This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html,<meta charset='UTF-8'> | |
<iframe src="data:text/html,<meta charset='UTF-8'><button id='button1'>button1</button>" id="frame-1"></iframe> | |
<iframe src="data:text/html,<meta charset='UTF-8'><button id='button2'>button2</button>" id="frame-2"></iframe> | |
<script> | |
var frame1 = document.querySelectorAll("iframe")[0]; | |
var frame2 = document.querySelectorAll("iframe")[1]; | |
var frame1Button = null; | |
var frame2Button = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# npm install -g replace | |
# back up the patch | |
cp .hg/patches/PATCHNAME ~/Desktop/PATCHNAME.patch | |
replace 'browser/devtools/' 'devtools/client/' .hg/patches/PATCHNAME | |
replace 'toolkit/devtools/server/' 'devtools/server/' .hg/patches/PATCHNAME | |
replace 'toolkit/devtools/' 'devtools/shared/' .hg/patches/PATCHNAME | |
replace 'browser/themes/shared/devtools/' 'devtools/client/themes/' .hg/patches/PATCHNAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Helpers that can be used when debugging Firefox in the Browser Console / Browser Debugger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Run this in a Scratchpad in Browser Context */ | |
let {devtools} = | |
Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); | |
let { getActiveTab } = devtools.require("sdk/tabs/utils"); | |
let { getMostRecentBrowserWindow } = devtools.require("sdk/window/utils"); | |
function addTab(url = "http://localhost/page_load_test/tp5n/bild.de/www.bild.de/index.html") { | |
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); | |
var win = wm.getMostRecentWindow("navigator:browser"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HUDService.getBrowserConsole().ui.webConsoleClient.getCachedMessages(["PageError"], foo => { | |
console.log('resolve', foo.messages); | |
let m = foo.messages[foo.messages.length - 1]; | |
console.log(m.errorMessage.initial.length); | |
let longString = HUDService.getBrowserConsole().ui.webConsoleClient.longString(m.errorMessage); | |
console.log("Going to fetch longstring", longString, longString.initial.length, longString.length) | |
longString.substring(longString.initial.length, longString.length, f=> { | |
console.log(f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start a normal instance with the debugger server running | |
./mach run --start-debugger-server 6080 | |
# Run the Browser Toolbox instance | |
MOZ_BROWSER_TOOLBOX_PORT=6080 ./mach run --temp-profile -chrome chrome://devtools/content/framework/browser-toolbox/window.html --purgecaches --jsconsole |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Cc, Ci, Cu, Cr} = require("chrome"); | |
Cu.importGlobalProperties(["indexedDB"]); | |
const {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {}); | |
/*! | |
localForage -- Offline Storage, Improved | |
Version 1.2.2 | |
https://mozilla.github.io/localForage | |
(c) 2013-2015 Mozilla, Apache License 2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let require = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools.require; | |
const asyncStorage = require("devtools/toolkit/shared/async-storage"); | |
asyncStorage.clear(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./mach mochitest-devtools browser/devtools/inspector --start-at browser_inspector_highlighter-iframes.js --end-at browser_inspector_iframe-navigation.js --run-until-failure --repeat 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jpm run --binary /Applications/FirefoxDeveloperEdition.app/ --binary-args --jsconsole -v |