Source mapping in IE. //@ sourceURL

拥有回忆 提交于 2019-12-01 14:05:43

问题


In IE doesn't work //@ sourceURL.

appLoader.loadScriptContent(doc, scriptData.data + "//@ sourceURL=" + scriptData.url );

In Another browsers it's OK. How can I change this code for working in IE ?


回答1:


UPDATE: See the other answer, IE11 supports //# sourceURL, which is also supported by recent Firefox & Chrome.

Sorry to be the bearer of bad news, but IE does not support source mapping. It's not even IE11 (at least not in the IE11 preview, anyway).

It may come eventually, but for now the answer is you can't do it. Sorry.

That said, as of this moment, it's still an experimental feature even in the browsers that do support it, and is still subject to change -- for example, I note that the syntax is being changed from //@ to //# in the nightlies, due to a clash with IE's existing JS conditional-comment syntax (//@cc_on etc).




回答2:


With the latest update that came with Windows 8.1, IE11 now supports source map: http://blogs.msdn.com/b/ie/archive/2014/04/14/what-s-new-in-f12-with-windows-8-1-update.aspx

Works in Win7 as well.



来源:https://stackoverflow.com/questions/17945833/source-mapping-in-ie-sourceurl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!