Navigator: userActivation 속성
Baseline 2023Newly available
Since November 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Navigator
인터페이스의 읽기 전용 속성인 userActivation
은 현재 활성화 되어있는 창의 사용자 활동 정보를 포함하는 UserActivation
객체를 반환합니다.
값
UserActivation
는 객체입니다.
예제
사용자 동작이 최근에 수행되었는지 확인
UserActivation.isActive
를 통해 사용자가 현재 임시 활성화로 상호작용 하는 중인지 확인할 수 있습니다.
js
if (navigator.userActivation.isActive) {
// proceed to request playing media, for example
}
사용자 동작이 수행된 적이 있는지 확인
UserActivation.hasBeenActive
를 통해 고정 활성화로 상호작용 된 적이 있는지 확인할 수 있습니다.
js
if (navigator.userActivation.hasBeenActive) {
// proceed with auto-playing an animation, for example
}
명세서
Specification |
---|
HTML # dom-navigator-useractivation |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
userActivation |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.