enable on-resize events on browser resize for any control

This commit is contained in:
David Botton 2024-08-11 16:59:54 -04:00
parent 9ad5676d5f
commit 4c2fd7d8e3
5 changed files with 33 additions and 9 deletions

View file

@ -625,10 +625,11 @@ option passed from javascript calling the jQuery custom event mechanism
(defgeneric set-on-resize (clog-obj on-resize-handler)
(:documentation "Set the ON-RESIZE-HANDLER for CLOG-OBJ. If ON-RESIZE-HANDLER
is nil unbind the event. In most modern browser this only works on the clog-window
object"))
object. One can set-on-resize and then re-trigger this event on any clog-obj
using (jquery-trigger obj \"resize\")."))
(defmethod set-on-resize ((obj clog-obj) handler)
(set-on-event obj "resize" handler))
(set-on-event obj "resize" handler :cancel-event t))
;;;;;;;;;;;;;;;;;;
;; set-on-focus ;;