Created
May 31, 2015 12:17
-
-
Save cubika/3cb9a2200a806effd343 to your computer and use it in GitHub Desktop.
window.Polymer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.Polymer = function(prototype) { | |
| var ctor = desugar(prototype); | |
| // Polymer.Base is now chained to ctor.prototype, and for IE10 compat | |
| // this may have resulted in a new prototype being created | |
| prototype = ctor.prototype; | |
| // native Custom Elements treats 'undefined' extends property | |
| // as valued, the property must not exist to be ignored | |
| var options = { | |
| prototype: prototype | |
| }; | |
| if (prototype.extends) { | |
| options.extends = prototype.extends; | |
| } | |
| Polymer.telemetry._registrate(prototype); | |
| document.registerElement(prototype.is, options); | |
| return ctor; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment