mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Add new Window globals as debuggees
Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
c59ee57b5d
commit
e2eabd41c9
7 changed files with 107 additions and 1 deletions
|
@ -1,3 +1,20 @@
|
|||
if (!("dbg" in this)) {
|
||||
dbg = new Debugger;
|
||||
|
||||
dbg.onNewGlobalObject = function(global) {
|
||||
console.log("[debugger] onNewGlobalObject");
|
||||
console.log(this, global);
|
||||
};
|
||||
|
||||
dbg.onNewScript = function(script, global) {
|
||||
console.log("[debugger] onNewScript");
|
||||
console.log(this, script, global);
|
||||
};
|
||||
}
|
||||
|
||||
addEventListener("addDebuggee", event => {
|
||||
const {global} = event;
|
||||
console.log("[debugger] Adding debuggee");
|
||||
dbg.addDebuggee(global);
|
||||
console.log("[debugger] getDebuggees().length =", dbg.getDebuggees().length);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue