mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #14630 - bd339:iss14064, r=KiChjang
Use MediaQueryListEvent for media query list change events <!-- Please describe your changes on the following line: --> - Implements MediaQueryListEvent interface - Makes MediaQueryList change events conform to the [spec](https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes) - Updates matchMedia.html test to verify that the new event type is used --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14064 <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14630) <!-- Reviewable:end -->
This commit is contained in:
commit
bcf154d8e6
6 changed files with 120 additions and 2 deletions
15
components/script/dom/webidls/MediaQueryListEvent.webidl
Normal file
15
components/script/dom/webidls/MediaQueryListEvent.webidl
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-mediaquerylistevent-mediaquerylistevent
|
||||
[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict), Exposed=(Window)]
|
||||
interface MediaQueryListEvent : Event {
|
||||
readonly attribute DOMString media;
|
||||
readonly attribute boolean matches;
|
||||
};
|
||||
|
||||
dictionary MediaQueryListEventInit : EventInit {
|
||||
DOMString media = "";
|
||||
boolean matches = false;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue