add JS methods to call scripts