Click here to Skip to main content
15,880,972 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I have visual studio in 2010 installed which I update service pack 1 to get HML5 tags.But When i m n't getting methods like getContext in intellisense.I d't know what i need to do for this.Plz Help
Posted

1 solution

I think native intellisense was introduced in Visual Studio 11

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.

http://www.asp.net/vnext/overview/aspnet/whats-new#_Toc303354505[^]

If you want support in Visual Studio 2010 you can try to use some 3rd party vsdoc files with documentation, like
http://canvasvsdoc.codeplex.com/[^]

The link above is for canvas, but you can find for the rest of APIs as well.
 
Share this answer
 
Comments
Rajni from delhi 17-Jan-13 5:51am    
I have added the Canvas js but still not getting the Canvas fill rectangle?I dn't know what other i need to do in this.is there any other js I need to add ?
Vyacheslav Voronenko 17-Jan-13 5:55am    
Not sure what do you mean

context.beginPath();
context.rect(188, 50, 200, 100);
context.fillStyle = 'yellow';
context.fill();
context.lineWidth = 7;
context.strokeStyle = 'black';
context.stroke();

All the functions to draw the rectangle are present in the vsdoc
Rajni from delhi 17-Jan-13 6:55am    
Canvas.vsDoc.Canvas2dContext = {

fillStyle: "#FF0000",
fillRect: function (x, y, width, height) {
// Canvas.vsDoc.Canvas2dContext.fillRect(10, 10, 150, 75)
x = 10;
y = 10;
width = 150;
height = 75;
}

};



Canvas.vsDoc.VSDocCanvasElement = document.getElementById("myCanvas");
Canvas.vsDoc.VSDocCanvasElement.getContext = function (twod) {
twod = '2d';
return Canvas.vsDoc.Canvas2dContext;
};
Canvas.vsDoc.VSDocCanvasElement.width =200;
Canvas.vsDoc.VSDocCanvasElement.height =100;
Canvas.vsDoc.VSDocCanvasElement.toDataUrl = function (type, args) {

return "";
};
what's the issue with this?
Vyacheslav Voronenko 17-Jan-13 7:03am    
Sir, vsdoc files are intended to provide hints for intellisense in Visual Studio

See blog post for the example of use
http://blogs.msdn.com/b/webdev/archive/2008/10/28/rich-intellisense-for-jquery.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900