Skip to content

Commit

Permalink
Remove dependency on WebComponets for IE detection
Browse files Browse the repository at this point in the history
Fixes #4201
  • Loading branch information
dfreedm committed Dec 6, 2016
1 parent a4bda18 commit 650c16a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/bind/accessors.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
value = value === undefined ? this[source] : value;
event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';
this.fire(event, {value: value},
{bubbles: false, cancelable: false, _useCache: Polymer.Settings.eventDataCache || !CustomElements.isIE});
{bubbles: false, cancelable: false, _useCache:
Polymer.Settings.eventDataCache || !Polymer.Settings.isIE});
},

// TODO(sjmiles): removing _notifyListener from here breaks accessors.html
Expand Down
2 changes: 2 additions & 0 deletions src/lib/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
settings.useNativeCSSProperties = settings.hasNativeCSSProperties &&
settings.lazyRegister && settings.useNativeCSSProperties;

settings.isIE = navigator.userAgent.match('Trident');

return settings;
})()
};
Expand Down
2 changes: 1 addition & 1 deletion src/standard/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
var bl = hbl.get(target);
if (!bl) {
bl = {};
if( !CustomElements.isIE || target != window ) {
if( !Polymer.Settings.isIE || target != window ) {
hbl.set(target, bl);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/standard/notify-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@
this.fire(eventName, {
path: path,
value: value
}, {bubbles: false, _useCache: Polymer.Settings.eventDataCache || !CustomElements.isIE});
}, {bubbles: false, _useCache: Polymer.Settings.eventDataCache ||
!Polymer.Settings.isIE});
},

_EVENT_CHANGED: '-changed',
Expand Down

0 comments on commit 650c16a

Please sign in to comment.