2016-04-24 5 views
1

Wie kann der DOM-Baum in webkit2gtk-4.0 manipulieren?vala Webkit.WebView DOM Manipulation

Alte Version:

WebKit.DOM.Document doc = get_dom_document(); 
WebKit.DOM.Element el = doc.create_element("div"); 
el.append_child(doc.create_text_node(color)); 
((WebKit.DOM.EventTarget) el).add_event_listener("dblclick", (Callback) on_div_clicked, false, this); 
doc.body.insert_before(el, null); 

Kompilierung:

valac --pkg gtk+-3.0 --pkg libsoup-2.4 --pkg webkitgtk-3.0 

Neue Version der Kompilierung:

valac --pkg gtk+-3.0 --pkg webkit2gtk-4.0 

Fehler:

error: The symbol `DOM' could not be found 
    private WebKit.DOM.Document get_document() 

http://www.valadoc.org/#!api=webkit2gtk-web-extension-4.0/WebKit.DOM.Document Wie füge ich webkit2gtk-web-extension-4.0 hinzu?

Antwort

1

Fügen Sie --pkg webkit2gtk-web-extension-4.0 zu Ihren Kompilierflags hinzu.

Verwandte Themen