Search code examples
pythondocumentationwebkitgtkpygobject

API reference to WebKit WebView implementation in GTK (Python)


I'm working on a Python Gtk3 app on Ubuntu, which primarily uses WebView from WebKit. I couldn't find all the methods available to WebView object in python, currently I only know its open() method, so, where can I get detailed reference to all its methods, including some documentation on handling cookies and user password saving, etc?

I went through http://webkitgtk.org/ but I couldn't find Python related API, or (I might have missed it out).


Solution

  • Because of GOBject Introspection, you should have access to every public class/method/function available in the WebKit. Hence, the original API documentation should help.

    To know every method available, you can even use the classic help from Python. For instance:

    $ python
    >>> from gi.repository import WebKit2
    >>> help(WebKit2.WebView)
    

    Now, you can match the method names against the documentation for other languages (likely Objective-C).