sjorsdonkers
bacef41a3b
extra header feedback
2025-06-06 10:33:15 +02:00
sjorsdonkers
f1672dd6d2
setExtraHTTPHeaders
2025-06-05 16:42:29 +02:00
Karl Seguin
fff0a8a522
Merge pull request #757 from lightpanda-io/window_target_crash
...
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
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (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 / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Fix crash when event target is the window.
2025-06-05 07:55:59 +08:00
Karl Seguin
4ff978f318
Merge pull request #762 from lightpanda-io/url_constructor
...
Url constructor
2025-06-05 07:55:48 +08:00
Karl Seguin
b29e07faba
expose URLSearchParams toString and URL.toString
2025-06-04 21:41:49 +08:00
Karl Seguin
b35107a966
URL stitch avoid double /
2025-06-04 21:41:49 +08:00
Karl Seguin
1090ff0175
URL constructor overload support
...
Allow URL constructor to be created with another URL or an HTML element.
Add URL set_search method.
Remove no-longer-used url/query.zig
2025-06-04 21:41:49 +08:00
Karl Seguin
8de57ec0e0
Merge pull request #761 from lightpanda-io/pozo_for_custom_state
...
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
Improve usability of NodeWrapper
2025-06-04 21:38:50 +08:00
Karl Seguin
4165f47a64
merge all states
2025-06-04 19:52:23 +08:00
sjorsdonkers
f931026216
update libdom with embedder data fix
2025-06-04 12:38:26 +02:00
Karl Seguin
19df73729a
Improve usability of NodeWrapper
...
The NodeWrapper pattern attaches a Zig instance to a libdom Node. That works in
isolation, but for 1 given node, we might want to attach different instances.
For example, for an HTMLScriptElement we want to attach an `onError`, but for
that same node viewed as an HTMLElement we want to a `CSSStyleDeclaration`. We
can only have one. Currently, this code will crash if, for example, we create
the embedded data as an HTMLScriptElement, then try to read the embedded data
as an HTMLElement.
This PR introduces dedicated state class. So if you want the onError property,
you no longer ask the NodeWrapper for an HTMLSCriptElement. Instead, you ask
for a storage/HTMLElement.
Nothing fancy here, just memory-inefficient optional fields. If it gets out of
hand, we'll think of something more clever.
2025-06-04 18:04:39 +08:00
Karl Seguin
9efc1a1c09
Merge pull request #752 from lightpanda-io/url_search_params
...
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
Rework/fix URLSearchParams
2025-06-04 14:38:23 +08:00
Karl Seguin
234e7afb12
Merge pull request #721 from lightpanda-io/HTMLInputElement-properties
...
Input element properties
2025-06-04 14:22:45 +08:00
Karl Seguin
8904afaa74
Fix crash when event target is the window.
...
On page load, emitted by the page, the target is the window, but it's improperly
cast since the pointer is actually `window.base`. This is going to be a problem
in general for any Zig type dispatched as a target, but the Window one is the
most obvious and the easiest to fix. If this issue comes up with other types,
we'll need to come up with a more robust solution.
2025-06-04 11:17:57 +08:00
Karl Seguin
d95a18b6eb
Merge pull request #756 from lightpanda-io/nix-2505
...
Bump Nixpkgs to 25.05
2025-06-04 08:40:51 +08:00
Karl Seguin
bcd4bdb4e0
Merge pull request #754 from lightpanda-io/fix-makebuilddev
...
fix makebuilddev
2025-06-04 08:34:42 +08:00
Karl Seguin
73df41b5b2
Merge pull request #753 from lightpanda-io/console_error_stack_trace
...
Make stacktraces available in debug via `page.stackTrace()`
2025-06-04 08:34:09 +08:00
Karl Seguin
d32fbfd634
Merge pull request #749 from lightpanda-io/functions
...
Poor support for functions/namespaces.
2025-06-04 08:33:51 +08:00
Karl Seguin
6b0c532f48
Merge pull request #742 from lightpanda-io/focus_and_active_element
...
Focus and active element
2025-06-04 08:33:20 +08:00
Muki Kiboigo
9f4ee7d6a8
update nixpkgs to 25.05
2025-06-03 10:44:03 -07:00
sjorsdonkers
7da83d2259
fix makebuilddev
2025-06-03 16:25:35 +02:00
sjorsdonkers
ceb9453006
Simplify testing
2025-06-03 16:04:31 +02:00
Karl Seguin
7091b37f3a
Make stacktraces available in debug via page.stackTrace()
...
Automatically include the stack trace in a `console.error` output. This is
useful because code frequently does:
```
try blah();
catch (e) console.log(e);
```
Which we log, but, without this, don't get the stack.
2025-06-03 20:40:40 +08:00
Karl Seguin
18e6f9be71
Detached node can't have focus.
...
Refactor isNodeAttached because of the "law of three."
2025-06-03 20:25:15 +08:00
sjorsdonkers
19d40845a4
input prop testing
2025-06-03 14:11:35 +02:00
Karl Seguin
211ce20132
Add document.activeElement and HTMLElement.focus()
2025-06-03 20:10:33 +08:00
sjorsdonkers
275b97948b
input element properties
2025-06-03 14:08:54 +02:00
Karl Seguin
13d602a9e0
Rework/fix URLSearchParams
...
Extracts the FormData logic, which is both more complete and more correct and
reuses it between FormData and URLSearchParams.
This includes the additional iterator behavior, `set` and URLSearchParams
constructor from FormData.
2025-06-03 20:01:01 +08:00
Francis Bouvier
69215e7d27
Merge pull request #751 from lightpanda-io/dummy_window_scroll_to
...
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
add noop window.scrollTo
2025-06-03 13:49:29 +02:00
Karl Seguin
7e8df34681
add noop window.scrollTo
2025-06-03 18:43:35 +08:00
Karl Seguin
6451065c77
Poor support for functions/namespaces.
...
If you look at the specification for `console` [1], you'll note that it's a
namespace, not an interface (like most things). Furthermore, MDN lists its
methods as "static".
But it's a pretty weird namespace IMO, because some of its "functions", like
`count` can have state associated with them.
This causes some problems with our current implementation. Something like:
```
[1].forEach(console.log)
```
Fails, since `this` isn't our window-attached Console instance.
This commit introducing a new `static_XYZ` naming convention which does not
have the class/Self as a receiver:
```
pub fn static_log(values: []JsObject, page: *Page) !void {
```
This turns Console into a namespace for these specific functions, while still
being used normally for those functions that require state.
We could infer this behavior from the first parameter, but that seems more
error prone. For now, I prefer having the explicit `static_` prefix.
[1] https://console.spec.whatwg.org/#console-namespace
2025-06-03 14:40:10 +08:00
Karl Seguin
bde8c54e7e
Merge pull request #748 from lightpanda-io/test_leak
...
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
fix leak in test
2025-06-03 10:58:53 +08:00
Karl Seguin
97b17af056
fix leak in test
2025-06-03 10:49:52 +08:00
Karl Seguin
9c2e3e2c76
Merge pull request #740 from lightpanda-io/fix_anchor_href
...
Fix anchor href
2025-06-03 10:47:25 +08:00
Karl Seguin
3c637872f2
Merge pull request #743 from lightpanda-io/default_timeout_10s
...
Increase default timeout from 3s to 10s.
2025-06-03 10:47:10 +08:00
Karl Seguin
4c8e2a1258
Setting anchor href should consider document.url
2025-06-03 09:58:26 +08:00
Karl Seguin
e5a76d737c
Increase default timeout from 3s to 10s.
...
The wait_for_network_idle demo often times out for me. I don't see any reason
to have the default so low. More likely to cause user scripts to unnecessarily
fail.
2025-06-03 09:57:51 +08:00
Karl Seguin
a482d5998d
Merge pull request #739 from lightpanda-io/url_constructor
...
Fix url constructor
2025-06-03 09:55:47 +08:00
Karl Seguin
12bc540ec9
Merge pull request #744 from lightpanda-io/dockerfile_zig_path_fix
...
Update zig filename for new pattern used in 0.14.1+
2025-06-03 09:52:25 +08:00
Karl Seguin
b6a37f6fb8
Merge pull request #747 from lightpanda-io/fix_crash_on_error_exit
...
fix a silly log crash on exit error
2025-06-03 09:52:08 +08:00
Karl Seguin
bbdb25420a
Merge pull request #746 from lightpanda-io/null_object_guard
...
Guard against null object when trying to fetch a function
2025-06-03 09:51:54 +08:00
Karl Seguin
e3099a16d4
fix a silly log crash on exit error
2025-06-02 23:34:09 +08:00
Karl Seguin
167fe5f758
Guard against null object when trying to fetch a function
2025-06-02 23:27:29 +08:00
Karl Seguin
36f59da7cc
Update zig filename for new pattern used in 0.14.1+
...
https://github.com/lightpanda-io/browser/issues/711
2025-06-02 21:59:09 +08:00
Karl Seguin
1ac23ce191
Merge pull request #735 from lightpanda-io/improved_logging
...
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
Improved logging
2025-06-02 21:53:51 +08:00
Karl Seguin
a000dfe676
include stack trace in JS function call log errors
2025-06-02 21:43:24 +08:00
Karl Seguin
9e834e0db5
Revert "experiment with reducing retained arena size"
...
This reverts commit 2f6b4c04da3e4659a3ebe8bcb9195f4625feaa16.
2025-06-02 21:43:20 +08:00
Karl Seguin
021fc8fb59
experiment with reducing retained arena size
2025-06-02 21:41:53 +08:00
Karl Seguin
625fa03c22
fix tests
2025-06-02 21:38:57 +08:00
Karl Seguin
6e80b03faa
Improve script logging
...
1 - Add a custom console.lp function to make our debug logs stand out from
script logs.
2 - In some cases, significantly improve how JavaScript values are serialized
in debug logs and in console.log.
2025-06-02 21:38:57 +08:00