complete javascript by tern