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

Commit

Permalink
use two underscores, less likely to have conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Dec 16, 2013
1 parent 8ee223e commit 9e99fcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CustomElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ if (useNative) {
throw new Error('Options missing required prototype property');
}
// record name
definition.elementName = name.toLowerCase();
definition.__name = name.toLowerCase();
// ensure a lifecycle object so we don't have to null test it
definition.lifecycle = definition.lifecycle || {};
// build a list of ancestral custom elements (for native base detection)
Expand All @@ -128,7 +128,7 @@ if (useNative) {
// overrides to implement attributeChanged callback
overrideAttributeApi(definition.prototype);
// 7.1.5: Register the DEFINITION with DOCUMENT
registerDefinition(definition.elementName, definition);
registerDefinition(definition.__name, definition);
// 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE
// 7.1.8. Return the output of the previous step.
definition.ctor = generateConstructor(definition);
Expand Down Expand Up @@ -161,10 +161,10 @@ if (useNative) {
baseTag = a.is && a.tag;
}
// our tag is our baseTag, if it exists, and otherwise just our name
definition.tag = baseTag || definition.elementName;
definition.tag = baseTag || definition.__name;
if (baseTag) {
// if there is a base tag, use secondary 'is' specifier
definition.is = definition.elementName;
definition.is = definition.__name;
}
}

Expand Down

0 comments on commit 9e99fcf

Please sign in to comment.