https://github.com/lightpanda-io/browser/pull/3095 made the bridge more promise-
aware. A WebAPI with a `!js.Promise` return type that returns an error will not
reject the promise.
That PR was limited to Crypto. This expands it where possible. Generally
speaking, the result is just more idiomatic Zig code. From:
```zig
validateName(name) catch |err| switch (err) {
error.SyntaxError => return local.rejectPromise(.{ .dom_exception = .{ .err = error.SyntaxError } }),
}
```
to:
```zig
try validateName(name);
```
However, because TypeErrors must often reject with a specific message, we use
a pseudo-global in Env. So, you'd do:
```zig
.invalid => return local.typeError("invalid algorithm"),
```
which return error.TypeError AND stores "invalid algorithm" on the `Env`. When
`Caller` gets `error.TypeError` it checks the Env for a message. Who says Zig
errors can't carry payloads?!
;# Please enter the commit message for your changes. Lines starting
A non-multi select with a display size of 1, must always have 1 item selected
(unless it's set via JS (selectedIndex = -1). Also, some small fixes to options
(e.g. there is no .name getter). option.html and select.html now pass in Firefox
Also, XMLHTTPRequest `httpHeaderCallback` was dead code.
Previously, we had a single root-bound context which we'd re-announce for every
frame. Now, Page.createIsolatedWorld and addScriptToEvaluateOnNewDocument seed
the context per frame(s).
Currently, the HttpClient owns the inbox and its borrowed by the Link. This is
a bit backwards, but it also means that we can't eagerly create a Link: the
Link needs the inbox, so it needs the HttpClient, which is created by the
Browser (which creates an Isolate).
Remember, the Inbox is one of the few things shared between the main thread
and the worker, so either end can own it and the other can borrow it.
This switches the ownership so that the HttpClient now borrows the Inbox from
the Server's side of the Link (the WebSocket).
The main goal of this change is to prepare for more advanced HTTP WebDriver
flows. The more we can create _without_ a Browser, the fewer edge cases we have
to deal with (Browser because it's expensive and has to be created on the
Worker thread due to how V8::Isolate works).
curl 8.22 moved the resolver sources into lib/vdns/, renamed the QUIC
backends to cf-ngtcp2*/cf-quiche, folded noproxy.c into proxy.c and
added a handful of new files. Regenerate the source list from the
tarball and drop the four config defines the 8.22 template no longer
declares (Zig errors on unused config header values).
Some low-hanging fruit from the IndexedDB tests. Added IDBDatabase.close()
and IDBFactory.databases(). Map count to an f64 which can handle NaNs and such.
Plus some reordering so validation happens in the correct order.