Remove the deprecated UnsupportedManager class of the API

This is deprecated since November 2015 with a visible message, so we
can safely remove this now.
This commit is contained in:
Tim van der Meij 2017-10-01 15:13:19 +02:00
parent 918bd98a2f
commit b651cfb440
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
2 changed files with 6 additions and 33 deletions

View file

@ -1890,17 +1890,14 @@ var WorkerTransport = (function WorkerTransportClosure() {
}
}, this);
messageHandler.on('UnsupportedFeature',
function transportUnsupportedFeature(data) {
messageHandler.on('UnsupportedFeature', function(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var featureId = data.featureId;
var loadingTask = this.loadingTask;
let loadingTask = this.loadingTask;
if (loadingTask.onUnsupportedFeature) {
loadingTask.onUnsupportedFeature(featureId);
loadingTask.onUnsupportedFeature(data.featureId);
}
_UnsupportedManager.notify(featureId);
}, this);
messageHandler.on('JpegDecode', function(data) {
@ -2380,26 +2377,6 @@ var InternalRenderTask = (function InternalRenderTaskClosure() {
return InternalRenderTask;
})();
/**
* (Deprecated) Global observer of unsupported feature usages. Use
* onUnsupportedFeature callback of the {PDFDocumentLoadingTask} instance.
*/
var _UnsupportedManager = (function UnsupportedManagerClosure() {
var listeners = [];
return {
listen(cb) {
deprecated('Global UnsupportedManager.listen is used: ' +
' use PDFDocumentLoadingTask.onUnsupportedFeature instead');
listeners.push(cb);
},
notify(featureId) {
for (var i = 0, ii = listeners.length; i < ii; i++) {
listeners[i](featureId);
}
},
};
})();
var version, build;
if (typeof PDFJSDev !== 'undefined') {
version = PDFJSDev.eval('BUNDLE_VERSION');
@ -2414,7 +2391,6 @@ export {
PDFDocumentProxy,
PDFPageProxy,
setPDFNetworkStreamClass,
_UnsupportedManager,
version,
build,
};