Remove js.DomElement from standard library
This commit is contained in:
@@ -36,12 +36,4 @@ fun setTimeout(callback : ()-> Unit, ms : Int) {}
|
|||||||
native
|
native
|
||||||
fun setInterval(callback : ()-> Unit, ms : Int) {}
|
fun setInterval(callback : ()-> Unit, ms : Int) {}
|
||||||
native
|
native
|
||||||
fun setInterval(callback : ()-> Unit) {}
|
fun setInterval(callback : ()-> Unit) {}
|
||||||
|
|
||||||
|
|
||||||
native
|
|
||||||
open class DomElement() {
|
|
||||||
val offsetLeft = 0.0;
|
|
||||||
val offsetTop = 0.0;
|
|
||||||
val offsetParent : DomElement? = DomElement();
|
|
||||||
}
|
|
||||||
@@ -1,19 +1,18 @@
|
|||||||
package js.jquery;
|
package js.jquery;
|
||||||
|
|
||||||
import js.*;
|
import js.dom.core.Element
|
||||||
import js.DomElement
|
|
||||||
|
|
||||||
native
|
native
|
||||||
class JQuery() {
|
class JQuery() {
|
||||||
fun addClass(className : String) : JQuery = js.noImpl;
|
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) = "";
|
||||||
fun attr(attrName : String, value : String) = this;
|
fun attr(attrName : String, value : String) = this;
|
||||||
|
|
||||||
fun html() : String = "";
|
fun html() : String = "";
|
||||||
fun html(s : String) = this;
|
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
|
fun hasClass(className : String) = true
|
||||||
@@ -23,22 +22,22 @@ class JQuery() {
|
|||||||
|
|
||||||
fun click() = this;
|
fun click() = this;
|
||||||
|
|
||||||
fun mousedown(handler : DomElement.(MouseEvent)->Unit) = this;
|
fun mousedown(handler : Element.(MouseEvent)->Unit) = this;
|
||||||
fun mouseup(handler : DomElement.(MouseEvent)->Unit) = this;
|
fun mouseup(handler : Element.(MouseEvent)->Unit) = this;
|
||||||
fun mousemove(handler : DomElement.(MouseEvent)->Unit) = this;
|
fun mousemove(handler : Element.(MouseEvent)->Unit) = this;
|
||||||
|
|
||||||
fun dblclick(handler : DomElement.(MouseClickEvent)->Unit) = this;
|
fun dblclick(handler : Element.(MouseClickEvent)->Unit) = this;
|
||||||
fun click(handler : DomElement.(MouseClickEvent)->Unit) = this;
|
fun click(handler : Element.(MouseClickEvent)->Unit) = this;
|
||||||
|
|
||||||
fun load(handler : DomElement.()->Unit) = this;
|
fun load(handler : Element.()->Unit) = this;
|
||||||
fun change(handler : DomElement.()->Unit) = this;
|
fun change(handler : Element.()->Unit) = this;
|
||||||
|
|
||||||
fun append(str : String) = this;
|
fun append(str : String) = this;
|
||||||
fun ready(handler : ()->Unit) = this;
|
fun ready(handler : ()->Unit) = this;
|
||||||
fun text(text : String) = this;
|
fun text(text : String) = this;
|
||||||
fun slideUp() = this;
|
fun slideUp() = this;
|
||||||
fun hover(handlerInOut : DomElement.() -> Unit) = this;
|
fun hover(handlerInOut : Element.() -> Unit) = this;
|
||||||
fun hover(handlerIn : DomElement.() -> Unit, handlerOut : DomElement.() -> Unit) = this;
|
fun hover(handlerIn : Element.() -> Unit, handlerOut : Element.() -> Unit) = this;
|
||||||
fun next() : JQuery = js.noImpl
|
fun next() : JQuery = js.noImpl
|
||||||
fun parent() : JQuery = js.noImpl
|
fun parent() : JQuery = js.noImpl
|
||||||
fun `val`() : String? = js.noImpl
|
fun `val`() : String? = js.noImpl
|
||||||
@@ -62,12 +61,12 @@ class MouseClickEvent() : MouseEvent() {
|
|||||||
native("$")
|
native("$")
|
||||||
fun jq(selector : String) = JQuery();
|
fun jq(selector : String) = JQuery();
|
||||||
native("$")
|
native("$")
|
||||||
fun jq(selector : String, context : DomElement) = JQuery();
|
fun jq(selector : String, context : Element) = JQuery();
|
||||||
native("$")
|
native("$")
|
||||||
fun jq(callback : () -> Unit) = JQuery();
|
fun jq(callback : () -> Unit) = JQuery();
|
||||||
native("$")
|
native("$")
|
||||||
fun jq(obj : JQuery) = JQuery();
|
fun jq(obj : JQuery) = JQuery();
|
||||||
native("$")
|
native("$")
|
||||||
fun jq(el : DomElement) = JQuery();
|
fun jq(el : Element) = JQuery();
|
||||||
native("$")
|
native("$")
|
||||||
fun jq() = JQuery();
|
fun jq() = JQuery();
|
||||||
|
|||||||
Reference in New Issue
Block a user