>From the Polymer docs
https://www.polymer-project.org/docs/polymer/polymer.html#imperativeregister
Registering imperatively Elements can be registered in pure JavaScript like
this:
<script>
Polymer('name-tag', {nameColor: 'red'});
var el = document.createElement('div');
el.innerHTML = '\
<polymer-element name="name-tag" attributes="name">\
<template>\
Hello <span style="color:{{nameColor}}">{{name}}</span>\
</template>\
</polymer-element>';
// The custom elements polyfill can't see the <polymer-element>
// unless you put it in the DOM.
document.body.appendChild(el);
</script>
You need to add the to the document so that the Custom Elements polyfill picks
it up.
Important: Since the Polymer call here is outside the , it must include the tag
name argument.
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/e7e9b248-f42a-4320-acbd-882ef90d6a4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.