VS 2008 JavaScript Intellisense

Taken from Scott Guthrie’s blog, this article show us one of the most wanted new features – JavaScript Intellisense:

One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript intellisense. This is enabled in both the free Visual Web Developer 2008 Express edition as well as in Visual Studio, and makes using JavaScript and building AJAX applications significantly easier.

Below is a quick tour of some of the new JavaScript intellisense features to take advantage of:

JavaScript Type Inference

One of the things you’ll notice immediately when you start typing within a script block is the richer support that Visual Studio 2008 now has for JavaScript keywords and language features:

step1 VS 2008 JavaScript Intellisense

JavaScript is a dynamic language, and doesn’t support explicit type declarations, which has made implementing good intellisense difficult in the past.

Visual Studio 2008 adds support for type inference, which means that it evaluates and computes how a JavaScript block is being used and dynamically infers the variable usage and type information of the code to provide accurate intellisense support.

For example, Visual Studio below will infer that an html element is being retrieved by the document.getElementById() method, and provide appropriate html element intellisense for the variable result:

step2 VS 2008 JavaScript Intellisense

read all


Leave a Reply

Your email address will not be published. Required fields are marked *