Shows either header or footer content. This is available as
<marginal-content> and the type of content to show is set via its type
attribute. type must be either header or footer; any other value, or
omitting this attribute, will cause it to throw an error.
Inserts nodes just after node, 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
allChildInputsValid
allChildInputsValid(): boolean
Returns whether all input child elements are valid (for example, if they
are required, a value has been entered). If any are invalid, this
requests that the browser show a validation message for them.
Optionaloptions: number | KeyframeAnimationOptions
Returns Animation
append
append(...nodes): void
Inserts nodes after the last child of node, 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
appendChild
appendChild<T>(node): T
Type Parameters
T extends Node<T>
Parameters
node: T
Returns T
attachInternals
attachInternals(): ElementInternals
Returns ElementInternals
attachShadow
attachShadow(init): ShadowRoot
Creates a shadow root for element and returns it.
Parameters
init: ShadowRootInit
Returns ShadowRoot
before
before(...nodes): void
Inserts nodes just before node, 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
blur
blur(): void
Returns void
changeContent
changeContent(callback): Promise<void>
Changes content using a transition. Unlike BodyContent, this doesn't
dispatch an event on completion because the UI only so far needs to react
to body content changing.
Parameters
callback: ((el) => void | Promise<void>)
(el): void | Promise<void>
Parameters
el: HTMLElement
Returns void | Promise<void>
Returns Promise<void>
click
click(): void
Returns void
cloneNode
cloneNode(deep?): Node
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
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.
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
Parameters
qualifiedName: string
Returns boolean
hasAttributeNS
hasAttributeNS(namespace, localName): boolean
Returns true if element has an attribute whose namespace is namespace and local name is localName.
Parameters
namespace: null | string
localName: string
Returns boolean
hasAttributes
hasAttributes(): boolean
Returns true if element has attributes, and false otherwise.
Returns boolean
hasChildNodes
hasChildNodes(): boolean
Returns whether node has children.
Returns boolean
hasPointerCapture
hasPointerCapture(pointerId): boolean
Parameters
pointerId: number
Returns boolean
insertAdjacentElement
insertAdjacentElement(where, element): null | Element
Parameters
where: InsertPosition
element: Element
Returns null | Element
insertAdjacentHTML
insertAdjacentHTML(position, text): void
Parameters
position: InsertPosition
text: string
Returns void
insertAdjacentText
insertAdjacentText(where, data): void
Parameters
where: InsertPosition
data: string
Returns void
insertBefore
insertBefore<T>(node, child): T
Type Parameters
T extends Node<T>
Parameters
node: T
child: null | Node
Returns T
isDefaultNamespace
isDefaultNamespace(namespace): boolean
Parameters
namespace: null | string
Returns boolean
isEqualNode
isEqualNode(otherNode): boolean
Returns whether node and otherNode have the same properties.
Parameters
otherNode: null | Node
Returns boolean
isSameNode
isSameNode(otherNode): boolean
Parameters
otherNode: null | Node
Returns boolean
lookupNamespaceURI
lookupNamespaceURI(prefix): null | string
Parameters
prefix: null | string
Returns null | string
lookupPrefix
lookupPrefix(namespace): null | string
Parameters
namespace: null | string
Returns null | string
matches
matches(selectors): boolean
Returns true if matching selectors against element's root yields element, and false otherwise.
Parameters
selectors: string
Returns boolean
moveContentsOffscreen
moveContentsOffscreen(): HTMLDivElement
Moves all child content to an offscreen <div> which is returned, then
copies the content back into this container. This is done in preparation
for a display transition. This causes child content to potentially lose
event handlers.
Returns HTMLDivElement
normalize
normalize(): void
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
Returns void
prepend
prepend(...nodes): void
Inserts nodes before the first child of node, 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
query
query<T>(selector): T
Selects a child element, throwing an error if it can't be found.
Type Parameters
T = HTMLElement
Parameters
selector: string
Returns T
queryAll
queryAll(selector): HTMLElement[]
Selects all child elements matching a selector, returning an empty array if
none match.
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.
Shows either header or footer content. This is available as
<marginal-content>
and the type of content to show is set via itstype
attribute.type
must be eitherheader
orfooter
; any other value, or omitting this attribute, will cause it to throw an error.