Skip to content

Commit 8010db1

Browse files
authored
Fix typescript types in DOMLocalization (#643)
1 parent 8858219 commit 8010db1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fluent-dom/src/dom_localization.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class DOMLocalization extends Localization {
120120
* Additionally, if this `DOMLocalization` has an observer, start observing
121121
* `newRoot` in order to translate mutations in it.
122122
*
123-
* @param {Element} newRoot - Root to observe.
123+
* @param {Element | DocumentFragment} newRoot - Root to observe.
124124
*/
125125
connectRoot(newRoot) {
126126
for (const root of this.roots) {
@@ -158,7 +158,7 @@ export default class DOMLocalization extends Localization {
158158
* Returns `true` if the root was the last one managed by this
159159
* `DOMLocalization`.
160160
*
161-
* @param {Element} root - Root to disconnect.
161+
* @param {Element | DocumentFragment} root - Root to disconnect.
162162
* @returns {boolean}
163163
*/
164164
disconnectRoot(root) {
@@ -269,7 +269,7 @@ export default class DOMLocalization extends Localization {
269269
*
270270
* Returns a `Promise` that gets resolved once the translation is complete.
271271
*
272-
* @param {DOMFragment} frag - Element or DocumentFragment to be translated
272+
* @param {Element | DocumentFragment} frag - Element or DocumentFragment to be translated
273273
* @returns {Promise}
274274
*/
275275
translateFragment(frag) {
@@ -321,7 +321,7 @@ export default class DOMLocalization extends Localization {
321321
/**
322322
* Collects all translatable child elements of the element.
323323
*
324-
* @param {Element} element
324+
* @param {Element | DocumentFragment} element
325325
* @returns {Array<Element>}
326326
* @private
327327
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy