mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 20:15:58 +00:00
Merge fx-team to m-c
This commit is contained in:
commit
b2b437ab2a
@ -77,7 +77,9 @@ const CM_MAPPING = [
|
||||
"redo",
|
||||
"clearHistory",
|
||||
"openDialog",
|
||||
"refresh"
|
||||
"refresh",
|
||||
"getOption",
|
||||
"setOption"
|
||||
];
|
||||
|
||||
const { cssProperties, cssValues, cssColors } = getCSSKeywords();
|
||||
@ -288,8 +290,7 @@ Editor.prototype = {
|
||||
* See Editor.modes for the list of all suppoert modes.
|
||||
*/
|
||||
getMode: function () {
|
||||
let cm = editors.get(this);
|
||||
return cm.getOption("mode");
|
||||
return this.getOption("mode");
|
||||
},
|
||||
|
||||
/**
|
||||
@ -297,8 +298,7 @@ Editor.prototype = {
|
||||
* See Editor.modes for the list of all suppoert modes.
|
||||
*/
|
||||
setMode: function (value) {
|
||||
let cm = editors.get(this);
|
||||
cm.setOption("mode", value);
|
||||
this.setOption("mode", value);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -649,8 +649,7 @@ Editor.prototype = {
|
||||
* True if the editor is in the read-only mode, false otherwise.
|
||||
*/
|
||||
isReadOnly: function () {
|
||||
let cm = editors.get(this);
|
||||
return cm.getOption("readOnly");
|
||||
return this.getOption("readOnly");
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,11 @@ function test() {
|
||||
let src = win.document.querySelector("iframe").getAttribute("src");
|
||||
ok(~src.indexOf(".CodeMirror"), "correct iframe is there");
|
||||
|
||||
// getOption/setOption
|
||||
ok(ed.getOption("styleActiveLine"), "getOption works");
|
||||
ed.setOption("styleActiveLine", false);
|
||||
ok(!ed.getOption("styleActiveLine"), "setOption works");
|
||||
|
||||
// Language modes
|
||||
is(ed.getMode(), Editor.modes.text, "getMode");
|
||||
ed.setMode(Editor.modes.js);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user