Bug Tracker

Changes between Initial Version and Version 1 of Ticket #5201, comment 7


Ignore:
Timestamp:
Jul 17, 2011, 4:34:33 AM (9 years ago)
Author:
addyosmani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5201, comment 7

    initial v1  
    1 I've just gone through the API docs for .getScript() and also put together a a live test case here: http://jsfiddle.net/64bDU/ using jQuery 1.5.2 demonstrating that the two parameters accepted by the success callback do in fact return values and *not* null/undefined as originally posted. In the case of the first parameter (data) you of course don't expect to get data returned, however the textStatus returns with a success message on completion.
     1I've just gone through the API docs for .getScript() and also put together a a live test case here: http://jsfiddle.net/64bDU/ using jQuery 1.5.2 demonstrating that the two parameters accepted by the success callback do in fact return values and *not* null/undefined as originally posted. In the case of the first parameter (data) data is returned if available and the textStatus returns with a success message on completion. We've never claimed that error messages were available for this.
    22
    3 In my view, we may need to adjust the docs to clarify the limitations of .getScript(), however as the first reply correctly points out, if you need more than it provides, remember it's just a shorthand method and you can always fall back on $.ajax() for something requiring additional callbacks for errors etc. Closing as an error callback would probably creep into the territory of stopping this being just a short convenience path to achieving $.ajax()-related functionality.
     3In my view, we may need to adjust the docs to clarify the limitations of .getScript(), however as the first reply correctly points out, if you need more than it provides, remember it's just a shorthand method and you can always fall back on $.ajax() for something requiring additional callbacks for errors etc.
     4
     5Closing as an error callback would probably creep into the territory of stopping this being just a short convenience path to achieving $.ajax()-related functionality.