2019, Web 为我们准备了什么

Philippe Le Hégaret, W3C
October 2019

Update and getting on board

Philippe Le Hégaret, W3C

W3C logo

Topics

Web Assembly Use Cases

Web Assembly

WASM Future

See WebAssembly/proposals

WebGPU

Contributing to the Web

Explainer

Find the right community/group

You need to sell your idea

Web IDL for APIs

specification

WebIDL for APIs

[SecureContext, Exposed=Window]
interface PaymentRequest : EventTarget {
  constructor(
    sequence<PaymentMethodData> methodData,
    PaymentDetailsInit details,
    optional PaymentOptions options = {}
  );
  [NewObject]
  Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise);
  readonly attribute DOMString? shippingOption;
}

WebIDL for APIs

[Exposed=(Window,Worker)]
interface Performance : EventTarget {
    DOMHighResTimeStamp now();
    readonly attribute DOMHighResTimeStamp timeOrigin;
    [Default] object toJSON();
};
partial interface mixin WindowOrWorkerGlobalScope {
    [Replaceable] readonly attribute Performance performance;
};

Step by step algorithm

Write the specification for implementers

The PaymentRequest(methodData, details, options) constructor MUST act as follows:

  1. If the current settings object's responsible document is not allowed to use the "payment" feature, then throw a "SecurityError" DOMException.
  2. Establish the request's id:
    1. If details.id is missing, add an id member to details and set its value to a UUID [RFC4122].
  3. Let serializedMethodData be an empty list.
  4. Process payment methods:
    1. If the length of the methodData sequence is zero, then throw a TypeError, optionally informing the developer that at least one payment method is required.

Tools

TAG review

Write tests

输出你的想法!

W3C 行为规范准则 - 多样性 & 包容性

谢谢!

问题?

https://www.w3.org/2019/Talks/shenzhen-2019-plh/

plh@w3.org