Skip to content

Instantly share code, notes, and snippets.

@dcherman
Created March 19, 2013 16:22
Show Gist options
  • Select an option

  • Save dcherman/5197562 to your computer and use it in GitHub Desktop.

Select an option

Save dcherman/5197562 to your computer and use it in GitHub Desktop.
PATCH support for IE8
(function( $ ){
try {
new XMLHttpRequest().open( "PATCH", "." );
}
catch( _ ) {
if ( typeof ActiveXObject !== "undefined" ) {
$.ajaxPrefilter(function(options) {
if ( options.type === "PATCH" ) {
options.xhr = function() {
return new ActiveXObject( "Microsoft.XMLHTTP" );
}
}
});
}
}
}( jQuery ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment