Skip to content

Instantly share code, notes, and snippets.

@jberthet
Created February 4, 2013 11:38
Show Gist options
  • Select an option

  • Save jberthet/4706263 to your computer and use it in GitHub Desktop.

Select an option

Save jberthet/4706263 to your computer and use it in GitHub Desktop.
var myWrapper = function(path, caller, handler) {
if (arguments > 3) {
var additionnal_arguments = arguments.slice(4);
}
// The 'notify()' call could take a variable number of args passed along to the "handler" callback
// My goal was to give it "additionnal_arguments" content ...
SC.Request.getUrl('/static_part' + path + '?lang=' + MyApp.lang)
.notify(caller, handler)
.send();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment