开发者

HTML5 Javascript API Intellisense support in visual studio

I started playing with HTML5/CSS3 and the new JavaScript API

something i noticed in VS 2010 is it doesn't have any support for the new JavaScript API i was wondering if there is anything i can do about it

so in Vs2010 if i type :

     var canvas = document.getElementById('diagonal');
     var context = canvas.getContext('2d');

i don't get any intellisense for the "getContext" method etc..

i dont wanna write the code and co开发者_StackOverflow社区mpile and pray it works.

any idea how can i enable intellisense for new javascript ?


vsdoc documentation for Canvas for Visual Studio 2010:

http://abstractform.wordpress.com/2010/02/18/canvas-intellisense-auto-completion-in-visual-studio/


I know you tagged VS2010, but the Visual Studio 11 Developer Preview, and presumably the eventual RTM, natively supports HTML5 intellisense, including support for canvas.

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.


This artricle describes how to add intellisense. The system looks pretty flexible. I think you'll need to download a special doc version of the JS API though.

http://msdn.microsoft.com/en-us/library/ff798328.aspx

Here is another

http://blog.turlov.com/2010/05/leveraging-visual-studio-javascript.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜