diff --git a/src/declaration/polymer-element.js b/src/declaration/polymer-element.js index 6e018636b9..971b8988a9 100644 --- a/src/declaration/polymer-element.js +++ b/src/declaration/polymer-element.js @@ -106,7 +106,7 @@ Platform.ShadowCSS.shimStyling(this.templateContent(), name, extendee); } // register our custom element - this.registerPrototype(name); + this.registerPrototype(name, extendee); // reference constructor in a global named by 'constructor' attribute this.publishConstructor(); // subclasses may now register themselves diff --git a/src/declaration/prototype.js b/src/declaration/prototype.js index 0b7ac527b2..ebe443680d 100644 --- a/src/declaration/prototype.js +++ b/src/declaration/prototype.js @@ -81,11 +81,16 @@ prototype[name] = extend({}, Object.getPrototypeOf(prototype)[name]); }, // register 'prototype' to custom element 'name', store constructor - registerPrototype: function(name) { - // register the custom type - this.ctor = document.register(name, { + registerPrototype: function(name, extendee) { + var info = { prototype: this.prototype - }); + } + // native element must be specified in extends + if (extendee && extendee.indexOf('-') < 0) { + info.extends = extendee; + } + // register the custom type + this.ctor = document.register(name, info); // constructor shenanigans this.prototype.constructor = this.ctor; // register the prototype with HTMLElement for name lookup diff --git a/test/html/element-registration.html b/test/html/element-registration.html index 98640209e1..58519e0086 100644 --- a/test/html/element-registration.html +++ b/test/html/element-registration.html @@ -30,6 +30,7 @@
+
  • @@ -130,6 +131,17 @@ + + + + +