The program works as expected when I create the auto-reload object on the brunch object first.
I've also modified the connect() function in the front-end code.
The function should check first if auto-reload is enabled before creating the Websocket call.
Finally I added a check for https / http. The Websocket will not work unless it is wss from https and vice versa. So it's a fair assumption that if the page is running at https: then the Websocket will connect at wss.
Hope this gets merged! Let me know if you have any questions or concerns.
I noticed a problem with how the docs recommend to attach the front-end settings:
Results in "Can not set the property "disabled" of undefined.
The program works as expected when I create the auto-reload object on the brunch object first.
I've also modified the connect() function in the front-end code.
The function should check first if auto-reload is enabled before creating the Websocket call.
Finally I added a check for https / http. The Websocket will not work unless it is wss from https and vice versa. So it's a fair assumption that if the page is running at https: then the Websocket will connect at wss.
Hope this gets merged! Let me know if you have any questions or concerns.