我一直在阅读文档,但无法弄清楚如何在 VS 2013 中将项目添加到 javascript intellisense 的完成列表中。我知道这些项目可以通过 event.items 访问,但推送到这个数组不会似乎影响完成列表。
intellisense.addEventListener('statementcompletion', function (event) {
var attempt = new Object();
attempt.name = "helllo";
attempt.value = function() {console.log("helllooo");
attempt.kind = "function";
attemp.scope = "global";
event.items.push(attempt);
});