I was wondering if the main browser window tracks its children windows? I have this scenario:
Different drafts opened in multiple children windows through tm-open-window, but are not opened in the story river of the parent browser = cluttered draft tabs in the bottom of the parent browser.
I experimented with populating a list tiddler (WindowList) with the title of children windows as they are being called. In this way, I was able to target the red draft tabs and style the specific tab so it isn't displayed in the parent window.
The problem now is, when I close the child window, it is still listed in (WindowList) and thus its red draft tab in the parent window is still hidden.
Is there any workaround to this or am I missing something?
Thanks for the help!
-jd
I’m not aware of any workaround, I think this is something that would need fixing in the core. The simplest implementation would be to track the open windows and then expose the details via a filter operator. We might also add a message to close a specific child window.
The close function is documented here, and the windows opened need a name,
In the past, when you called the window object's close() method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script created that window or not. This is no longer the case; for security reasons, scripts are no longer allowed to close windows they didn't open. (Firefox 46.0.1: scripts can not close windows, they had not opened)
function closeCurrentWindow() {
window.close();
}
<a href="javascript:window.close()"> close this window </a><$button>
<a href="javascript:window.close()"> {{$:/core/images/close-button}} </a>
</$button>