Support timeout when executing JS