Skip to content

Commit b865f65

Browse files
committed
Remove MDN attributions and ResizeObserverOptions factory
1 parent d84ef7d commit b865f65

File tree

6 files changed

+15
-79
lines changed

6 files changed

+15
-79
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ package org.scalajs.dom
99
import scala.scalajs.js
1010
import scala.scalajs.js.annotation._
1111

12-
/** A DOMRect describes the size and position of a rectangle.
13-
*
14-
* MDN
15-
*/
12+
/** A DOMRect describes the size and position of a rectangle. */
1613
@js.native
1714
@JSGlobal
1815
class DOMRect extends DOMRectReadOnly {

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

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,27 @@ import scala.scalajs.js
55
@js.native
66
trait DOMRectReadOnly extends js.Object {
77

8-
/** The x coordinate of the DOMRect's origin.
9-
*
10-
* MDN
11-
*/
8+
/** The x coordinate of the DOMRect's origin. */
129
def x: Double = js.native
1310

14-
/** The y coordinate of the DOMRect's origin.
15-
*
16-
* MDN
17-
*/
11+
/** The y coordinate of the DOMRect's origin. */
1812
def y: Double = js.native
1913

20-
/** The width of the DOMRect.
21-
*
22-
* MDN
23-
*/
14+
/** The width of the DOMRect. */
2415
def width: Double = js.native
2516

26-
/** The height of the DOMRect.
27-
*
28-
* MDN
29-
*/
17+
/** The height of the DOMRect. */
3018
def height: Double = js.native
3119

32-
/** Returns the top coordinate value of the DOMRect (usually the same as y.)
33-
*
34-
* MDN
35-
*/
20+
/** Returns the top coordinate value of the DOMRect (usually the same as y.) */
3621
def top: Double = js.native
3722

38-
/** Returns the right coordinate value of the DOMRect (usually the same as x + width).
39-
*
40-
* MDN
41-
*/
23+
/** Returns the right coordinate value of the DOMRect (usually the same as x + width). */
4224
def right: Double = js.native
4325

44-
/** Returns the bottom coordinate value of the DOMRect (usually the same as y + height)
45-
*
46-
* MDN
47-
*/
26+
/** Returns the bottom coordinate value of the DOMRect (usually the same as y + height) */
4827
def bottom: Double = js.native
4928

50-
/** Returns the left coordinate value of the DOMRect (usually the same as x)
51-
*
52-
* MDN
53-
*/
29+
/** Returns the left coordinate value of the DOMRect (usually the same as x) */
5430
def left: Double = js.native
5531
}

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

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,21 @@ import scala.scalajs.js
44
import scala.scalajs.js.annotation.JSGlobal
55

66
/** The ResizeObserver constructor creates a new ResizeObserver object, which can be used to report changes to the
7-
* content or border box of an Element or the bounding box of an SVGElement - MDN
7+
* content or border box of an Element or the bounding box of an SVGElement
88
*
99
* @param callback
10-
* The function called whenever an observed resize occurs. - MDN
10+
* The function called whenever an observed resize occurs.
1111
*/
1212
@js.native
1313
@JSGlobal
1414
class ResizeObserver(callback: js.Function2[js.Array[ResizeObserverEntry], ResizeObserver, _]) extends js.Object {
1515

16-
/** Starts observing the specified Element or SVGElement.
17-
*
18-
* MDN
19-
*/
16+
/** Starts observing the specified Element or SVGElement. */
2017
def observe(target: Node, options: js.UndefOr[ResizeObserverOptions] = js.native): Unit = js.native
2118

22-
/** Unobserves all observed Element or SVGElement targets.
23-
*
24-
* MDN
25-
*/
19+
/** Unobserves all observed Element or SVGElement targets. */
2620
def disconnect(): Unit = js.native
2721

28-
/** Ends the observing of a specified Element or SVGElement.
29-
*
30-
* MDN
31-
*/
22+
/** Ends the observing of a specified Element or SVGElement. */
3223
def unobserve(target: Node): Unit = js.native
3324
}

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,27 @@ import scala.scalajs.js
44

55
/** The ResizeObserverEntry interface represents the object passedto the ResizeObserver() constructor's callback
66
* function, which allows you to access the new dimensions of the Element or SVGElement being observed.
7-
*
8-
* MDN
97
*/
108
@js.native
119
trait ResizeObserverEntry extends js.Object {
1210

13-
/** A reference to the Element or SVGElement being observed
14-
*
15-
* MDN
16-
*/
11+
/** A reference to the Element or SVGElement being observed */
1712
def target: Node = js.native
1813

1914
/** An array containing objects with the new border box size of the observed element. The array is necessary to
2015
* support elements that have multiple fragments, which occur in multi-column scenarios.
21-
*
22-
* MDN
2316
*/
2417
def borderBoxSize: js.Array[ResizeObserverSize] = js.native
2518

2619
/** An array containing objects with the new content box size of the observed element. The array is necessary to
2720
* support elements that have multiple fragments, which occur in multi-column scenarios.
28-
*
29-
* MDN
3021
*/
3122
def contentBoxSize: js.Array[ResizeObserverSize] = js.native
3223

3324
/** A [[DOMRectReadOnly]] object containing the new size of the observed element when the callback is run. Note that
3425
* this is better supported than the above two properties, but it is left over from an earlier implementation of the
3526
* Resize Observer API, is still included in the spec for web compat reasons, and may be deprecated in future
3627
* versions.
37-
*
38-
* MDN
3928
*/
4029
def contentRect: DOMRectReadOnly = js.native
4130
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,3 @@ import scala.scalajs.js
66
trait ResizeObserverOptions extends js.Object {
77
var box: js.UndefOr[String] = js.native
88
}
9-
10-
/** Factory for [[ResizeObserverOptions]] objects. */
11-
object ResizeObserverOptions {
12-
13-
/** Creates a new [[ResizeObserverOptions]] object with the given values. */
14-
def apply(
15-
box: Option[String] = None
16-
): ResizeObserverOptions = {
17-
val res = js.Dynamic.asInstanceOf[ResizeObserverOptions]
18-
box.foreach(res.box = _)
19-
res
20-
}
21-
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ trait ResizeObserverSize extends js.Object {
88
/** The length of the observed element's border box in the block dimension. For boxes with a horizontal writing-mode,
99
* this is the vertical dimension, or height; if the writing-mode is vertical, this is the horizontal dimension, or
1010
* width.
11-
*
12-
* MDN
1311
*/
1412
def blockSize: Double = js.native
1513

1614
/** The length of the observed element's border box in the inline dimension. For boxes with a horizontal writing-mode,
1715
* this is the horizontal dimension, or width; if the writing-mode is vertical, this is the vertical dimension, or
1816
* height.
19-
*
20-
* MDN
2117
*/
2218
def inlineSize: Double = js.native
2319
}

0 commit comments

Comments
 (0)