1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibWeb/HTML: Port Window.matchMedia() to IDL

This commit is contained in:
Linus Groh 2023-03-06 19:51:05 +00:00
parent 198db2ebd9
commit 2beb99b76e
3 changed files with 18 additions and 17 deletions

View file

@ -1,4 +1,5 @@
#import <Crypto/Crypto.idl>
#import <CSS/MediaQueryList.idl>
#import <DOM/Document.idl>
#import <DOM/EventHandler.idl>
#import <DOM/EventTarget.idl>
@ -42,6 +43,9 @@ interface Window : EventTarget {
// https://dom.spec.whatwg.org/#interface-window-extensions
[Replaceable] readonly attribute (Event or undefined) event; // legacy
// https://w3c.github.io/csswg-drafts/cssom-view/#extensions-to-the-window-interface
[NewObject] MediaQueryList matchMedia(CSSOMString query);
// FIXME: Everything from here on should be shared through WindowOrWorkerGlobalScope
// https://w3c.github.io/hr-time/#the-performance-attribute
[Replaceable] readonly attribute Performance performance;