Commit Graph

1117 Commits

Author SHA1 Message Date
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
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
Pierre Tachoire
9acb1890b4 netsurf: add elementGetAttribute func 2023-10-27 18:11:08 +02:00
Francis Bouvier
3c5f1b89e7 Update jsruntime + fix breaking changes
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-23 13:03:39 +02:00
Pierre Tachoire
cff27ecbd2 document: remove constructor comparison from test
Now the tag's constructor can be HTMLElement, so previous basic test
is invalid.
2023-10-19 15:16:26 +02:00
Pierre Tachoire
091a7fec9a netsurf: use the missing tags from libdom 2023-10-19 15:14:19 +02:00
Pierre Tachoire
24a4164f5e dom: add missing tags
according with https://wpt.live/dom/nodes/Node-cloneNode.html test
2023-10-19 15:14:16 +02:00
Francis Bouvier
7f9ee308bd Merge pull request #51 from Browsercore/wpt
WPT tests
2023-10-18 16:49:11 +02:00
Pierre Tachoire
0580a3ffd6 netsurf: remove useless documentBody 2023-10-18 16:35:30 +02:00
Pierre Tachoire
34d5f2800e document: re-dispatch tests between node document and html document 2023-10-18 14:11:31 +02:00
Pierre Tachoire
b8efce8f34 wpt: declare FilesMap type in FileLoader struct 2023-10-18 14:08:58 +02:00
Pierre Tachoire
0a3e2fe392 wpt: refacto js eval 2023-10-17 18:33:35 +02:00
Pierre Tachoire
3f40936b78 wpt: remove useless default 2023-10-17 18:19:17 +02:00
Pierre Tachoire
9dda08b8a9 dom: document: re-dispatch document function according to spec 2023-10-17 18:18:38 +02:00
Pierre Tachoire
8f6016e0fd netsurf: cs fix 2023-10-17 14:32:59 +02:00
Pierre Tachoire
2a4d2be7db dom/document: fix get_body 2023-10-17 14:30:11 +02:00
Pierre Tachoire
77ab43fbd4 netsurf: stick w/ pure c names 2023-10-17 14:11:20 +02:00
Pierre Tachoire
82bcf226c2 netsurf: remove useless var 2023-10-17 14:08:11 +02:00
Pierre Tachoire
ebb5afe914 wpt: remove useless alias 2023-10-17 11:49:53 +02:00
Pierre Tachoire
14cacc3635 wpt: remove Self = @This() useless usage 2023-10-17 11:48:30 +02:00
Pierre Tachoire
3b141d3216 wpt: rename new into init 2023-10-17 11:40:07 +02:00
Pierre Tachoire
aadc17292e wpt: improve hashmap creation readability 2023-10-17 11:39:00 +02:00
Pierre Tachoire
0d6c319f1b wpt: replace cbk_res with null 2023-10-17 11:24:35 +02:00
Francis Bouvier
ac76f95916 Format test.html for easier manipulation
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-12 14:15:08 +02:00
Pierre Tachoire
6370b2d7a7 dom: add document.createElement and document.getElementById 2023-10-11 14:48:31 +02:00
Pierre Tachoire
f3601f1245 wpt: get the script content fonr the node itself
instead of using the first child only which result a partial content.
see https://github.com/Browsercore/browsercore/issues/59
2023-10-11 11:31:40 +02:00
Pierre Tachoire
bf0af2c036 wpt: accept test name argument 2023-10-11 10:48:11 +02:00
Pierre Tachoire
22b9b1841c wpt: rename file into main and create make wpt 2023-10-11 09:35:52 +02:00
Pierre Tachoire
8321aa42c7 wpt: create a command instead of a test 2023-10-11 09:35:52 +02:00
Pierre Tachoire
24e8de00ae wpt: update test runner 2023-10-11 09:35:51 +02:00
Pierre Tachoire
b8de2f213c wpt: implement missing features in JS 2023-10-11 09:35:51 +02:00
Pierre Tachoire
590fe62f88 wpt: remode useless func 2023-10-11 09:35:50 +02:00
Pierre Tachoire
a42d054fe7 wpt: update parser.documentHTMLParseFromFileAlloc refacto 2023-10-11 09:35:49 +02:00
Pierre Tachoire
ae18c105c5 wpt: refacto wpt test runner 2023-10-11 09:35:49 +02:00
Pierre Tachoire
2cfc28ff2f wpt: change test format 2023-10-11 09:35:48 +02:00
Pierre Tachoire
a27a24fe8c wpt: use the parser from string and fix mem leak 2023-10-11 09:35:48 +02:00
Pierre Tachoire
1c7655bfb5 wpt: browse tests dir dynamically 2023-10-11 09:35:47 +02:00
Pierre Tachoire
753b2c9970 wpt: update parser.documentHTMLParse 2023-10-11 09:35:47 +02:00
Pierre Tachoire
d171b0ff01 wpt: first draft for tests 2023-10-11 09:35:47 +02:00
Pierre Tachoire
b782a591f9 netsurf: add document.getElementsByName 2023-10-11 09:35:46 +02:00
Pierre Tachoire
b8205e7498 netsurf: add NodeList 2023-10-11 09:35:41 +02:00
Francis Bouvier
3ad5233b18 Forgot to commit files on b8aa291e1e
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-10 16:49:09 +02:00
Francis Bouvier
887dde5ee3 Merge pull request #57 from Browsercore/global_aliases
Alias global as self and window
2023-10-10 14:50:32 +02:00
Francis Bouvier
28b1bee241 Alias global as self and window
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-10 14:49:57 +02:00
Francis Bouvier
76dd8f3c31 Merge pull request #54 from Browsercore/text
text: properties and methods
2023-10-10 07:55:10 +02:00
Francis Bouvier
b8aa291e1e Iterfaces generation refacto
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-09 17:31:42 +02:00
Francis Bouvier
b05e08e6a8 text: add splitText method
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-10-09 16:27:40 +02:00