简体   繁体   English

dart2js编译的Polymer Dart应用程序未在IE 11中运行

[英]dart2js compiled Polymer Dart application is not running in IE 11

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. 我无法获得dart2js编译的聚合物dart项目甚至无法在IE 11中加载。我有点困惑,因为它可以在Chrome和Firefox中正常运行。 Here are my steps: 这是我的步骤:

  • Used stagehand to create a new web-polymer application. 使用stagehand创建新的网络聚合物应用程序。
  • Without changing any dependencies, I ran pub get. 在不更改任何依赖的情况下,我运行了pub get。
  • Ran the application in Dartium using Webstorm's Open in Browser -> Dartium and verified the string reversing sample loaded. 使用Webstorm的“在浏览器中打开”-> Dartium在Dartium中运行该应用程序,并验证加载的字符串反转样本。
  • Ran pub build to compile my project into JavaScript. Ran pub build将我的项目编译为JavaScript。
  • Navigated to my build\\web directory, and started up a simple HTTP server (python -m SimpleHTTPServer or node's http-server) 导航到我的build \\ web目录,并启动一个简单的HTTP服务器(python -m SimpleHTTPServer或节点的http服务器)
  • Opened the IP address and port listed in Chrome and Firefox, application worked as expected 打开Chrome和Firefox中列出的IP地址和端口,应用程序按预期工作
  • Opened the IP address and port listed in IE 11 and got a blank page. 打开IE 11中列出的IP地址和端口,并得到一个空白页。

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" 我确实在IE 11中打开了开发人员工具,并注意到从index.bootstrap.initialize.dart.js文件中抛出了一个错误,文本为“不支持的操作:extendTag与基本本机类不匹配”

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? 有什么我想念或忘记做的事情才能让它在IE 11中运行吗?

Seems you run into this issue https://github.com/dart-lang/polymer-dart/issues/682 似乎您遇到了这个问题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). 如果您使用完整的polyfill(webcomponents.js而不是webcomponents-lite.js),则看起来确实可行。

Looks like this is caused by the template element not existing on IE. 看起来这是由IE上不存在的模板元素引起的。 The full polyfill adds it which is why that works, where the lite version doesn't do a full polyfill. 完整的polyfill会添加它,这就是为什么它可以工作的原因,精简版无法执行完整的polyfill。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM