-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
24 lines (20 loc) · 692 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"use strict";
const {Cu} = require("chrome");
const self = require("sdk/self");
const {RecorderPanel} = require("data/panel");
const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
gDevTools.registerTool({
id: "domprofiler",
icon: self.data.url("images/icon.svg"),
invertIconForLightTheme: true,
url: self.data.url("panel.html"),
label: "DOM Profiler",
tooltip: "Record DOM mutations and events on the page",
isTargetSupported(target) {
return target.isLocalTab;
// target.client.mainRoot.applicationType returns "operating-system" for b2g
},
build(iframeWindow, toolbox) {
return new RecorderPanel(iframeWindow, toolbox);
}
});