forked from yaronn/xpath.js
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shadow DOM support #142
Comments
From what I see, in PathExpr.applyLocationPath, we shouldn't have Moreover, in PathExpr.applySteps, it seems that for shadow DOM, the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I want to use the library to evaluate xPath in shadow DOMs in HTML, but have a problem when I use it with absolute xPath.
Per definition, absolute XPath should look for the target in all of the document, but the document itself does not have access to the content of shadow DOM (which are
document-fragment
). In my case, the case where we use Shadow DOM as a document and have the absolute xpath only inside it, is enough. Is there a way to achieve it ?Here is the HTML and Javascript used:
The screenshot from the devTools
And the console
The text was updated successfully, but these errors were encountered: