mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Remove the requestAnimationFrame
work-around in L10n.prototype.destroy
(PR 18313 follow-up)
With `@fluent/dom 0.10.0` just published this work-around is no longer necessary.
This commit is contained in:
parent
11cb3a8e11
commit
f676ce5760
4 changed files with 8 additions and 18 deletions
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -12,7 +12,7 @@
|
||||||
"@babel/preset-env": "^7.24.7",
|
"@babel/preset-env": "^7.24.7",
|
||||||
"@babel/runtime": "^7.24.7",
|
"@babel/runtime": "^7.24.7",
|
||||||
"@fluent/bundle": "^0.18.0",
|
"@fluent/bundle": "^0.18.0",
|
||||||
"@fluent/dom": "^0.9.0",
|
"@fluent/dom": "^0.10.0",
|
||||||
"@jazzer.js/core": "^2.1.0",
|
"@jazzer.js/core": "^2.1.0",
|
||||||
"@metalsmith/layouts": "^2.7.0",
|
"@metalsmith/layouts": "^2.7.0",
|
||||||
"@metalsmith/markdown": "^1.10.0",
|
"@metalsmith/markdown": "^1.10.0",
|
||||||
|
@ -2230,15 +2230,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fluent/dom": {
|
"node_modules/@fluent/dom": {
|
||||||
"version": "0.9.0",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fluent/dom/-/dom-0.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@fluent/dom/-/dom-0.10.0.tgz",
|
||||||
"integrity": "sha512-KElkUkHhFuliHeQaL4bDMin3MEJlXm3Mgh1lDE5JdmdO+5VW1bFZGjxpFS1qNzz8XZtsa71lL5zDPVg5vOgYtQ==",
|
"integrity": "sha512-31a+GJRg6Xhpw9IQ8yNiHhegd10g1DvC30TMSO52bFpjJVJqfQHTuLKFSORNR5xI1oyP4RU4lGLho9+HaC/pVQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cached-iterable": "^0.3"
|
"cached-iterable": "^0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": ">=18.0.0",
|
||||||
"npm": ">=7.0.0"
|
"npm": ">=7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"@babel/preset-env": "^7.24.7",
|
"@babel/preset-env": "^7.24.7",
|
||||||
"@babel/runtime": "^7.24.7",
|
"@babel/runtime": "^7.24.7",
|
||||||
"@fluent/bundle": "^0.18.0",
|
"@fluent/bundle": "^0.18.0",
|
||||||
"@fluent/dom": "^0.9.0",
|
"@fluent/dom": "^0.10.0",
|
||||||
"@jazzer.js/core": "^2.1.0",
|
"@jazzer.js/core": "^2.1.0",
|
||||||
"@metalsmith/layouts": "^2.7.0",
|
"@metalsmith/layouts": "^2.7.0",
|
||||||
"@metalsmith/markdown": "^1.10.0",
|
"@metalsmith/markdown": "^1.10.0",
|
||||||
|
|
|
@ -559,12 +559,8 @@ describe("Stamp Editor", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
// Close the pages in reverse order because the second document will have
|
|
||||||
// focus at the end of the test and the `testingClose` method requires
|
|
||||||
// (via `requestAnimationFrame` usage in the `this.l10n.destroy()` call)
|
|
||||||
// that the page it's called on has focus.
|
|
||||||
await closePages(pages2);
|
|
||||||
await closePages(pages1);
|
await closePages(pages1);
|
||||||
|
await closePages(pages2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("must check that the alt-text button is here when pasting in the second tab", async () => {
|
it("must check that the alt-text button is here when pasting in the second tab", async () => {
|
||||||
|
|
|
@ -87,13 +87,6 @@ class L10n {
|
||||||
}
|
}
|
||||||
this.#elements.clear();
|
this.#elements.clear();
|
||||||
this.#l10n.pauseObserving();
|
this.#l10n.pauseObserving();
|
||||||
|
|
||||||
// Since `disconnectRoot`/`pauseObserving` can still trigger asynchronous
|
|
||||||
// operations, without any way to actually cancel them, attempt to
|
|
||||||
// workaround timing issues when closing the integration-tests.
|
|
||||||
await new Promise(resolve => {
|
|
||||||
window.requestAnimationFrame(resolve);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue