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?.toElementList(): List<Element> = this?.asList() ?: emptyList()
|
||||
|
||||
private class DOMTokenListView(val delegate: DOMTokenList) : AbstractList<String>() {
|
||||
|
||||
@@ -3,11 +3,11 @@ package kotlin.js.dom.html
|
||||
import org.w3c.dom.*
|
||||
|
||||
native
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
deprecated("Use kotlin.browser instead")
|
||||
public val window: Window = noImpl
|
||||
|
||||
native
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
deprecated("Use kotlin.browser instead")
|
||||
public var document: HTMLDocument = noImpl
|
||||
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package kotlin.browser
|
||||
|
||||
import org.w3c.dom.Document
|
||||
import org.w3c.dom.*
|
||||
|
||||
/**
|
||||
* Provides access to the current active browsers DOM for the currently visible page.
|
||||
*/
|
||||
deprecated("use org.w3c.dom instead")
|
||||
native public var document: Document = noImpl
|
||||
native
|
||||
public val window: Window = noImpl
|
||||
|
||||
native
|
||||
public val document: Document = noImpl
|
||||
|
||||
native
|
||||
public val localStorage: Storage = noImpl
|
||||
|
||||
native
|
||||
public val sessionStorage: Storage = noImpl
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package test.js
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.browser.*
|
||||
import kotlin.dom.*
|
||||
import kotlin.test.*
|
||||
import org.w3c.dom.*
|
||||
|
||||
Reference in New Issue
Block a user