Frage

I'm importing the method in C# mono (since dom_document isn't implemented in webkit-sharp), like this:

class ExtendedWebView : WebKit.WebView {
    [DllImport ("webkit-1.0")]
    private static extern IntPtr webkit_web_view_get_dom_document (IntPtr raw);

    public DOMDocument get_dom_document()
    {
        return new DOMDocument(webkit_web_view_get_dom_document(base.Handle));
    }
}

base.Handle is an IntPtr to the WebView object. The webkit_web_view_get_dom_document never returns. I'm calling this in a separate thread. The thread just hangs indefinitely.

I also tried isolating the method call, to be sure that was what was hanging. I passed in an IntPtr and assigned the return value to an IntPtr. It's definitely webkit_web_view_get_dom_document that isn't returning.

Anybody know why this is happening? Maybe I'm using the wrong version of webkit? Does that method not exist?

War es hilfreich?

Lösung

Webkit 1.0 doesn't include the DOMDocument stuff. I ended up having to use a newer version of webkit-sharp (which hasn't actually been released yet) which already has the DOMDocument implementation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top