@vttforge/core / InjectOptions
Interface: InjectOptions<App>
Type Parameters
App
App = unknown
Properties
hook
readonlyhook:string
The render hook, such as renderActorDirectory or renderActorSheetV2. Render hooks fire once per class in the chain, so the base class name catches every sheet and the exact class name catches one.
id
readonlyid:string
Package id. Namespaces the marker, so two packages cannot fight.
into?
readonlyoptionalinto?:string
CSS selector for the node to insert around, searched inside the rendered element. Left out, the rendered element itself is used, and position is then limited to 'append' and 'prepend'.
name
readonlyname:string
Name for this injection, unique within the package. It is half the marker, and what a second render looks for before inserting again.
position?
readonlyoptionalposition?:InjectPosition
Default 'append'. 'before', 'after' and 'replace' need into: without it they would put the node outside the application.
render
readonlyrender: (app,element) =>HTMLElement|null
Build what to insert. Return null to insert nothing, which still removes anything a previous render left.
Parameters
app
App
element
HTMLElement
Returns
HTMLElement | null
when?
readonlyoptionalwhen?: (app,element) =>boolean
Skip the injection entirely when this returns false.
Parameters
app
App
element
HTMLElement
Returns
boolean