A composable class for managing functionality for secret blocks within DocumentSheets.

See

DocumentSheet

Example: Activate secret revealing functionality within a certain block of content.

const secrets = new HTMLSecret({
selector: "section.secret[id]",
callbacks: {
content: this._getSecretContent.bind(this),
update: this._updateSecret.bind(this)
}
});
secrets.bind(html);

Constructors

Methods

Constructors

Methods

  • Add event listeners to the targeted secret blocks.

    Parameters

    • html: HTMLElement

      The HTML content to select secret blocks from.

    Returns void

  • Protected

    Handle toggling a secret's revealed state.

    Parameters

    • event: MouseEvent

      The triggering click event.

    Returns Promise<ClientDocument>

    The Document whose content was modified.