File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ pub const Session = struct {
138138 self .alloc .destroy (self );
139139 }
140140
141- pub fn setInspector (
141+ pub fn initInspector (
142142 self : * Session ,
143143 ctx : anytype ,
144144 onResp : jsruntime.InspectorOnResponseFn ,
@@ -149,15 +149,15 @@ pub const Session = struct {
149149 self .env .setInspector (self .inspector .? );
150150 }
151151
152- pub fn createPage (self : * Session ) ! Page {
153- return Page .init (self .alloc , self );
154- }
155-
156152 pub fn callInspector (self : * Session , msg : []const u8 ) void {
157153 if (self .inspector ) | inspector | {
158154 inspector .send (msg , self .env );
159155 }
160156 }
157+
158+ pub fn createPage (self : * Session ) ! Page {
159+ return Page .init (self .alloc , self );
160+ }
161161};
162162
163163// Page navigates to an url.
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ pub const Ctx = struct {
300300
301301 fn newSession (self : * Ctx ) ! void {
302302 try self .browser .newSession (self .alloc (), self .loop );
303- try self .browser .currentSession ().setInspector (
303+ try self .browser .currentSession ().initInspector (
304304 self ,
305305 Ctx .onInspectorResp ,
306306 Ctx .onInspectorNotif ,
@@ -426,7 +426,7 @@ pub fn listen(
426426 .conn_completion = & conn_completion ,
427427 .timeout_completion = & timeout_completion ,
428428 };
429- try browser .currentSession ().setInspector (
429+ try browser .currentSession ().initInspector (
430430 & ctx ,
431431 Ctx .onInspectorResp ,
432432 Ctx .onInspectorNotif ,
You can’t perform that action at this time.
0 commit comments