我无法//# 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.js
、two.js
和three.js
. 但是,调试器向我显示了一个文件test.js
:
关于我错过了什么的任何线索?