mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replaces UnsupportedManager with callback.
This commit is contained in:
parent
84a47f8e53
commit
c9cb6a3025
7 changed files with 66 additions and 47 deletions
|
@ -236,7 +236,6 @@ function error(msg) {
|
|||
console.log('Error: ' + msg);
|
||||
console.log(backtrace());
|
||||
}
|
||||
UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);
|
||||
throw new Error(msg);
|
||||
}
|
||||
|
||||
|
@ -263,22 +262,6 @@ var UNSUPPORTED_FEATURES = PDFJS.UNSUPPORTED_FEATURES = {
|
|||
font: 'font'
|
||||
};
|
||||
|
||||
var UnsupportedManager = PDFJS.UnsupportedManager =
|
||||
(function UnsupportedManagerClosure() {
|
||||
var listeners = [];
|
||||
return {
|
||||
listen: function (cb) {
|
||||
listeners.push(cb);
|
||||
},
|
||||
notify: function (featureId) {
|
||||
warn('Unsupported feature "' + featureId + '"');
|
||||
for (var i = 0, ii = listeners.length; i < ii; i++) {
|
||||
listeners[i](featureId);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// Combines two URLs. The baseUrl shall be absolute URL. If the url is an
|
||||
// absolute URL, it will be returned as is.
|
||||
function combineUrl(baseUrl, url) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue