Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Created January 7, 2018 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmercouris/6d6983aae8d089861805defe5b055ad8 to your computer and use it in GitHub Desktop.
Save jmercouris/6d6983aae8d089861805defe5b055ad8 to your computer and use it in GitHub Desktop.
(defparameter promise (promise))
(defun callback-stub ()
(fulfill promise))
(defun web-view-execute (view script)
(execute-function-in-new-thread
(let ((np (cffi:null-pointer)))
(webkit2:webkit-web-view-run-javascript view script np (cffi:callback callback-stub) np)))
(force promise))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment