From a0cd83b92980e59a8eac87157cc746c897069a2a Mon Sep 17 00:00:00 2001 From: Sergey Linev <S.Linev@gsi.de> Date: Fri, 31 Aug 2018 12:36:50 +0200 Subject: [PATCH] webgui: try to inject some closer code for chrome with holder script Does not work for now, may be later better solution will be found --- gui/webdisplay/src/TWebWindow.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/webdisplay/src/TWebWindow.cxx b/gui/webdisplay/src/TWebWindow.cxx index 05d9b4b6529..b73c7f68b7b 100644 --- a/gui/webdisplay/src/TWebWindow.cxx +++ b/gui/webdisplay/src/TWebWindow.cxx @@ -187,6 +187,7 @@ std::shared_ptr<ROOT::Experimental::TWebWindow::WebConn> ROOT::Experimental::TWe bool ROOT::Experimental::TWebWindow::ProcessBatchHolder(std::shared_ptr<THttpCallArg> arg) { std::string query = arg->GetQuery(); + if (query.find("key=") != 0) return false; std::string key = query.substr(4); @@ -217,7 +218,7 @@ bool ROOT::Experimental::TWebWindow::ProcessBatchHolder(std::shared_ptr<THttpCal } if (prev) { - prev->Set404(); + prev->SetTextContent("console.log('execute holder script'); if (window) setTimeout (window.close, 1000); if (window) window.close();"); prev->NotifyCondition(); } @@ -301,8 +302,9 @@ bool ROOT::Experimental::TWebWindow::HasKey(const std::string &key) ROOT::Experimental::TWebWindow::WebKey::~WebKey() { if (fHold) { - fHold->Set404(); + fHold->SetTextContent("console.log('execute holder script'); if (window) setTimeout (window.close, 1000); if (window) window.close();"); fHold->NotifyCondition(); + fHold.reset(); } } -- GitLab