Skip to content

Commit a5b0afc

Browse files
committed
Empty and deprecate experimental.Fullscreen.
Its extensions are already provided by default in Element and Document.
1 parent 377b9ef commit a5b0afc

File tree

1 file changed

+4
-82
lines changed

1 file changed

+4
-82
lines changed
Lines changed: 4 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,6 @@
11
package org.scalajs.dom.experimental
22

3-
import org.scalajs.dom.{Event, Element, Document}
4-
5-
import scala.language.implicitConversions
6-
import scala.scalajs.js
7-
8-
/**
9-
* Full Screen API
10-
*
11-
* [[https://fullscreen.spec.whatwg.org/ Fullscreen API Living Standard]]
12-
*/
13-
object Fullscreen {
14-
15-
implicit def toFullscreenElement(e: Element): FullscreenElement =
16-
e.asInstanceOf[FullscreenElement]
17-
18-
implicit def toFullscreenDocument(d: Document): FullscreenDocument =
19-
d.asInstanceOf[FullscreenDocument]
20-
21-
@js.native
22-
trait FullscreenElement extends js.Object {
23-
24-
/**
25-
* The Element.requestFullscreen() method issues an asynchronous request to
26-
* make the element be displayed full-screen.
27-
*
28-
* It's not guaranteed that the element will be put into full screen mode.
29-
* If permission to enter full screen mode is granted, the document will
30-
* receive a `fullscreenchange` event to let it know that it's now in full
31-
* screen mode. If permission is denied, the document receives a
32-
* `fullscreenerror` event instead.
33-
*
34-
* Note: Returns `js.UndefOr` because implementations of older versions
35-
* of this spec may not return a Promise.
36-
*
37-
* MDN
38-
*/
39-
def requestFullscreen(): js.UndefOr[js.Promise[Unit]] = js.native
40-
}
41-
42-
@js.native
43-
trait FullscreenDocument extends js.Object {
44-
45-
/**
46-
* The fullscreenEnabled attribute tells you whether or not the document is
47-
* currently in a state that would allow fullscreen mode to be requested.
48-
*
49-
* MDN
50-
*/
51-
def fullscreenEnabled: Boolean = js.native
52-
53-
/**
54-
* Returns the Element that is currently being presented in full-screen mode
55-
* in this document, or `null` if full-screen mode is not currently in use.
56-
*
57-
* MDN
58-
*/
59-
def fullscreenElement: Element = js.native
60-
61-
/**
62-
* Stops document's fullscreen element from being displayed fullscreen and
63-
* fulfills promise when done.
64-
*
65-
* Note: Returns `js.UndefOr` because implementations of older versions
66-
* of this spec may not return a Promise.
67-
*
68-
* MDN
69-
*/
70-
def exitFullscreen(): js.UndefOr[js.Promise[Unit]] = js.native
71-
72-
/**
73-
* Note: May not be available in implementations of older versions of
74-
* this spec.
75-
**/
76-
var onfullscreenchange: js.Function1[Event, _] = js.native
77-
78-
/**
79-
* Note: May not be available in implementations of older versions of
80-
* this spec.
81-
**/
82-
var onfullscreenerror: js.Function1[Event, _] = js.native
83-
}
84-
}
3+
@deprecated(
4+
"the extensions provided by Fullscreen are now available by default",
5+
"2.0.0")
6+
object Fullscreen

0 commit comments

Comments
 (0)