-
Notifications
You must be signed in to change notification settings - Fork 104
Updating the front end
You will likely want to update the HTML/ Javascript Front-End to reflect the current state of the background service.
There are three options for this:
Using the [registerForUpdates] (registerForUpdates) and [deregisterForUpdates] (deregisterForUpdates) methods you can register/ deregister a Javascript function to be run on the HTML/ Javascript Front-End after each time that the [doWork] (doWork) runs.
Using the Javascript setInterval method and the [getStatus] (getStatus) method you can set a polling interval within the HTML/ Javascript Front-End to retrieve updates on a periodic basis.
Using the getStatus] (getStatus) method you can retrieve the updates from the HTML/ Javascript Front-End based on programmatic events (for example, user button press).