[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: WebKit bindings for Lua?
- From: Rena <hyperhacker@...>
- Date: Fri, 8 Feb 2013 22:58:02 -0500
On Fri, Feb 8, 2013 at 10:55 PM, William Ahern
<william@25thandclement.com> wrote:
> On Fri, Feb 08, 2013 at 08:22:35PM -0500, Rena 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 might want to checkout this project for inspiration, which is the only
> one I know of which has successfully and comprehensively packaged WebKit
> similar to the manner you describe, although it runs headless and renders to
> buffers on request:
>
> http://phantomjs.org/
>
> AFAIU, packaging WebKit as a library is troublesome. It makes assumptions
> about threads and other global resources that something properly built as a
> library would never do.
>
> For a browser suite which has been sanely built from the ground up to be
> embeddable and otherwise twisted into various projects you might want to
> checkout
>
> http://www.netsurf-browser.org/
>
> It doesn't do JavaScript, however, although that sounds okay for your needs.
> (I've been toying with the idea of compiling JavaScript to Lua, and then
> offering to add Lua support to NetSurf.)
>
>
Thanks for the recommendation. I would want to have some kind of
scripting in the frontend (obviously I'd prefer Lua to JS, but either
would do), but I'll take a look at it.
--
Sent from my Game Boy.