summaryrefslogtreecommitdiffstats
path: root/devtools/client/styleeditor/StyleEditorUtil.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/styleeditor/StyleEditorUtil.sys.mjs')
-rw-r--r--devtools/client/styleeditor/StyleEditorUtil.sys.mjs31
1 files changed, 1 insertions, 30 deletions
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);