13

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 ?

4

2 回答 2

16

随着 Windows 8.1 附带的最新更新,IE11 现在支持源映射:https : //all-markup-news.com/whats-new-in-f12-with-windows-8-1-update/ 在 Win7 中作为出色地。

于 2014-04-17T13:25:31.910 回答
15

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).

于 2013-07-30T12:24:39.837 回答