Open Bug 2020678 Opened 5 months ago Updated 5 months ago

Explore Using DeferredTask for about:translations Page Throttle and Debounce

Categories

(Firefox :: Translations, task)

task

Tracking

()

People

(Reporter: nordzilla, Unassigned)

References

(Blocks 1 open bug)

Details

Description

In the about:translations page we currently use setTimeout to handle certain tasks that need to run at most once ever N milliseconds while the user is actively inputting text into the source text area (throttled) and at least M milliseconds after the user has stopped inputting text (debounced).

It is generally preferred to use DeferredTask for this kind of scheduling work, however the about:translations page is an unprivileged content page and cannot directly import a system module like DeferredTask.sys.mjs.

We should explore if it's worthwhile to try to get this working with DeferredTask, and also if we should give the about:translations page more privileges. The latter may also be required in order to implement Bug 2010399.

You need to log in before you can comment on or make changes to this bug.