This would be very useful. I suspect that we can use it to speed up and
decrease the memory usage of the worker module loader.

Cheers,
 David

On 10/10/14 00:36, Fitzgerald, Nick wrote:
> # Summary
>
> By appending "//# sourceURL=foo.js" to script text that is being passed
> to `eval`, `new Function`, or as the text content of a dynamically
> appended <script> tag, a JS developer can give a name to a script that
> would otherwise be anonymous. This is used by many JS module loaders.
>
> Here's an example:
>
>     eval("window.foo = function () { return Error().stack; }; //#
> sourceURL=my-url.js");
>     window.foo();
>
> The youngest frame in the stack returned by the call to `window.foo`
> would have "my-url.js" reported as the filename.



-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to