A drop-in replacement for Backbone.Ajax that uses only native XMLHttpRequest methods for sync. It has no dependency on jQuery.
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.
- Accepts
success
anderror
callbacks - Set headers with a
headers
object beforeSend
NativeAjax makes use of XMLHttpRequest which is supported in most modern browsers. See the compatibility chart
- The ajax function accepts a
success
anderror
callbacks. To return a deferred object, setBackbone.Deferred
.
Uses code from Exoskeleton. See that project for more information and other features.