LibWeb: Add stub for ValidityState

This fixes https://html5test.com/ as previously an exception was being
thrown after trying to access this attribute which would then result in
a popup about the test failing (and none of the test results being
shown).
This commit is contained in:
Shannon Booth 2024-06-09 15:13:38 +12:00 committed by Andreas Kling
commit e0bbbc729b
Notes: sideshowbarker 2024-07-17 03:25:24 +09:00
9 changed files with 87 additions and 1 deletions

View file

@ -174,6 +174,8 @@ public:
virtual void form_associated_element_was_removed(DOM::Node*) override;
virtual void form_associated_element_attribute_changed(FlyString const&, Optional<String> const&) override;
JS::NonnullGCPtr<ValidityState const> validity() const;
// ^HTMLElement
// https://html.spec.whatwg.org/multipage/forms.html#category-label
virtual bool is_labelable() const override { return type_state() != TypeAttributeState::Hidden; }