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

Commit

Permalink
Address same issue as PR 57. Android browser is not supported, but im…
Browse files Browse the repository at this point in the history
…plemented fix since it's trivial.
  • Loading branch information
sorvell committed Sep 3, 2013
1 parent 046cda3 commit 63790ee
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 @@ -172,26 +172,26 @@ 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.
// NOTE: On platforms without __proto__, a mixin strategy is used instead
// 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
Expand Down

0 comments on commit 63790ee

Please sign in to comment.