This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
In a controlling user agent, the defaultRequest
attribute MUST return the default presentation request if any, otherwise null
. In a receiving browsing context, it MUST return null
.
If set by the controller, the value of the defaultRequest
attribute SHOULD be used by the controlling user agent as the default presentation request for that controlling browsing context. If the the document object's active sandboxing flag set has the sandboxed presentation browsing context flag set, the controlling user agent SHOULD act as if the default request is not set for that browsing context. When the controlling user agent wishes to initiate a PresentationConnection
on the behalf of that browsing context, it MUST start a presentation using the default presentation request for the controller (as if the controller had called defaultRequest.start()
).
The controlling user agent SHOULD initiate presentation using the default presentation request, only when the user has expressed an intention to do so via a user gesture. For example, by clicking a button in the browser.
Note: Some controlling user agents may allow the user to initiate a default presentation connection and select a presentation display with the same user gesture. For example, the browser chrome could allow the user to pick a display from a menu, or allow the user to tap on an Near Field Communications (NFC) enabled display. In this case, when the controlling user agent asks for permission while starting a presentation, the browser could offer that display as the default choice, or consider the gesture as granting permission for the display and bypass display selection entirely.
Note: If a controlling user agent does not support initiation of a presentation connection from the browser chrome, setting defaultRequest
will have no effect.
Specifications
Specification | Status | Comment |
Presentation APIThe definition of 'defaultRequest' in that specification. | Candidate Recommendation | Initial definition. |
Browser Compatibility
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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 48 |
Edge
Full support ≤79 |
Firefox Full support 51 Full support 51 Disabled' From version 51: this feature is behind the |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
No support No |
Chrome Android
Full support 48 |
Firefox Android Full support 51 Full support 51 Disabled' From version 51: this feature is behind the |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.'
- Experimental. Expect behavior to change in the future.
- User must explicitly enable this feature.'
- User must explicitly enable this feature.
Presentation.defaultRequest by Mozilla Contributors is licensed under CC-BY-SA 2.5.