Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Add support for indexed setter of HTMLOptionsCollection #630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vpzomtrrfrt
Copy link
Contributor

No description provided.

Comment on lines +79 to +82
// The spec doesn't seem to require this, but it's consistent with length handling and other browsers
if (index > 100'000) {
return {};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're adding a weird special case, let's make sure we test it as well :)

return WebIDL::TypeMismatchError::create(realm(), "The value provided is not an HTMLOptionElement"_fly_string);
}

auto& option = dynamic_cast<HTMLOptionElement&>(unconverted_option.as_object());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be okay to static_cast<HTMLOptionElement&> here as you have verified just above that it is indeed an option element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants