1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

LibWeb: Expose HTMLSelectElement::options

Use the stub implementation of HTMLOptionsCollection to expose the
`option` children of `select` elements.

This fixes a JS error on openstreetmap.org, which occured when JQuery
code tried to access `options.length`:
https://github.com/jquery/jquery/blob/main/src/attributes/val.js#L121
This commit is contained in:
Simon Wanner 2022-03-16 13:08:12 +01:00 committed by Andreas Kling
parent 624527f15e
commit deef2911e9
3 changed files with 24 additions and 0 deletions

View file

@ -1,9 +1,11 @@
#import <HTML/HTMLElement.idl>
#import <HTML/HTMLOptionsCollection.idl>
interface HTMLSelectElement : HTMLElement {
[Reflect] attribute boolean disabled;
[Reflect] attribute boolean multiple;
[Reflect] attribute boolean required;
[SameObject] readonly attribute HTMLOptionsCollection options;
};