Sean McMillan
Sean McMillan

Reputation: 10093

Javascript line number mapping

Magically formatted comments will change the reported line number of javascript errors in some browsers; They look like this:

//@line n "f"

n is the line number and f is the file name. Unfortunately, //@line appears to be ungoogleable. Does anyone know where there is documentation on this feature, and which browsers support it?

(I found references to it here and here.)

Upvotes: 7

Views: 480

Answers (1)

Ryan Matthews
Ryan Matthews

Reputation: 1043

From what I can find it is only available in Mozilla based browsers.

It is using the JS_SetOptions command which can turn these options on or off depending on the values passed.

https://developer.mozilla.org/en/JS_SetOptions

Upvotes: 1

Related Questions