IE中的源映射。 // @ sourceURL [英] Source mapping in IE. //@ sourceURL

查看:361
本文介绍了IE中的源映射。 // @ sourceURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE中不起作用// @ sourceURL。

In IE doesn't work //@ sourceURL.

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

在另一个浏览器中,没关系。如何在IE中更改此代码?

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

推荐答案


更新:请参阅其他答案,IE11支持//#sourceURL,最近的Firefox& Chrome。

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

很抱歉成为坏消息的承载者,但IE不支持源映射。它甚至不是IE11(至少不是在IE11预览中,无论如何)。

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.

这就是说,到目前为止,即使在支持它的浏览器中,它仍然是一个实验性功能,并且仍然可能会发生变化 - 例如,我注意到由于冲突,语法在夜间从 // @ 更改为 //#使用IE现有的JS条件注释语法( // @ cc_on 等)。

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

这篇关于IE中的源映射。 // @ sourceURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆