Closed rakesh-barla closed 7 years ago
I was able to replicate this. Using the code in the OP (including pubspec library versions), I get this stack trace (as best as I could copy from IE11...)
_IsolateContext.eval$1 [Line: 468, Col: 29], isolate_helper.dart
_callInIsolate [Line: 53, Col: 1], isolate_helper.dart
Anonymous function [Line: 2375, Col: 7], js_helper.dart
Anonymous function [Line: 2395, Col: 14], js_helper.dart
It is referencing "_globalState.rootContext" where "_globalState" is undefined.
I also get this using the default Dart Polymer project created by IntelliJ.
Windows 8.1 IE 11.0.9600.18161 IntelliJ IDEA 15.0.3 Dart 1.14.1 (will try 1.14.2 when I get a chance to see if this still occurs there)
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.
Looks like including the full polyfill only makes things work until you actually use an element which extends TemplateElement, at which point it will still fail (see polymer stagehand app for instance).
I have the same stack trace (terminating in isolate_helper.dart:468) when I run a combined Dart + Polymer/JS application in the iOS 9.2 WKWebView. This code works perfectly on Safari Desktop and Mobile when loaded as a normal web page. The problem appears only in WKWebView. Note, I am running the code in Cordova and everything is loaded via file://, however, WKWebView has an issue whereby it refuses to perform a file: XHR request. That means that the web component polyfil cannot load linked html components as it normally would. The work arounds are i) run a internal web server, or ii) vulcanize index.html to pull all components into a single file so that no file:// XHR is necessary to load them. I only get this error if I use approach ii - vulcanizing the elements into index.hml. The Polymer code appears to start up just fine. It's just the dart code that breaks. If I run an embedded web server in the iOS app, and the WKWebView loads via that, then everything is fine with both Polymer and Dart (although that has other issues, and is not a permanent solution). While this is not the particular bug you are tracking here, it seems related.
The error occurs even if I exclude my dart code from the vulcanized index.html so that it loads via a normal script tag. I'm running Dart 1.15.0. Also, I'm using csp output from dart2js.
Is the root problem known for this bug?
I based my app on the Stagehand one, so now it doesn't work in Internet Explorer even though I'm not using <template>
anywhere else. How do I move everything out of the template and put it in the main page?
I have created a standalone repro of this here, https://github.com/jakemac53/extend-template-repro/. It looks like a dart2js/dart:html issue. @sigmundch
I finally landed a fix in dart2js/dart:html to make it feasible to use the webcomponents-lite polyfill on IE11. I noticed also that the polyfill had a bug that was fixed in it's version 7.22, I was about to roll the polyfills today but Matias just did it :)
Combining the two fixes makes both the repro and the stagehand example work on IE11!
Fixes have landed in the source tree, they will be available on the next release of the sdk and the web components package. That should be:
I am trying to run the following sample project : https://github.com/montyr75/pdcl_first_elements
Its working in Chrome and Firefox but not working in IE 11.
In F12 developer tools console it giving this error :
File: index.bootstrap.initialize.dart.js, Line: 1483, Column: 15
I checked IE 11 on browserstack also, same issue.
I am using Eclipse Mars IDE.
So i tried a new project like below :
Pubspec.yaml
in index.html
in index.dart
in lib/main_app.html :
in lib/main_app.dart :
When I run this I get the same error in IE 11.
please help...