[webkit-gtk] WebView signals
Pierre-Yves Luyten
py at luyten.fr
Sun Jun 22 14:48:14 PDT 2014
Le 04/06/2014 09:06, Carlos Garcia Campos a écrit :
> El mar, 03-06-2014 a las 22:59 +0200, Pierre-Yves escribió:
>> Hello,
>>
>> I don’t find some WebKit2 equivalent for "user-changed-contents » WebView signal on WebKit1.
>> I also looked at WebExtension parts but did not found neither.
>>
>> Is there an equivalent?
>> Use case is to detect changes in an editable page and act accordingly.
> There's webkit_dom_html_text_area_element_is_edited and
> webkit_dom_html_input_element_is_edited in the DOM bindings API. You can
> iterate the DOM looking for text area/fields and query them. This is
> what we do in ephy:
>
> https://git.gnome.org/browse/epiphany/tree/lib/ephy-web-dom-utils.c#n27
>
Ah , thanks much for the example!
I did not reply immediately, since i was not sure. Turns out,
addEventListener is currently a simple replacement, since the
application allows to edit the entire body, and changing this would be
more work. But this is a specific case and <user-changed-contents> is
not a big deal finally.
Regards
Pierre-Yves
More information about the webkit-gtk
mailing list