mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Add a unit-test to ensure that NullL10n
won't diverge from the L10n
-class
To prevent the *standalone* viewer-components from breaking, we need to ensure that the `NullL10n`-interface won't accidentally diverge from the actual `L10n`-implementations.
This commit is contained in:
parent
377af6892b
commit
e2af77fd6c
3 changed files with 13 additions and 2 deletions
|
@ -25,7 +25,7 @@ import { L10n } from "./l10n.js";
|
|||
class GenericL10n extends L10n {
|
||||
constructor(lang) {
|
||||
super({ lang });
|
||||
this.setL10n(
|
||||
this._setL10n(
|
||||
new DOMLocalization(
|
||||
[],
|
||||
GenericL10n.#generateBundles.bind(
|
||||
|
|
|
@ -31,7 +31,7 @@ class L10n {
|
|||
this.#dir = isRTL ?? L10n.#isRTL(this.#lang) ? "rtl" : "ltr";
|
||||
}
|
||||
|
||||
setL10n(l10n) {
|
||||
_setL10n(l10n) {
|
||||
this.#l10n = l10n;
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||
document.l10n = l10n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue