Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Added ConsoleReady event to or-console

Rich Turneraf99746a04eb
diff --git a/client/src/main/webapp/src/or-app/or-console.html b/client/src/main/webapp/src/or-app/or-console.html
index 64c0f8c33..1c8e65960 100644
--- a/client/src/main/webapp/src/or-app/or-console.html
+++ b/client/src/main/webapp/src/or-app/or-console.html
@@ -270,7 +270,7 @@
}
}
- register(successFn, failureFn) {
+ register(successFn, failureFn, raiseReadyEvent) {
console.debug("Console: updating registration");
if (!window.openremote.INSTANCE.requests) {
console.debug("Cannot register console as requests object not set");
@@ -289,6 +289,9 @@
console.debug("Console: updating locally stored registration");
window.localStorage.setItem("OpenRemoteConsole", JSON.stringify(this.registration));
successFn();
+ if (raiseReadyEvent) {
+ window.dispatchEvent(new CustomEvent("ConsoleReady"));
+ }
})
}