mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
DevTools - Browser Console - restore sessions
https://github.com/MoonchildProductions/moebius/pull/112
This commit is contained in:
parent
173d356acd
commit
63ba51f58e
17 changed files with 135 additions and 46 deletions
|
|
@ -12,7 +12,7 @@ Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtool
|
|||
var {Utils: WebConsoleUtils} = require("devtools/client/webconsole/utils");
|
||||
var {Messages} = require("devtools/client/webconsole/console-output");
|
||||
const asyncStorage = require("devtools/shared/async-storage");
|
||||
const HUDService = require("devtools/client/webconsole/hudservice");
|
||||
const {HUDService} = require("devtools/client/webconsole/hudservice");
|
||||
|
||||
// Services.prefs.setBoolPref("devtools.debugger.log", true);
|
||||
|
||||
|
|
@ -1842,3 +1842,18 @@ function getRenderedSource(root) {
|
|||
column: location.getAttribute("data-column"),
|
||||
} : null;
|
||||
}
|
||||
|
||||
function waitForBrowserConsole() {
|
||||
return new Promise(resolve => {
|
||||
Services.obs.addObserver(function observer(subject) {
|
||||
Services.obs.removeObserver(observer, "web-console-created");
|
||||
subject.QueryInterface(Ci.nsISupportsString);
|
||||
|
||||
let hud = HUDService.getBrowserConsole();
|
||||
ok(hud, "browser console is open");
|
||||
is(subject.data, hud.hudId, "notification hudId is correct");
|
||||
|
||||
executeSoon(() => resolve(hud));
|
||||
}, "web-console-created");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue