Add custom element constructor definition

This commit is contained in:
laco0416
2015-06-30 16:48:58 +09:00
parent ac3a1f059f
commit 4cfb34b702
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -10,10 +10,12 @@ var fooProto = Object.create(HTMLElement.prototype, {
}
});
document.registerElement("x-foo", {
var XFoo = document.registerElement("x-foo", {
prototype: fooProto
});
var xFoo = new XFoo();
window.CustomElements.hasNative;
window.CustomElements.flags;
window.CustomElements.ready;