ElementDOMScreen
Index
Interfaces
Functions
Interfaces
TemplateOptions
Options for customizing the ElementDOMScreen.GetTemplate output
optionalasShadow
Whether to content of the DOM screen root is embedded within a shadow root or not, storing the DOM tree in an isolated namespace with its own set of element IDs and CSS style sheets
optionalcssFiles
Additional CSS files to load when the asShadow
option is specified
optionalheader
Text content for within the heading (see .screen-hgroup h1
)
optionalmainContent
Content for within the main section (see .screen-main
)
optionalmainTag
Whether the main section (see .screen-main
) is a <main>
or <aside>
element.
As a rule of thumb: use "main"
(aka the default) unless another <main>
element is already visible on the page,
as the HTML spec demands that only a single non-hidden main element may be present at any time.
optionalmenubarButtons
Buttons for in the header's menubar (see .screen-header [role="menubar"]
)
optionalparent
The parent element of the to-be returned screen (if any)
Functions
getTemplate
Construct and return a template for a basic DOM screen.
Important points:
- Screen dimensions of
[x, 0, y, 1000]
are generally recommended - The standard child elements of the to-be returned screen may freely be moved around in the DOM tree as one sees fit
- The standard child elements of the to-be returned screen should not be removed; do so at your own risk. They may remain unused however.
Parameters
id: string
The ID of the screen
options: TemplateOptions = null
Further customization options
Returns HTMLDivElement
- The newly created DOM screen
- Screen dimensions of
setStatus
Set a temporary status message for the screen.
Parameters
root: HTMLElement
The screen on which the status is the be set; it must contain a single
h1
and[role='status']
elementstatus: string
The to-be displayed status message
timeout: number = 5000
How long the status message should be shown in ms; defaults to 5000 ms
Returns void
Namespace with helper functions for creating DOM-based screens