Commit Graph

7 Commits

Author SHA1 Message Date
Shannon Booth
1ffbd29683 Bindings: Implement is_supported_property_index in terms of item_value
Greatly simplifying the code :^)

(cherry picked from commit 9b1af542e7a718d110786551a1a18914cc386a2d)
2024-07-28 14:12:04 -04:00
Shannon Booth
930725ce8d Bindings: Make item_value return an Optional<JS::Value>
This removes some ambiguity about what the return value should be if
the index is out of range.

Previously, we would sometimes return a JS null, and other times a JS
undefined.

It will also let us fold together the checks for whether an index is a
supported property index, followed by getting the value just afterwards.

(cherry picked from commit c5c1a8fcc78af986e5dd1a1f0bef1223e458ed37)
2024-07-28 14:12:04 -04:00
Shannon Booth
daa4dc63f5 Bindings: Remove exception handling for named_item_value
(cherry picked from commit 9b59dc5e8b88d311089e57fe134a1377a39242cb)
2024-07-28 14:12:04 -04:00
Shannon Booth
7bcb02822e Bindings: Remove exception handling for named_item
We don't need this for any case, so just remove it to simplify handling
in PlatformObject.

(cherry picked from commit 081c92bf3dc66773887243718cf41011289ac55e)
2024-07-28 14:12:04 -04:00
Matthew Olsson
a98ad191c7 Userland: Add ESCAPING annotations to a bunch of places
This isn't comprehensive; just a result of a simple grep search.
2024-05-22 21:55:34 -06:00
Shannon Booth
89a536b57a LibWeb: Remove resolved FIXME about putting HTMLALlCollection in HTML NS
This was an unfortunate artifact from development. I originally added
this class in the DOM namespace alongside HTMLCollection until I
realized it was defined by the HTML spec instead. To remind myself to
move it over to the HTML namespace, I left this comment. It was moved
to the correct namespace before upstreaming to the main repo, but I
forgot to remove this comment!
2024-05-12 07:28:09 +01:00
Shannon Booth
1f59e21829 LibWeb: Implement HTMLAllCollection
This collection has some pretty strange behaviour, particularly with the
IsHTMLDDA slot which is defined in the javascript spec specifically for
this object.

This commit implements pretty much all of this interface, besides from
the custom [[Call]].

There is also no caching over this collection. Since it is a live
collection over the entire document, the performance is never going to
be great, and I am not convinced any speedup for this legacy interface
is worth a massive cache.
2024-04-01 14:41:00 +02:00