Remove depreciated call to sendJavaScript for more recent method