Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d230cc1

Browse files
committed
chore($sniffer): Remove remnants of separate documentMode handling
Since msie is now set to document.documentMode, it's not necessary to keep the documentMode in a separate property.
1 parent 74a214c commit d230cc1

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/ng/sce.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,9 @@ function $SceProvider() {
729729

730730
this.$get = ['$parse', '$sniffer', '$sceDelegate', function(
731731
$parse, $sniffer, $sceDelegate) {
732-
// Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows
732+
// Prereq: Ensure that we're not running in IE9/IE10/IE11 quirks mode. In that mode, IE allows
733733
// the "expression(javascript expression)" syntax which is insecure.
734-
if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {
734+
if (enabled && $sniffer.msie < 8) {
735735
throw $sceMinErr('iequirks',
736736
'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +
737737
'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +

src/ng/sniffer.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function $SnifferProvider() {
2222
int((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
2323
boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
2424
document = $document[0] || {},
25-
documentMode = document.documentMode,
2625
vendorPrefix,
2726
vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,
2827
bodyStyle = document.body && document.body.style,
@@ -65,9 +64,7 @@ function $SnifferProvider() {
6564
// jshint -W018
6665
history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
6766
// jshint +W018
68-
hashchange: 'onhashchange' in $window &&
69-
// IE8 compatible mode lies
70-
(!documentMode || documentMode > 7),
67+
hashchange: 'onhashchange' in $window && (!msie || msie > 7),
7168
hasEvent: function(event) {
7269
// IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
7370
// it. In particular the event is not fired when backspace or delete key are pressed or
@@ -86,8 +83,7 @@ function $SnifferProvider() {
8683
transitions : transitions,
8784
animations : animations,
8885
android: android,
89-
msie : msie,
90-
msieDocumentMode: documentMode
86+
msie : msie
9187
};
9288
}];
9389
}

0 commit comments

Comments
 (0)