Closed Bug 1482394 Opened 6 years ago Closed 6 years ago

Consider using #document-fragment instead of #shadow-root ?

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ladybenko, Unassigned)

References

(Blocks 1 open bug)

Details

We have a bit of disonance, in which we have a `#document-fragment` node that is shown as a `#shadow-root`(when it is a shadow root fragment) in some places, but potentially not in others.

We should really use one display string for fragments that are shadow roots, everywhere in our panels:

a) Always use #shadow-root
b) Always use #document-fragment

In case of b), we could add a note besides the display name to identify it as a shadow dom too in the mark up view (where we display the shadow root mode). Right now the markup view renders:

```
#shadow-root (<open/closed>)
```

We could have:

```
#document-fragmnet - shadow root (<open/closed>)
```
> We should really use one display string for fragments that are shadow roots, everywhere in our panels:

What are the other places where we show (or are planning to show) a display string for shadow roots? As for Reps / console, it looks like we currently show ShadowRoot { } when inspecting one.

> a) Always use #shadow-root
> b) Always use #document-fragment

I prefer (a) since it's technically distinct from a document fragment (https://dom.spec.whatwg.org/#shadowroot), and it's a more helpful search term for people who might see it in the markup view and not know what it is.
Priority: -- → P3
We're sticking to `#shadow-root`
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.