[webkit-gtk] webkit_dom_* api
slash at peereboom.us
Tue Nov 8 11:51:04 PST 2011
On Tue, Nov 08, 2011 at 11:30:18AM -0600, Marco Peereboom wrote:
> I am working on some code on my xxxterm browser and have come to the
> point that I need to be able to touch the DOM stuff. I don't seem to be
> able to find any API docs and have been trolling the code instead.
> I have 2 questions.
> 1. Are there any docs or is the source + UT the doco?
> 2. Can someone tell me the magic to know what DOM node is active on a
> webpage? I want to be able to determine if the browser is sitting in
> a user editable field in order to handle keystrokes differently.
I actually found it and I'll paste it here in the hopes to save a poor
soul the same amount of time I spent on it.
doc = webkit_web_view_get_dom_document(webview);
active = webkit_dom_html_document_get_active_element((WebKitDOMHTMLDocument*)doc);
> On #2 I looked at some JS code however I prefer to use C code for this
> for a number of reasons.
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
More information about the webkit-gtk