Click here to Skip to main content
11,926,472 members (58,309 online)
Rate this:
Please Sign up or sign in to vote.
See more: HTML5 ASP.NET4
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
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.[^]

If you want support in Visual Studio 2010 you can try to use some 3rd party vsdoc files with documentation, like[^]

The link above is for canvas, but you can find for the rest of APIs as well.
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 there any other js I need to add ?
Vyacheslav Voronenko 17-Jan-13 5:55am
Not sure what do you mean

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

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2015
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