(test-ps-js variable-declaration-2
(if (= i 1)
- (progn (defvar blorg "hallo")
- (alert blorg))
- (progn (defvar blorg "blitzel")
- (alert blorg)))
+ (let* ((blorg "hallo"))
+ (alert blorg))
+ (let* ((blorg "blitzel"))
+ (alert blorg)))
"if (i == 1) {
var blorg = 'hallo';
alert(blorg);
(test-ps-js variable-declaration-3
(if (= i 1)
- (let ((blorg "hallo"))
+ (lexical-let* ((blorg "hallo"))
(alert blorg))
- (let ((blorg "blitzel"))
+ (lexical-let* ((blorg "blitzel"))
(alert blorg)))
"if (i == 1) {
(function () {
"document.write('<a href=\"#\" onclick=\"' + 'javascript:transport()' + '\">link</a>')")
(test-ps-js the-html-generator-4
- (let ((disabled nil)
+ (let* ((disabled nil)
(authorized t))
(setf element.inner-h-t-m-l
(ps-html ((:textarea (or disabled (not authorized)) :disabled "disabled")
+ (disabled || !authorized ? ' disabled=\"' + 'disabled' + '\"' : '')
+ '>Edit me</textarea>';")
-(test-ps-js the-html-generator-5
- (css-inline :color "red"
- :font-size "x-small")
- "'color:red;font-size:x-small'")
-
-(test-ps-js the-html-generator-6
- (defun make-color-div(color-name)
- (return (ps-html ((:div :style (css-inline :color color-name))
- color-name " looks like this."))))
- "function makeColorDiv(colorName) {
- return '<div style=\"' + ('color:' + colorName) + '\">' + colorName
- + ' looks like this.</div>';
-}")
-