File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const result = cdp.result;
2828const IncomingMessage = @import ("msg.zig" ).IncomingMessage ;
2929const Input = @import ("msg.zig" ).Input ;
3030const stringify = cdp .stringify ;
31+ const target = @import ("target.zig" );
3132
3233const log = std .log .scoped (.cdp );
3334
@@ -129,6 +130,27 @@ fn sendInspector(
129130 }
130131
131132 ctx .sendInspector (msg .json );
133+
134+ if (method == .enable ) {
135+ try executionContextCreated (
136+ alloc ,
137+ ctx ,
138+ 0 ,
139+ "://" ,
140+ "" ,
141+ // TODO: hard coded ID
142+ "7102379147004877974.3265385113993241162" ,
143+ .{
144+ .isDefault = true ,
145+ .type = "default" ,
146+ // TODO: hard coded ID
147+ .frameId = cdp .FrameID ,
148+ },
149+ // TODO: hard coded ID
150+ target .BrowserContextID ,
151+ );
152+ }
153+
132154 return "" ;
133155}
134156
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ pub fn target(
6262}
6363
6464// TODO: hard coded IDs
65- const PageTargetID = "CFCD6EC01573CF29BB638E9DC0F52DDC" ;
66- const BrowserTargetID = "2d2bdef9-1c95-416f-8c0e-83f3ab73a30c" ;
67- const BrowserContextID = "65618675CB7D3585A95049E9DFE95EA9" ;
65+ pub const PageTargetID = "CFCD6EC01573CF29BB638E9DC0F52DDC" ;
66+ pub const BrowserTargetID = "2d2bdef9-1c95-416f-8c0e-83f3ab73a30c" ;
67+ pub const BrowserContextID = "65618675CB7D3585A95049E9DFE95EA9" ;
6868
6969// TODO: noop method
7070fn setDiscoverTargets (
You can’t perform that action at this time.
0 commit comments