mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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:
parent
918bd98a2f
commit
b651cfb440
2 changed files with 6 additions and 33 deletions
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
_UnsupportedManager, getDocument, LoopbackPort, PDFDataRangeTransport,
|
||||
PDFWorker
|
||||
} from './api';
|
||||
import {
|
||||
addLinkAttributes, CustomStyle, DEFAULT_LINK_REL, getFilenameFromUrl,
|
||||
isExternalLinkTargetSet, isValidUrl, LinkTarget
|
||||
|
@ -28,6 +24,9 @@ import {
|
|||
removeNullCharacters, setVerbosityLevel, shadow, UnexpectedResponseException,
|
||||
UnknownErrorException, UNSUPPORTED_FEATURES, Util, VERBOSITY_LEVELS, warn
|
||||
} from '../shared/util';
|
||||
import {
|
||||
getDocument, LoopbackPort, PDFDataRangeTransport, PDFWorker
|
||||
} from './api';
|
||||
import { AnnotationLayer } from './annotation_layer';
|
||||
import globalScope from '../shared/global_scope';
|
||||
import { Metadata } from './metadata';
|
||||
|
@ -302,8 +301,6 @@ PDFJS.Metadata = Metadata;
|
|||
|
||||
PDFJS.SVGGraphics = SVGGraphics;
|
||||
|
||||
PDFJS.UnsupportedManager = _UnsupportedManager;
|
||||
|
||||
export {
|
||||
globalScope,
|
||||
isWorker,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue