create function without specify parameters, any idea?
HarlonWang opened this issue · comments
Harlon Wang commented
Create function use quickjs-android must be specify parameters:
JSFunction zeroCompareTo = context.createJSFunction(integer, Method.create(Integer.class, Integer.class.getMethod("compareTo", Integer.class)));
Hopes like this:
context.createJSFunction("setTimeout", new Callback() {
public JSValue callFunction(JSValue[] args) {
//handle some thing
JSValue firstArg = args[0];
if( firstArg instanceOf JSString) {
Log.d("Test", fristArg);
}
return null;
}
})
Any idea , thx
jwxbond commented
have the same problem. how to solve it?
seven332 commented
Wow, it's should be supported. I will work on it this weekend.
Harlon Wang commented
@seven332 thx
Harlon Wang commented
@seven332 Great job ! :)