docs for set-on-load-script

This commit is contained in:
David Botton 2022-06-12 20:30:11 -04:00
parent e43afc3d9e
commit 0fce8207c1
2 changed files with 60 additions and 10 deletions

View file

@ -167,7 +167,11 @@ clog-document object. (Private)"))
(:documentation "Load script from SCRIPT-URL."))
(defmethod load-script ((obj clog-document) script-url)
(jquery-execute (head-element obj)
;; After we load the script from src we then fire the
;; custom on-load-script event in the next line of
;; script after the load as scripts are loaded
;; synchronously.
(Jquery-execute (head-element obj)
(format nil "append('<script src=\"~A\"></script>~
<script>$(clog[\\'document\\']).trigger(\\'on-load-script\\',~
\\'~A\\')</script>')"