Added support for javascript callbacks.
Official v1.0 version
switched v to 1.1