Files
pdf.js/test/pdfs/scripting_user_activation.pdf
Calixte Denizet 290290c247 Only show a dialog from the sandbox while handling an event allowed by the viewer
Nothing coming from the sandbox can be trusted: it grants itself a user
activation for any event, and a script can trigger some events on its own
(e.g. a timer calling setFocus).

Hence the host only shows a dialog, once, while handling an event for
which the viewer allows it: the ones caused by the user, Open, and the
print/save ones. A focus change requested by a script no longer counts
as a user activation.
2026-11-15 15:01:19 +01:00

13 KiB