mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibWeb: Implement MediaQuery matching :^)
Currently, `evaluate()` recalculates whether the MediaQuery matches or not, and stores it in `m_matches`, which users can query using `matches()`. This allows us to know when the match-state changes, which is required to fire MediaQueryList's change event.
This commit is contained in:
parent
f354fd72f1
commit
1c829e0417
6 changed files with 163 additions and 1 deletions
|
@ -29,6 +29,9 @@ public:
|
|||
void append_medium(String);
|
||||
void delete_medium(String);
|
||||
|
||||
bool evaluate(DOM::Window const&);
|
||||
bool matches() const;
|
||||
|
||||
private:
|
||||
explicit MediaList(NonnullRefPtrVector<MediaQuery>&&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue