Reputation: 41
I am updating a JavaScript file that uses jQuery.support.cors
, which is now deprecated;
What should I use instead?
The application operates in an <iframe>
inside a parent document and uses $.ajax();
to send data to a different url.
jQuery(document).ready(function() {
jQuery.support.cors = true; // This is now deprecated.
}
Upvotes: 2
Views: 868
Reputation: 4117
The documentation is pretty helpful here. Firstly that it's intended as an internal collection and secondly it suggests the use of Modernizr instead.
A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as Modernizr instead of dependency on properties in jQuery.support
Upvotes: 1