Skip to content

gaearon/Backbone.NativeAjax

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backbone.NativeAjax

A drop-in replacement for Backbone.Ajax that uses only native XMLHttpRequest methods for sync. It has no dependency on jQuery.

To Use:

Load Backbone.NativeAjax with your favorite module loader or add as a script tag after you have loaded Backbone in the page. You may set a Backbone.Deferred class that will be assigned to the return value if you so desire.

Features:

  • Accepts success and error callbacks
  • Set headers with a headers object
  • beforeSend

Requirements:

NativeAjax makes use of XMLHttpRequest which is supported in most modern browsers. See the compatibility chart

Notes:

  • The ajax function accepts a success and error callbacks. To return a deferred object, set Backbone.Deferred.

Uses code from Exoskeleton. See that project for more information and other features.

About

A Backbone.Ajax function powered by native XHR methods

Resources

License

Stars

Watchers

Forks

Packages

No packages published