Remove old API methods which were previously converted to throwing (PR 11219 follow-up)
These methods were deprecated already in PDF.js version `2.1.266`, see PRs 10246 and 10369, and were converted to throw `Error`s upon invocation in PDF.js version `2.4.456`, see PR 11219. Hence it ought to be possible to remove these methods now.
This commit is contained in:
		
							parent
							
								
									b86df97725
								
							
						
					
					
						commit
						c3c197d87a
					
				@ -481,17 +481,6 @@ const PDFDocumentLoadingTask = (function PDFDocumentLoadingTaskClosure() {
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Registers callbacks to indicate the document loading completion.
 | 
			
		||||
     * @ignore
 | 
			
		||||
     */
 | 
			
		||||
    then(onFulfilled, onRejected) {
 | 
			
		||||
      throw new Error(
 | 
			
		||||
        "Removed API method: " +
 | 
			
		||||
          "PDFDocumentLoadingTask.then, use the `promise` getter instead."
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return PDFDocumentLoadingTask;
 | 
			
		||||
})();
 | 
			
		||||
@ -972,15 +961,6 @@ class PDFPageProxy {
 | 
			
		||||
    offsetY = 0,
 | 
			
		||||
    dontFlip = false,
 | 
			
		||||
  } = {}) {
 | 
			
		||||
    if (
 | 
			
		||||
      typeof PDFJSDev !== "undefined" &&
 | 
			
		||||
      PDFJSDev.test("GENERIC") &&
 | 
			
		||||
      (arguments.length > 1 || typeof arguments[0] === "number")
 | 
			
		||||
    ) {
 | 
			
		||||
      throw new Error(
 | 
			
		||||
        "PDFPageProxy.getViewport is called with obsolete arguments."
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
    return new PageViewport({
 | 
			
		||||
      viewBox: this.view,
 | 
			
		||||
      scale,
 | 
			
		||||
@ -2706,17 +2686,6 @@ class RenderTask {
 | 
			
		||||
  cancel() {
 | 
			
		||||
    this._internalRenderTask.cancel();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Registers callbacks to indicate the rendering task completion.
 | 
			
		||||
   * @ignore
 | 
			
		||||
   */
 | 
			
		||||
  then(onFulfilled, onRejected) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      "Removed API method: " +
 | 
			
		||||
        "RenderTask.then, use the `promise` getter instead."
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user