Commit Graph

226 Commits

Author SHA1 Message Date
Pierre Tachoire
47e52b8217 dom: implement lwc_string
and unit tests for document.GetElementByClassName
2023-11-20 14:57:42 +01:00
Pierre Tachoire
9acf3fb209 dom: remove useless deinit from html_collection 2023-11-20 14:57:42 +01:00
Pierre Tachoire
dd28204797 dom: implement getElementsByClassName 2023-11-20 14:57:42 +01:00
Pierre Tachoire
e9edb8bab4 dom: no need to allocate mem for case insensitive equality
thanks to
[std.ascii.eqlIgnoreCase](https://ziglang.org/documentation/master/std/#A;std:ascii.eqlIgnoreCase)
2023-11-20 14:57:41 +01:00
Pierre Tachoire
9b94a4ec49 dom: deinit matcher with HTMLCollection 2023-11-20 14:57:41 +01:00
Pierre Tachoire
78e2f70cfb dom: refacto HTMLCollection to extract matching 2023-11-20 14:57:41 +01:00
Francis Bouvier
54f7492bab Merge pull request #73 from Browsercore/html-collection-wpt
dom: add WPT tests for HTMLCollection
2023-11-20 14:10:24 +01:00
Francis Bouvier
c1dec3794a Merge pull request #72 from Browsercore/domdoc-createelementns
dom: declare document.createElementsNS
2023-11-20 14:09:20 +01:00
Pierre Tachoire
b656831e76 dom: add WPT tests for HTMLCollection 2023-11-20 10:44:07 +01:00
Pierre Tachoire
4a15456418 dom: declare document.createElementsNS 2023-11-20 10:39:40 +01:00
Francis Bouvier
05d31eb63e Merge pull request #64 from Browsercore/domdoc-gelementsby
document.getElementsByTagName
2023-11-17 15:23:10 +01:00
Pierre Tachoire
18bfaf8b55 dom: create elementToNode helper 2023-11-17 15:11:00 +01:00
Pierre Tachoire
3ca6a4a74e dom: fix bug in collection get_next 2023-11-16 17:32:31 +01:00
Pierre Tachoire
9b923c550b dom: remove unreachable from html collection 2023-11-16 17:32:30 +01:00
Pierre Tachoire
3909fc01a7 dom: improve code style 2023-11-16 17:32:30 +01:00
Pierre Tachoire
a136e812ae dom: add collection get_next comment 2023-11-16 17:32:30 +01:00
Pierre Tachoire
2129361fa0 dom: is_wildcard is never changed 2023-11-16 17:32:29 +01:00
Pierre Tachoire
d8b1989e8e netsurf: remove useless HTMLCollection wrapper 2023-11-16 17:32:22 +01:00
Pierre Tachoire
ba32e1baff dom: collection: use nullable value instead fo undefined 2023-11-16 12:31:26 +01:00
Pierre Tachoire
62fe1c292d wpt: add a console.log debug message 2023-11-16 10:09:00 +01:00
Pierre Tachoire
24d3854138 dom: saner returns for html collection 2023-11-15 17:06:42 +01:00
Pierre Tachoire
6f2e59d663 wpt: add getElementsByTagName tests 2023-11-15 16:09:11 +01:00
Pierre Tachoire
f02769b2dd dom: use allocator with HTMLCollection getters 2023-11-15 16:09:09 +01:00
Pierre Tachoire
9bb200a46f dom: rename HTMLCollection._next() into get_next()
We don't want expose the function to the JS API.
2023-11-15 16:09:08 +01:00
Pierre Tachoire
84934cca13 dom: add HTMLCollection unit tests 2023-11-15 16:09:06 +01:00
Pierre Tachoire
055bde96e4 dom: speedup HTMLCollection.item() w/ an internal state 2023-11-15 16:09:04 +01:00
Pierre Tachoire
5f05cffff9 dom: remove optional node type 2023-11-15 16:09:03 +01:00
Pierre Tachoire
8c1d1e491c dom: refacto HTMLCollection next 2023-11-15 16:09:01 +01:00
Pierre Tachoire
1fe49adba2 dom: add comment about buffer with fixed length
The buffer is used for upper case string transformation.
2023-11-15 16:09:00 +01:00
Pierre Tachoire
09d032f6f8 dom: implement HTMLCollection.namedItem() 2023-11-15 16:08:58 +01:00
Pierre Tachoire
3a188c4568 dom: compare tagname in case insensitive way 2023-11-15 16:08:57 +01:00
Pierre Tachoire
062a1a4010 dom: implement HTMLCollection
We can't simply use the libdom dom_document_get_elements_by_tag_name
because it follows an old version of the specifications and returns a
NodeList.
Since
190700b7c1
the spec changed in favor of returning an HTMLCollection.

So I'm trying to re-implement the HTMLCollection in zig.
2023-11-15 16:08:55 +01:00
Pierre Tachoire
2e40837f0d dom: add HTMLCollection 2023-11-15 16:08:52 +01:00
Pierre Tachoire
a238eed065 upgrade jsruntime-lib 2023-11-15 15:01:04 +01:00
Francis Bouvier
6f2cc91eab Merge pull request #68 from Browsercore/ci
ci: add CI workflows for tests
2023-11-15 14:22:17 +01:00
Pierre Tachoire
9469f157ca ci: don't run CI for draft PRs 2023-11-15 13:53:54 +01:00
Francis Bouvier
2331223cad Merge pull request #69 from Browsercore/ci-deps
ci: create a docker image with browsercore deps
2023-11-15 11:59:23 +01:00
Pierre Tachoire
d06d09ddda ci: add path contraints for pull requests 2023-11-15 11:58:09 +01:00
Pierre Tachoire
13e11ae5ca ci: build-deps: fix branch name 2023-11-15 11:45:59 +01:00
Pierre Tachoire
a671f6fd8a ci: allow WPT to fail 2023-11-15 09:29:49 +01:00
Pierre Tachoire
9155024fa5 ci: add zig build release 2023-11-15 09:02:21 +01:00
Pierre Tachoire
2afbd0752c ci: use browsercore-zig docker image 2023-11-14 19:04:30 +01:00
Pierre Tachoire
d04e321b65 ci: create a docker image with browsercore deps 2023-11-14 15:40:52 +01:00
Pierre Tachoire
d6996889c2 ci: fetch git submodules recursively 2023-11-14 11:36:34 +01:00
Pierre Tachoire
c5170db0f6 ci: add CI workflows for tests 2023-11-14 11:36:33 +01:00
Pierre Tachoire
ad58e536ed makefile: remove useless var 2023-11-14 11:36:33 +01:00
Francis Bouvier
ab75644dc8 Update jsruntime
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-11-09 16:25:37 +01:00
Francis Bouvier
f8d8920ebb Merge pull request #67 from Browsercore/wpt-script
wpt: load script source files from HTML
2023-11-09 15:29:01 +01:00
Pierre Tachoire
bd0ade29d2 wpt: use fs.path.join 2023-10-27 19:06:51 +02:00
Pierre Tachoire
89431971ac wpt: load script soruce file dynamically 2023-10-27 19:00:26 +02:00