cancel
Showing results for 
Search instead for 
Did you mean: 

Add summary for JavaScript functions to intellisense

SOLVED
Highlighted
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
Highlighted
Community Expert


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
Highlighted
Contributor

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

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

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


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

Highlighted
Contributor

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.
Highlighted
Community Manager


Hi,


 


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


 

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors