CustomMethodAccess
Read-only Proxy namespace for the Custom Model's custom Methods. Invoke a Method by its nonempty Name for JS Access. Arguments are positional, in the order of the Method's parameter definitions. The call schedules the Method's Actions and returns undefined; it does not wait for them to finish.
Unknown or empty names return undefined. Use 'ResetDisplay' in this.method to check membership. Object.keys, Reflect.ownKeys, for...in, and spread expose the defined nonempty names once each, in definition order.
The namespace has a null prototype. It provides no inherited hasOwnProperty function or $raw escape. Assignment, definition, deletion of existing members, prototype changes, and making it non-extensible are rejected. Deleting an unknown name succeeds without changing the namespace.
Each member lookup creates a new function whose name is the Method's Name for JS Access. Save the function when a stable reference is needed. Saved functions remain usable after garbage collection and resolve the definition again when called; an unavailable definition raises ReferenceError.
String conversion produces [object Method] without invoking custom toString or valueOf Methods. Symbol.toPrimitive and Symbol.toStringTag support this conversion but are not namespace members and are not enumerated. Other symbol lookups, including Symbol.iterator, return undefined.
JSON.stringify normally produces {} because function values are omitted. A defined Method named toJSON is invoked by the normal JavaScript JSON rules.
this.method.SetSpeed(1200);
this.method.ResetDisplay();if ('ResetDisplay' in this.method) {
const reset = this.method.ResetDisplay;
console.log(reset.name); // 'ResetDisplay'
reset();
}
console.log(Object.keys(this.method));
console.log(String(this.method)); // '[object Method]'