mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
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. :^) (cherry picked from commit 274411db9756a9dffe44e21b4da09c7808e9f465)
This commit is contained in:
1 parent
a5e6fd3b5f
commit
3fe7d96fa7
3 files changed
+14
-1
No files matched your search
@@ -5637,4 +5637,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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -722,6 +722,9 @@ public:
|
||||
[[nodiscard]] WebIDL::CallbackType* onreadystatechange();
|
||||
void set_onreadystatechange(WebIDL::CallbackType*);
|
||||
|
||||
[[nodiscard]] WebIDL::CallbackType* onvisibilitychange();
|
||||
void set_onvisibilitychange(WebIDL::CallbackType*);
|
||||
|
||||
protected:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
@@ -152,7 +152,7 @@ interface Document : Node {
|
||||
|
||||
// special event handler IDL attributes that only apply to Document objects
|
||||
[LegacyLenientThis] attribute EventHandler onreadystatechange;
|
||||
[FIXME] attribute EventHandler onvisibilitychange;
|
||||
attribute EventHandler onvisibilitychange;
|
||||
};
|
||||
|
||||
dictionary ElementCreationOptions {
|
||||
|
||||
Reference in new issue
Block a user