-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($sce): do not assume $document[0] exists #9663
Conversation
I feel a little uncomfortable modifying this way. |
The problem with using |
Also, the way I handled it is consistent with what we do in |
@shahata : What do you mean by "this is the only place we need it" ? Why don't we use |
I mean this is the only place we need to mock |
I would rather use msie and change the tests that mock it. Keep all the msie stuff in one place. |
this is important so that people can mock $window without having to add stuff that angular uses internally into it Closes #9661
* documentMode is an IE-only property | ||
* http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx | ||
*/ | ||
var msie = document.documentMode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need this as ngScenario gets compiled up into a separate file with its own closure.
It just happens that our unit tests run with all the files in a single closure! (Which is bad but no one has the energy to fix it)
this is important so that people can mock $window without having to add stuff that angular uses internally into it
Closes #9661