[parenscript-devel] Miscellaneous utils I use
John Fremlin
john at fremlin.org
Tue Jun 19 09:30:08 UTC 2007
(defjsmacro max (a b)
`(*Math.max ,a ,b)) ; might be nice to be able to have more than two arguments
(defjsmacro ceil (expr)
`(*Math.ceil ,expr))
(define-js-compiler-macro timeout (form timeout)
(js-compile `(set-timeout (lambda() ,form) ,timeout)))
(defjsmacro make-xml-http-request ()
`(if (slot-value window '*X-M-L-Http-Request )
(new *X-M-L-Http-Request)
(new (*Active-X-Object "Microsoft.XMLHTTP"))))
More information about the parenscript-devel
mailing list