top | item 9620190

(no title)

mrisse | 10 years ago

Do web components have a chance when a polyfills are required for iOS? Does anyone have any experience w/ Polymer performance on iOS?

discuss

order

trevordixon|10 years ago

Polymer 1.0 uses "Shady DOM" instead of a full shadow DOM polyfill. According to https://www.polymer-project.org/1.0/articles/shadydom.html, "Many projects simply cannot afford the Shadow DOM Polyfill, for the reasons given above. In particular, the performance costs on platforms like mobile Safari are nearly intolerable."

"Polyfilling shadow DOM is hard, the robust polyfill is invasive and slow. Shady DOM is a super-fast shim for shadow DOM that provides tree-scoping, but has drawbacks. Most importantly, one must use the shady DOM APIs to work with scoped trees."

So it sounds like this lighter, less complete Shady DOM half-polyfill that 1.0 uses is specifically made to make performance acceptable on iOS.

spankalee|10 years ago

Exactly. Performance under iOS is great with Shady DOM, at the expense of needing to use its APIs to get the effects of DOM scoping and composition.

spankalee|10 years ago

There has been major progress on getting all browser vendors to agree on Shadow DOM. It sounds like the final details will be hammered out soon (this summer) and implementation will start shortly after that.