diff options
Diffstat (limited to 'services/sync/tps/extensions/mozmill/resource/stdlib')
4 files changed, 12 insertions, 13 deletions
diff --git a/services/sync/tps/extensions/mozmill/resource/stdlib/EventUtils.js b/services/sync/tps/extensions/mozmill/resource/stdlib/EventUtils.js index a821ab2e0..7f08469f0 100644 --- a/services/sync/tps/extensions/mozmill/resource/stdlib/EventUtils.js +++ b/services/sync/tps/extensions/mozmill/resource/stdlib/EventUtils.js @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["disableNonTestMouseEvents","sendMouseEvent", "sendChar" "synthesizeText", "synthesizeComposition", "synthesizeQuerySelectedText"]; -const Ci = Components.interfaces; -const Cc = Components.classes; +var Ci = Components.interfaces; +var Cc = Components.classes; var window = Cc["@mozilla.org/appshell/appShellService;1"] .getService(Ci.nsIAppShellService).hiddenDOMWindow; diff --git a/services/sync/tps/extensions/mozmill/resource/stdlib/os.js b/services/sync/tps/extensions/mozmill/resource/stdlib/os.js index fcda30572..ce88bea8a 100644 --- a/services/sync/tps/extensions/mozmill/resource/stdlib/os.js +++ b/services/sync/tps/extensions/mozmill/resource/stdlib/os.js @@ -4,9 +4,9 @@ var EXPORTED_SYMBOLS = ['listDirectory', 'getFileForPath', 'abspath', 'getPlatform']; -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; +var Cc = Components.classes; +var Ci = Components.interfaces; +var Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); @@ -37,7 +37,7 @@ function abspath(rel, file) { file = file.parent; } - for each(var p in relSplit) { + for (var p of relSplit) { if (p == '..') { file = file.parent; } else if (p == '.') { diff --git a/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js b/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js index 794c3e2c2..bfa7ef5a9 100644 --- a/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js +++ b/services/sync/tps/extensions/mozmill/resource/stdlib/securable-module.js @@ -168,8 +168,7 @@ if (rootPaths) { if (rootPaths.constructor.name != "Array") rootPaths = [rootPaths]; - var fses = [new exports.LocalFileSystem(path) - for each (path in rootPaths)]; + var fses = rootPaths.map(path => new exports.LocalFileSystem(path)); options.fs = new exports.CompositeFileSystem(fses); } else options.fs = new exports.LocalFileSystem(); diff --git a/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js b/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js index 3dcca76e0..f27bbaaf7 100644 --- a/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js +++ b/services/sync/tps/extensions/mozmill/resource/stdlib/utils.js @@ -10,9 +10,9 @@ var EXPORTED_SYMBOLS = ["applicationName", "assert", "Copy", "getBrowserObject", "unwrapNode", "waitFor" ]; -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; +var Cc = Components.classes; +var Ci = Components.interfaces; +var Cu = Components.utils; Cu.import("resource://gre/modules/NetUtil.jsm"); @@ -83,7 +83,7 @@ function getWindows(type) { } function getMethodInWindows(methodName) { - for each (var w in getWindows()) { + for (var w of getWindows()) { if (w[methodName] != undefined) { return w[methodName]; } @@ -93,7 +93,7 @@ function getMethodInWindows(methodName) { } function getWindowByTitle(title) { - for each (var w in getWindows()) { + for (var w of getWindows()) { if (w.document.title && w.document.title == title) { return w; } |