You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want the interpreted code to access data, which are not in the memory of the interpreter.
There should be a global object "app", similar to "window", which has many properties and methods. Some properties of the "app" have their own properties and methods. Maby my case is similar e.g. to giving scripts the access to HTML5 Canvas drawing.
Whenever a sub-property of "app" is read, or changed, or a method is called, I need my own functions to be called, which will manipulate my data (in my own representation) and possibly return a value.
My idea is, that I could give the interpreter three functions:
When the interpreted script tries to read the property, which does not exist, getProp(Obj, propName) would be called, which would return the necessary value. Same for setting a property and calling a method.
The first accessing of the "app" would return a special object, and all other accesses to that object would perform some actions outside the environment of the interpreter.
Is there any way to do this in this interpreter?
The text was updated successfully, but these errors were encountered:
I want the interpreted code to access data, which are not in the memory of the interpreter.
There should be a global object "app", similar to "window", which has many properties and methods. Some properties of the "app" have their own properties and methods. Maby my case is similar e.g. to giving scripts the access to HTML5 Canvas drawing.
Whenever a sub-property of "app" is read, or changed, or a method is called, I need my own functions to be called, which will manipulate my data (in my own representation) and possibly return a value.
My idea is, that I could give the interpreter three functions:
When the interpreted script tries to read the property, which does not exist, getProp(Obj, propName) would be called, which would return the necessary value. Same for setting a property and calling a method.
The first accessing of the "app" would return a special object, and all other accesses to that object would perform some actions outside the environment of the interpreter.
Is there any way to do this in this interpreter?
The text was updated successfully, but these errors were encountered: