This repository was archived by the owner on Feb 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
7 Controller "API"
lebaston100 edited this page Jun 7, 2018
·
2 revisions
The controller enables you to easily communicate with all the clients. They are available on the controller side through communicator.js
sendCommand(command, content);
Sends a command to all connected controller and clients
- command: Something to seperate your request. (Text or json object/array)
- content: The content to send. (Text or json object/array)
changeElementContent(id, newContent);
Changes the content of the object(e.g. changing text in a div or span)
- id: The id of the element to change
- newContent: The new content to change to (html tags supported)
getInput(id);
Reads the input of an html <input> object
-
id: The id of the
<input>object to read
doConnect();
Connect to the Server. This should not be needed because the controller automatically connects when loading the page.
doDisconnect();
Disconnect from the Server
made by lebaston100