LibWeb: Support Document.onvisibilitychange

We don't have a way to trigger this from a test, but the fix is so
simple that we might as well get it in. :^)
This commit is contained in:
Andreas Kling 2024-10-08 16:27:40 +02:00 committed by Andreas Kling
commit 274411db97
Notes: github-actions[bot] 2024-10-08 16:50:04 +00:00
3 changed files with 14 additions and 1 deletions

View file

@ -5676,4 +5676,14 @@ void Document::set_onreadystatechange(WebIDL::CallbackType* value)
set_event_handler_attribute(HTML::EventNames::readystatechange, value);
}
WebIDL::CallbackType* Document::onvisibilitychange()
{
return event_handler_attribute(HTML::EventNames::visibilitychange);
}
void Document::set_onvisibilitychange(WebIDL::CallbackType* value)
{
set_event_handler_attribute(HTML::EventNames::visibilitychange, value);
}
}