JS move document/window/storage to kotlin.browser

This commit is contained in:
Sergey Mashkov
2015-05-05 16:01:46 +03:00
committed by Sergey Mashkov
parent 33c1d5d2cf
commit 4ee780ef07
4 changed files with 15 additions and 9 deletions
-1
View File
@@ -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>() {
+2 -2
View File
@@ -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")
+12 -6
View File
@@ -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
View File
@@ -1,6 +1,7 @@
package test.js
import kotlin.*
import kotlin.browser.*
import kotlin.dom.*
import kotlin.test.*
import org.w3c.dom.*