This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
When the getAvailability() method is called, the user agent MUST run the following steps:
presentationUrls, a list of presentation request URLs
P, a Promise
If one of the following conditions is true:
"Prohibits Mixed Security Contexts" and presentationUrl is an a priori unauthenticated URL.Run the following substeps:
SecurityError DOMException.Let P be a new Promise.
Return P, but continue running these steps in parallel.
If the user agent is unable to monitor the list of available presentation displays for the entire duration of the controlling browsing context (e.g., because the user has disabled this feature), then:
PresentationAvailability object with its value property set to false.If the user agent is unable to continuously monitor the list of available presentation displays but can find presentation displays in order to start a connection, then:
NotSupportedError DOMException.If there exists a tuple (A, presentationUrls) in the set of availability objects, then:
Let A be a new PresentationAvailability object with its value property set as follows:
false if the list of available presentation displays is empty.true if there is at least one compatible presentation display for some member of presentationUrls. Meaning there is an entry (presentationUrl, display) in the list of available presentation displays for some presentationUrl in presentationUrls.false otherwise.Create a tuple (A, presentationUrls) and add it to the set of availability objects.
Run the algorithm to monitor the list of available presentation displays.
Resolve P with A.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
getAvailability |
47 | 79 | No | 34 | No | 47 | No | 34 | No | 5.0 | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/getAvailability