0

我无法//# sourceURL在 Firefox 24 中获得评论。

这是test.html

<html>
<script src="test.js"></script>

这是test.js

document.write('<p>hello</p>');

//# sourceURL=one.js

var fn;

fn = eval("(function two() { console.log(1); })\n//# sourceURL=two.js");
fn.call();

fn = new Function([], "console.log(2);\n//# sourceURL=three.js");
fn.call();

如果这可行,我应该会在 Firefox 调试器中看到三个文件:one.jstwo.jsthree.js. 但是,调试器向我显示了一个文件test.js

火狐调试器

关于我错过了什么的任何线索?

4

1 回答 1

1

不,sourceURL 尚未在 Firefox 中实现。

请参阅错误 904144(引擎)、错误 833744(前端)。

但是,Firebug 似乎支持它

于 2013-09-05T00:46:57.057 回答