-
I am attempting to update the font size of all the table cells using a particular class, so I tried to use the document object method
Does htmlNode only support a subset of the document object methods? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
htmlNode is a ShadowRoot https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot To get classNames from the htmlNode you can use htmlNode.querySelectorAll(".class-name") Or use a child element that has the htmlNode.lastChild.getElementsByClassName("class-name") |
Beta Was this translation helpful? Give feedback.
htmlNode is a ShadowRoot https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot
It inherets DocumentFragment https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
To get classNames from the htmlNode you can use
querySelectorAll
from the DocumentFragment https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment/querySelectorAllOr use a child element that has the
getElementsByClassName
function https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName.