Reorganize v8 contexts and scope

- Pages within the same session have proper isolation
  - they have their own window
  - they have their own SessionState
  - they have their own v8.Context

- Move inspector to CDP browser context
  - Browser now knows nothing about the inspector

- Use notification to emit a context-created message
  - This is still a bit hacky, but again, it decouples browser from CDP
This commit is contained in:
Karl Seguin
2025-04-28 21:04:01 +08:00
parent 0fb0532875
commit 2d5ff8252c
19 changed files with 1213 additions and 1236 deletions

View File

@@ -100,7 +100,7 @@ pub fn main() !void {
var session = try browser.newSession({});
// page
const page = try session.createPage(null);
const page = try session.createPage();
_ = page.navigate(url, .{}) catch |err| switch (err) {
error.UnsupportedUriScheme, error.UriMissingHost => {