Skip to content

Instantly share code, notes, and snippets.

@cubika
Created May 31, 2015 12:17
Show Gist options
  • Select an option

  • Save cubika/3cb9a2200a806effd343 to your computer and use it in GitHub Desktop.

Select an option

Save cubika/3cb9a2200a806effd343 to your computer and use it in GitHub Desktop.
window.Polymer
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