"js" -> "kotlin.js"

This commit is contained in:
Zalim Bashorov
2014-09-11 16:33:01 +04:00
parent b28b0046d1
commit 838c384672
50 changed files with 171 additions and 228 deletions
@@ -1,7 +1,5 @@
package foo
import js.*
class RangeIterator(val start: Int, var count: Int, val reversed: Boolean) {
var i = start
@@ -1,7 +1,5 @@
package a.b.c
import js.*
fun main(args: Array<String>) {
println("ayee")
}
}
@@ -1,7 +1,6 @@
package kotlin.test
import kotlin.test.*
import js.*
public var asserter: Asserter = JsTestsAsserter()
@@ -24,4 +23,4 @@ public class JsTestsAsserter() : Asserter {
}
native("JsTests.assert")
public fun assert(value: Boolean, message: String): Unit = js.noImpl
public fun assert(value: Boolean, message: String): Unit = js.noImpl
@@ -1,7 +1,5 @@
package foo
import js.*
native
class A(b: Int) {
fun g(): Int = js.noImpl
@@ -24,4 +22,4 @@ fun box(): Boolean {
return false;
}
return true;
}
}
@@ -1,7 +1,5 @@
package foo
import js.*
native
class A(val c: Int) {
native
@@ -17,4 +15,4 @@ fun box(): Boolean {
if (A(2).c != 2) return false
return true
}
}
@@ -1,8 +1,6 @@
package foo
import js.*
native
fun returnFalse(): Boolean = js.noImpl
fun box() = !returnFalse()
fun box() = !returnFalse()
@@ -1,11 +1,9 @@
package foo
import js.*
native
val c: Any? = js.noImpl
fun box(): Boolean {
if (c != null) return false
return (c == null)
}
}
@@ -1,7 +1,5 @@
package foo
import js.*
/*function g should return 0 if a parameter is undefined 1 if parameter is 1 and 3 if parameter is 3*/
native
fun f(g: (Int?) -> Int): Boolean = js.noImpl
@@ -21,4 +19,4 @@ fun box(): Boolean {
}
}
return f(b)
}
}
@@ -1,7 +1,5 @@
package foo
import js.*
native
fun paramCount(vararg a: Int): Int = js.noImpl
@@ -118,4 +116,4 @@ fun box(): String {
return "failed when combined SureCall and SafeCall, maybe we lost cached expression"
return "OK"
}
}
@@ -1,8 +1,5 @@
package foo
import js.enumerable
import js.native
native
fun <T> _enumerate(o: T): T = noImpl
@@ -27,4 +24,4 @@ fun box(): Boolean {
return (100 == test.a && "s" == test.b) && p.a == 100 && _findFirst<Int>(object {
val test = 100
}) == 100;
}
}
@@ -1,7 +1,5 @@
package foo
import js.*
fun box(): Boolean {
var twoToFive = IntRange(2, 5)
@@ -1,7 +1,5 @@
package foo
import js.*
fun box(): Boolean {
var d = 0
@@ -1,7 +1,5 @@
package foo
import js.*
fun box(): Boolean {
var twoToFive = 2..5
@@ -1,6 +1,6 @@
package test.browser
import js.dom.html.document
import kotlin.js.dom.html.document
import org.w3c.dom.Node
fun box(): String {
@@ -10,4 +10,4 @@ fun box(): String {
if (textNode.nodeType != Node.TEXT_NODE) return "The type of the node is ${textNode.nodeType}, ${Node.TEXT_NODE} was expected"
if (element.nodeType != Node.ELEMENT_NODE) return "The type of the node is ${element.nodeType}, ${Node.ELEMENT_NODE} was expected"
return element.textContent
}
}
@@ -4,14 +4,14 @@
*/
package creatures
import js.dom.html5.CanvasContext
import js.jquery.*
import js.dom.html5.CanvasGradient
import js.dom.html5.HTMLCanvasElement
import java.util.ArrayList
import js.dom.html.window
import js.dom.html.HTMLElement
import js.dom.html.HTMLImageElement
import jquery.*
import kotlin.js.dom.html.window
import kotlin.js.dom.html.HTMLElement
import kotlin.js.dom.html.HTMLImageElement
import kotlin.js.dom.html5.CanvasContext
import kotlin.js.dom.html5.CanvasGradient
import kotlin.js.dom.html5.HTMLCanvasElement
fun getImage(path: String): HTMLImageElement {
@@ -353,4 +353,4 @@ fun <T> List<T>.reversed(): List<T> {
result.add(get(--i))
}
return result
}
}
@@ -6,9 +6,9 @@ Note that only a subset of the api is supported for now.
package fancylines
import js.dom.html5.*
import js.dom.html.window
import js.jquery.*
import kotlin.js.dom.html.window
import kotlin.js.dom.html5.*
import jquery.*
fun main(args: Array<String>) {
jq {
@@ -3,9 +3,9 @@
*/
package hello
import js.dom.html5.*
import js.dom.html.window
import js.jquery.*
import kotlin.js.dom.html.window
import kotlin.js.dom.html5.*
import jquery.*
val canvas: HTMLCanvasElement
get() {
@@ -1,13 +1,12 @@
package traffic
import java.util.ArrayList
import js.dom.html5.CanvasContext
import js.dom.html5.HTMLCanvasElement
import js.dom.html.HTMLImageElement
import js.dom.html.window
import js.jquery.*
import js.dom.html.HTMLElement
import kotlin.js.dom.html5.CanvasContext
import kotlin.js.dom.html5.HTMLCanvasElement
import kotlin.js.dom.html.HTMLImageElement
import kotlin.js.dom.html.window
import kotlin.js.dom.html.HTMLElement
import jquery.*
fun getImage(path: String): HTMLImageElement {
val image = window.document.createElement("img") as HTMLImageElement
@@ -26,7 +26,6 @@
* Additionally, you can pass the desired initial number of bottles to use (rather than 99)
* as a command-line argument
*/
import js.*
fun main(args: Array<String>) {
if (args.isEmpty()) {
@@ -5,7 +5,6 @@
import java.util.*
import java.util.Collections.max
import js.*;
/*
* A field where cells live. Effectively immutable