mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #14984 from Snuffleupagus/dialog-polyfill-CSS
Bundle the `<dialog>` polyfill-CSS in the GENERIC `legacy/`-viewer (PR 14710 follow-up)
This commit is contained in:
commit
37f7995dde
2 changed files with 19 additions and 0 deletions
|
@ -44,6 +44,15 @@ class OverlayManager {
|
|||
) {
|
||||
const dialogPolyfill = require("dialog-polyfill/dist/dialog-polyfill.js");
|
||||
dialogPolyfill.registerDialog(dialog);
|
||||
|
||||
if (!this._dialogPolyfillCSS) {
|
||||
this._dialogPolyfillCSS = true;
|
||||
|
||||
const style = document.createElement("style");
|
||||
style.textContent = PDFJSDev.eval("DIALOG_POLYFILL_CSS");
|
||||
|
||||
document.head.insertBefore(style, document.head.firstElementChild);
|
||||
}
|
||||
}
|
||||
|
||||
dialog.addEventListener("cancel", evt => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue