我开始玩
HTML5 / CSS3和新的
JavaScript API
我在VS 2010中注意到的一点是,它不支持新的JavaScript API,我想知道是否有任何可以做的事情
所以在Vs2010如果我键入:
var canvas = document.getElementById('diagonal'); var context = canvas.getContext('2d');
我不会得到任何intellisense为“getContext”方法等.
我不想写代码,编译和祈祷它的工作.
任何想法如何启用智能感知新的JavaScript?
解决方法
我知道你标记了VS2010,但是
Visual Studio 11 Developer Preview,可能是最终的RTM,natively supports HTML5 intellisense,包括支持画布.
IntelliSense for DOM APIs has been improved,with support for many new HTML5 APIs including querySelector,DOM Storage,cross-document messaging,and canvas. DOM IntelliSense is now driven by a single simple JavaScript file,rather than by a native type library definition. This makes it easy to extend or replace.