Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何关闭当前浏览器选项卡?以下不起作用。
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
试试这个。
gBrowser.removeCurrentTab();