From 9e99fcfaa573e625d36a7fe2366dd4e8de0d7bf4 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 16 Dec 2013 13:13:44 -0800 Subject: [PATCH] use two underscores, less likely to have conflict --- src/CustomElements.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CustomElements.js b/src/CustomElements.js index 670d24a..edbce8d 100644 --- a/src/CustomElements.js +++ b/src/CustomElements.js @@ -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) @@ -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); @@ -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; } }