Shade functions can behave as javascript function calls via js_evaluate. This is way neat.