test.ss
(module test mzscheme
  (require (planet "ast.ss" ("dherman" "javascript.plt" 3) "syntax"))
  (require (prefix scheme: (lib "pretty.ss")))
  (require "javascript.ss")
  
  (print-struct #t)
  
  (javascript (ignore (bar "foo")))
  
  (scheme:pretty-print
   (javascript
    (ignore 
     ((dot YAHOO util Connect asyncRequest)
      "GET"
      #,(make-StringLiteral #f "URL")
      (make_callback ,"Activity" ,"Day")))))
  
  (printf "~a~n"
          (js
           (ignore 
            ((dot YAHOO util Connect asyncRequest)
             "GET"
             #,(make-StringLiteral #f "URL")
             (make_callback ,"Activity" ,"Day")))))
  
  (scheme:pretty-print
   (javascript
    (define (make_callback activity day)
      (return
       (object [success 
                (lambda (obj)
                  (define newcolor
                    ((dot obj responseText subString) 4 11))
                  (define activity
                    ((dot document getElementById) (dot obj argument activity)))
                  (ignore ((dot activity style backgroundColor) = newcolor))
                  (define day ((dot document getElementById) (dot obj argument day)))
                  (ignore ((dot day className) = (if (== (dot day className) "field-on") "field-off" "field-on")))
                  (return true))]
               [failure 
                (lambda (obj) 
                  (return false))]
               [argument 
                (object [activity activity]
                        [day day])])))))
  
  #;(javascript (ignore)))