JS move document/window/storage to kotlin.browser
This commit is contained in:
committed by
Sergey Mashkov
parent
33c1d5d2cf
commit
4ee780ef07
@@ -42,7 +42,6 @@ private class HTMLCollectionListView(val collection: HTMLCollection) : AbstractL
|
|||||||
}
|
}
|
||||||
|
|
||||||
public fun HTMLCollection.asList(): List<HTMLElement> = HTMLCollectionListView(this)
|
public fun HTMLCollection.asList(): List<HTMLElement> = HTMLCollectionListView(this)
|
||||||
|
|
||||||
public fun HTMLCollection?.toElementList(): List<Element> = this?.asList() ?: emptyList()
|
public fun HTMLCollection?.toElementList(): List<Element> = this?.asList() ?: emptyList()
|
||||||
|
|
||||||
private class DOMTokenListView(val delegate: DOMTokenList) : AbstractList<String>() {
|
private class DOMTokenListView(val delegate: DOMTokenList) : AbstractList<String>() {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package kotlin.js.dom.html
|
|||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
|
|
||||||
native
|
native
|
||||||
deprecated("Use org.w3c.dom instead")
|
deprecated("Use kotlin.browser instead")
|
||||||
public val window: Window = noImpl
|
public val window: Window = noImpl
|
||||||
|
|
||||||
native
|
native
|
||||||
deprecated("Use org.w3c.dom instead")
|
deprecated("Use kotlin.browser instead")
|
||||||
public var document: HTMLDocument = noImpl
|
public var document: HTMLDocument = noImpl
|
||||||
|
|
||||||
deprecated("Use org.w3c.dom instead")
|
deprecated("Use org.w3c.dom instead")
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
package kotlin.browser
|
package kotlin.browser
|
||||||
|
|
||||||
import org.w3c.dom.Document
|
import org.w3c.dom.*
|
||||||
|
|
||||||
/**
|
native
|
||||||
* Provides access to the current active browsers DOM for the currently visible page.
|
public val window: Window = noImpl
|
||||||
*/
|
|
||||||
deprecated("use org.w3c.dom instead")
|
native
|
||||||
native public var document: Document = noImpl
|
public val document: Document = noImpl
|
||||||
|
|
||||||
|
native
|
||||||
|
public val localStorage: Storage = noImpl
|
||||||
|
|
||||||
|
native
|
||||||
|
public val sessionStorage: Storage = noImpl
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package test.js
|
package test.js
|
||||||
|
|
||||||
import kotlin.*
|
import kotlin.*
|
||||||
|
import kotlin.browser.*
|
||||||
import kotlin.dom.*
|
import kotlin.dom.*
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
|
|||||||
Reference in New Issue
Block a user