No Description

Upstream URL


Joachim Fasting <>



1cl-webkit - WebKitGTK+ binding for Common Lisp


cl-webkit is a binding to [WebKitGTK+] for Common Lisp, currentlytargeting WebKit version 2. The WebKitGTK+ library adds web browsingcapabilities to an application, leveraging the full power of theWebKit browsing engine.

1.2API overview

The cl-webkit API closely follows the WebKit2 API, with the exceptionthat class based interfaces are preferred over functional interfacesin cases where both are provided.

That is, *new,get,set methods are excluded in favour of make-instance and slot accessors wherever possible.

For documentation on how to use the WebKit2 API, please refer to the C API documentation.

Backwards compatibility (with older WebKit2 API versions) is not a priority. The binding targets the latest version of Webkit2Gtk+ available on mainstream distributions.


  • A working installation of WebKit2GTK+ (whichever package, e.g., libwebkit2gtk on Debian).
  • A [CFFI] compatible Common Lisp implementation. The package isdeveloped using [SBCL] but should work on any implementation thatsupports CFFI.
  • A recent checkout of [cl-cffi-gtk]


Assuming you have [Quicklisp] installed, do
  1. Clone to ~/common-lisp/quicklisp/local-projects/cl-webkit
  2. > lisp
  3. > (ql:quickload :cl-webkit2)


To run tests, you need to additionally install Calispel,float-features and FiveAM (all of these are available viaQuicklisp). After that, simply running (asdf:test-system :cl-webkit2)should be enough.


Contributing implies an agreement to redistribute the work under theproject's license (see below); please make sure that you own therights to the work you contribute.


1.7Change Log

  • Add micro Webkit version to *features*.

  • Remove support for Webkit shared lib version 5.0 due to libsoup conflicts.

  • Add bindings for WebKitUserContentFilterStore.
  • Add more properties for WebKitWebView.
  • Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION value for WebKitHitTestResult enum.
  • Fix several implicit dependency issues.

  • Fix SoapMessageHeaders' access from WebKitURIResponse.

  • Add SoapMessageHeaders bindings.
  • Use them everywhere, in custom scheme processing too.

  • Add WebKitWebResource bindings.
  • Add WebKitUriSchemeResponse bindings and use them in scheme callbacks by default.
  • Add GAction-related functions for WebKitContextMenuAction.

  • Fix typing for context menu item-related functions.

  • Fix string processing for custom URLs -- no longer segfaulting on long strings.

  • Add support for libwebkit2gtk-5.0.
  • Add advanced editing commands with webkit-web-view-execute-editing-command-with-arguments as the way to execute those.
  • Bugfixes in custom schemes and color chooser requests.

  • Add webkit-web-view-set-cors-allowlist, a binding for a recently (2.34.1) introduced webkit_web_view_set_cors_allowlist.
  • Bug Fix: Catch any condition in C callbacks to avoid crashing the whole Lisp process due to unhandled conditions.

  • Add a binding for webkit_web_view_try_close.

  • Add full bindings for WebKitURIRequest and WebKitNotification.
  • Support libwebkit2gtk-4.1.
  • Rename starred functions to non-starred for consistency:
    • webkit-web-view-can-execute-editing-command* -> webkit-web-view-can-execute-editing-command.
    • webkit-web-view-send-message-to-page* -> webkit-web-view-send-message-to-page

  • Add webkit-web-view-can-execute-editing-command* for easier execution command checking.

  • Export webkit-web-view-execute-editing-command properly.

  • webkit-web-view-send-message-to-page* to send WebKitUserMesssages ina nicer Lispy way.
  • More WebKitSettings settings.
  • Bind all the subtypes of WebKitPermissionRequest.
  • Bindings for:
    • webkit_user_content_manager_remove_script
    • webkit_user_content_manager_remove_style_sheet
  • New g-variant-get-maybe-string: checks GVariant for nullness and returnsa contained string if possible.
  • The WebKitURISchemeRequest callbacks run on separate thread now.
  • make-jsc-function should return the original JSCValue as a second value.
Minor API-breaking changes:
  • webkit-web-context-register-uri-scheme-callback now has one less optional arguments.
Bug Fixes:
  • Fix mistyped JSC-related exports.
  • Use :string type instead of :pointer for WebKitUserMessage names.
  • webkit2.uri-response is not loaded in cl-webkit.asd.

  • Make webkit-web-view-evaluate-javascript process the returned valuesand turn them into the matching Lisp values (see jsc-value-to-lispdocstring for transformation rules).
  • The callback to the webkit-web-view-evaluate-javascript now acceptstwo required arguments -- the Lispy data, transformed from theresults of code evaluation, and an original JSCValue it wastransformed from.
  • Add tests (webkit2/tests/ subdirectory and cl-webkit2/tests system),mostly for JS evaluation results.


cl-webkit is distributed under the MIT license.

Please note that this licence only covers the binding itself. Refer to the distribution terms of the third-party dependencies for details.

Dependencies (6)

  • alexandria
  • calispel
  • cffi
  • cl-cffi-gtk
  • fiveam
  • float-features

Dependents (0)

    • GitHub
    • Quicklisp