Clients: get() 메서드
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2018.
참고 : This feature is only available in Service Workers.
Clients
인터페이스의 get()
메서드는 주어진 id
와 일치하는 서비스 워커 클라이언트를 가져와 Promise
로 반환합니다.
구문
js
get(id)
매개변수
id
-
가져오려고 하는 클라이언트의 아이디를 나타내는 문자열.
반환 값
예제
js
self.clients.get(id).then((client) => {
self.clients.openWindow(client.url);
});
명세서
Specification |
---|
Service Workers # clients-get |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
get |
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.