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)
optionalhgroupInHeader
Whether heading group should be embedded within the header or not, with the alternative placing them below each other
optionalleftContent
Whether an extra aside.screen-aside-l section should be added to the left of .screen-main
optionalmainContent
Content for within the main section (see .screen-main)
optionalmainSection
Which section should be marked as <main> (if any).
Defaults to center if unspecified.
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)
optionalrightContent
Whether an extra aside.screen-aside-r section should be added to the right of .screen-main
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
setHeading
Set the persistent heading of a screen.
Parameters
root: ElementOrId
The screen on which the heading is the be set
heading: string | Element | readonly (string | Element)[]
The to-be displayed heading content. Note that headings may only ever contain flow content
Returns void
setStatus
Set a temporary status message for the screen.
Parameters
root: ElementOrId
The screen on which the status is the be set; it must contain a single
h1and[role='status']elementstatus: string | Element | readonly (string | Element)[]
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