Closed Bug 1478589 Opened 6 years ago Closed 6 years ago

The counting of nodes includes also the comment node + shadow root

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: Ovidiu, Unassigned)

References

(Blocks 1 open bug)

Details

This bug was filed after a discussion with Julian on slack about the fact that the comment node + shadow root are additional nodes and if they need to be counted or not. 

STR:

Go to https://juliandescottes.github.io/webcomponents-playground/test-too-many-light-dom/
Open Inspector
Expand the body
Scroll down until you see "Some nodes were hidden"

Actual results: You have a button with the text "Show all 202 nodes". Here is a print screen https://imgur.com/a/oqys5PK

Expected results: There is a comment node + shadow root - 2 additional nodes.
Component: General → Inspector
Component: Inspector → General
Component: General → Inspector
Small precision, while it is fine to have the comment node counted as a "node", for the shadow-root, the label might be slightly confusing. 

It is a line as far as the markup view is concerned, but should we really say "nodes"? A shadow-root is a node, but it's not really a child of the parent under which we display it. Can't think of a better term at the moment.
After a discussion about this: shadow roots and comments are technically nodes. We believe users working with Shadow DOM are aware of this, so changing the count to not include them would probably not make sense.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.