SfileAPI¶
Implements the Sfile Api for module script.
sfile.post(value)¶
| Param | Description |
|---|---|
| value | input to the SInterface save() script |
Sends async request to server to update SFile value. The server runs the “save” method of the SInterface script to set the new value and then sends a push to any listening clients.
sfile.onUpdate(user_callback)¶
| Param | Type |
|---|---|
| user_callback | function |
Register a callback to handle the server push which will be made whenver the SFile value is updated.