cancel
Showing results for 
Search instead for 
Did you mean: 

Add summary for JavaScript functions to intellisense

SOLVED
Antonio_Haynes
Contributor

Add summary for JavaScript functions to intellisense

Hello,

 Im new to test complete and javascript, Im wondering if there is any way that I can add a summary to my custom functions in javascript so that when im trying to use the intellisense I get a discription of what that function does.
1 ACCEPTED SOLUTION

Accepted Solutions
Philip_Baird
Community Expert

RE: Add summary for JavaScript functions to intellisense


Hi Antonio, unfortunately there is no way to add summary information to you JScript functions if they are within a Script Unit.


 


The only case where it can be done is if the functions appear in a Script Extension. via the Description.xml file.




This unfortuately has the drawback in that Script Extensions cannot access external code via //USEUNIT, they are required to be completely self contained.





If your functions belong to a user defined object, e.g. myFunction() in the following module MyModule


 


var MyModule(function(){


  return {


    myFunction: function() {


      return 123;


    }


  };


})();


 


then there is no way to get the function myFunction() to appear in the intellisense at all.


 


Regards,


Phil Baird





View solution in original post

5 REPLIES 5
Antonio_Haynes
Contributor

RE: Add summary for JavaScript functions to intellisense

As an added note, I have looked for this topic on the smartbear help pages and from google, with no luck .
Ryan_Moran
Valued Contributor

RE: Add summary for JavaScript functions to intellisense

I'd also like to know how to do this or if it's even possible.

''-Praise the sun and Give Kudos.''
Philip_Baird
Community Expert

RE: Add summary for JavaScript functions to intellisense


Hi Antonio, unfortunately there is no way to add summary information to you JScript functions if they are within a Script Unit.


 


The only case where it can be done is if the functions appear in a Script Extension. via the Description.xml file.




This unfortuately has the drawback in that Script Extensions cannot access external code via //USEUNIT, they are required to be completely self contained.





If your functions belong to a user defined object, e.g. myFunction() in the following module MyModule


 


var MyModule(function(){


  return {


    myFunction: function() {


      return 123;


    }


  };


})();


 


then there is no way to get the function myFunction() to appear in the intellisense at all.


 


Regards,


Phil Baird





View solution in original post

Antonio_Haynes
Contributor

RE: Add summary for JavaScript functions to intellisense

That is unfortunate, I was really hoping to be able to use that kind of functionallity. Thanks for the reply. it is nice to know that I cannot at least.
TanyaYatskovska
Community Manager

RE: Add summary for JavaScript functions to intellisense


Hi,


 


I'd like to add that we have the corresponding suggestion in our DB - I've added your votes to it.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements