This Question is Answered

2 "helpful" answers available (2 pts)
2 Replies Last post: Jun 26, 2013 4:32 PM by Klaus Sevensleeper  
Klaus Sevensleeper Newbie 3 posts since
Jun 26, 2013
Currently Being Moderated

Jun 26, 2013 11:43 AM

External Libraries and <script> in HTML file

Hi

 

I'm quite new to WebStorm and even quite unexperienced with JavaScript. Now, I want to start a bigger JavaScript project using WebStorm 6.

After my first attempt to walk with WebStorm 6, a question came up:

 

How can I reference an External Library in the <script> element of the HTML file ?


Is it right to reference an External Library from <script>? Or, do I have to copy the used external library into the project folder (i.e. to scripts/libs) additionally?

Is the only purpose of an External Library to enable code completion, quick fix ... in JavaScript files of the project?

 

I search the docs some hours but I found no clear answer for my questions

 

Can sombody pls clearify?

 

Thanks,

Klaus

Elena Pogorelova Apprentice 912 posts since
Oct 5, 2011
Currently Being Moderated
Jun 26, 2013 2:22 PM in response to: Klaus Sevensleeper
Re: External Libraries and <script> in HTML file

Hi Klaus,

 

exactly - the only purpose of an External Library is to enable code completion, navigation, etc. in our javascript files. Libraries configured in WebStorm are not passed to the browser when you run your application, so you need to specify the correct URL in the src attribute of a <script> tag in your HTML to get the libraries loaded by your browser. It may be absolute (http reference), relative to document or site root-relative (see http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c44a.html, for example)

 

 

Best regards,

Lena

More Like This

  • Retrieving data ...