comparison default/node_modules/shoestring/src/ajax/get.js @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1d038bc9b3d2
1 //>>excludeStart("exclude", pragmas.exclude);
2 define([ "shoestring", "ajax/ajax" ], function( shoestring ) {
3 //>>excludeEnd("exclude");
4
5 /**
6 * Helper function wrapping a call to [ajax](ajax.js.html) using the `GET` method.
7 *
8 * @param {string} url The url to GET from.
9 * @param {function} callback Callback to invoke on success.
10 * @return shoestring
11 * @this shoestring
12 */
13 shoestring.get = function( url, callback ){
14 return shoestring.ajax( url, { success: callback } );
15 };
16
17 //>>excludeStart("exclude", pragmas.exclude);
18 });
19 //>>excludeEnd("exclude");