Confirmed users
125
edits
| Line 50: | Line 50: | ||
** Should it be a comment at the top of the source? Something like //@sourceMap=http://example.com/path/to/source/map | ** Should it be a comment at the top of the source? Something like //@sourceMap=http://example.com/path/to/source/map | ||
*** This could work with "eval" and script tag injection. | *** This could work with "eval" and script tag injection. | ||
*** John J Barton has suggested that it is best to put the comment at the bottom of a script so that it can be dynamically added without shifting the existing line numbers for a script. I (fitzgen) agree with him. | |||
** Should it be an attribute on the script's tag? Something like <script src='/path/to/foo.js' data-source-map='path/to/foo.smap'> | ** Should it be an attribute on the script's tag? Something like <script src='/path/to/foo.js' data-source-map='path/to/foo.smap'> | ||
*** This would not work with eval, but would work with script tag injection. | *** This would not work with eval, but would work with script tag injection. | ||