Skip to content

rschroll/webkitdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOM Manipulation in WebKit2GTK

WebKit2GTK runs the web process separately from the UI process. This increases stability and robustness but prevents direct access to the DOM from the UI process. Here, we present two methods to interact with the DOM in WebKit2GTK.

Branches

There are three branches in this repository:

  • master shows a test program using the older WebKitGTK bindings, which allow for direct access to the DOM. The program presents a WebView and a button, which inserts numbered divs, of the selected color, into the DOM. Clicking on these divs triggers a message in a Label.

  • javascript shows the same behavior, but with the WebKit2GTK bindings. The DOM is manipulated by injected Javascript, and messages are passed back to the UI through the title of the WebView. This solution is easier but more limited than using a web extension.

  • extension uses the new WebExtension API to load a .so file into the web process to do the DOM manipulation. This communicates over with the UI process over DBus.

VAPI Files

Until recently, VAPI files were not shipped with WebKit, so we have included them in the repository. If you system does have the VAPI files installed, you may adjust the Makefile to use them.

About

These examples were developed by Michael Catanzaro and Robert Schroll at the 2014 GNOME Summit. The authors release their work into the public domain. Do note that the VAPI files are derived from the WebKit source and inherit their copyright and licenses.

About

Example of DOM access with WebKit2GTK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages