1 import { jQuery } from "./core.js";
2 import { slice } from "./var/slice.js";
4 import "./deprecated/ajax-event-alias.js";
5 import "./deprecated/event.js";
7 // Bind a function to a context, optionally partially applying any
9 // jQuery.proxy is deprecated to promote standards (specifically Function#bind)
10 // However, it is not slated for removal any time soon
11 jQuery.proxy = function( fn, context ) {
14 if ( typeof context === "string" ) {
20 // Quick check to determine if target is callable, in the spec
21 // this throws a TypeError, but we will just return undefined.
22 if ( typeof fn !== "function" ) {
27 args = slice.call( arguments, 2 );
29 return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
32 // Set the guid of unique handler to the same of original handler, so it can be removed
33 proxy.guid = fn.guid = fn.guid || jQuery.guid++;
38 jQuery.holdReady = function( hold ) {
46 export { jQuery, jQuery as $ };