On Thu, Feb 27, 2020 at 2:01 PM Urs Riggenbach <
urs.riggenbach.ph...@gmail.com> wrote:

>
>
> 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?
>
> Yeah, a Web Extension is best for this, but it's a little complicated.
You'll need to use this mechanism[1] to communicate with the page from a
content script, and then some hacks[2] for injecting code into the actual
page.

James


[1]
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts#Communicating_with_the_web_page
[2]
https://stackoverflow.com/questions/12395722/can-the-window-object-be-modified-from-a-chrome-extension
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to