Hello, I've been experimenting with creating a polyfill to isolate styles from shadow DOM elements. It has been fairly straight-forward creating a script that isolates CSS rules from the children of arbitrary DOM elements in a stand alone package but I've run into some issues with the MutationObserver while trying to integrate with Polymer's webcomponents.js. The 'childList' mutations for shadowRoot children never trigger and attribute mutations to custom element ancestors are not triggered either.
Please take a look at my code: https://github.com/numtel/shadowstyles You can see the webcomponent.js integration in test/mockup/webcomponent.html View in Firefox <=33 or IE 9/10 to see effects If you click the 'Attribute Change Test' button first, the MutationObserver picks up the class change and performs the update. If the 'Insert Test' button is clicked first, the child insertion is never observed. Then click the 'Attribute Change Test' button, no attribute changes are observed. The 'Ancestor Attribute Change Test' fails completely. Also, any idea on how to access the original querySelector methods without a shim before loading webcomponents.js would be helpful. Thanks Ben Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/a43d8faa-03dc-4cfb-9eb2-c520eaf0daef%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
