dart2js compiled Polymer Dart application is not running in IE 11

Issue

I am unable to get a dart2js compiled polymer dart project to even load in IE 11. I am a bit confused since it runs in Chrome and Firefox perfectly fine. Here are my steps:

  • Used stagehand to create a new web-polymer application.
  • Without changing any dependencies, I ran pub get.
  • Ran the application in Dartium using Webstorm’s Open in Browser -> Dartium and verified the string reversing sample loaded.
  • Ran pub build to compile my project into JavaScript.
  • Navigated to my build\web directory, and started up a simple HTTP server (python -m SimpleHTTPServer or node’s http-server)
  • Opened the IP address and port listed in Chrome and Firefox, application worked as expected
  • Opened the IP address and port listed in IE 11 and got a blank page.

I did open up the developer tools in IE 11 and noticed an error being thrown from my index.bootstrap.initialize.dart.js file with the text “Unsupported operation: extendsTag does not match base native class”

Again I did not change anything, I was just curious to see the compiled application run. Is there something I am missing or forgot to do to get this to run in IE 11?

Solution

Seems you run into this issue https://github.com/dart-lang/polymer-dart/issues/682

It looks like this does work if you use the full polyfill (webcomponents.js not webcomponents-lite.js).

Looks like this is caused by the template element not existing on IE. The full polyfill adds it which is why that works, where the lite version doesn’t do a full polyfill.

Answered By – Günter Zöchbauer

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.