HOME DOCUMENTATION DOWNLOADS

HTML5 - how to close tab via javascript

We have web report with buttons. One of the buttons is used for closing tab page. There was a possibility in flash version to close the page via javascript code: window.top.document.getElementById("portal").closeActiveTab().
Is there any possibility in HTML5 version?
image

This feature has not yet been implemented.

Is there any plan for implementing this feature?

Not at the moment but you would be welcome to do so :slight_smile:

I’ve created a small javascript function closeTab() inside the webreport (iframe), which is removing the Tab label and the Tab page but I don’t know how to unhide (activate) other Tabpage after closing the webreport tab.

function closeTab() {
			var closeTabLabel = window.parent.document.querySelector('div[class^="TabbedView"][class$="isActive"]');
			closeTabLabel.parentElement.removeChild(closeTabLabel);
			var closeTabPage = window.parent.document.querySelector('div[class^="Screen_root"]:not([class$="isHidden"])');
			closeTabPage.parentElement.removeChild(closeTabPage);
		}

We have added support to close tab via javascript in HTML5 version.

javascript code:

document.closeOrigamTab();

Thank you! I’ll test in, when it will be available in master.