console.error when using unknown attributes in templates.

Log an error whenever an element has an unknown attribute in a template.
This means you can't use generic attributes like Polymer, but we
probably want to discourage that anyway since attribute selectors should
be avoided for most things.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/845523004
This commit is contained in:
Elliott Sprehn 2015-01-08 16:52:12 -08:00
parent d58e6de7b2
commit 4002105ad9
2 changed files with 7 additions and 1 deletions

View File

@ -162,7 +162,7 @@ module.exports.CityItemElement = class extends SkyElement {
}
</style>
<div id="scroller" fit>
<div id="scroller">
<div id="scrollarea">
<div id="contentarea">
</div>

View File

@ -56,6 +56,12 @@
</template>
<script>
module.exports = class extends SkyElement {
created() {
this.myButton = null;
this.myCheckbox = null;
this.myText = null;
this.clickCount = 0;
}
attached() {
this.myButton = this.shadowRoot.getElementById('button');
this.myCheckbox = this.shadowRoot.getElementById('checkbox');