开发者

Javascript line number mapping

Magically formatted comments will change the reported line number of javascript errors in some browsers; They look like this:

//@line n "开发者_如何学Pythonf"

n is the line number and f is the file name. Unfortunately, //@line appears to be ungoogleable. Does anyone know where there is documentation on this feature, and which browsers support it?

(I found references to it here and here.)


From what I can find it is only available in Mozilla based browsers.

It is using the JS_SetOptions command which can turn these options on or off depending on the values passed.

https://developer.mozilla.org/en/JS_SetOptions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜