Skip to content

Integrate with Feature Policy #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,11 @@

act as follows:

  1. "allowpaymentrequest/active-document-cross-origin.https.sub.html, allowpaymentrequest/active-document-same-origin.https.html, allowpaymentrequest/removing-allowpaymentrequest.https.sub.html, allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub.html, allowpaymentrequest/setting-allowpaymentrequest.https.sub.html">
    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Tests will be moving to Feature Policy directory as part of web-platform-tests/wpt#14855

    If the current settings object's
  2. If the current settings object's
  3. "HTML#responsible-document">responsible document is not
    allowed to use the feature indicated by attribute name
    allowpaymentrequest, then throw a
    "SecurityError" DOMException.
    allowed to use the "payment"
    feature, then throw a "SecurityError"
    DOMException.
  4. Let serializedMethodData be an empty list.
  5. Expand Down Expand Up @@ -3475,12 +3473,49 @@

    PaymentRequest and iframe elements

    "allowpaymentrequest/active-document-cross-origin.https.sub.html, allowpaymentrequest/active-document-same-origin.https.html, allowpaymentrequest/allowpaymentrequest-attribute-cross-origin-bc-containers.https.html, allowpaymentrequest/allowpaymentrequest-attribute-same-origin-bc-containers.https.html, allowpaymentrequest/basic.https.html, allowpaymentrequest/no-attribute-cross-origin-bc-containers.https.html, allowpaymentrequest/no-attribute-same-origin-bc-containers.https.html, allowpaymentrequest/removing-allowpaymentrequest.https.sub.html, allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub.html, allowpaymentrequest/setting-allowpaymentrequest.https.sub.html">

    To indicate that a cross-origin iframe is allowed to invoke the
    payment request API, the allowpaymentrequest attribute can be
    specified on the iframe element.
    specified on the iframe element. See
    "#feature-policy"> for details of how allowpaymentrequest
    and Feature Policy interact.

    Feature Policy integration

    This specification defines a policy-controlled feature identified by
    the string "
    "">payment". Its
    "feature-policy#default-allowlist">default allowlist is
    'self'.

    A document’s
    "html/multipage/dom.html#concept-document-feature-policy">feature
    policy determines whether any content in that document is allowed
    to construct PaymentRequest instances. If disabled in any
    document, no content in the document will be allowed to use
    the PaymentRequest constructor (trying to create an instance
    will throw).

    The allowpaymentrequest attribute of the HTML iframe
    element affects the
    "feature-policy#container-policy">container policy for any
    document nested in that iframe. Unless overridden by the
    "html/multipage/iframe-embed-object.html#attr-iframe-allow">allow
    attribute, setting allowpaymentrequest on an iframe is
    equivalent to <iframe allow="fullscreen *">, as
    described in
    "feature-policy#iframe-allowpaymentrequest-attribute">Feature Policy
    §iframe-allowpaymentrequest-attribute.

    Expand Down