Commit Graph
29 Commits
Author SHA1 Message Date
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
https://github.com/whatwg/dom/commit/190700b7c12ecfd3b5ebdb359ab1d6ea9cbf7749
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