Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source mapping in IE. //@ sourceURL

In IE doesn't work //@ sourceURL.

appLoader.loadScriptContent(doc, scriptData.data + "//@ sourceURL=" + scriptData.url );

In Another browsers it's OK. How can I change this code for working in IE ?

like image 587
Geray Suinov Avatar asked Jul 30 '13 11:07

Geray Suinov


People also ask

What is a sourcing map?

A sourcing map is a visual representation of the channels, approaches, and other elements of a sourcing plan. With a sourcing map you can be sure that you are keeping track of all the potential Talent sources and candidates you are uncovering, as well as ensuring that you cover the whole market.

How do I enable source maps?

To enable source maps in Google Chrome, go to Developer Tools, click the little cog icon, and then make sure that “Enable Javascript source maps” is checked. That's it.

What is source mapping URL?

A source map is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger. To enable the debugger to work with a source map, you must: generate the source map.

What is source map in Webpack?

Source maps connect the bundle file with corresponding source files. Source maps are not a Webpack only concept. It is a common debugging technique which is respected by all modern browsers. Webpack has the ability to generate source maps. Let us try generating a source map.


2 Answers

With the latest update that came with Windows 8.1, IE11 now supports source map: https://all-markup-news.com/whats-new-in-f12-with-windows-8-1-update/ Works in Win7 as well.

like image 70
samyem Avatar answered Oct 18 '22 19:10

samyem


UPDATE: See the other answer, IE11 supports //# sourceURL, which is also supported by recent Firefox & Chrome.

Sorry to be the bearer of bad news, but IE does not support source mapping. It's not even IE11 (at least not in the IE11 preview, anyway).

It may come eventually, but for now the answer is you can't do it. Sorry.

That said, as of this moment, it's still an experimental feature even in the browsers that do support it, and is still subject to change -- for example, I note that the syntax is being changed from //@ to //# in the nightlies, due to a clash with IE's existing JS conditional-comment syntax (//@cc_on etc).

like image 35
Spudley Avatar answered Oct 18 '22 19:10

Spudley