Remove the addLinkAttributes
warnings in the Annotation/XFA-layers (PR 14092 follow-up)
These warnings have now been present in three releases, see PR 14092, hence it should (hopefully) be fine to remove them now.
This commit is contained in:
parent
9e4aaf18f7
commit
0c349c701f
@ -481,15 +481,7 @@ class LinkAnnotationElement extends AnnotationElement {
|
|||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
|
|
||||||
if (data.url) {
|
if (data.url) {
|
||||||
if (
|
linkService.addLinkAttributes(link, data.url, data.newWindow);
|
||||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
|
||||||
!linkService.addLinkAttributes
|
|
||||||
) {
|
|
||||||
warn(
|
|
||||||
"LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
linkService.addLinkAttributes?.(link, data.url, data.newWindow);
|
|
||||||
} else if (data.action) {
|
} else if (data.action) {
|
||||||
this._bindNamedAction(link, data.action);
|
this._bindNamedAction(link, data.action);
|
||||||
} else if (data.dest) {
|
} else if (data.dest) {
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
/** @typedef {import("./display_utils").PageViewport} PageViewport */
|
/** @typedef {import("./display_utils").PageViewport} PageViewport */
|
||||||
/** @typedef {import("../../web/interfaces").IPDFLinkService} IPDFLinkService */
|
/** @typedef {import("../../web/interfaces").IPDFLinkService} IPDFLinkService */
|
||||||
|
|
||||||
import { warn } from "../shared/util.js";
|
|
||||||
import { XfaText } from "./xfa_text.js";
|
import { XfaText } from "./xfa_text.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,15 +133,7 @@ class XfaLayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isHTMLAnchorElement) {
|
if (isHTMLAnchorElement) {
|
||||||
if (
|
linkService.addLinkAttributes(
|
||||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
|
||||||
!linkService.addLinkAttributes
|
|
||||||
) {
|
|
||||||
warn(
|
|
||||||
"XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
linkService.addLinkAttributes?.(
|
|
||||||
html,
|
html,
|
||||||
attributes.href,
|
attributes.href,
|
||||||
attributes.newWindow
|
attributes.newWindow
|
||||||
|
Loading…
x
Reference in New Issue
Block a user