[webkit-gtk] webextensions, iframes and main gui process

Michael Gratton mike at vee.net
Tue Jun 26 19:26:28 PDT 2018


Hey Gaute,

On Tue, Jun 26, 2018 at 6:21 PM, Gaute Hope <eg at gaute.vetsj.com> wrote:
> thanks for your answer. As you might have noticed I have found a lot 
> of inspiration in Geary when it comes to message rendering - thanks! 
> I noticed that I could use the set_inner_html() on the body from 
> iframe_get_content_document() without generating a request. This 
> solves my problem.

Good to hear!

> The necessicity to do all DOM manipulation on the main WE-thread 
> (sync'ed) and the interactivity between the webpage and the GUI 
> allows my design to become a lot simpler if I can do sync'ed requests 
> between my GUI thread and the WE-thread. Async-options would require 
> me to keep blocking user-events and making my GUI inactive when I am 
> waiting for a request to finish. I was hoping to avoid this since it 
> would be really hard to reliably guard against this. Especially since 
> external events / timers also need to be blocked untill the request 
> is done. The last option is what I am doing now (I just choose to do 
> most things sync'ed).

Yeah, async calls do make things more complicated, but quite often in 
the long run it's usually worth it. I'm not completely sure how 
WebKitGTK handles user events and other IO between the WebView and 
WebProcess, but I'm pretty sure it is all async. If so handling user 
input between the two is possible, at least.

//Mike

-- 
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>



More information about the webkit-gtk mailing list