Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
any value that defines 'register' in flags turns on polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Aug 2, 2013
1 parent dc0c190 commit 100e45f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CustomElements.js
Expand Up @@ -22,7 +22,7 @@ if (!scope) {

// native document.register?

scope.hasNative = (document.webkitRegister || document.register) && scope.flags.register !== 'polyfill';
scope.hasNative = !scope.flags.register && (document.webkitRegister || document.register);
if (scope.hasNative) {

// normalize
Expand Down Expand Up @@ -88,7 +88,7 @@ if (scope.hasNative) {
// TODO(sjmiles): probably should clone inOptions instead of mutating it
var definition = inOptions || {};
if (!inName) {
// TODO(sjmiles): replace with more appropriate error (Erik can probably
// TODO(sjmiles): replace with more appropriate error (EricB can probably

This comment has been minimized.

Copy link
@ebidel

ebidel Aug 9, 2013

Contributor

"Custom element name is required and cannot be empty string"

// offer guidance)
throw new Error('Name argument must not be empty');
}
Expand All @@ -97,7 +97,7 @@ if (scope.hasNative) {
// must have a prototype, default to an extension of HTMLElement
// TODO(sjmiles): probably should throw if no prototype, check spec
if (!definition.prototype) {
// TODO(sjmiles): replace with more appropriate error (Erik can probably
// TODO(sjmiles): replace with more appropriate error (EricB can probably

This comment has been minimized.

Copy link
@ebidel

ebidel Aug 9, 2013

Contributor

"Prototype argument for document.register() is required"

// offer guidance)
throw new Error('Options missing required prototype property');
}
Expand Down

0 comments on commit 100e45f

Please sign in to comment.