• Thanks @Robin

    what you are after?

    Imagine we have this code on the device:

    var speed = 0.5;
    function move(arg) {
     // do something with arg

    I am trying to create a robot object in the webbrowser that is connected to the device via UART, such that robot.speed translate into a call to UART.eval('speed'), and robot.move(value) translate to call to UART.eval('move(value)'). But in a generic way, so that the object robot does not really have the properties speed and move and any other properties could be called without defining them explicitly, hence the use of Proxy as per Gordon suggestion.

    Check again the first few posts for more details. I hope that makes some sense.


    I might have found a way around my problem with an additional call eval('typeof prop') to check if the property exist and is a function or not.


Avatar for jgrizou @jgrizou started