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
Passing a custom document object can be useful. My use case is shadow DOMs: the contents of the shadow DOMs are not available to document.querySelectorAll, but are available to shadowRoot.querySelectorAll.
Although not documented, this plugin accepts a document option in init, which defaults to document (i.e. window.document). This was added by commit 6d6569d.
However, this change does not support passing a custom document to the handle function. This would allow using a different document object within the same project.
I am preparing a pull request to solve this.
The text was updated successfully, but these errors were encountered:
thjungers
changed the title
Pass a different document object to the options of handle
Pass a custom document object to the options of handle
Mar 28, 2023
Passing a custom
document
object can be useful. My use case is shadow DOMs: the contents of the shadow DOMs are not available todocument.querySelectorAll
, but are available toshadowRoot.querySelectorAll
.Although not documented, this plugin accepts a
document
option ininit
, which defaults todocument
(i.e.window.document
). This was added by commit 6d6569d.However, this change does not support passing a custom document to the
handle
function. This would allow using a different document object within the same project.I am preparing a pull request to solve this.
The text was updated successfully, but these errors were encountered: