Skip to content

Updates MediaQueryList to extend EventTarget #724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
  • Loading branch information
mabasic and armanbilge authored Aug 31, 2022
commit 9c98f2331fc8afaa02700be5b74334605bcb47bc
6 changes: 3 additions & 3 deletions dom/src/main/scala/org/scalajs/dom/MediaQueryList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait MediaQueryList extends EventTarget {
def matches: Boolean = js.native

/** A string representing a serialized media query. */
var media: String = js.native
def media: String = js.native

/** Adds to the MediaQueryList a callback which is invoked whenever the media query status—whether or not the document
* matches the media queries in the list—changes.
Expand All @@ -27,7 +27,7 @@ trait MediaQueryList extends EventTarget {
* watch for the change event.
* @deprecated
*/
@deprecated("Use addEventListener() instead", "2.3.0")
@deprecated("Use addEventListener() instead", "2.4.0")
def addListener(listener: MediaQueryListListener): Unit = js.native

/** Removes the specified listener callback from the callbacks to be invoked when the MediaQueryList changes media
Expand All @@ -38,6 +38,6 @@ trait MediaQueryList extends EventTarget {
* to remove change notification callbacks (which should have previously been added using addEventListener()).
* @deprecated
*/
@deprecated("Use removeEventListener() instead", "2.3.0")
@deprecated("Use removeEventListener() instead", "2.4.0")
def removeListener(listener: MediaQueryListListener): Unit = js.native
}