[webkit-dev] Problems with injecting js-code on first load

Michael Catanzaro mcatanzaro at redhat.com
Thu Aug 29 05:17:47 PDT 2024


On Thu, Aug 29 2024 at 06:41:45 AM +00:00:00, Erik Lundin via 
webkit-dev <webkit-dev at lists.webkit.org> wrote:
> I’m trying to inject javascript code on each page load but it fails 
> on the first load every time. If I reload the page it works. How do I 
> fix this? Is there something I’ve missed in the code below?

You're injecting the script after the load has already finished, so 
it's too late. Try injecting it when creating the web view instead.




More information about the webkit-dev mailing list