-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Shadow DOM support to Elements tab #158
Comments
I haven't gotten too much into Eruda's structure, or how it builds the UI elements, but the areas I see that catch my attention are The code can be adjusted as follows; eruda-dom/src/index.js Line 115 // From
const childCount = child.childNodes.length;
// To
const childCount = (!child.shadowRoot) ? child.childNodes.length : child.shadowRoot.childNodes.length; eruda/src/Elements/Elements.js Line 291 // From
ret.children = formatChildNodes(el.childNodes)
// To
ret.children = formatChildNodes((!el.shadowRoot) ? el.childNodes : el.shadowRoot.childNodes); |
I've created a pull request with eruda/shadow-dom, view it here |
Use version 3.4.0 |
Unsure about the exact implementation. Several caveats: ---- Rough test with the coined: <meta charset="UTF-8" />
<div id="host">
<pre>Invisible Outer</pre>
<!-- ^ Placed after the adjacent "<template>". (rendered) -->
<template shadowrootmode="open">
<span>Shadow DOM</span>
<div id="host2">
<template shadowrootmode="open">
<pre>Visible</pre>
</template>
<pre>Invisible Inner</pre>
</div>
</template>
</div> ]] Related: |
add feature to copy unique selector for elements including shadow |
I think, it'd be a great enhancement if we could inspect the shadowRoot on HTML elements, as currently it is completely unsupported by eruda.
The text was updated successfully, but these errors were encountered: