Object of attribute names to property names
Flag indicating pending property changes are being processed
Flag indicating if element has been connected to DOM at least once
Element containing reference to underlying HTMLElement
implementation.
The element is proxied in this class to:
avoid clashes with HTMLElement
implementation details
make it easy to swap out for alternative implementations
Flag indicating if this is the first update to occur
Initial values of properties
Flag indicating if there are any pending changes in the current update cycle
Array of property names
Current values of properties <string, any>
Indicates if unreflected attributes should be removed on initialisation
Type of shadow root (open/closed) or falsey for none
Tag name that this component will be rendered within
Map of all properties to their new values, that have changed in the current update cycle
Promise that will resolve when all the current updates have been triggered
Holds the server implementation of a shadow root if required
Returns true if the component has been rendered on the server and has not yet been hydrated. Only true in client context
Object containing the element's attributes
The child nodes of this element
Set the child nodes of this element
The first child of this element
Set the innerHTML of underlying element
Element's node type
The parent of this element
The parent of this element
Property definitions Prop
The tag name of the original element. This is used internally by node-html-parser and needs to br proxied here so a ServerElement can be used everywhere node-html-parser's HTMLElement is
The element's tag name
Get the text content of underlying element
Set the text content of underlying element
A list of all attributes whose values should be used to set
properties, using attributeName
set in props if available
Property definitions
Static template string
Returns a getter for named property
Property name
Sets property value from named attribute
Property name
Attribute value
Sets attribute from named property value
Property name
Property value
Returns a setter method for named property
Property name
Append a child to the underlying element implementation
Element to append
Create and attach a shadow root, which on the server is an instance of a template ServerElement
Callback triggered when an attribute with a name matching a property name is changed
Attribute name
Old attribute value
New attribute value
Called when all pending property value changes have been processed, but before their targets have been updated. Changes made to properties in this callback will not trigger another update, but the updated values will be used for the current update.
A Map of properties and their old values that have changed in the current cycle
If an array of property names (or a Promise that resolves to an array) is
returned then those properties will not have their targets updated. If
a promise is returned then it will be await
ed
Called when an element is 'attached' to the DOM on the server. This is called explicitly on the server before rendering takes place
Called to initialise the component
Called after the initial update of this component has occurred.
Return the current value of names attribute
Attribute name
Retrieve the underlying element
Does this element have an attribute set with named key
Attribute name
Set up initial values of properties
Query underlying element for single match
CSS3 selector
Query underlying element for all matches
Proxy for getAttribute
in ServerElement ensuring
attributeChangedCallback
is called on this component
Manually request an update cycle to run
Proxy for setAttribute
in ServerElement ensuring
attributeChangedCallback
is called on this component
Sets all attributes at once
Value to set
Update the underlying element to new element
Set initial property values
Trigger an update to the component that will be run at the end of the current task
Update property targets for all properties whose values have changed or have been manually requested
Returns a promise that will resolve when the current update cycle is complete, or immediately if there is no update pending.
Promise resolves when all pending updates have been processed
registry of tag names to Wafer component definitions
Update the targets for property
Called when all pending property target updates have been called. Changes made to properties in this callback will trigger another update cycle.
A Map of properties and their old values that have had their targets updated in the current cycle.
If a promise is returned then it will be
await
ed - this is useful in a server context where, if further work is
initiated that results in property changes (and targets updated), the
response shouldn't be set until all changes have been processed.
Generated using TypeDoc
Registry of components and their Wafer definitions that should be upgraded if found in the component template