![]() ![]() ![]() Intellisense for External JavaScript Libraries If I later assign a numeric value to the "myElement" variable (which in JavaScript converts it to a number), notice how VS will detect this and now provide integer intellisense for the variable later in the method: 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.įor 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: JavaScript is a dynamic language, and doesn't support explicit type declarations, which has made implementing good intellisense difficult in the past. 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: 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.īelow is a quick tour of some of the new JavaScript intellisense features to take advantage of: JavaScript Type Inference One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript intellisense. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |