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
@ -1890,17 +1890,14 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
messageHandler.on('UnsupportedFeature',
|
messageHandler.on('UnsupportedFeature', function(data) {
|
||||||
function transportUnsupportedFeature(data) {
|
|
||||||
if (this.destroyed) {
|
if (this.destroyed) {
|
||||||
return; // Ignore any pending requests if the worker was terminated.
|
return; // Ignore any pending requests if the worker was terminated.
|
||||||
}
|
}
|
||||||
var featureId = data.featureId;
|
let loadingTask = this.loadingTask;
|
||||||
var loadingTask = this.loadingTask;
|
|
||||||
if (loadingTask.onUnsupportedFeature) {
|
if (loadingTask.onUnsupportedFeature) {
|
||||||
loadingTask.onUnsupportedFeature(featureId);
|
loadingTask.onUnsupportedFeature(data.featureId);
|
||||||
}
|
}
|
||||||
_UnsupportedManager.notify(featureId);
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
messageHandler.on('JpegDecode', function(data) {
|
messageHandler.on('JpegDecode', function(data) {
|
||||||
@ -2380,26 +2377,6 @@ var InternalRenderTask = (function InternalRenderTaskClosure() {
|
|||||||
return InternalRenderTask;
|
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;
|
var version, build;
|
||||||
if (typeof PDFJSDev !== 'undefined') {
|
if (typeof PDFJSDev !== 'undefined') {
|
||||||
version = PDFJSDev.eval('BUNDLE_VERSION');
|
version = PDFJSDev.eval('BUNDLE_VERSION');
|
||||||
@ -2414,7 +2391,6 @@ export {
|
|||||||
PDFDocumentProxy,
|
PDFDocumentProxy,
|
||||||
PDFPageProxy,
|
PDFPageProxy,
|
||||||
setPDFNetworkStreamClass,
|
setPDFNetworkStreamClass,
|
||||||
_UnsupportedManager,
|
|
||||||
version,
|
version,
|
||||||
build,
|
build,
|
||||||
};
|
};
|
||||||
|
@ -13,10 +13,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
_UnsupportedManager, getDocument, LoopbackPort, PDFDataRangeTransport,
|
|
||||||
PDFWorker
|
|
||||||
} from './api';
|
|
||||||
import {
|
import {
|
||||||
addLinkAttributes, CustomStyle, DEFAULT_LINK_REL, getFilenameFromUrl,
|
addLinkAttributes, CustomStyle, DEFAULT_LINK_REL, getFilenameFromUrl,
|
||||||
isExternalLinkTargetSet, isValidUrl, LinkTarget
|
isExternalLinkTargetSet, isValidUrl, LinkTarget
|
||||||
@ -28,6 +24,9 @@ import {
|
|||||||
removeNullCharacters, setVerbosityLevel, shadow, UnexpectedResponseException,
|
removeNullCharacters, setVerbosityLevel, shadow, UnexpectedResponseException,
|
||||||
UnknownErrorException, UNSUPPORTED_FEATURES, Util, VERBOSITY_LEVELS, warn
|
UnknownErrorException, UNSUPPORTED_FEATURES, Util, VERBOSITY_LEVELS, warn
|
||||||
} from '../shared/util';
|
} from '../shared/util';
|
||||||
|
import {
|
||||||
|
getDocument, LoopbackPort, PDFDataRangeTransport, PDFWorker
|
||||||
|
} from './api';
|
||||||
import { AnnotationLayer } from './annotation_layer';
|
import { AnnotationLayer } from './annotation_layer';
|
||||||
import globalScope from '../shared/global_scope';
|
import globalScope from '../shared/global_scope';
|
||||||
import { Metadata } from './metadata';
|
import { Metadata } from './metadata';
|
||||||
@ -302,8 +301,6 @@ PDFJS.Metadata = Metadata;
|
|||||||
|
|
||||||
PDFJS.SVGGraphics = SVGGraphics;
|
PDFJS.SVGGraphics = SVGGraphics;
|
||||||
|
|
||||||
PDFJS.UnsupportedManager = _UnsupportedManager;
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
globalScope,
|
globalScope,
|
||||||
isWorker,
|
isWorker,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user