mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fixed invalid JSBody annotation in IDBObjectStore, fixed IDBFactory compatibility check (#582)
* Fixed invalid JSBody annotation in IDBObjectStore * Fixed backwards IndexedDB support check, it was throwing an exception only if IndexedDB IS SUPPORTED
This commit is contained in:
parent
8d02dc0f4a
commit
19f070840c
|
@ -28,7 +28,7 @@ public abstract class IDBFactory implements JSObject {
|
||||||
|
|
||||||
public static IDBFactory getInstance() {
|
public static IDBFactory getInstance() {
|
||||||
IDBFactory factory = getInstanceImpl();
|
IDBFactory factory = getInstanceImpl();
|
||||||
if (!factory.isUndefined()) {
|
if (factory.isUndefined()) {
|
||||||
throw new IllegalStateException("IndexedDB is not supported in this browser");
|
throw new IllegalStateException("IndexedDB is not supported in this browser");
|
||||||
}
|
}
|
||||||
return factory;
|
return factory;
|
||||||
|
|
|
@ -36,8 +36,8 @@ public abstract class IDBObjectStore implements JSObject, IDBCursorSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(script = "return this;")
|
@JSBody(params = "obj", script = "return obj;")
|
||||||
private native String[] unwrapStringArray(JSObject obj);
|
private static native String[] unwrapStringArray(JSObject obj);
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
public abstract String[] getIndexNames();
|
public abstract String[] getIndexNames();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user