Forum Discussion

Antonio_Haynes's avatar
Antonio_Haynes
Contributor
11 years ago

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...
  • Philip_Baird's avatar
    11 years ago

    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