thanks a lot Andreas, I've now been trying .../startup/windows.js , which handles the tm-open-window message couldn't I also try to register it from within there, when the window gets opened?
I'll take a look at your tips, the second seems more appropriate to me, changing that much like in (1) is a bit out of my skill-scope and I guess it would need to change many other things, too Hi Simon, > > that is almost the right place yes, if you have a look at > core/modules/startup/startup.js [1], you will see that it initializes it > without the rootElement being given anyway. The next problem is that all > widgets regardless of the window they are rendered in will use > $tw.popup.triggerPopup(), so we can't have multiple popup handler (i.e. > one per window). The actual event listener however will be registered in > $tw.popup.show(). > > As it stands I see two ways you could make the core properly handle this: > > - Turn the global window variable in core/modules/startup/window.js > into $tw.openWindows and make sure that all open windows including the > main one are listed there and then have the Popup mechanism iterate > through > these and register itself (to all of them). > - Have the Popup mechanism use [2] to register itself to the > appropriate window by default and only change this if the rootElement > option was set. (Not sure how well this would work in other browsers, but > it would require the least change) > > [1] > https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/startup/startup.js#L118 > > [2] https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywikidev@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/cfae930d-b51a-4e7d-aeef-40ffe06ce056%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.