X
Thinta lapha ukuze uye kuveshini yamakhalekhukhwini kusayithi.

Isithangami Sabeseki

How to inject Javascript to loaded web page

Kuphostiwe

Hi There,

I want to run javascript on a loaded webpage on Android. I was able to do this when I was using webview:

webview.loadUrl (String.format ("javascript: setProperties (% s)", someJsonObject.toString ()))

How do I do the same when using GeckoView?

geckoSession.loadUri (String.format ("javascript: setProperties (% s)", someJsonObject.toString ())) -- won't work for me.

I just want to something like this : https://medium.com/appunite-edu-collection/webview-with-injected-js-script-13eb1e0257c9 or https://medium.com/@filipe.batista/inject-javascript-into-webview-2b702a2a029f

Hi There, I want to run javascript on a loaded webpage on Android. I was able to do this when I was using webview: webview.loadUrl (String.format ("javascript: setProperties (% s)", someJsonObject.toString ())) How do I do the same when using GeckoView? geckoSession.loadUri (String.format ("javascript: setProperties (% s)", someJsonObject.toString ())) -- won't work for me. I just want to something like this : https://medium.com/appunite-edu-collection/webview-with-injected-js-script-13eb1e0257c9 or https://medium.com/@filipe.batista/inject-javascript-into-webview-2b702a2a029f
Isicaphuno

Eminye Imininingwane Yohlelo

Isisebenziso

  • I-ejenti Engumsebenzisi: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

Eminye Imininingwane

kbrosnan
  • Moderator
584 izisombululo 3850 izimpendulo
Kuphostiwe

This is an end user support forum. Geckoview questions should be asked at the options provided at https://wiki.mozilla.org/Mobile/GeckoView#Getting_Help

https://mozilla.github.io/geckoview/consumer/docs/web-extensions may be of some help.

This is an end user support forum. Geckoview questions should be asked at the options provided at https://wiki.mozilla.org/Mobile/GeckoView#Getting_Help https://mozilla.github.io/geckoview/consumer/docs/web-extensions may be of some help.
Ingabe lokhu kube usizo kuwena?
Isicaphuno
Buza umbuzo

Kufanele ulogele ukungena ku-akhawunti yakho ukuze uphendule amaphosti. Uyacelwauqale umbuzo omusha, uma ungekabi nayo i-akhawunti namanje.