-
Emilio Cobos Álvarez authored
Not really a fan of this, but I can't think of a better alternative really... Ideas welcome :) The main issue is that in bug 1662975 we made window.print() not return until the user has closed the print / print preview dialog (as it is needed for some use cases). This matches other browsers, too. We use an nsAutoSyncOperation here, in order not to violate the run-to-completion invariants, which turns off micro-tasks, timers, etc... However we'd still want promises inside mozPrintCallback to resolve and such, which is a bit contradictory. It is really awkward to have this behavior change based on whether we have a print callback... Differential Revision: https://phabricator.services.mozilla.com/D89298
6eae8df6