Stopping All Tasks when browser is closed or page refreshed
This commit is contained in:
1 parent
dcbe60f5a5
commit
432b5c9dcd
1 file changed
+5
-1
+5
-1
@@ -113,7 +113,11 @@ function newDashboard () {
|
||||
function setBrowserEvents () {
|
||||
window.onbeforeunload = onBrowserClosed
|
||||
function onBrowserClosed () {
|
||||
window.alert('My Window is closing')
|
||||
let definition = canvas.strategySpace.workspace.definition
|
||||
for (let i = 0; i < definition.taskManagers.length; i++) {
|
||||
taskManager = definition.taskManagers[i]
|
||||
taskManager.payload.uiObject.menu.internalClick('Stop All Tasks')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user