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