In order to remove XBL bindings in-content, I'd like to be able to create a shadow root and move content into it without the page seeing it. For example, the <marquee> element could create a UA shadow root and then put the light dom inside of a wrapper element that moves around. The in-content bindings I suspect this would be useful for are: 1) <marquee> 2) XML pretty printing 3) <videocontrols> 4) plugin problem ui I believe that (1) and (2) could be implemented just with this feature, while (3) and (4) will require some kind of js environment in addition to this.
Here's an example of how this looks in chromium: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLMarqueeElement.cpp?rcl=545ae8c4766e100e92936a13018d3106cb8cbc4a&l=57-79
I wonder if we can modify the stuff used by the DevTools highlighter to support injecting elsewhere than the canvas frame: https://dxr.mozilla.org/mozilla-central/source/dom/webidl/AnonymousContent.webidl
> 2) XML pretty printing For XML pretty printing, a possibility is to support XML files similarly to how JSON files are supported by the devtools JSON viewer. Would be interesting to sync this on the DevTools' roadmap.
The JSON viewer has a bunch of problems compared to the XML viewer, starting with the fact that the DOM it exposes is not the right DOM...
FWIW I think we can turn the XML pretty printing into HTML with no JS by modifying the existing XSLT to render out appropriate <details> / <summary> tags. Then we need a way to place to put that DOM - I was thinking this could be in a UA shadow root (attached to the root element), although I believe we also discussed somehow using the existing native anon content / CanvasFrame similar to how the devtools highlighters work.
(In reply to Tim Nguyen :ntim from comment #2) > I wonder if we can modify the stuff used by the DevTools highlighter to > support injecting elsewhere than the canvas frame: > https://dxr.mozilla.org/mozilla-central/source/dom/webidl/AnonymousContent. > webidl I'd be interested in considering this for the highlighter use case. I am tracking various new pathways for highlighters over in bug 1411122.
You need to log in before you can comment on or make changes to this bug.