Class CustomContentBaseAbstract

Hierarchy (view full)

Constructors

Properties

activateDefaultSheetListeners?: boolean

An optional override to whether the target content should use default sheet event listeners. Defaults to false.

Remarks

The default sheet listeners pertain to the default 5e sheets. Behaviors include but are not limited to

  • data-action click handling
  • drag-and-drop behaviors
  • rollable items click handling
  • item controls click handling
  • proficiency toggling
  • ... etc.

Leaving this field false means you wish to take full control of the event handling of your content.

enabled?: ((context) => boolean)

Optional function to determine whether the content should be rendered. When excluded, it defaults to true.

Type declaration

    • (context): boolean
    • Parameters

      • context: any

      Returns boolean

onContentReady?: ((params) => void)

After the custom content has been prepared for rendering and is ready to inject into the sheet, this callback is invoked.

Type declaration

Remarks

For more complex HTML insertion scenarios, one can skip CustomContentInjectParams and simply inject the prepared content with this callback.

This callback is also useful for quick debug logging of the content to be rendered.

onRender?: ((params) => void)

Optional function which is called each time a change detection cycle occurs on the sheet. This is any time a FormApplication would normally call render().

Type declaration

renderScheme?: RenderScheme

Optionally determines whether to refresh content each time an application render occurs.

For svelte-based content, the default is "force". For HTML and Handlebars content, the default is "handlebars".