Hi Urs, On Thu, Feb 27, 2020 at 12:01 PM Urs Riggenbach < urs.riggenbach.ph...@gmail.com> wrote:
> Hello dear community, > > I'm working on a project and am considering geckoview as it's just better > in every way over webview. > > I am looking for a way to log when the window.print() function is executed > by the user. > > As far as i can tell geckoview does nothing when window.print() is run. > > I would like to run Android app code when window.print() is run. Is this > best done in a WebExtension? Or is there a simple way to overwrite such > functions? > My guess is that you could use a Web Extension to run code in the content context before page load that sets `window.print = console.log` or similar. If that's not possible then I doubt there's any way to smoothly monkey with the Window object's prototype. It's possible that GV should expose some API for `Window.print()` (but I doubt it) or some generic API for "Window.foo got called and we don't service it" at all. I expect the experts will weigh in shortly. Interesting question! Nick
_______________________________________________ mobile-firefox-dev mailing list mobile-firefox-dev@mozilla.org https://mail.mozilla.org/listinfo/mobile-firefox-dev