[Webkit-unassigned] [Bug 62817] [Qt] Expose runJavaScriptInMainFrame to WebKit2 UIProcess Qt API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 22 14:54:37 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62817





--- Comment #9 from mike.zraly at nokia.com  2011-06-22 14:54:37 PST ---
(In reply to comment #8)
> Could you tell us about the use case for this feature?
> And what happens if I execute a script that loops forever?

The use case I have in mind is making shallow DOM queries once a page is loaded, e.g. to get navigation tags (link rel="next" etc) or meta tags.  See the last unit test function in tst_qwkjavascriptresult.cpp for an example.

When using Qt with WebKit1 I would navigate the DOM tree directly.  A naive implementation of the same API in WebKit2 using HTMLElement proxy objects would require multiple requests between the UI and web processes.  Making the query in javascript avoids the multiple round-trip problem and provides a generally useful facility for manipulating the loaded web page.  It also allows some result processing to be offloaded to the web process, at the discretion of the caller.

I have not tested the code with a script that loops forever, but I imagine the same thing will happen that would happen if you loaded an HTML page with embedded javascript containing an infinite loop.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list