anchor.diff:        (write-line "    C.prototype = obj;" out)
         (write-line "    return new C;" out)))
   
  -    ;; Custom print directive handlers
  -  (iter (for (directive handler) in-hashtable *custom-print-handlers*)
  -        (write-line "" out)
  -        (format out "~A.~A = ~A;" name (print-handler-name handler) (print-handler-impl handler))))
  +  ;; Custom print directive handlers
  +  (iter (for (directive handler) in-hashtable *js-custom-print-handlers*)
  +        (when (print-handler-impl handler)
  +          (write-line "" out)
  +          (format out "~A.~A = ~A;~%" name (print-handler-name handler) (print-handler-impl handler)))))
   
   (defun write-namespace-declaration (name out)
     (iter (for pos first (position #\. name) then (position #\. name :start (1+ pos)))
  
positive.code:   (format out "~A = (function () {
  var module = { };" name)
    (write-namespace-helpers "module" out)
    (write-namespace-body "module" (namespace-templates (parse-template namespace)) out)
    (write-string "return module; })();
  " out))
  
  
negative.code: :HANDLER or :FUNCTION are required, :PARAMETER-CONVERTER is optional. If :PARAMETER-CONVERTER is NIL or
  it returns NIL or empty string then \"params\" argument will be omitted in call to handler."
    (let ((handler (getf params :handler))
          (name (getf params :function))
          (converter (getf params :parameter-converter)))
      (unless name
        (setf name (format nil "$$customPrintDirective~A$$" (remove-if-not #'alphanumericp (symbol-name directive)))))
      (setf (gethash directive *js-custom-print-handlers*) (make-print-handler :impl handler
                                                                               :name name
                                                                               :param-converter converter
                                                                               :module nil)))
    t)
  
  (defmethod register-print-handler ((backend (eql :requirejs-backend)) directive &rest params)
    "Register DIRECTIVE handler for Javascript backend.
  The following parameters are accepted:
  :HANDLER - string which defines actual Javascript handler like \"function (params, value) { }\";
  :FUNCTION - string with name of handler function (it should be defined elsewhere with
  prototype similar to above);
  :MODULE - RequireJS module which implements :FUNCTION.
  :PARAMETER-CONVERTER - lambda which accepts data from parser and returns string parameters for handler.
  
  :HANDLER or :FUNCTION are required, :PARAMETER-CONVERTER and :MODULE are optional. If :PARAMETER-CONVERTER is NIL or
  it returns NIL or empty string then \"params\" argument will be omitted in call to handler. if :MODULE not missing it
  should contain URI of the RequireJS module which implements function :FUNCTION. :MODULE it not used when :HANDLER is
  specified"
    (let ((*js-custom-print-handlers* *requirejs-custom-print-handlers*))
      (apply #'register-print-handler :javascript-backend directive params))
    (let ((module (getf params :module))
          (module-ref))
      (when module
        (if (gethash module *requirejs-deps*)
            (setf module-ref (gethash module *requirejs-deps*))
            (progn
              (setf module-ref (symbol-name (gensym "JS")))
              (setf (gethash module *requirejs-deps*) module-ref))))
      (format t "Setting module to ~S~%" module-ref)
      (setf (print-handler-module (gethash directive *requirejs-custom-print-handlers*)) module-ref))
      (format t "Module to ~S~%" (print-handler-module (gethash directive *requirejs-custom-print-handlers*)))
    t)
  
  (defun write-custom-print-directives (directives expr out)
  