Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 978 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 978 Bytes

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.