Is it possible to use data-URI source-maps in inline Javascript in HTML script tags?
I've tried a few variations on the following HTML, but none of them seem to produce a usable sourcemap for the embedded JS when the page is loaded in Chrome:
<script type="text/javascript">
/* source code... */
//# sourceMappingURL=data:application/json;base64,/* base64'd inline sourcemap */
</script>
I've also tried stripping sourcesContent, file, and sourceRoot from the generated sourcemap, since I figure those wouldn't apply in this situation. But it doesn't seem to help.
The spec seems to imply that this is possible, or at least considered, since script tags without src attributes are briefly mentioned:
If the generated code is associated with a script element and the script element does not have a “src” attribute, then the source origin will be the page’s origin.
However, I am having trouble finding evidence of this being used in the wild, or if this is even possible. Can anyone help shed some light on this?
//# sourceURL=?//# sourceURL=correctly matching the sourcemap object does not seem to work.page.html-1for the first <script> tag on a page, as well as just usingpage.htmldirectly