diff --git a/js/js.libraries/src/core/core.kt b/js/js.libraries/src/core/core.kt index 989995df136..64c4fb604e1 100644 --- a/js/js.libraries/src/core/core.kt +++ b/js/js.libraries/src/core/core.kt @@ -36,12 +36,4 @@ fun setTimeout(callback : ()-> Unit, ms : Int) {} native fun setInterval(callback : ()-> Unit, ms : Int) {} native -fun setInterval(callback : ()-> Unit) {} - - -native -open class DomElement() { - val offsetLeft = 0.0; - val offsetTop = 0.0; - val offsetParent : DomElement? = DomElement(); -} +fun setInterval(callback : ()-> Unit) {} \ No newline at end of file diff --git a/js/js.libraries/src/jquery/common.kt b/js/js.libraries/src/jquery/common.kt index f93636baffd..962a8be81fb 100644 --- a/js/js.libraries/src/jquery/common.kt +++ b/js/js.libraries/src/jquery/common.kt @@ -1,19 +1,18 @@ package js.jquery; -import js.*; -import js.DomElement +import js.dom.core.Element native class JQuery() { fun addClass(className : String) : JQuery = js.noImpl; - fun addClass(f : DomElement.(Int, String)->String) = js.noImpl; + fun addClass(f : Element.(Int, String)->String) = js.noImpl; fun attr(attrName : String) = ""; fun attr(attrName : String, value : String) = this; fun html() : String = ""; fun html(s : String) = this; - fun html(f : DomElement.(Int, String)->String) = this; + fun html(f : Element.(Int, String)->String) = this; fun hasClass(className : String) = true @@ -23,22 +22,22 @@ class JQuery() { fun click() = this; - fun mousedown(handler : DomElement.(MouseEvent)->Unit) = this; - fun mouseup(handler : DomElement.(MouseEvent)->Unit) = this; - fun mousemove(handler : DomElement.(MouseEvent)->Unit) = this; + fun mousedown(handler : Element.(MouseEvent)->Unit) = this; + fun mouseup(handler : Element.(MouseEvent)->Unit) = this; + fun mousemove(handler : Element.(MouseEvent)->Unit) = this; - fun dblclick(handler : DomElement.(MouseClickEvent)->Unit) = this; - fun click(handler : DomElement.(MouseClickEvent)->Unit) = this; + fun dblclick(handler : Element.(MouseClickEvent)->Unit) = this; + fun click(handler : Element.(MouseClickEvent)->Unit) = this; - fun load(handler : DomElement.()->Unit) = this; - fun change(handler : DomElement.()->Unit) = this; + fun load(handler : Element.()->Unit) = this; + fun change(handler : Element.()->Unit) = this; fun append(str : String) = this; fun ready(handler : ()->Unit) = this; fun text(text : String) = this; fun slideUp() = this; - fun hover(handlerInOut : DomElement.() -> Unit) = this; - fun hover(handlerIn : DomElement.() -> Unit, handlerOut : DomElement.() -> Unit) = this; + fun hover(handlerInOut : Element.() -> Unit) = this; + fun hover(handlerIn : Element.() -> Unit, handlerOut : Element.() -> Unit) = this; fun next() : JQuery = js.noImpl fun parent() : JQuery = js.noImpl fun `val`() : String? = js.noImpl @@ -62,12 +61,12 @@ class MouseClickEvent() : MouseEvent() { native("$") fun jq(selector : String) = JQuery(); native("$") -fun jq(selector : String, context : DomElement) = JQuery(); +fun jq(selector : String, context : Element) = JQuery(); native("$") fun jq(callback : () -> Unit) = JQuery(); native("$") fun jq(obj : JQuery) = JQuery(); native("$") -fun jq(el : DomElement) = JQuery(); +fun jq(el : Element) = JQuery(); native("$") fun jq() = JQuery();