Class And ID Functions
assignClassAndIdToPart
Return Type
undefined
Takes a shadow root as a parameter and then queries for any of its decendants that have id
or class
attributes.
For each element returned by the query, the function assigns the element's id
attribute value, and each of its class
values, to its part
attribute.
Parameters
Name | Description | Value Type | Default Value |
---|---|---|---|
shadowRoot
|
The shadow root of the target custom element. |
ShadowRoot
|
|
assignIdToPart
Return Type
undefined
Takes a shadow root as a parameter and then queries for any of its decendants that have an id
attribute.
For each element returned by the query, the function assigns the element's id
attribute value to its part
attribute.
Parameters
Name | Description | Value Type | Default Value |
---|---|---|---|
shadowRoot
|
The shadow root of the target custom element. |
ShadowRoot
|
|
assignClassToPart
Return Type
undefined
Takes a shadow root as a parameter and then queries for any of its decendants that have class
attributes.
For each element returned by the query, the function assigns the element's class
values, to its part
attribute.
Parameters
Name | Description | Value Type | Default Value |
---|---|---|---|
shadowRoot
|
The shadow root of the target custom element. |
ShadowRoot
|
|