@vttforge/core / FoundryApplications
Interface: FoundryApplications ​
foundry.applications.
Properties ​
api ​
readonlyapi:FoundryApplicationsApi
apps ​
readonlyapps:FoundryClassNamespace<"DocumentSheetConfig"|"FilePicker"|"ImagePopout">
fields ​
readonlyfields:Readonly<Record<string, (...args) =>HTMLElement>>
Form input builders: createFormGroup, createSelectInput and the rest.
unknown[], not never[]. A never[] rest parameter accepts no argument at all, so every real call fails with "not assignable to parameter of type 'never'".
handlebars ​
readonlyhandlebars:object
loadTemplates() ​
loadTemplates(
paths):Promise<unknown>
Warm the template cache, usually in init.
Parameters ​
paths ​
readonly string[] | Record<string, string>
Returns ​
Promise<unknown>
renderTemplate() ​
renderTemplate(
path,context):Promise<string>
Render one template with a context.
Parameters ​
path ​
string
context ​
unknown
Returns ​
Promise<string>
instances ​
readonlyinstances:ReadonlyMap<string,object>
Every open application, keyed by its id.
v13 removed ui.windows, and this replaced it. The value is object rather than a shape: a package finds its own window with instanceof, and then it has the class it wrote.
for (const app of foundry.applications.instances.values()) {
if (app instanceof MyViewer) app.refresh();
}sheets ​
readonlysheets:FoundryClassNamespace<"ActiveEffectConfig"|"ActorSheetV2"|"ItemSheetV2"|"MacroConfig"|"SceneConfig"|"TokenConfig">
ux ​
readonlyux:Readonly<Record<"ContextMenu"|"DragDrop"|"Draggable"|"FormDataExtended"|"ProseMirrorEditor"|"SearchFilter"|"Tabs",AnyClass>> &Readonly<Record<string,AnyClass|undefined>> &object
Type Declaration ​
TextEditor ​
readonlyTextEditor:object
TextEditor.implementation ​
readonlyimplementation:TextEditorImplementation