Storage

abstract external class Storage

Exposes the JavaScript Storage to Kotlin

Constructors

Storage
Link copied to clipboard
JS
fun Storage()

Functions

clear
Link copied to clipboard
JS
fun clear()
getItem
Link copied to clipboard
JS
fun getItem(key: String): String?
key
Link copied to clipboard
JS
fun key(index: Int): String?
removeItem
Link copied to clipboard
JS
fun removeItem(key: String)
setItem
Link copied to clipboard
JS
fun setItem(key: String, value: String)

Properties

length
Link copied to clipboard
JS
open val length: Int

Extensions

get
Link copied to clipboard
JS
inline operator fun Storage.get(key: String): String?
set
Link copied to clipboard
JS
inline operator fun Storage.set(key: String, value: String)