Closed
Description
Given the following element:
<polymer-element name="todo-list">
<template>
<form>
<input id="title" type="text" value="{{ title }}" placeholder="New Todo Title">
<button type="button" on-click="add">Add</button>
</form>
<ul>
<template repeat="{{ todos }}">
<li>{{ title }}</li>
</template>
</ul>
</template>
<script>
setTimeout(function() {
Polymer('todo-list', {
title: 'asdf',
todos: [],
add: function() {
this.todos.push({ title: this.title });
this.$.title.value = '';
}
});
}, 1000);
</script>
</polymer-element>
The call to Polymer()
will not initialise the element. I messed with the value and got it to happen some of the time around 5ms.
Due to this issue, you cannot use an asynchronous module loader if you want to use components within your element.
Metadata
Assignees
Labels
No labels