[Bug 26213] Need a shadowRoots MutationObserver option

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26213

--- Comment #2 from Elliott Sprehn <esprehn@gmail.com> ---
(In reply to Olli Pettay from comment #1)
> And I thought it was one of the main points of Shadow DOM to hide its
> internals
> from the outside world...
> 
> If you need to know about the internals of shadow DOM, you probably shouldn't
> use it at all, but just plain normal DOM, IMHO.

Shadow DOM is about making sure consumers don't accidentally access the
internals.

The current approach is to replace Element.prototype.createShadowRoot which I
think makes Gecko go into slow mode, and doesn't work from isolated script
contexts that extensions run inside.

It's also brittle since libraries are fighting to be first so they can replace
the built in function before anyone uses it.

> 
> 
> (Somewhat similar use case to bug 24861#c4 came up in
>  FFOS localization. Though, there whenever a component wants to be
>  localizable can register itself to some global service after
>  shadow dom creation.)

This doesn't work in use cases for global attribute polyfills or libraries that
use them, or for extensions.

Instead of library authors hacking around us, we should just give them this
ability.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 26 June 2014 23:04:09 UTC