Sets CSS variables on itself based on state changes under config.style.
This doesn't handle any logic related to light/dark theme: see
state-dark-theme-css-overrides.ts for that.
Returns a bitmask indicating the position of other relative to node.
Parameters
other: Node
Returns number
connectedCallback
connectedCallback(): void
Returns void
contains
contains(other): boolean
Returns true if other is an inclusive descendant of node, and false otherwise.
Parameters
other: null | Node
Returns boolean
defaultHtml
defaultHtml(source): void
Sets inner HTML if it's empty.
Parameters
source: string
Returns void
delegate
delegate(eventName, selector, callback): void
Responds to events on child elements.
Parameters
eventName: string
selector: string
callback: ((event, element) => void)
(event, element): void
Parameters
event: Event
element: HTMLElement
Returns void
Returns void
disconnectedCallback
disconnectedCallback(): void
Returns void
dispatchEvent
dispatchEvent(event): boolean
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Parameters
event: Event
Returns boolean
focus
focus(options?): void
Parameters
Optionaloptions: FocusOptions
Returns void
getAnimations
getAnimations(options?): Animation[]
Parameters
Optionaloptions: GetAnimationsOptions
Returns Animation[]
getAttribute
getAttribute(qualifiedName): null | string
Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
Rest...nodes: (string | Node)[]
Returns void
replaceWith
replaceWith(...nodes): void
Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
Rest...nodes: (string | Node)[]
Returns void
requestFullscreen
requestFullscreen(options?): Promise<void>
Displays element fullscreen and resolves promise when done.
When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
Parameters
Optionaloptions: FullscreenOptions
Returns Promise<void>
requestPointerLock
requestPointerLock(): void
Returns void
scroll
scroll(options?): void
Parameters
Optionaloptions: ScrollToOptions
Returns void
scroll(x, y): void
Parameters
x: number
y: number
Returns void
scrollBy
scrollBy(options?): void
Parameters
Optionaloptions: ScrollToOptions
Returns void
scrollBy(x, y): void
Parameters
x: number
y: number
Returns void
scrollIntoView
scrollIntoView(arg?): void
Parameters
Optionalarg: boolean | ScrollIntoViewOptions
Returns void
scrollTo
scrollTo(options?): void
Parameters
Optionaloptions: ScrollToOptions
Returns void
scrollTo(x, y): void
Parameters
x: number
y: number
Returns void
setAttribute
setAttribute(qualifiedName, value): void
Sets the value of element's first attribute whose qualified name is qualifiedName to value.
Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
Parameters
namespace: null | string
qualifiedName: string
value: string
Returns void
setAttributeNode
setAttributeNode(attr): null | Attr
Parameters
attr: Attr
Returns null | Attr
setAttributeNodeNS
setAttributeNodeNS(attr): null | Attr
Parameters
attr: Attr
Returns null | Attr
setPointerCapture
setPointerCapture(pointerId): void
Parameters
pointerId: number
Returns void
toggleAttribute
toggleAttribute(qualifiedName, force?): boolean
If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
Returns true if qualifiedName is now present, and false otherwise.
Parameters
qualifiedName: string
Optionalforce: boolean
Returns boolean
updateColor
updateColor(prefix, value): void
Updates color-related CSS variables for a particular prefix.
Parameters
prefix: string
value: string
Returns void
updateFont
updateFont(prefix, value): void
Updates font-related CSS variables for a prefix.
Parameters
prefix: string
value: string
Returns void
updateLineColor
updateLineColor(prefix, value): void
Updates line color-related CSS variables for a prefix. Similar to
#updateColor, but only uses the foreground color.
Sets CSS variables on itself based on state changes under
config.style
. This doesn't handle any logic related to light/dark theme: see state-dark-theme-css-overrides.ts for that.This is available as
<state-css-variables>
.