add tag and category models
[redakcja.git] / apps / wiki / static--wiki--editor--node_modules--grunt-contrib-less--node_modules--less--test / browser / es5.js
1 /*
2    PhantomJS does not implement bind. this is from
3               https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
4  */
5 if (!Function.prototype.bind) {
6     Function.prototype.bind = function (oThis) {
7         if (typeof this !== "function") {
8             // closest thing possible to the ECMAScript 5 internal IsCallable function
9             throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
10         }
11
12         var aArgs = Array.prototype.slice.call(arguments, 1),
13             fToBind = this,
14             fNOP = function () {},
15             fBound = function () {
16                 return fToBind.apply(this instanceof fNOP && oThis
17                     ? this
18                     : oThis,
19                     aArgs.concat(Array.prototype.slice.call(arguments)));
20             };
21
22         fNOP.prototype = this.prototype;
23         fBound.prototype = new fNOP();
24
25         return fBound;
26     };
27 }