ladybird/Userland/Libraries/LibWeb/HTML/HTMLAllCollection.idl
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

14 lines
510 B
Plaintext

#import <DOM/Element.idl>
#import <DOM/HTMLCollection.idl>
[Exposed=Window,
LegacyUnenumerableNamedProperties]
interface HTMLAllCollection {
readonly attribute unsigned long length;
getter Element (unsigned long index);
getter (HTMLCollection or Element)? namedItem([FlyString] DOMString name);
(HTMLCollection or Element)? item(optional [FlyString] DOMString nameOrIndex);
// Note: HTMLAllCollection objects have a custom [[Call]] internal method and an [[IsHTMLDDA]] internal slot.
};