mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Stub out Window-Management proposal extensions to Screen API
As defined in https://w3c.github.io/window-management
This commit is contained in:
parent
b79815c5a5
commit
97bf9e7953
Notes:
sideshowbarker
2024-07-17 08:37:36 +09:00
Author: https://github.com/shannonbooth
Commit: 97bf9e7953
Pull-request: https://github.com/SerenityOS/serenity/pull/23855
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/awesomekling
3 changed files with 35 additions and 4 deletions
|
@ -22,7 +22,7 @@ JS::NonnullGCPtr<Screen> Screen::create(HTML::Window& window)
|
|||
}
|
||||
|
||||
Screen::Screen(HTML::Window& window)
|
||||
: PlatformObject(window.realm())
|
||||
: DOM::EventTarget(window.realm())
|
||||
, m_window(window)
|
||||
{
|
||||
}
|
||||
|
@ -58,4 +58,23 @@ JS::NonnullGCPtr<ScreenOrientation> Screen::orientation()
|
|||
return *m_orientation;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/window-management/#dom-screen-isextended
|
||||
bool Screen::is_extended() const
|
||||
{
|
||||
dbgln("FIXME: Unimplemented Screen::is_extended");
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/window-management/#dom-screen-onchange
|
||||
void Screen::set_onchange(JS::GCPtr<WebIDL::CallbackType> event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::change, event_handler);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/window-management/#dom-screen-onchange
|
||||
JS::GCPtr<WebIDL::CallbackType> Screen::onchange()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::change);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue