kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Extend popover support to new tabs or windows

Open Jaifroid opened this issue 1 month ago • 0 comments

Once #1252 is finished, it might be a good idea to extend popover support to new windows and tabs opened by the app.

This is a bigger job, hence would need to be a separate PR. Up till now, we have not attempted to keep any reference to new containers, and so we can't track them in order to add the necessary event listeners. This is done in the PWA, but there is quite a lot of infrastructure associated with it there. It might be possible to do a "light" version here.

For info, tabs and windows are navigable in ServiceWorker mode, because the SW deals with the page's Fetch requests. But the SW doesn't have any access to the DOM, so cannot process links to add popovers.

Jaifroid avatar May 20 '24 14:05 Jaifroid