您好我有一个使用Polymer 1.0构建的应用程序并且在chrome中测试我的应用程序没有问题。但是在IE 11中我的索引页面只是一个空白页面,根据DOM浏览器没有加载任何元素。我在elements.html文件中导入元素。虽然我的自定义元素直接添加到头部。在DOM资源管理器中,正文是空的。我遗失的任何事情都是什么?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<script type="text/javascript" src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="elements/elements.html">
<link rel="import" href="components/add-skill/add-skill.html">
<link rel="import" href="components/app-menu/app-menu.html">
<link rel="import" href="components/view-profile/view-profile.html">
<link rel="import" href="components/search-skill/search-skill.html">
<link rel="import" href="components/view-users/view-users.html">
<link rel="import" href="css/main.html">
</head>
<body class="fullbleed">
<template id="app" is="dom-bind">
<paper-drawer-panel>
<paper-header-panel main>
<paper-toolbar>
<div>Toolbar</div>
<paper-icon-button icon="menu" paper-drawer-toggle>
</paper-icon-button>
<span class="flex"></span>
<paper-button onclick="_logout()">
<div>Log out</div>
</paper-button>
</paper-toolbar>
<neon-animated-pages class="flex" selected="{{selected}}">
<view-profile></view-profile>
<add-skill></add-skill>
<search-skill></search-skill>
<view-users></view-users>
</neon-animated-pages>
</paper-header-panel>
<paper-header-panel drawer>
<paper-toolbar>
</paper-toolbar>
<paper-menu class="list" selected="{{selected}}">
<paper-item>
<iron-icon icon="account-circle"></iron-icon>
<span>Profile</span>
</paper-item>
<paper-item>
<iron-icon icon="add" on-click="showAddSkill"></iron-icon>
<span>Add Skills</span>
</paper-item>
<paper-item>
<iron-icon icon="search"></iron-icon>
<span>Search</span>
</paper-item>
<paper-item>
<iron-icon icon="android"></iron-icon>
<span>Users</span>
</paper-item>
</paper-menu>
</paper-header-panel>
</paper-drawer-panel>
</template>
<script src="scripts/app.js"></script>
</body>
</html>
答案 0 :(得分:0)
据我所知,这个问题与IE 11有关,它不支持 Shadow DOM 以获取更多信息(http://caniuse.com/#search=shadow%20dom)< / p>
答案 1 :(得分:0)
您应该使用完整的webcomponents.js
来获取polyfill。 IE11实际上是以这种方式支持的:https://www.polymer-project.org/1.0/resources/compatibility.html#other-apis