mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Function.prototype.bind emulation; enable compatibility.js for multi_page_viewer
This commit is contained in:
parent
2179cd0943
commit
e5762f3ec8
2 changed files with 14 additions and 0 deletions
|
@ -137,4 +137,17 @@
|
|||
};
|
||||
})();
|
||||
|
||||
// Function.prototype.bind ?
|
||||
(function() {
|
||||
if (typeof Function.prototype.bind !== "undefined")
|
||||
return;
|
||||
|
||||
Function.prototype.bind = function(obj) {
|
||||
var fn = this, headArgs = Array.prototype.slice.call(arguments, 1);
|
||||
var binded = function(tailArgs) {
|
||||
var args = headArgs.concat(tailArgs);
|
||||
return fn.apply(obj, args);
|
||||
};
|
||||
return binded;
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue