Skip to content

Change Storage#length to a def instead of var #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25109,7 +25109,7 @@ StereoPannerNode[JT] def removeEventListener[T <: Event](`type`: String, listene
Storage[JC] def clear(): Unit
Storage[JC] def getItem(key: String): String
Storage[JC] def key(index: Int): String
Storage[JC] var length: Int
Storage[JC] def length: Int
Storage[JC] def removeItem(key: String): Unit
Storage[JC] def setItem(key: String, data: String): Unit
StorageEstimate[JT] val quota: Double
Expand Down
2 changes: 1 addition & 1 deletion api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25109,7 +25109,7 @@ StereoPannerNode[JT] def removeEventListener[T <: Event](`type`: String, listene
Storage[JC] def clear(): Unit
Storage[JC] def getItem(key: String): String
Storage[JC] def key(index: Int): String
Storage[JC] var length: Int
Storage[JC] def length: Int
Storage[JC] def removeItem(key: String): Unit
Storage[JC] def setItem(key: String, data: String): Unit
StorageEstimate[JT] val quota: Double
Expand Down
2 changes: 1 addition & 1 deletion dom/src/main/scala/org/scalajs/dom/Storage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import scala.scalajs.js.annotation._
@js.native
@JSGlobal
class Storage extends js.Object {
var length: Int = js.native
def length: Int = js.native

def getItem(key: String): String = js.native

Expand Down