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
There are use-cases where `document.documentElement` does not contain the element.
In my case I was contributing to a Chrome Extension, and `document.documentElement` contained the background page only, which made the plugin stop working.
There might be a smarter way to do this, i.e. finding out if the element is visible - maybe by specifying the parent in some way. But it is rather an edge case, so this solution should be sufficient.
0 commit comments