JS deprecate old declarations
This commit is contained in:
committed by
Sergey Mashkov
parent
e84aa78ac6
commit
e487825237
+5482
-288
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -12,12 +12,12 @@ import org.w3c.dom.views.*
|
||||
|
||||
// Contains stub APIs for the W3C DOM API so we can delegate to the platform DOM instead
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait DocumentEvent {
|
||||
public fun createEvent(arg1: String?): Event = noImpl
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait Event {
|
||||
public val bubbles: Boolean
|
||||
public val cancelable: Boolean
|
||||
@@ -37,14 +37,14 @@ native public trait Event {
|
||||
}
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait EventTarget {
|
||||
public fun addEventListener(arg1: String?, arg2: EventListener, arg3: Boolean): Unit = noImpl
|
||||
public fun dispatchEvent(arg1: Event?): Boolean = noImpl
|
||||
public fun removeEventListener(arg1: String?, arg2: EventListener, arg3: Boolean): Unit = noImpl
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait MouseEvent: UIEvent {
|
||||
public val altKey: Boolean
|
||||
public val button: Short
|
||||
@@ -59,7 +59,7 @@ native public trait MouseEvent: UIEvent {
|
||||
public fun initMouseEvent(arg1: String?, arg2: Boolean, arg3: Boolean, arg4: AbstractView, arg5: Int, arg6: Int, arg7: Int, arg8: Int, arg9: Int, arg10: Boolean, arg11: Boolean, arg12: Boolean, arg13: Boolean, arg14: Short, arg15: EventTarget): Unit = noImpl
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait MutationEvent: Event {
|
||||
public val attrChange: Short
|
||||
public val attrName: String
|
||||
@@ -75,7 +75,7 @@ native public trait MutationEvent: Event {
|
||||
}
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait UIEvent: Event {
|
||||
public val detail: Int
|
||||
public val view: AbstractView
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.w3c.dom.views.*
|
||||
See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
*/
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public trait EventListener {
|
||||
public fun handleEvent(arg1: Event): Unit
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.w3c.dom3
|
||||
package org.w3c.dom
|
||||
|
||||
import java.util.AbstractList
|
||||
import kotlin.js.splitWithRegex
|
||||
@@ -25,6 +25,13 @@ public val window: Window = noImpl
|
||||
native
|
||||
public val document: Document = noImpl
|
||||
|
||||
native
|
||||
public val localStorage: Storage = noImpl
|
||||
|
||||
native
|
||||
public val sessionStorage: Storage = noImpl
|
||||
|
||||
|
||||
private class HTMLCollectionListView(val collection: HTMLCollection) : AbstractList<HTMLElement>() {
|
||||
override fun size(): Int = collection.length.toInt()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.w3c.dom.views
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
native public trait AbstractView {
|
||||
}
|
||||
|
||||
|
||||
@@ -3,22 +3,22 @@ package kotlin.js.dom.html
|
||||
import org.w3c.dom.*
|
||||
|
||||
native
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public val window: Window = noImpl
|
||||
|
||||
native
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public var document: HTMLDocument = noImpl
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Object {
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Image : HTMLImageElement {
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Navigator {
|
||||
public native var userAgent: String
|
||||
public native var product: String
|
||||
@@ -44,7 +44,7 @@ public native trait Screen {
|
||||
public native var colorDepth: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Option {
|
||||
public native var defaultSelected: Boolean
|
||||
public native var selected: Boolean
|
||||
@@ -52,7 +52,7 @@ public native trait Option {
|
||||
public native var value: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Location {
|
||||
public native var href: String
|
||||
public native var hash: String
|
||||
@@ -67,7 +67,7 @@ public native trait Location {
|
||||
public native fun replace(url: String): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Event {
|
||||
public native var data: Array<Any>
|
||||
public native var height: Double
|
||||
@@ -88,20 +88,20 @@ public native trait Event {
|
||||
public native var button: Boolean
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Selection {
|
||||
|
||||
}
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait CSSRule {
|
||||
public native var selectorText: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Stylesheet {
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait History {
|
||||
public native fun back(): Unit
|
||||
public native fun forward(): Unit
|
||||
@@ -112,7 +112,7 @@ public native trait Console {
|
||||
public native fun log(message: Any): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait Window {
|
||||
public native val document: HTMLDocument
|
||||
public native val event: Event
|
||||
@@ -172,21 +172,21 @@ public native trait Global {
|
||||
public native fun unescape(): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLCollection {
|
||||
public native val length: Double
|
||||
public native fun item(index: Number): Node?
|
||||
public native fun namedItem(name: String): Node?
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLOptionsCollection {
|
||||
public native val length: Double
|
||||
public native fun item(index: Number): Node?
|
||||
public native fun namedItem(name: String): Node?
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLDocument : Document {
|
||||
public native var title: String
|
||||
public native val referrer: String
|
||||
@@ -209,7 +209,7 @@ public native trait HTMLDocument : Document {
|
||||
public native var onunload: () -> Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLElement : Element {
|
||||
public native var id: String
|
||||
public native var title: String
|
||||
@@ -246,7 +246,7 @@ public native trait HTMLElement : Element {
|
||||
public native var onresize: () -> Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait CSSStyleDeclaration {
|
||||
public native var cssText: String
|
||||
public native var length: Double
|
||||
@@ -258,17 +258,17 @@ public native trait CSSStyleDeclaration {
|
||||
public native fun setProperty(propertyName: String, value: String, priority: String): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLHtmlElement : HTMLElement {
|
||||
public native var version: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLHeadElement : HTMLElement {
|
||||
public native var profile: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLLinkElement : HTMLElement {
|
||||
public native var disabled: Boolean
|
||||
public native var charset: String
|
||||
@@ -281,12 +281,12 @@ public native trait HTMLLinkElement : HTMLElement {
|
||||
public native var type: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTitleElement : HTMLElement {
|
||||
public native var text: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLMetaElement : HTMLElement {
|
||||
public native var content: String
|
||||
public native var httpEquiv: String
|
||||
@@ -294,26 +294,26 @@ public native trait HTMLMetaElement : HTMLElement {
|
||||
public native var scheme: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLBaseElement : HTMLElement {
|
||||
public native var href: String
|
||||
public native var target: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLIsIndexElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var prompt: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLStyleElement : HTMLElement {
|
||||
public native var disabled: Boolean
|
||||
public native var media: String
|
||||
public native var type: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLBodyElement : HTMLElement {
|
||||
public native var aLink: String
|
||||
public native var background: String
|
||||
@@ -325,7 +325,7 @@ public native trait HTMLBodyElement : HTMLElement {
|
||||
public native var onunload: () -> Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLFormElement {
|
||||
public native val elements: HTMLCollection
|
||||
public native val length: Double
|
||||
@@ -339,7 +339,7 @@ public native trait HTMLFormElement {
|
||||
public native fun reset(): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLSelectElement : HTMLElement {
|
||||
public native val type: String
|
||||
public native var selectedIndex: Double
|
||||
@@ -358,13 +358,13 @@ public native trait HTMLSelectElement : HTMLElement {
|
||||
public native fun focus(): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLOptGroupElement : HTMLElement {
|
||||
public native var disabled: Boolean
|
||||
public native var label: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLOptionElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var defaultSelected: Boolean
|
||||
@@ -376,7 +376,7 @@ public native trait HTMLOptionElement : HTMLElement {
|
||||
public native var value: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLInputElement : HTMLElement {
|
||||
public native var defaultValue: String
|
||||
public native var defaultChecked: Boolean
|
||||
@@ -404,7 +404,7 @@ public native trait HTMLInputElement : HTMLElement {
|
||||
public native var selectionEnd: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTextAreaElement : HTMLElement {
|
||||
public native var defaultValue: String
|
||||
public native val form: HTMLFormElement
|
||||
@@ -422,7 +422,7 @@ public native trait HTMLTextAreaElement : HTMLElement {
|
||||
public native fun select(): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLButtonElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var accessKey: String
|
||||
@@ -433,104 +433,104 @@ public native trait HTMLButtonElement : HTMLElement {
|
||||
public native var value: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLLabelElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var accessKey: String
|
||||
public native var htmlFor: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLFieldSetElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLLegendElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var accessKey: String
|
||||
public native var align: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLUListElement : HTMLElement {
|
||||
public native var compact: Boolean
|
||||
public native var type: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLOListElement : HTMLElement {
|
||||
public native var compact: Boolean
|
||||
public native var start: Double
|
||||
public native var type: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLDListElement : HTMLElement {
|
||||
public native var compact: Boolean
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLDirectoryElement : HTMLElement {
|
||||
public native var compact: Boolean
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLMenuElement : HTMLElement {
|
||||
public native var compact: Boolean
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLLIElement : HTMLElement {
|
||||
public native var type: String
|
||||
public native var value: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLDivElement : HTMLElement {
|
||||
public native var align: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLParagraphElement : HTMLElement {
|
||||
public native var align: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLHeadingElement : HTMLElement {
|
||||
public native var align: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLQuoteElement : HTMLElement {
|
||||
public native var cite: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLPreElement : HTMLElement {
|
||||
public native var width: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLBRElement : HTMLElement {
|
||||
public native var clear: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLBaseFontElement : HTMLElement {
|
||||
public native var color: String
|
||||
public native var face: String
|
||||
public native var size: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLFontElement : HTMLElement {
|
||||
public native var color: String
|
||||
public native var face: String
|
||||
public native var size: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLHRElement : HTMLElement {
|
||||
public native var align: String
|
||||
public native var noShade: Boolean
|
||||
@@ -538,13 +538,13 @@ public native trait HTMLHRElement : HTMLElement {
|
||||
public native var width: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLModElement : HTMLElement {
|
||||
public native var cite: String
|
||||
public native var dateTime: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLAnchorElement : HTMLElement {
|
||||
public native var accessKey: String
|
||||
public native var charset: String
|
||||
@@ -562,7 +562,7 @@ public native trait HTMLAnchorElement : HTMLElement {
|
||||
public native fun focus(): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLImageElement : HTMLElement {
|
||||
public native var name: String
|
||||
public native var align: String
|
||||
@@ -580,7 +580,7 @@ public native trait HTMLImageElement : HTMLElement {
|
||||
public native var width: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLObjectElement : HTMLElement {
|
||||
public native val form: HTMLFormElement
|
||||
public native var code: String
|
||||
@@ -603,7 +603,7 @@ public native trait HTMLObjectElement : HTMLElement {
|
||||
public native val contentDocument: Document
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLParamElement : HTMLElement {
|
||||
public native var name: String
|
||||
public native var type: String
|
||||
@@ -611,7 +611,7 @@ public native trait HTMLParamElement : HTMLElement {
|
||||
public native var valueType: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLAppletElement : HTMLElement {
|
||||
public native var align: String
|
||||
public native var alt: String
|
||||
@@ -626,13 +626,13 @@ public native trait HTMLAppletElement : HTMLElement {
|
||||
public native var width: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLMapElement : HTMLElement {
|
||||
public native val areas: HTMLCollection
|
||||
public native var name: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLAreaElement : HTMLElement {
|
||||
public native var accessKey: String
|
||||
public native var alt: String
|
||||
@@ -644,7 +644,7 @@ public native trait HTMLAreaElement : HTMLElement {
|
||||
public native var target: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLScriptElement : HTMLElement {
|
||||
public native var text: String
|
||||
public native var htmlFor: String
|
||||
@@ -655,7 +655,7 @@ public native trait HTMLScriptElement : HTMLElement {
|
||||
public native var type: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableElement : HTMLElement {
|
||||
public native var caption: HTMLTableCaptionElement
|
||||
public native var tHead: HTMLTableSectionElement
|
||||
@@ -681,12 +681,12 @@ public native trait HTMLTableElement : HTMLElement {
|
||||
public native fun deleteRow(index: Number): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableCaptionElement : HTMLElement {
|
||||
public native var align: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableColElement : HTMLElement {
|
||||
public native var align: String
|
||||
public native var ch: String
|
||||
@@ -696,7 +696,7 @@ public native trait HTMLTableColElement : HTMLElement {
|
||||
public native var width: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableSectionElement : HTMLElement {
|
||||
public native var align: String
|
||||
public native var ch: String
|
||||
@@ -707,7 +707,7 @@ public native trait HTMLTableSectionElement : HTMLElement {
|
||||
public native fun deleteRow(index: Number): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableRowElement : HTMLElement {
|
||||
public native val rowIndex: Double
|
||||
public native val sectionRowIndex: Double
|
||||
@@ -721,7 +721,7 @@ public native trait HTMLTableRowElement : HTMLElement {
|
||||
public native fun deleteCell(index: Number): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLTableCellElement : HTMLElement {
|
||||
public native val cellIndex: Double
|
||||
public native var abbr: String
|
||||
@@ -740,13 +740,13 @@ public native trait HTMLTableCellElement : HTMLElement {
|
||||
public native var width: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLFrameSetElement : HTMLElement {
|
||||
public native var cols: String
|
||||
public native var rows: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLFrameElement : HTMLElement {
|
||||
public native var frameBorder: String
|
||||
public native var longDesc: String
|
||||
@@ -758,7 +758,7 @@ public native trait HTMLFrameElement : HTMLElement {
|
||||
public native var src: String
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom3 instead")
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLIFrameElement : HTMLElement {
|
||||
public native var align: String
|
||||
public native var frameBorder: String
|
||||
|
||||
@@ -6,7 +6,7 @@ native public class Json() {
|
||||
}
|
||||
|
||||
public fun json(vararg pairs: Pair<String, Any?>): Json {
|
||||
var res: dynamic = js("({})")
|
||||
val res: dynamic = js("({})")
|
||||
for((name, value) in pairs) {
|
||||
res[name] = value
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package kotlin.js.dom.html5
|
||||
import kotlin.js.dom.html.HTMLElement
|
||||
import org.w3c.dom.Element
|
||||
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait HTMLCanvasElement : HTMLElement {
|
||||
public var width: Double
|
||||
public var height: Double
|
||||
@@ -12,6 +13,7 @@ public native trait HTMLCanvasElement : HTMLElement {
|
||||
public fun toDataURL(string: String): String
|
||||
}
|
||||
|
||||
deprecated("USe org.w3c.dom instead. See CanvasRenderingContext2D")
|
||||
public native trait CanvasContext {
|
||||
public var canvas: HTMLCanvasElement
|
||||
public fun save(): Unit
|
||||
@@ -76,10 +78,12 @@ public native trait CanvasContext {
|
||||
public fun putImageData(image_data: ImageData, dx: Number, dy: Number, dirtyX: Number, dirtyY: Number, dirtyWidth: Number): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait CanvasGradient {
|
||||
public fun addColorStop(offset: Number, color: String): Unit
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait ImageData {
|
||||
public var data: CanvasPixelArray
|
||||
public var width: Double
|
||||
@@ -90,6 +94,7 @@ public native trait CanvasPixelArray {
|
||||
public var length: Double
|
||||
}
|
||||
|
||||
deprecated("Use org.w3c.dom instead")
|
||||
public native trait TextMetrics {
|
||||
public var width: Double
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package html5.files
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public class FileReader() {
|
||||
public var onloadend : ((FileReaderEvent)->Unit)? = noImpl //
|
||||
public fun readAsDataURL(blob : Blob): Unit = noImpl
|
||||
@@ -8,23 +10,31 @@ public class FileReader() {
|
||||
}
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public class FileReaderEvent() {
|
||||
public val target : FileReader = noImpl
|
||||
}
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public class FileList() {
|
||||
public fun item(index : Int) : File? = noImpl
|
||||
public val length : Int = noImpl
|
||||
}
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public class File() : Blob() {
|
||||
public val name : String = noImpl
|
||||
// readonly attribute Date lastModifiedDate;
|
||||
}
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public open class Blob(blobParts: Array<Any>? = undefined, options: BlobPropertyBag? = undefined) {
|
||||
public val size: Int = noImpl
|
||||
public val type: String = noImpl
|
||||
@@ -35,6 +45,8 @@ public open class Blob(blobParts: Array<Any>? = undefined, options: BlobProperty
|
||||
}
|
||||
|
||||
native
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public trait BlobPropertyBag {
|
||||
public val type: String
|
||||
}
|
||||
@@ -17,12 +17,13 @@
|
||||
package kotlin.js.dom.html5
|
||||
|
||||
native
|
||||
public val localStorage: Storage = noImpl
|
||||
public val localStorage: org.w3c.dom3.Storage = noImpl
|
||||
|
||||
native
|
||||
public val sessionStorage: Storage = noImpl
|
||||
public val sessionStorage: org.w3c.dom3.Storage = noImpl
|
||||
|
||||
native
|
||||
deprecated("Use org.w3c.dom")
|
||||
public trait Storage {
|
||||
public val length: Int
|
||||
get() = noImpl
|
||||
|
||||
@@ -62,10 +62,12 @@ public fun jq(selector: String): JQuery = JQuery();
|
||||
native("$")
|
||||
public fun jq(selector: String, context: Element): JQuery = JQuery();
|
||||
native("$")
|
||||
native("$")
|
||||
public fun jq(callback: () -> Unit): JQuery = JQuery();
|
||||
native("$")
|
||||
public fun jq(obj: JQuery): JQuery = JQuery();
|
||||
native("$")
|
||||
public fun jq(el: Element): JQuery = JQuery();
|
||||
native("$")
|
||||
native("$")
|
||||
public fun jq(): JQuery = JQuery();
|
||||
|
||||
@@ -5,5 +5,6 @@ import org.w3c.dom.Document
|
||||
/**
|
||||
* 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
|
||||
|
||||
|
||||
@@ -3,14 +3,18 @@ package kotlin.dom
|
||||
import org.w3c.dom.Document
|
||||
import org.w3c.dom.Node
|
||||
|
||||
deprecated("use org.w3c.dom instead: create document directly via constructor Document() or use document.implementation.createDocument")
|
||||
public fun createDocument(): Document {
|
||||
return kotlin.js.dom.html.document.implementation.createDocument(null, null, null)
|
||||
}
|
||||
|
||||
deprecated("use org.w3c.dom instead")
|
||||
native public val Node.outerHTML: String get() = noImpl
|
||||
|
||||
/** Converts the node to an XML String */
|
||||
deprecated("use outerHTML directly")
|
||||
public fun Node.toXmlString(): String = this.outerHTML
|
||||
|
||||
/** Converts the node to an XML String */
|
||||
deprecated("use outerHTML directly")
|
||||
public fun Node.toXmlString(xmlDeclaration: Boolean): String = this.outerHTML
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.lang.IndexOutOfBoundsException
|
||||
|
||||
// Properties
|
||||
|
||||
deprecated("use textContent directly instead")
|
||||
public var Node.text: String
|
||||
get() {
|
||||
return textContent
|
||||
@@ -18,6 +19,7 @@ public var Node.text: String
|
||||
textContent = value
|
||||
}
|
||||
|
||||
deprecated("You shouldn't use it as setter will drop all elements and get may return not exactly content user can expect")
|
||||
public var Element.childrenText: String
|
||||
get() {
|
||||
val buffer = StringBuilder()
|
||||
@@ -368,6 +370,7 @@ public fun Element.createElement(name: String, doc: Document? = null, init: Elem
|
||||
}
|
||||
|
||||
/** Returns the owner document of the element or uses the provided document */
|
||||
deprecated("")
|
||||
public fun Node.ownerDocument(doc: Document? = null): Document {
|
||||
val answer = if (this.nodeType == Node.DOCUMENT_NODE) this as Document
|
||||
else if (doc == null) this.ownerDocument
|
||||
|
||||
@@ -24,7 +24,7 @@ fun main(args: Array<String>) {
|
||||
w.appendln(" */")
|
||||
|
||||
w.appendln()
|
||||
w.appendln("package org.w3c.dom3")
|
||||
w.appendln("package org.w3c.dom")
|
||||
w.appendln()
|
||||
|
||||
w.render(definitions)
|
||||
|
||||
@@ -135,7 +135,7 @@ $imports
|
||||
if (typeName == null) {
|
||||
validMethods.add(pk.method)
|
||||
} else {
|
||||
println(" deprecated(\"Use org.w3c.dom3 instead\")")
|
||||
println(" deprecated(\"Use org.w3c.dom instead\")")
|
||||
println(" public ${pk.kind} ${pk.name}: ${typeName}")
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ $imports
|
||||
var counter = 0
|
||||
val parameters = parameterTypes.map{ "arg${++counter}: ${parameterTypeName(it)}" }.makeString(", ")
|
||||
val returnType = simpleTypeName(method.getReturnType())
|
||||
println(" deprecated(\"Use org.w3c.dom3 instead\")")
|
||||
println(" deprecated(\"Use org.w3c.dom instead\")")
|
||||
println(" public fun ${method.getName()}($parameters): $returnType = noImpl")
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ $imports
|
||||
val value = field.get(null)
|
||||
if (value != null) {
|
||||
val fieldType = simpleTypeName(field.getType())
|
||||
println(" deprecated(\"Use org.w3c.dom3 instead\")")
|
||||
println(" deprecated(\"Use org.w3c.dom instead\")")
|
||||
println(" public val ${field.getName()}: $fieldType = $value")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user