Skip to content

Commit d7e4942

Browse files
committed
fix(mediaquerylist): fixes deprecated version
1 parent 18c79ba commit d7e4942

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

dom/src/main/scala/org/scalajs/dom/MediaQueryList.scala

+13-14
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package org.scalajs.dom
88

99
import scala.scalajs.js
1010

11-
/** A MediaQueryList object stores information on a media query applied to a document,
12-
* with support for both immediate and event-driven matching against the state of the document.
11+
/** A MediaQueryList object stores information on a media query applied to a document, with support for both immediate
12+
* and event-driven matching against the state of the document.
1313
*/
1414
@js.native
1515
trait MediaQueryList extends EventTarget {
@@ -20,25 +20,24 @@ trait MediaQueryList extends EventTarget {
2020
/** A string representing a serialized media query. */
2121
var media: String = js.native
2222

23-
/** Adds to the MediaQueryList a callback which is invoked whenever the media query status—whether or
24-
* not the document matches the media queries in the list—changes.
23+
/** Adds to the MediaQueryList a callback which is invoked whenever the media query status—whether or not the document
24+
* matches the media queries in the list—changes.
2525
*
26-
* This method exists primarily for backward compatibility;
27-
* if possible, you should instead use addEventListener() to watch for the change event.
26+
* This method exists primarily for backward compatibility; if possible, you should instead use addEventListener() to
27+
* watch for the change event.
2828
* @deprecated
2929
*/
30-
@deprecated("Use addEventListener() instead")
30+
@deprecated("Use addEventListener() instead", "2.3.0")
3131
def addListener(listener: MediaQueryListListener): Unit = js.native
3232

33-
/** Removes the specified listener callback from the callbacks to be invoked when the MediaQueryList
34-
* changes media query status, which happens any time the document switches between matching and
35-
* not matching the media queries listed in the MediaQueryList.
33+
/** Removes the specified listener callback from the callbacks to be invoked when the MediaQueryList changes media
34+
* query status, which happens any time the document switches between matching and not matching the media queries
35+
* listed in the MediaQueryList.
3636
*
37-
* This method has been kept for backward compatibility;
38-
* if possible, you should generally use removeEventListener() to remove change notification callbacks
39-
* (which should have previously been added using addEventListener()).
37+
* This method has been kept for backward compatibility; if possible, you should generally use removeEventListener()
38+
* to remove change notification callbacks (which should have previously been added using addEventListener()).
4039
* @deprecated
4140
*/
42-
@deprecated("Use removeEventListener() instead")
41+
@deprecated("Use removeEventListener() instead", "2.3.0")
4342
def removeListener(listener: MediaQueryListListener): Unit = js.native
4443
}

0 commit comments

Comments
 (0)