
static.js.vendor.modernizr.src.fnBind.js Maven / Gradle / Ivy
The newest version!
define(function() {
/**
* fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
*
* @access private
* @function fnBind
* @param {function} fn - a function you want to change `this` reference to
* @param {object} that - the `this` you want to call the function with
* @returns {function} The wrapped version of the supplied function
*/
function fnBind(fn, that) {
return function() {
return fn.apply(that, arguments);
};
}
return fnBind;
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy