activitypub-actor-tester/README

This page excerpts the README of activitypub-actor-tester. Find the entirety of the source code in the repository.

activitypub-actor-tester

An HTML element that renders a tool for testing an ActivityPub Actor using activitypub-testing/test-actor

Usage

Use the element in your HTML wherever you want it to appear.

<activitypub-actor-tester></activitypub-actor-tester>

Add the custom element definition via a script tag, e.g.

<script
  src="https://cdn.jsdelivr.net/npm/activitypub-actor-tester@0.2.2/dist/activitypub-actor-tester.js"
  integrity="sha384-LA7dbf/ovh5DDtqSW+DNFa7Z099LvPbl9pW6+Mb0wXYmH6QAMdDNseKglnSQcYST"
  type="module"
  crossorigin="anonymous"
></script>

Attributes

Configure the <activitypub-actor-tester /> element by adding HTML Attributes.

actor

URL of the ActivityPub Actor that should be tested.

Default: The URL of the document the activitypub-actor-tester is contained within (i.e. globalThis.document.location.toString()).

Example

<activitypub-actor-tester
  actor="https://socialweb.coop"
></activitypub-actor-tester>

test

When set, tests will run automatically as soon as the activitypub-actor-tester is connected to a document. When unset, the tests are not run until the "Test..." button is clicked.

Default: unset

Example

<activitypub-actor-tester
  test
></activitypub-actor-tester>

Note: even if the value of the test attribute is false, the tests will run, because the string "false" is truthy. See Boolean attributes @lit.dev.