Transient activation
Transient activation (or “transient user activation”) is a window state that indicates a user has recently pressed a button, moved a mouse, used a menu, or performed some other user interaction.
This state is sometimes used as a mechanism for ensuring that a web API can only function if triggered by user interaction. For example, scripts cannot arbitrarily launch a popup that requires transient activation —it must be triggered from a UI element’s event handler.
APIs that require transient activation (list is not exhaustive):
Clients.openWindow()
Clipboard.read()
Clipboard.readText()
Clipboard.write()
Clipboard.writeText()
ContactsManager.select()
Document.requestStorageAccess()
DocumentPictureInPicture.requestWindow()
Element.requestFullScreen()
Element.requestPointerLock()
EyeDropper.open()
HID.requestDevice()
HTMLInputElement.showPicker()
HTMLSelectElement.showPicker()
HTMLVideoElement.requestPictureInPicture()
IdleDetector.requestPermission()
Keyboard.lock()
MediaDevices.getDisplayMedia()
MediaDevices.getViewportMedia()
MediaDevices.selectAudioOutput()
MediaStreamTrack.sendCaptureAction()
Navigator.share()
PaymentRequest.show()
PresentationRequest.start()
RemotePlayback.prompt()
Serial.requestPort()
USB.requestDevice()
Window.getScreenDetails()
Window.open()
Window.queryLocalFonts()
Window.showDirectoryPicker()
Window.showOpenFilePicker()
Window.showSaveFilePicker()
WindowClient.focus()
XRSystem.requestSession()