From 3aaee11ebf14f528c3ebebd456608296d3565f0e Mon Sep 17 00:00:00 2001 From: David Botton Date: Sat, 9 Mar 2024 21:13:24 -0500 Subject: [PATCH] add defaults to clog-popup and return the clog-body and the clog-window --- source/clog-window.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/clog-window.lisp b/source/clog-window.lisp index 64998db..827fd54 100644 --- a/source/clog-window.lisp +++ b/source/clog-window.lisp @@ -34,11 +34,13 @@ them.") (defun open-clog-popup (obj &key (path *clog-popup-path*) (add-sync-to-path t) (sync-key (clog-connection:random-hex-string)) - specs name (wait-timeout 10)) + (name "_blank") + (specs "") + (wait-timeout 10)) "Open a new browser window/popup in most cases a tab. Since they are controlled by clog you have full control of the new popups and are more flexible than using -open-windo. Returns the clog-body of the new window on the new connection or nil -if failed within :WAIT-TIMEOUT" +open-windo. Returns the clog-body and the clog-window in the same connnection as +obj of the new window on the new connection or nil if failed within :WAIT-TIMEOUT" (let* ((sem (bordeaux-threads:make-semaphore)) (mpath (if add-sync-to-path (format nil "~A?sync=~A" path sync-key) @@ -48,7 +50,7 @@ if failed within :WAIT-TIMEOUT" (bordeaux-threads:wait-on-semaphore sem :timeout wait-timeout) (setf sem (gethash sync-key *clog-popup-sync-hash*)) (if (typep sem 'clog-obj) - sem + (values sem new-win) nil))) (defun clog-popup-openned (obj sync-key)