I am trying to learn JavaScript and write a few examples in Visual Studio. But Intellisense stops working for me when getting the context for a canvas. The example renders fine in the browser.
<!DOCTYPE html>
<html>
<head>
<title>Canvas with text</title>
<meta charset="utf-8" />
</head>
<body>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.font = "30px Arial";
ctx.fillText("Hello World", 10, 50);
</script>
</body>
</html>
The line: "var ctx = c.getContext("2d");" results in ctx not getting IntelliSense. So font and fillText are properties and methods that I just kind of have to know in advance, not getting any help from Visual Studio.
Is that normal or am I doing something wrong?