Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JavaScript Code Assist missing browser objects?
JavaScript Code Assist missing browser objects? [message #693570] Wed, 06 July 2011 19:16 Go to next message
Dagan Henderson is currently offline Dagan HendersonFriend
Messages: 2
Registered: July 2011
Junior Member
Am I doing something wrong, or are the generic browser objects document, window and screen not recognized by the JavaScript code assist unless they are explicitly declared?

If I type document. in a .js file, I don't get any recommendations. However, if I add declare document = new Document(); at the start of the file, it works as you'd expect.

Is there a means of setting the context for the .js file or some other way to tell Code Assist that this file will be accessed within a rendered DOM document?
(no subject) [message #693650 is a reply to message #693570] Wed, 06 July 2011 23:50 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

On 7/6/2011 3:16 PM, Dagan Henderson wrote:
> Am I doing something wrong, or are the generic browser objects document,
> window and screen not recognized by the JavaScript code assist unless
> they are explicitly declared?
>
> If I type document. in a .js file, I don't get any recommendations.
> However, if I add declare document = new Document(); at the start of the
> file, it works as you'd expect.
>
> Is there a means of setting the context for the .js file or some other
> way to tell Code Assist that this file will be accessed within a
> rendered DOM document?

Assuming you're using Indigo, does the project's JavaScript>Include Path
property page's Libraries tab include the browser library? On the
Global SuperType tab, is Window set as the default?

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: (no subject) [message #693661 is a reply to message #693650] Thu, 07 July 2011 00:28 Go to previous message
Dagan Henderson is currently offline Dagan HendersonFriend
Messages: 2
Registered: July 2011
Junior Member
That did it, Nitin. Thanks!!
Previous Topic:Error starting Eclipse
Next Topic:Pin console
Goto Forum:
  


Current Time: Fri Apr 26 23:07:21 GMT 2024

Powered by FUDForum. Page generated in 0.08891 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top