And how would you transfer the WhenExpression to the JavaScript from a PHP closure? That's what I don't get :)