From 63790ee04b2269121851fe6ae06878dc13d42750 Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Tue, 3 Sep 2013 11:22:48 -0700 Subject: [PATCH] Address same issue as PR 57. Android browser is not supported, but implemented fix since it's trivial. --- src/CustomElements.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CustomElements.js b/src/CustomElements.js index 0250277..d8bc6b7 100644 --- a/src/CustomElements.js +++ b/src/CustomElements.js @@ -172,11 +172,11 @@ if (useNative) { // prototype for precise mixing in if (!Object.__proto__) { // default prototype - var native = HTMLElement.prototype; + var nativePrototype = HTMLElement.prototype; // work out prototype when using type-extension if (definition.is) { var inst = document.createElement(definition.tag); - native = Object.getPrototypeOf(inst); + nativePrototype = Object.getPrototypeOf(inst); } // ensure __proto__ reference is installed at each point on the prototype // chain. @@ -184,14 +184,14 @@ if (useNative) { // of prototype swizzling. In this case, this generated __proto__ provides // limited support for prototype traversal. var proto = definition.prototype, ancestor; - while (proto && (proto !== native)) { + while (proto && (proto !== nativePrototype)) { var ancestor = Object.getPrototypeOf(proto); proto.__proto__ = ancestor; proto = ancestor; } } // cache this in case of mixin - definition.native = native; + definition.native = nativePrototype; } // SECTION 4