-
Notifications
You must be signed in to change notification settings - Fork 0
API Host ScriptProxy
Liu.Yandong.Hanks edited this page Aug 21, 2026
·
3 revisions
Runtime proxy object that delegates get/set/delete behavior to script closure handlers.
Namespace: AuroraScript.Runtime.Types. Kind: class.
Back to .NET Host API Reference
Runtime proxy object that delegates get/set/delete behavior to script closure handlers.
The options object expects script closures named get, set, or unset.
A minimal use of ScriptProxy.
@module(MAIN);
export func run() {
var target = { value: 42 };
return new Proxy(target, {
get: (obj, key) => obj[key]
});
}Creates a ScriptProxy instance.
ScriptProxy(ScriptObject target, ScriptObject options)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
target |
ScriptObject |
Yes | Object whose operations are intercepted. |
options |
ScriptObject |
Yes | Initial options copied into the new instance. |
Returns
A new ScriptProxy instance.
void Define(string key, ScriptObject value, bool writeable = true, bool enumerable = true)void Define(string key, ScriptDatum value, bool writeable = true, bool enumerable = true)void Define(string key, ScriptObject value, bool writeable = true, bool enumerable = true)void Define(string key, ScriptDatum value, bool writeable = true, bool enumerable = true)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | Key to look up or store. |
value |
ScriptObject / ScriptDatum |
Yes | Property value to define on the proxy. |
writeable |
bool |
No | The bool parameter required by the signature. |
enumerable |
bool |
No | Whether the member participates in enumeration. |
Returns
None.
AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License