Native api update.

This commit is contained in:
pTalanov
2012-03-11 22:37:53 +04:00
parent c21cdaf413
commit 3ef7805cd6
5 changed files with 18 additions and 2 deletions
+2 -1
View File
@@ -16,8 +16,9 @@ library("println")
fun println(s : Any?) {}
library("print")
fun print(s : Any?) {}
//TODO: consistent parseInt
library("parseInt")
fun parseInt(s : String) : Int = 0
fun parseInt(s : String) : Int = js.noImpl
library
open class Exception() : Throwable() {}
library
+11
View File
@@ -0,0 +1,11 @@
package js.debug
import js.*
native
val console : consoleClass = js.noImpl
native
class consoleClass() {
fun log(message : Any?) : Unit = js.noImpl
}
+3
View File
@@ -17,5 +17,8 @@ fun Json.get(paramName : String) : Any? = js.noImpl
library("jsonFromTuples")
fun json(vararg pairs : Tuple2<String, Any?>) : Json = js.noImpl
library("jsonFromTuples")
fun json2(pairs : Array<Tuple2<String, Any?>>) : Json = js.noImpl
library("jsonAddProperties")
fun Json.add(other : Json) : Json = js.noImpl
+1 -1
View File
@@ -2,6 +2,7 @@ package js;
import js.native
//TODO: declare using number
native
class MathClass() {
val PI : Double = 1.0;
@@ -25,7 +26,6 @@ class MathClass() {
fun round(value : Number) = 0
fun floor(value : Number) = 0
fun ceil(value : Number) = 0
}
native
+1
View File
@@ -41,6 +41,7 @@ class JQuery() {
fun hover(handlerIn : DomElement.() -> Unit, handlerOut : DomElement.() -> Unit) = this;
fun next() : JQuery = js.noImpl
fun parent() : JQuery = js.noImpl
fun `val`() : String? = js.noImpl
}
native