Presentation.defaultRequest - Web APIs 编辑

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.

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 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

SpecificationStatusComment
Presentation API
The definition of 'defaultRequest' in that specification.
Candidate RecommendationInitial definition.

Browser Compatibility

BCD tables only load in the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:94 次

字数:5165

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文