UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

20 lines (17 loc) 572 B
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; });