Fix some JS APIs

This commit is contained in:
Alexey Andreev 2015-10-11 18:26:50 +03:00
parent ef71ec99ad
commit 94368935ab
9 changed files with 28 additions and 28 deletions

View File

@ -48,16 +48,16 @@ public abstract class Window implements JSObject, EventTarget, StorageProvider {
public static native int setTimeout(TimerHandler handler, double delay);
@JSBody(params = { "timeoutId" }, script = "clearTimeout(timeoutId);")
public abstract void clearTimeout(int timeoutId);
public static native void clearTimeout(int timeoutId);
@JSBody(params = { "handler", "delay" }, script = "return setInverval(handler, delay);")
public abstract int setInterval(TimerHandler handler, int delay);
public static native int setInterval(TimerHandler handler, int delay);
@JSBody(params = { "handler", "delay" }, script = "return setInverval(handler, delay);")
public abstract int setInterval(TimerHandler handler, double delay);
public static native int setInterval(TimerHandler handler, double delay);
@JSBody(params = { "timeoutId" }, script = "clearInverval(timeoutId);")
public abstract void clearInterval(int timeoutId);
public static native void clearInterval(int timeoutId);
@JSBody(params = {}, script = "return window;")
public static native Window current();

View File

@ -30,11 +30,11 @@ public abstract class Float32Array extends ArrayBufferView {
public abstract void set(int index, float value);
@JSBody(params = "length", script = "return new Float32Array(length);")
public static native ArrayBuffer create(int length);
public static native Float32Array create(int length);
@JSBody(params = "buffer", script = "return new Float32Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Float32Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Float32Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Float32Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Float64Array extends ArrayBufferView {
public abstract void set(int index, double value);
@JSBody(params = "length", script = "return new Float64Array(length);")
public static native ArrayBuffer create(int length);
public static native Float64Array create(int length);
@JSBody(params = "buffer", script = "return new Float64Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Float64Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Float64Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Float64Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Int16Array extends ArrayBufferView {
public abstract void set(int index, short value);
@JSBody(params = "length", script = "return new Int16Array(length);")
public static native ArrayBuffer create(int length);
public static native Int16Array create(int length);
@JSBody(params = "buffer", script = "return new Int16Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Int16Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int16Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Int16Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Int32Array extends ArrayBufferView {
public abstract void set(int index, int value);
@JSBody(params = "length", script = "return new Int32Array(length);")
public static native ArrayBuffer create(int length);
public static native Int32Array create(int length);
@JSBody(params = "buffer", script = "return new Int32Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Int32Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int32Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Int32Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Int8Array extends ArrayBufferView {
public abstract void set(int index, byte value);
@JSBody(params = "length", script = "return new Int8Array(length);")
public static native ArrayBuffer create(int length);
public static native Int8Array create(int length);
@JSBody(params = "buffer", script = "return new Int8Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Int8Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int8Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Int8Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Uint16Array extends ArrayBufferView {
public abstract void set(int index, int value);
@JSBody(params = "length", script = "return new Uint8Array(length);")
public static native ArrayBuffer create(int length);
public static native Uint16Array create(int length);
@JSBody(params = "buffer", script = "return new Uint8Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Uint16Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Uint16Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,11 +30,11 @@ public abstract class Uint8Array extends ArrayBufferView {
public abstract void set(int index, short value);
@JSBody(params = "length", script = "return new Uint8Array(length);")
public static native ArrayBuffer create(int length);
public static native Uint8Array create(int length);
@JSBody(params = "buffer", script = "return new Uint8Array(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Uint8Array create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Uint8Array create(ArrayBuffer buffer, int offset, int length);
}

View File

@ -30,12 +30,12 @@ public abstract class Uint8ClampedArray extends ArrayBufferView {
public abstract void set(int index, int value);
@JSBody(params = "length", script = "return new Uint8ClampedArray(length);")
public static native ArrayBuffer create(int length);
public static native Uint8ClampedArray create(int length);
@JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);")
public static native ArrayBuffer create(ArrayBuffer buffer);
public static native Uint8ClampedArray create(ArrayBuffer buffer);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new "
+ "Uint8ClampedArray(buffer, offset, length);")
public static native ArrayBuffer create(ArrayBuffer buffer, int offset, int length);
public static native Uint8ClampedArray create(ArrayBuffer buffer, int offset, int length);
}