Skip to content

Instantly share code, notes, and snippets.

Last active February 28, 2016 00:36
What would you like to do?
From Zero to Polymer: Step 01 - document.registerElement
<!DOCTYPE html>
<html lang="en">
var MyElementProto = Object.create(HTMLElement.prototype);
MyElementProto.createdCallback = function() {
this.innerHTML = "<p>My <b>custom element</b> markup!</p>";
var MyElement = document.registerElement(
'my-element', { prototype: MyElementProto }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment