Intent to Experiment: Capability Delegation with Payment Request

73 views
Skip to first unread message

Mustaq Ahmed

unread,
Aug 13, 2021, 11:50:04 AMAug 13
to blink-dev, smcg...@chromium.org

Contact emails

mus...@chromium.org


Explainer

https://github.com/WICG/capability-delegation


Specification

https://wicg.github.io/capability-delegation/spec.html


Summary

Capability delegation means allowing a frame to relinquish its ability to call a restricted API and transfer the ability to another (sub)frame trusts.


If an app wants to delegate its ability to call a restricted JS capability (e.g. popups, fullscreen, etc) to a known+trusted third-party frame, the app would utilize a Capability Delegation API to "transfer" the ability to the target frame in a time-constrained manner (unlike static mechanisms like <iframe allow> attributes).


Blink component

Blink>Input


TAG review

https://github.com/w3ctag/design-reviews/issues/655


TAG review status

Pending


Risks

Interoperability and Compatibility

Interop risk here like any new API: new use-cases relying on delegation will fail in a browser that hasn't implemented this feature.  In such a browser, the new API (postMessage() call with an additional option) will silently get ignored while preserving the legacy behavior.  More precisely, the postMessage() call will be treated as if it was meant to send the message object only, and the delegated capability will behave in the target Window as if no delegation has taken place.


There is no compat risk because this is a new feature.


Gecko: No signal


WebKit: No signal


Web developers: Positive (https://discourse.wicg.io/t/capability-delegation/4821/3)


Goals for experimentation

This trial includes Capability Delegation and one “user API”, the PaymentRequest API, to seek feedback from developers who rely on payment processing in a cross-origin subframe.  We want to find out if any fine tuning is needed in Capability Delegation interface and/or in delegated payment request behavior in order to support such payment processing in a spec compliant way.


Reason this experiment is being extended

Not applicable.


Ongoing technical constraints

None.


Debuggability

Developers can test the delegated API by calling it from the appropriate console (i.e. from the console of postMessage-target Window).


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

No


Flag name

--enable-blink-features=CapabilityDelegationPaymentRequest


Requires code in //chrome?

False


Tracking bug

https://crbug.com/1130558


Estimated milestones

We expect to ship this one milestone after the end of OT or the end of TAG review (whichever takes longer).


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5708770829139968


Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/9CeLYndESPE/m/AhEttheMBQAJ




This intent message was generated by Chrome Platform Status.


Yoav Weiss

unread,
Aug 27, 2021, 2:53:36 AMAug 27
to Mustaq Ahmed, blink-dev, Stephen McGruer
Apologies for missing this! This fell off of our collective radar :/

What's the requested timeline for experimentation?

On Fri, Aug 13, 2021 at 5:50 PM Mustaq Ahmed <mus...@chromium.org> wrote:

Contact emails

mus...@chromium.org


Explainer

https://github.com/WICG/capability-delegation


Specification

https://wicg.github.io/capability-delegation/spec.html


Summary

Capability delegation means allowing a frame to relinquish its ability to call a restricted API and transfer the ability to another (sub)frame trusts.


If an app wants to delegate its ability to call a restricted JS capability (e.g. popups, fullscreen, etc) to a known+trusted third-party frame, the app would utilize a Capability Delegation API to "transfer" the ability to the target frame in a time-constrained manner (unlike static mechanisms like <iframe allow> attributes).


Blink component

Blink>Input


TAG review

https://github.com/w3ctag/design-reviews/issues/655


TAG review status

Pending


Risks

Interoperability and Compatibility

Interop risk here like any new API: new use-cases relying on delegation will fail in a browser that hasn't implemented this feature.  In such a browser, the new API (postMessage() call with an additional option) will silently get ignored while preserving the legacy behavior.  More precisely, the postMessage() call will be treated as if it was meant to send the message object only, and the delegated capability will behave in the target Window as if no delegation has taken place.


There is no compat risk because this is a new feature.


Gecko: No signal


WebKit: No signal


Might be worthwhile to ask for signals: https://bit.ly/blink-signals
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO7rdz71M6Cr1wULotqfSS9BRokG8Ov8%2B2doH_asW1DUow%40mail.gmail.com.

Mustaq Ahmed

unread,
Aug 27, 2021, 4:00:38 PMAug 27
to Yoav Weiss, blink-dev, Stephen McGruer
> What's the requested timeline for experimentation?

We are planning to run the trial from M95 through M96.

> Might be worthwhile to ask for signals: https://bit.ly/blink-signals

Yoav Weiss

unread,
Aug 30, 2021, 7:49:02 AMAug 30
to Mustaq Ahmed, blink-dev, Stephen McGruer
LGTM to experiment M95-M96

On Fri, Aug 27, 2021 at 10:00 PM Mustaq Ahmed <mus...@chromium.org> wrote:
> What's the requested timeline for experimentation?

We are planning to run the trial from M95 through M96.

> Might be worthwhile to ask for signals: https://bit.ly/blink-signals

We asked for Mozilla's signal here: https://github.com/mozilla/standards-positions/issues/565

Worthwhile to ask webkit as well (but non blocking for the experiment).
Reply all
Reply to author
Forward
0 new messages