Skip to content

Commit e1393c5

Browse files
committed
Rename ImageLoadingMode to LazyLoadingState and change Longs to Double for Image
1 parent 6930cd5 commit e1393c5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

dom/src/main/scala-2/org/scalajs/dom/ImageLoadingMode.scala renamed to dom/src/main/scala-2/org/scalajs/dom/LazyLoadingState.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import scala.scalajs.js
77
* [[https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-loading]]
88
*/
99
@js.native
10-
sealed trait ImageLoadingMode extends js.Any
10+
sealed trait LazyLoadingState extends js.Any
1111

12-
object ImageLoadingMode {
13-
val eager: ImageLoadingMode = "eager".asInstanceOf[ImageLoadingMode]
14-
val `lazy`: ImageLoadingMode = "lazy".asInstanceOf[ImageLoadingMode]
12+
object LazyLoadingState {
13+
val eager: LazyLoadingState = "eager".asInstanceOf[LazyLoadingState]
14+
val `lazy`: LazyLoadingState = "lazy".asInstanceOf[LazyLoadingState]
1515
}

dom/src/main/scala-3/org/scalajs/dom/ImageLoadingMode.scala renamed to dom/src/main/scala-3/org/scalajs/dom/LazyLoadingState.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import scala.scalajs.js
66
* Possible values for an HTMLImageElement loading attribute
77
* [[https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-loading]]
88
*/
9-
opaque type ImageLoadingMode <: String = String
9+
opaque type LazyLoadingState <: String = String
1010

11-
object ImageLoadingMode {
12-
val eager: ImageLoadingMode = "eager"
13-
val `lazy`: ImageLoadingMode = "lazy"
11+
object LazyLoadingState {
12+
val eager: LazyLoadingState = "eager"
13+
val `lazy`: LazyLoadingState = "lazy"
1414
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class HTMLImageElement extends HTMLElement {
3131
/** A string whose value provides a hint to the user agent on how to handle the loading of the image which is
3232
* currently outside the window's visual viewport.
3333
*/
34-
var loading: ImageLoadingMode = js.native
34+
var loading: LazyLoadingState = js.native
3535

3636
/** Reflects the src HTML attribute, containing the URL of the image. */
3737
var src: String = js.native
@@ -67,8 +67,8 @@ abstract class HTMLImageElement extends HTMLElement {
6767
var onload: js.Function1[Event, _] = js.native
6868

6969
/** Indicates the x-coordinate of the <img> element's left border edge relative to the root element's origin. */
70-
def x: Long = js.native
70+
def x: Double = js.native
7171

7272
/** Indicates the y-coordinate of the <img> element's top border edge relative to the root element's origin. */
73-
def y: Long = js.native
73+
def y: Double = js.native
7474
}

0 commit comments

Comments
 (0)