JScript IntelliSense: Working with Ext JS

JScript IntelliSense: Working with Ext JS

  • Comments 28

Ext is great framework for adding rich AJAX interactivity to your web application.  Unfortunately, JScript IntelliSense currently has difficulties processing the script and it's not uncommon to see this message:


I just wanted to let everyone know that we've investigated and fixed the issue.  This fix will be available in the next service pack (no date announced yet).  In the meanwhile, there's actually a simple workaround.  In a file that runs before ext-base.js, or on the first-line of ext-base.js itself, add the following code:

window.addEventListener = false;

This corrects for an inaccuracy in our simulated execution environment.  Once again, after the next service pack, this workaround will no longer be neccesary.  I quickly experimented with Ext 2.0.2...


...and Ext 1.1.1...


Ext is one of the larger libraries out there and thus it takes longer to execute.  If you've been seeing...


...increasing the timeout will often solve the problem.

Increasing the Timeout

By default, every IntelliSense request is only allowed 15s to execute.  This is to prevent IntelliSense from scripts with infinite loops.  If you have a large script or slower machine, it may make sense to increase the timeout limit.  The timeout value store within following registry keys (depending on if your are using Express or the full product).  The value is in milliseconds so choose something greater than 15000.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\HTML Editor\JsFailsafeTimeout 
HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\9.0\HTML Editor\JsFailsafeTimeout

On a related note, we've read all the requests for Prototype support.  Like Ext, We've fixed the issue for the next service pack. But unlike Ext, there isn't a temporary workaround to be offered.  We hope this info unblocks your work.  Thanks for using our editor!

Jeff King
Program Manager
Visual Studio Web Tools

Leave a Comment
  • Please add 2 and 6 and type the answer here:
  • Post
  • Any possibility of JavaScript intellisense honoring the ///<returns domElement='true'> for return values or ///<param domElement='true'> inside of functions? TIA

  • Great news.

    Keep up the good work.

  • Great news - glad you're continuing to improve things. How about improved YUI support? I had problems with namespaces.

  • @Brock: We'll definitely consider respecting domElement=true.

  • @Kevin Dente: We've tested about 10 of the core YUI library files and so far they've seemed to be working.  I realize it's not a conclusive testing strategy, so if you have a sample app where YUI IntelliSense is not working, please feel free to send it to me (jking-at-microsoft-dot-com) and we can take a look.  Thanks!

  • Excellent... keep up the great work guys and keep posting :)

  • I'm slowly recovering from keynoting at MIX last week, and have been digging my way out of backlogged

  • I'm slowly recovering from keynoting at MIX last week, and have been digging my way out of backlogged

  • I&#39;m slowly recovering from keynoting at MIX last week, and have been digging my way out of backlogged

  • Is there any plans to bring Mootools into VS2008?

  • Awesome find. [high-five!]

    I've been testing this workaround all morning and thought I would post my results here...

    1. As you noted the fix MUST be added to an external .js file. Adding the line of code to an inline &lt;script&gt; block which is rendered above the external Ext script includes does not appear to work.

    2. The "window.addEventListener = false;" appears to disable events from attaching in FireFox and Safari. The page appears to render correctly, but all events are disabled. Maybe this should be a VS Design-Time only fix?

    3. We add the Ext files to our Assembly as Embedded Resources and have yet to get the addEventListener fix to work with these Embedded Resources. We're running a  few tests to figure out exactly why. I thought it had something to do with not adding the scripts to the document head, but...

    4. The fix and Ext scripts do not need to be included in the head of the page. The fix just needs to be included before the Ext includes.

    Probably point #2 is the most serious limitation. Wrapping the line in an IE only browser/dom check would easily solve the problem, although completely removing the fix at render/release would certainly be safer.

  • forgot to add...

    5. We do find it takes a while (10-30 seconds) until Ext shows up in intellisense the first time the page loads in VS, BUT ONLY if the 2008 Hot Fix Roll up has NOT been installed. With the hot fix, Ext pops into intellisense almost immediately. The registry edits were not required.

    Get the Visual Studio 2008 Hot Fix at the following location:


  • @geoffrey.mcgill:  Thanks for the detailed feedback!  Some answers:

    1. Correct, this workaround will not work for an inline script block.  The code always need to be in another file relative to your active document.

    2. Correct, this should only be a design-time only fix.  Perhaps I should have made that more clear.

    3. Your scenario should work.  Let us know if for some reason it doesn't.

    4. Correct, any line of code that executes before Ext will do.

    5. That sounds great!  What type of box do you have?  On mine, it takes about 10 seconds (with the hotfix).

  • This is why VS is the best IDE in the world.  Keep up the good work.

  • Visual Studio 2008 JavaScript IntelliSense and Ext JS Framework

Page 1 of 2 (28 items) 12