PageSourceSearch

https://js.prismashop.fr/js/algoliasearch/internals/frontend/Function.prototype.bind.js

js prismashop.fr collected 2026-09-24 09:55:51 UTC 1,006 bytes, 28 lines download raw bytes

vendor: 1,006 bytes, lines 1-28
1// Magento is using a very old prototype.js version with a poor Function.prototype.bind
2// forced overloading, we redefine it here so that our code works
3// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
4Function.prototype.bind = function(oThis) {
5  if (typeof this !== 'function') {
6    // closest thing possible to the ECMAScript 5
7    // internal IsCallable function
8    throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
9  }
10
11  var aArgs   = Array.prototype.slice.call(arguments, 1),
12      fToBind = this,
13      fNOP    = function() {},
14      fBound  = function() {
15        return fToBind.apply(this instanceof fNOP
16               ? this
17               : oThis,
18               aArgs.concat(Array.prototype.slice.call(arguments)));
19      };
20
21  if (this.prototype) {
22    // native functions don't have a prototype
23    fNOP.prototype = this.prototype;
24  }
25  fBound.prototype = new fNOP();
26
27  return fBound;
28};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.