dart-archive / web-components

Dart package providing the web components platform polyfills
https://pub.dartlang.org/packages/web_components
BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

if using .appendHtml, elements are upgraded asynchronously, why? #4

Closed jakemac53 closed 9 years ago

jakemac53 commented 9 years ago

See custom_element_proxy_test.dart. Can we make this not so?

jakemac53 commented 9 years ago

Not that this only happens in browsers with the shadowdom polyfill active

jakemac53 commented 9 years ago

@jmesserly any idea if the polyfill itself could be introducing this?

jmesserly commented 9 years ago

CE polyfill is async. It uses MutationObservers to detect new elements. To do better it would have to work more like SD polyfill, and patch innerHTML setter (and appendChild etc). Maybe open an issue on https://github.com/webcomponents/webcomponentsjs? The risk though is DOM performance might suffer, so not sure if it's worth changing the default.

jakemac53 commented 9 years ago

fair enough, I created https://github.com/webcomponents/webcomponentsjs/issues/169 to track this but its not a blocker for now at least.

jakemac53 commented 9 years ago

closing as not planned, at least for now