refactor($sce): Use $sniffer instead of $document for feature detection.#5045
refactor($sce): Use $sniffer instead of $document for feature detection.#5045tbosch wants to merge 1 commit into
Conversation
|
LGTM |
There was a problem hiding this comment.
This line does break the 100 character limit. It might be worth breaking it up to make it more manageable.
There was a problem hiding this comment.
do we even need isDefined($sniffer.msieDocumentMode)?
There was a problem hiding this comment.
No it is not - really - since undefined < 8 is true
There was a problem hiding this comment.
Right, just copied over the old code.
There was a problem hiding this comment.
Actually the fact that undefined<8 is true means that you do need the isDefined check to get the right result, i.e. that it is msie and documentMode exists and is less than 8.
But if it is msie then documentMode will always exist so in the end the line is OK.
|
While we are at it, on line https://github.com/angular/angular.js/blob/master/src/ng/sce.js#L202, |
|
+1 to what pete said, otherwise lgtm |
|
Thanks! |
Also adds `$sniffer.msieDocumentMode` property. Fixes angular#4931.
Also adds `$sniffer.msieDocumentMode` property. Closes angular#4931 Closes angular#5045
Also adds `$sniffer.msieDocumentMode` property. Closes angular#4931 Closes angular#5045
Also adds
$sniffer.msieDocumentModeproperty.Fixes #4931.