You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Citry UI: check for a shadow root before reading getRootNode().host #542
getRootNode() returns a ShadowRoot only when the node is inside a shadow tree. For a node in a detached subtree it returns the subtree's top element. If that element is an <a href> or an <area href>, .host is the link's URL host, a string such as "example.com". The loop then passes that string to contains() or calls getRootNode() on it, and the script throws a TypeError.
This has not been seen in practice. It needs a node that the component handles while it sits in a detached subtree under a link.
The scripts that TypeScript checks were fixed in #534. They now test instanceof ShadowRoot before reading .host, as _anchored_layer.py and _form_control_runtime.py do. The scripts below are not checked, because they are the sources of minified files.
Places to fix
ctour/runtime.source.js: composedContains (line 334) and the ancestor-root loop (line 355).
ccascader/runtime.source.js: composedContains (line 170) and the ancestor-root loop (line 193).
ccolor_picker/runtime.source.js: composedContains and listenForAncestorClose (lines 40 and 46).
cselect/runtime.source.js: the parent walk at line 121.
ccontext_menu/runtime.source.js: the parent walks at lines 536, 565 and 1453.
Activity