Commit Graph

46 Commits

Author SHA1 Message Date
Pierre Tachoire
b0c6948848 dom: implement document.createAttributeNS 2023-12-07 17:42:15 +01:00
Pierre Tachoire
f0149b03e5 dom: implement document.createAttribute 2023-12-07 17:36:34 +01:00
Pierre Tachoire
82148da5f6 dom: implement document.adoptNode 2023-12-07 17:31:04 +01:00
Pierre Tachoire
3ec5cee98c dom: implement document.importNode 2023-12-07 17:26:08 +01:00
Pierre Tachoire
9b9d927f38 dom: implement ProcessingIntruction.target 2023-12-07 17:02:14 +01:00
Pierre Tachoire
d13da6ffab dom: implement document.createProcessingInstruction 2023-12-07 16:54:17 +01:00
Pierre Tachoire
24ec5f554d dom: implement document.createComment 2023-12-07 16:30:33 +01:00
Pierre Tachoire
94876d01f1 dom: add document.createCDATASection 2023-12-07 16:27:26 +01:00
Pierre Tachoire
894b6182cf dom: implement document.createTextNode 2023-12-07 16:16:39 +01:00
Pierre Tachoire
1bcedead56 dom: implement document.createDocumentFragment 2023-12-05 14:21:00 +01:00
Francis Bouvier
ce913219a9 Add DOMError check in DOMImplementation
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2023-11-29 15:34:10 +01:00
Francis Bouvier
2065d47d8e Check DOMError
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2023-11-28 17:55:49 +01:00
Pierre Tachoire
1c4edf7c95 dom: implement document constructor 2023-11-27 17:55:00 +01:00
Pierre Tachoire
7bd4729d3f dom: add document.implementation 2023-11-27 17:54:59 +01:00
Pierre Tachoire
36005cd591 Merge pull request #86 from Browsercore/jsruntime_changes
Adapt to free js slices
2023-11-27 12:22:07 +01:00
Pierre Tachoire
ec06190327 dom: implement document.characterSet 2023-11-27 09:28:41 +01:00
Francis Bouvier
71866001db Adapt to free js slices
Relates to PR https://github.com/Browsercore/jsruntime-lib/issues/111

Relates to issue https://github.com/Browsercore/jsruntime-lib/pull/142

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2023-11-26 23:49:21 +01:00
Pierre Tachoire
b64707766e dom: rename document.get_URL 2023-11-24 10:30:15 +01:00
Pierre Tachoire
bf297ac97d dom: document.documentURI and document.URL 2023-11-24 09:22:37 +01:00
Pierre Tachoire
0fadb4ff98 dom: document.contentType with hardcoded value 2023-11-24 09:22:37 +01:00
Pierre Tachoire
f1ea914303 dom: add document.compatMode with hardcoded value 2023-11-24 09:22:37 +01:00
Pierre Tachoire
4ae0c0c5af dom: add document.characterSet with hardcoded value 2023-11-24 09:22:35 +01:00
Pierre Tachoire
e4d1b1d921 dom: add document.documentElement getter 2023-11-24 09:21:07 +01:00
Francis Bouvier
f0483586a3 Merge pull request #75 from Browsercore/dom-documenttype
dom: add DocumentType
2023-11-23 14:33:25 +01:00
Pierre Tachoire
06ec9a16f5 dom: remove useless error union on document.getElementsBy* 2023-11-20 16:34:13 +01:00
Pierre Tachoire
a64d920f11 dom: add document.doctype getter 2023-11-20 15:26:58 +01:00
Pierre Tachoire
47e52b8217 dom: implement lwc_string
and unit tests for document.GetElementByClassName
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
78e2f70cfb dom: refacto HTMLCollection to extract matching 2023-11-20 14:57:41 +01:00
Pierre Tachoire
4a15456418 dom: declare document.createElementsNS 2023-11-20 10:39:40 +01:00
Pierre Tachoire
18bfaf8b55 dom: create elementToNode helper 2023-11-17 15:11:00 +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
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
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
34d5f2800e document: re-dispatch tests between node document and html document 2023-10-18 14:11:31 +02:00
Pierre Tachoire
9dda08b8a9 dom: document: re-dispatch document function according to spec 2023-10-17 18:18:38 +02:00
Pierre Tachoire
2a4d2be7db dom/document: fix get_body 2023-10-17 14:30:11 +02:00
Pierre Tachoire
6370b2d7a7 dom: add document.createElement and document.getElementById 2023-10-11 14:48:31 +02:00
Francis Bouvier
766b7b4ed8 netsurf: first adaptations
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-09-20 23:04:16 +02:00
Francis Bouvier
e0eee45156 Applies changes from jsruntime Self and mem_guaranteed
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-06-02 16:54:57 +02:00
Francis Bouvier
50ac87ed6a Implement HTMLDocument.createElement
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-03-16 18:22:46 +01:00
Francis Bouvier
497a1119f8 Initial commit
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-02-07 16:22:01 +01:00