js:compat es5,use context.sendNative to replace Proxy
This commit is contained in:
2
doric-js/lib/src/ui/view.d.ts
vendored
2
doric-js/lib/src/ui/view.d.ts
vendored
@@ -131,7 +131,7 @@ export declare abstract class View implements Modeling, IView {
|
||||
also(block: (it: this) => void): this;
|
||||
apply(config: IView): this;
|
||||
in(group: Group): this;
|
||||
nativeChannel(context: any, name: string): (args?: any) => Promise<any>;
|
||||
nativeChannel(context: BridgeContext, name: string): (args?: any) => Promise<any>;
|
||||
getWidth(context: BridgeContext): Promise<number>;
|
||||
getHeight(context: BridgeContext): Promise<number>;
|
||||
getLocationOnScreen(context: BridgeContext): Promise<{
|
||||
|
@@ -149,7 +149,6 @@ export class View {
|
||||
nativeChannel(context, name) {
|
||||
let thisView = this;
|
||||
return function (args = undefined) {
|
||||
const func = context.shader.command;
|
||||
const viewIds = [];
|
||||
while (thisView != undefined) {
|
||||
viewIds.push(thisView.viewId);
|
||||
@@ -160,7 +159,7 @@ export class View {
|
||||
name,
|
||||
args,
|
||||
};
|
||||
return Reflect.apply(func, undefined, [params]);
|
||||
return context.callNative('shader', 'command', params);
|
||||
};
|
||||
}
|
||||
getWidth(context) {
|
||||
@@ -222,10 +221,6 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], View.prototype, "hidden", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
], View.prototype, "viewId", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
|
Reference in New Issue
Block a user