Spaces:
No application file
No application file
Update browser_automation_ui.html
Browse files
browser_automation_ui.html
CHANGED
|
@@ -148,12 +148,13 @@
|
|
| 148 |
|
| 149 |
async function closeSession(id){
|
| 150 |
if(!confirm(`Close session\n${id}?`))return;
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
|
|
|
| 157 |
}
|
| 158 |
|
| 159 |
async function closeAllSessions(){
|
|
|
|
| 148 |
|
| 149 |
async function closeSession(id){
|
| 150 |
if(!confirm(`Close session\n${id}?`))return;
|
| 151 |
+
try{
|
| 152 |
+
await apiPost('/browser/close', { session_id: id });
|
| 153 |
+
// log(`✖ closed ${id}`);if(id===currentSessionId){currentSessionId=null;document.getElementById('screenshot').src='';}
|
| 154 |
+
// await refreshSessions();
|
| 155 |
+
}catch(e){
|
| 156 |
+
handleErr(e)
|
| 157 |
+
}
|
| 158 |
}
|
| 159 |
|
| 160 |
async function closeAllSessions(){
|