Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML5 ASP.NET4.0
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 16-Jan-13 23:20pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Rajni from delhi at 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 at 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 at 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 at 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
0 DamithSL 320
1 OriginalGriff 195
2 Afzaal Ahmad Zeeshan 154
3 Zoltán Zörgő 149
4 Peter Leow 115
0 OriginalGriff 7,510
1 DamithSL 5,519
2 Sergey Alexandrovich Kryukov 4,994
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100