AboutSupportDeveloper GuideVersion 40.130.100.7

Namespace for events that can emitted on the HTMLElement of the Layout container.

Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.

Note that the Layout DOM events are emitted on the Layout container element itself, and not globally typed. To introduce your own typing, you can declare these events in a separate d.ts file and augment the GlobalEventHandlersEventMap:

declare global {
interface GlobalEventHandlersEventMap {
'tab-created': CustomEvent<OpenFin.LayoutDOMEvents.TabCreatedEvent>;
'tab-closed': CustomEvent<OpenFin.LayoutDOMEvents.TabClosedEvent>;
'tab-dropped': CustomEvent<OpenFin.LayoutDOMEvents.TabDroppedEvent>;
'container-created': CustomEvent<OpenFin.LayoutDOMEvents.ContainerCreatedEvent>;
'layout-state-changed': CustomEvent<OpenFin.LayoutDOMEvents.LayoutStateChangedEvent>;
}
}

Then, make sure this is included in your tsconfig.json:

"compilerOptions": {
"include": ["path/to/your/typings.d.ts"]
}

Now you will be able to get typed event listeners when using container.addEventListener on the Layout container element.

Index

Interfaces

Type Aliases