summaryrefslogtreecommitdiffstats
path: root/devtools/client/styleeditor
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/styleeditor')
-rw-r--r--devtools/client/styleeditor/StyleEditorUI.sys.mjs2
-rw-r--r--devtools/client/styleeditor/StyleEditorUtil.sys.mjs31
-rw-r--r--devtools/client/styleeditor/StyleSheetEditor.sys.mjs2
-rw-r--r--devtools/client/styleeditor/test/iframe_with_service_worker.html2
4 files changed, 4 insertions, 33 deletions
diff --git a/devtools/client/styleeditor/StyleEditorUI.sys.mjs b/devtools/client/styleeditor/StyleEditorUI.sys.mjs
index d48c50f556..e00a88c3ad 100644
--- a/devtools/client/styleeditor/StyleEditorUI.sys.mjs
+++ b/devtools/client/styleeditor/StyleEditorUI.sys.mjs
@@ -1576,7 +1576,7 @@ export class StyleEditorUI extends EventEmitter {
// onAvailable is a mandatory argument for watchTargets,
// but we don't do anything when a new target gets created.
- #onTargetAvailable = ({ targetFront }) => {};
+ #onTargetAvailable = () => {};
#onTargetDestroyed = ({ targetFront }) => {
// Iterate over a copy of the list in order to prevent skipping
diff --git a/devtools/client/styleeditor/StyleEditorUtil.sys.mjs b/devtools/client/styleeditor/StyleEditorUtil.sys.mjs
index 739dc55fc5..11dae675d9 100644
--- a/devtools/client/styleeditor/StyleEditorUtil.sys.mjs
+++ b/devtools/client/styleeditor/StyleEditorUtil.sys.mjs
@@ -51,23 +51,6 @@ export function getString(name) {
}
/**
- * Assert an expression is true or throw if false.
- *
- * @param expression
- * @param message
- * Optional message.
- * @return expression
- */
-export function assert(expression, message) {
- if (!expression) {
- const msg = message ? "ASSERTION FAILURE:" + message : "ASSERTION FAILURE";
- log(msg);
- throw new Error(msg);
- }
- return expression;
-}
-
-/**
* Retrieve or set the text content of an element.
*
* @param DOMElement root
@@ -94,18 +77,6 @@ export function text(root, selector, textContent) {
}
/**
- * Log a message to the console.
- *
- * @param ...rest
- * One or multiple arguments to log.
- * If multiple arguments are given, they will be joined by " "
- * in the log.
- */
-export function log() {
- console.logStringMessage(Array.prototype.slice.call(arguments).join(" "));
-}
-
-/**
* Show file picker and return the file user selected.
*
* @param mixed file
@@ -171,7 +142,7 @@ export function showFilePicker(
fp.defaultString = suggestedFilename;
}
- fp.init(parentWindow, getString(key + ".title"), mode);
+ fp.init(parentWindow.browsingContext, getString(key + ".title"), mode);
fp.appendFilter(getString(key + ".filter"), "*.css");
fp.appendFilters(fp.filterAll);
fp.open(fpCallback);
diff --git a/devtools/client/styleeditor/StyleSheetEditor.sys.mjs b/devtools/client/styleeditor/StyleSheetEditor.sys.mjs
index d84854a0ae..bf43bf0268 100644
--- a/devtools/client/styleeditor/StyleSheetEditor.sys.mjs
+++ b/devtools/client/styleeditor/StyleSheetEditor.sys.mjs
@@ -274,7 +274,7 @@ StyleSheetEditor.prototype = {
*
* This will set |this._state.text| to the new text.
*/
- async _fetchSourceText(options = {}) {
+ async _fetchSourceText() {
const styleSheetsFront = await this._getStyleSheetsFront();
let longStr = null;
diff --git a/devtools/client/styleeditor/test/iframe_with_service_worker.html b/devtools/client/styleeditor/test/iframe_with_service_worker.html
index 690515775e..b66e1e74a8 100644
--- a/devtools/client/styleeditor/test/iframe_with_service_worker.html
+++ b/devtools/client/styleeditor/test/iframe_with_service_worker.html
@@ -12,7 +12,7 @@ function waitForActive(swr) {
resolve(swr);
return;
}
- sw.addEventListener("statechange", function onStateChange(evt) {
+ sw.addEventListener("statechange", function onStateChange() {
if (sw.state === "activated") {
sw.removeEventListener("statechange", onStateChange);
resolve(swr);