Polymer app won't load in Safari (pre-1.0)

2019-08-10 14:46发布

问题:

A load of errors, and my app won't load. True on desktop (OSX El Capitan) and mobile (iOS9).

http://d.pr/i/1lvBa

Errors like:

TypeError: Attempting to change configurable attribute of unconfigurable property.

ReferenceError: Can't find variable: HTMLImports
    (anonymous function)
    atEndOfMicrotask

TypeError: document.registerElement is not a function. (In 'document.registerElement('polymer-element', {prototype: prototype})', 'document.registerElement' is undefined)

And more...

My Polymer (Dart) version is 0.16.3+3.

回答1:

I assume you run into this issue https://github.com/dart-lang/polymer-dart/issues/538

It appears that problem is in outdated web_components, i got it all working on iOS 9 and OSX 10.11 by overriding web_components in my yams file by adding:

dependency_overrides: web_components: "^0.12.0+3"