devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

IE detection cc_on causes errors on all IE versions that loads javascript with sourcemaps #22

Closed ThaNarie closed 11 years ago

ThaNarie commented 11 years ago

Hi,

This single pease of code: eval("/_@ccon 1;@/") turns on conditional compiling.

When it is turned on, sourseMapUrl's are executed as code instead of comments and causes runtime errors in IE: //@ sourceMappingURL=ClipModel.js.map

removing that peace of code seems to fix the errors, and doesn't seem to break anything, but I'm not sure. I guess there is a better way to detect IE.

More information: http://bugs.jquery.com/ticket/13274

devote commented 11 years ago

Hi

use four slashes for mapping code: ////@ sourceURL=ClipModel.js.map

ThaNarie commented 11 years ago

Hi,

Thanks for that, i've also found some similar workarounds, but I think the problem itself should be fixed.

Also, most of the time the sourcemaps are generated by 3rd party tools (like the TypeScript compiler in my case), so you cannot (easily) change the way they are generated.

devote commented 11 years ago

I agree with you, This problem is known for a long time.