0

皇冠hg0088代理网址I am trying to access a button (class bt-close-onboarding) inside shadow-root using document.querySelector, but when I try to access the shadow-root, it returns null

I startet building the query like this:

document.querySelector('body > brad-root > div.center > #app-wrapper > brad-app-home > )

but when i insert shadow-root in the query it returns null

  • shadow-root is not an element on its own and can't be used in selectors. There is a shadowRoot propertty of custom elements, i.e. const appRoot = document.querySelector('brad-app-home').shadowRoot then appRoot.querySelector('.bt-close-onboarding') – pawel Jul 14 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.