gpt4 book ai didi

internet-explorer - 示例项目未在ie11 Windows 7中运行

转载 作者:行者123 更新时间:2023-12-03 02:57:12 24 4
gpt4 key购买 nike

我正在尝试运行以下示例项目:
https://github.com/montyr75/pdcl_first_elements

它可以在Chrome和Firefox中运行,但不能在IE 11中运行。

在F12开发人员工具控制台中,它给出此错误:

File: index.bootstrap.initialize.dart.js, Line: 1483, Column: 15



我也在浏览器堆栈上检查了IE 11,同样的问题。

我正在使用Eclipse Mars IDE。

所以我尝试了一个新的项目,如下所示:

Pubspec.yaml
name: polymerdartsample
version: 1.0.0
author: tester
description: Sample web application
environment:
sdk: '>=1.12.0 <2.0.0'
documentation: none
dependencies:
polymer: 1.0.0-rc.15
polymer_elements: 1.0.0-rc.8
web_components: 0.12.2+2
transformers:
- polymer:
entry_points: web/index.html

在index.html中
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src='packages/web_components/webcomponents-lite.js'></script>
<link rel="import" href="packages/polymer_elements/roboto.html">
<title>Test Data</title>
</head>
<body unresolved>
<main-app></main-app>
<script type="application/dart" src="index.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>

在index.dart中
library polymerdartsample.web.index;
import 'package:polymerdartsample/main_app.dart';
import 'package:polymer/polymer.dart';
import 'dart:html';

main() async {
await initPolymer();
}

在lib / main_app.html中:
<dom-module id="main-app">
<template>

<h3>Hello world</h3>


</template>
</dom-module>

在lib / main_app.dart中:
@HtmlImport('main_app.html')

library polymerdartsample.lib.main_app;

import 'package:polymer/polymer.dart';
import 'package:web_components/web_components.dart';

@PolymerRegister('main-app')
class MainApp extends PolymerElement {

MainApp.created() : super.created();

}

当我运行它时,我在IE 11中得到了相同的错误。

请帮忙...

最佳答案

在您的index.html中使用webcomponentsjs而不是webcomponents-lite.js,因为IE 11尚不支持本地dom,但是您还必须知道webcomponents.js的速度比webcomponents-lite.js慢

干杯

关于internet-explorer - 示例项目未在ie11 Windows 7中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35199616/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com