Bug 740805 - Treat JSM files as JS scripts in the debugger; r=rcampbell

This commit is contained in:
Panos Astithas 2012-03-23 10:08:59 +00:00
parent 52a57a7a22
commit 5122431dc3

View File

@ -724,7 +724,8 @@ SourceScripts.prototype = {
return;
}
if (this._trimUrlQuery(aUrl).slice(-3) == ".js") {
// Use JS mode for files with .js and .jsm extensions.
if (/\.jsm?$/.test(this._trimUrlQuery(aUrl))) {
DebuggerView.editor.setMode(SourceEditor.MODES.JAVASCRIPT);
} else {
DebuggerView.editor.setMode(SourceEditor.MODES.HTML);