java – 如何关闭当前浏览器选项卡?
作者:互联网
如何关闭当前浏览器选项卡?以下不起作用.
JavaScript.getCurrent().execute("window.close();");
要么
UI.getCurrent().removeWindow(window);
要么
window.close();
解决方法:
尝试这个:
Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME);
if (appointmentWindow != null) {
getApplication().removeWindow(appointmentWindow);
}
资料来源:https://vaadin.com/forum/#!/thread/235330
标签:vaadin7,java,spring,vaadin,browser 来源: https://codeday.me/bug/20191002/1842048.html