Options
All
  • Public
  • Public/Protected
  • All
Menu

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);

Hierarchy

  • HTMLSecret

Index

Constructors

Methods

  • bind(html: HTMLElement): void
  • Add event listeners to the targeted secret blocks.

    Parameters

    • html: HTMLElement

      The HTML content to select secret blocks from.

    Returns void

  • _onToggleSecret(event: MouseEvent): Promise<Document>
  • Handle toggling a secret's revealed state.

    Parameters

    • event: MouseEvent

      The triggering click event.

    Returns Promise<Document>

    The Document whose content was modified.