mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-24 21:33:16 +08:00
新增 支持ui的view对象增加属性,修改它的prototype为object
This commit is contained in:
parent
1094965eb1
commit
a124c732b1
@ -10,6 +10,7 @@ import com.stardust.autojs.core.ui.attribute.ViewAttributes;
|
||||
import com.stardust.autojs.rhino.NativeJavaObjectWithPrototype;
|
||||
|
||||
import org.mozilla.javascript.NativeJavaObject;
|
||||
import org.mozilla.javascript.NativeObject;
|
||||
import org.mozilla.javascript.ScriptRuntime;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
|
||||
@ -49,7 +50,8 @@ public class NativeView extends NativeJavaObjectWithPrototype {
|
||||
mViewAttributes = ViewExtras.getViewAttributes(view, runtime.ui.getResourceParser());
|
||||
mView = view;
|
||||
mViewPrototype = new ViewPrototype(mView, mViewAttributes, scope, runtime);
|
||||
prototype = new NativeJavaObject(scope, mViewPrototype, mViewPrototype.getClass());
|
||||
prototype = new NativeJavaObjectWithPrototype(scope, mViewPrototype, mViewPrototype.getClass());
|
||||
prototype.setPrototype(new NativeObject());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user