MCPcopy Index your code
hub / github.com/NativeScript/capacitor / _setter

Method _setter

testing/browser.ts:480–506  ·  view source on GitHub ↗
(target: any, prop: any, value: any, _receiver: any)

Source from the content-addressed store, hash-verified

478
479 // eslint-disable-next-line @typescript-eslint/no-unused-vars
480 _setter(target: any, prop: any, value: any, _receiver: any) {
481 if (DEBUGGING) {
482 nativeLog(
483 'Setter:',
484 target[NS_PROXY_FULL_PROP] + '.' + prop,
485 '=',
486 value,
487 );
488 }
489 let newTarget;
490 if (target[NS_PROXY_CHILDREN][prop]) {
491 newTarget = target[NS_PROXY_CHILDREN][prop];
492 } else {
493 const tempProxy = NativeScriptProxy.instance.getProxy(
494 target,
495 prop,
496 sub_handler,
497 );
498 newTarget = tempProxy.__func;
499 }
500 return NativeScriptProxy.instance.marshall(
501 NS_MARSHALL_SET,
502 newTarget,
503 prop,
504 value,
505 );
506 }
507}
508
509(<any>window).native = (<any>new NativeScriptProxy());

Callers 1

browser.tsFile · 0.80

Calls 3

nativeLogFunction · 0.85
getProxyMethod · 0.80
marshallMethod · 0.80

Tested by

no test coverage detected