主页中元素的聚合物未在 IE 中显示
Polymer with elements in main page not showing in IE
为什么这在 Chrome 中有效,但在 IE 中无效:
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel='import' href='base-element.html'>
</head>
<body>
<base-element></base-element>
</body>
</html>
基元素中有这个
<link rel="import" href="bower_components/polymer/polymer.html">
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
Polymer({
is: 'base-element'
});
</script>
如果不是这样
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel="import" href="bower_components/polymer/polymer.html">
</head>
<body>
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
Polymer({
is: 'base-element'
});
</script>
<base-element></base-element>
</body>
它在 Chrome 中有效,但在 IE 中无效
干杯
Stack Overflow 认为我在这个 post 中有太多 "code" ...所以请跳过这个废话:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu erat vel nunc lacinia commodo a sed nisl. Quisque commodo turpis sed diam fringilla cursus. Nunc nisi mi, lacinia maximus lacus in, elementum vehicula purus. Suspendisse ut dolor nisi. Nunc porttitor sem quis viverra molestie. Cras porta in risus tempor molestie. Fusce at magna tellus"
这似乎有效:
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel="import" href="bower_components/polymer/polymer.html">
</head>
<body>
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
HTMLImports.whenReady(function() { Polymer({
is: 'base-element'
});});
</script>
<base-element></base-element>
</body>
是 HTMLImport 起作用了....但我不知道为什么。任何人? :-)
为什么这在 Chrome 中有效,但在 IE 中无效:
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel='import' href='base-element.html'>
</head>
<body>
<base-element></base-element>
</body>
</html>
基元素中有这个
<link rel="import" href="bower_components/polymer/polymer.html">
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
Polymer({
is: 'base-element'
});
</script>
如果不是这样
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel="import" href="bower_components/polymer/polymer.html">
</head>
<body>
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
Polymer({
is: 'base-element'
});
</script>
<base-element></base-element>
</body>
它在 Chrome 中有效,但在 IE 中无效
干杯
Stack Overflow 认为我在这个 post 中有太多 "code" ...所以请跳过这个废话:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eu erat vel nunc lacinia commodo a sed nisl. Quisque commodo turpis sed diam fringilla cursus. Nunc nisi mi, lacinia maximus lacus in, elementum vehicula purus. Suspendisse ut dolor nisi. Nunc porttitor sem quis viverra molestie. Cras porta in risus tempor molestie. Fusce at magna tellus"
这似乎有效:
<!doctype html>
<html>
<head>
<script src='bower_components/webcomponentsjs/webcomponents.min.js'></script>
<link rel="import" href="bower_components/polymer/polymer.html">
</head>
<body>
<dom-module id="base-element">
<template>
<div>test</div>
</template>
</dom-module>
<script>
HTMLImports.whenReady(function() { Polymer({
is: 'base-element'
});});
</script>
<base-element></base-element>
</body>
是 HTMLImport 起作用了....但我不知道为什么。任何人? :-)