2087 Commits

Author SHA1 Message Date
Karl Seguin
cfdbd418c1 Implement named_get and iterator on NamedNodeMap 2025-05-30 14:42:54 +08:00
Karl Seguin
2a4feb7bee Fix set_innerHTML, fix HTMLCollection fixed (postAttached) return type 2025-05-30 13:32:29 +08:00
Karl Seguin
7202d758a2 Merge pull request #714 from lightpanda-io/live_scripts
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Load dynamically added <script> tags
2025-05-29 18:06:56 +08:00
Karl Seguin
dab59aded3 Merge pull request #707 from lightpanda-io/skip_large_headers
Skip large header lines that don't fit into the header buffer.
2025-05-29 18:06:40 +08:00
Karl Seguin
20d0b4ad16 update libdom dep 2025-05-29 16:00:41 +08:00
Karl Seguin
eed4fc7844 Load dynamically added <script> tags
Add a callback to libdom which triggers whenever a script tag is added. Page
registers the callback AFTER the HTML is parsed, but before any JS is processed
and loads the script tags.
2025-05-29 16:00:40 +08:00
Karl Seguin
0ccd9e0579 Merge pull request #716 from lightpanda-io/skip_long_timeouts
Skip long setTimeout/setInterval
2025-05-29 15:59:52 +08:00
Karl Seguin
74b36d6d32 support form.submit()
Only supports application/x-www-form-urlencoded
2025-05-29 14:10:07 +08:00
Karl Seguin
58215a470b Implement location.reload(), location.assign() and location setter
I'm not sure that _any_ location instance should be able to change the page URL.
But you can't create a new location (i.e. new Location() isn't valid), and the
only two ways I know of are via `window.location` and `document.location` both
of which _should_ alter the location of the window/document.
2025-05-29 13:59:15 +08:00
Karl Seguin
608e0a0122 Skip long setTimeout/setInterval
I guess this should eventually become a configuration option - what time is too
long and should they be skipped or just be run sooner?

But for now, this unblocks from fetching a site like DDG which does a setTimeout
of 2 minutes.
2025-05-29 13:58:31 +08:00
Karl Seguin
bddb3f0542 Merge pull request #724 from lightpanda-io/apt_update
run apt-get update before trying to install
2025-05-29 13:57:02 +08:00
Karl Seguin
83da81839b run apt-get update before trying to install 2025-05-29 13:50:22 +08:00
Karl Seguin
73d63293d9 Merge pull request #722 from lightpanda-io/nix
Update flake.nix for Zig 0.14.1
2025-05-29 08:10:15 +08:00
Muki Kiboigo
f49710f361 update flake.nix for Zig 0.14.1 2025-05-28 13:05:03 -07:00
Karl Seguin
dffbce1934 Merge pull request #712 from lightpanda-io/tweak_http_logs
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Reduce info logs of HTTP event
2025-05-28 23:04:29 +08:00
Karl Seguin
06a33b0c8b Merge pull request #717 from lightpanda-io/missing-t
Missing T
2025-05-28 23:02:40 +08:00
Karl Seguin
a1f140acf7 Merge pull request #718 from lightpanda-io/max_memory_30
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
increase max memory threshold to 30
2025-05-28 17:21:18 +08:00
Karl Seguin
fed37bcc48 increase max memory threshold to 30 2025-05-28 17:07:28 +08:00
sjorsdonkers
88df9f0134 missing t 2025-05-28 10:42:33 +02:00
Karl Seguin
79d1425530 Reduce info logs of HTTP event
In normal cases, only log a single info event HTTP request. In an error case or
when log-level=debug, more may be logged.
2025-05-28 11:18:38 +08:00
Karl Seguin
f9144378ae Re-enable microtask loop
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Must have gotten disabled in a merge?
2025-05-27 21:05:24 +02:00
Muki Kiboigo
d13d28e6f4 use single pointer to parser.MouseEvent 2025-05-27 20:55:54 +02:00
Muki Kiboigo
c438bb2fbe fix style of MouseEvent interface 2025-05-27 20:55:54 +02:00
Muki Kiboigo
5f4dd43124 support int enums in jsValueToZig 2025-05-27 20:55:54 +02:00
Muki Kiboigo
e7f16f371c add MouseEvent 2025-05-27 20:55:54 +02:00
Karl Seguin
30ff17df28 Skip large header lines that don't fit into the header buffer.
https://github.com/lightpanda-io/browser/issues/672
2025-05-28 00:14:51 +08:00
Karl Seguin
d7a3e2f450 Merge pull request #694 from lightpanda-io/add_event_listener_object
AddEventListener object listener
2025-05-27 21:05:52 +08:00
Karl Seguin
9ce3fc9f8e Refactor events
Removes some duplication between xhr/event_target and dom/event_target.

Implement 'once' option of addEventListener.
2025-05-27 21:03:43 +08:00
Karl Seguin
f0017c3e92 No-op eventHandler's passive option
This is a hint to the brower that the listener won't call preventDefault. In
theory, we should enforce this. But in practice, ignoring it should be ok.
2025-05-27 20:59:16 +08:00
Karl Seguin
99b7508c7a support object listener on removeEventListener also 2025-05-27 20:59:16 +08:00
Karl Seguin
cff8857a36 AddEventListener object listener
Instead of taking a callback function, addEventListener can take an object
that exposes a `handleEvent` function. When used this way, `this` is
automatically bound. I don't think the current behavior is correct when
`handleEvent` is defined as a property (getter), but I couldn't figure out how
to make it work the way WPT expects, and it hopefully isn't a common usage
pattern.

Also added option support to removeEventListener.
2025-05-27 20:59:14 +08:00
Karl Seguin
60395852d5 Merge pull request #706 from lightpanda-io/cookie-domain-localhost
cookies: accept localhost domain
2025-05-27 20:55:21 +08:00
Karl Seguin
edf125b4ba Merge pull request #705 from lightpanda-io/page_as_state
Replace SessionState directly with the Page.
2025-05-27 20:55:01 +08:00
Pierre Tachoire
b731fa4b78 cookie: ignore case when comparing with localhost domain
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
2025-05-27 14:31:59 +02:00
Karl Seguin
676e6ecec1 fix/revert debug code 2025-05-27 20:31:37 +08:00
Karl Seguin
7d9951aa3c Replace SessionState directly with the Page. 2025-05-27 20:31:34 +08:00
Karl Seguin
1d0876af4d Merge pull request #691 from lightpanda-io/logger
Replace std.log with a structured logger
2025-05-27 20:24:07 +08:00
Pierre Tachoire
c6f23eee77 cookies: accept localhost domain 2025-05-27 14:11:32 +02:00
Karl Seguin
8d3cf04324 re-enable log tests 2025-05-27 19:57:58 +08:00
Karl Seguin
fe9344ce57 Try stateless logger (to save memory) 2025-05-27 19:57:58 +08:00
Karl Seguin
d7c4824633 remove unused init, and remove magic pre-alloc 2025-05-27 19:57:58 +08:00
Karl Seguin
2feba3182a Replace std.log with a structured logger
Outputs in logfmt in release and a "pretty" print in debug mode. The format
along with the log level will become arguments to the binary at some point in
the future.
2025-05-27 19:57:58 +08:00
Pierre Tachoire
e9920caa69 Merge pull request #703 from lightpanda-io/window_top
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Simple window.top implementation (not frame-aware)
2025-05-27 09:48:52 +02:00
Karl Seguin
9bcaaab9d7 Simple window.top implementation (not frame-aware) 2025-05-27 15:25:27 +08:00
Pierre Tachoire
d47db317fb Merge pull request #702 from lightpanda-io/ci-bench
ci: execute cdp bench on main only
2025-05-27 06:48:31 +02:00
Pierre Tachoire
287d0fad85 Merge pull request #701 from lightpanda-io/s3-nightly
ci: use GLACIER IR class storage for release
2025-05-27 06:40:35 +02:00
Pierre Tachoire
7c19de3d61 ci: execute cdp bench on main only 2025-05-27 06:38:14 +02:00
Pierre Tachoire
a76cdf7514 ci: use GLACIER IR class storage for release 2025-05-27 06:34:24 +02:00
Karl Seguin
9abead7c49 Merge pull request #690 from lightpanda-io/zig_0_14_1
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Upgrade to Zig 0.14.1
2025-05-27 08:11:33 +08:00
Pierre Tachoire
5ff3f71f83 Merge pull request #700 from lightpanda-io/s3-nightly
S3 nightly
2025-05-26 21:57:31 +02:00