mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Avoid issues in IE with other code containing comments like //@todo xyz.
Former-commit-id: 92ec6258539bf48144e9af05d0e326651a5fedda
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -211,14 +211,12 @@
|
||||
* The JS engine in Narwhal will generate the function `function anonymous(){//}`
|
||||
* and throw a syntax error.
|
||||
*
|
||||
* In IE, `@` symbols are part of its non-standard conditional compilation support.
|
||||
* The `@cc_on` statement activates its support while the trailing ` !` induces
|
||||
* a syntax error to exlude it. Compatibility modes in IE > 8 require a space
|
||||
* before the `!` to induce a syntax error.
|
||||
* See http://msdn.microsoft.com/en-us/library/121hztk3(v=vs.94).aspx
|
||||
* Avoid comments beginning `@` symbols in IE because they are part of its
|
||||
* non-standard conditional compilation support.
|
||||
* http://msdn.microsoft.com/en-us/library/121hztk3(v=vs.94).aspx
|
||||
*/
|
||||
try {
|
||||
var useSourceURL = (Function('//@cc_on !')(), true);
|
||||
var useSourceURL = (Function('//@')(), !window.attachEvent);
|
||||
} catch(e){ }
|
||||
|
||||
/** Used to identify object classifications that are array-like */
|
||||
|
||||
Reference in New Issue
Block a user