[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: WebKit bindings for Lua?
- From: Michal Kottman <michal.kottman@...>
- Date: Sat, 9 Feb 2013 08:23:50 +0100
On 9 February 2013 02:22, Rena <firstname.lastname@example.org> wrote:
> I'm curious if there are WebKit bindings for Lua? I know about LuaKit,
> but that appears to be more of a "build your own UI for a browser"
> project, about the opposite of what I'm after. I'd like to load WebKit
> as a module in a Lua script, feed it some HTML generated for the
> purpose, and display it in a window, query positions and sizes of DOM
> elements, basically use it as more of a UI toolkit than a web browser.
> Has anyone done this before?
You can do stuff like this also in lqt . The whole QtWebkit 
module is available as a binding. I've used this to "cheat" in a
simple online game, where you buy stuff and get some rewards. After
loading the page, I calculated the reward/price for each item (using
DOM, not parsing) and rearanged the items, so that the most efficient
items were at the top.
I am not sure if this works in the current Qt version (4.8, 5.0 was
not tested yet), since there are some threading issues, but it worked
stable in Qt 4.7. There are Windows binaries available for 4.7 and 4.8
if anyone wants to try it out, just mail me.