我有以下代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<base href="http://polygit.org/polymer+:master/components/">
<link href="polymer/polymer.html" rel="import">
<link rel="import" href="paper-input/paper-input.html">
<link rel="import" href="paper-dialog/paper-dialog.html">
<title>JS Bin</title>
</head>
<body>
<paper-input name="some"></paper-input>
<paper-input name="some"></paper-input>
<my-el></my-el>
<dom-module id="my-el">
<template>
<style>
display: block;
</style>
I AM HERE!
<paper-input name="some"></paper-input>
<paper-input name="some"></paper-input>
<script>
Polymer({
is: "my-el",
ready: function(){
console.log("READY!?!");
}
})
</script>
</template>
</dom-module>
AND:
</body>
</html>
哪个在这个 Jsbin 中:http://jsbin.com/qiyohaj/edit?html,console, output
非常简单的问题为什么地球上不会“x-el”显示,也不会运行ready()
......?