From:  simon.lydell@gmail.com
Date:  20 Jun 2014 05:07:28 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Re: `/*# ... */` or `//#` in JS shouldn't matter

NNTP-Posting-Host:  63.245.216.66

Den fredagen den 7:e februari 2014 kl. 18:40:14 UTC+1 skrev Fitzgerald, Nick:
> On 2/7/14 1:29 AM, Simon Lydell wrote:
> 
> > Currently the spec only mentions that the `//#` syntax is allowed to link a source map to a generated JavaScript file. I think that `/*# ... */` should be allowed as well, because:
> 
> >
> 
> > - It's weird that only one type of comment works. Any type of comment in any type of language at the end of a file on its own line that starts with `# sourceMappingURL=` should work.
> 
> >
> 
> > - In reality, source maps are only used by JavaScript and CSS. It would be really nice if tools working with source maps didn't have to care whether a file is CSS or JavaScript. If it wants to add a sourceMappingURL it can just add `\n/*# sourceMappingURL=... */` and be done with it.
> 
> >
> 
> > - Firefox already supports it. (Chrome is a bit weird: It allows either `//#` or `/*\n//# ... \n*/`)
> 
> > _______________________________________________
> 
> > dev-js-sourcemap mailing list
> 
> > dev-js-sourcemap@lists.mozilla.org
> 
> > https://lists.mozilla.org/listinfo/dev-js-sourcemap
> 
> +1

If you really like this proposal, you have to add it to the spec. Chromium likely won't add it otherwise[1].

[1]: https://code.google.com/p/chromium/issues/detail?id=341807#c2