Added javascript support to example