Closed dfreedm closed 11 years ago
The first comment is not quite right. As long as polymer.js or platform.js is loaded, it's ensured that elements are upgrade before bind is called on them.
Under the custom elements polyfill, element definitions are ready only after the WebComponentsReady event fires. In this case, code was executing before this event.
Example from StackOverflow: http://stackoverflow.com/posts/16821813/
If a
<template>
contains Custom Elements,bind
can be called on those elements before they upgrade.There is a currently a hack for Polymer to upgrade elements before MDV calls bind, but this only works if the template is inside a Polymer element. If a bare template is used, then the bindings are incorrect.
One possible solution is to reach up to the CustomElement registry and upgrade the template content after the WebComponentsReady event fires.