feat: add URLPattern API (#11941)

This adds support for the URLPattern  API.

The API is added in --unstable only, as it has not yet shipped in any
browser. It is targeted for shipping in Chrome 95.

Spec: https://wicg.github.io/urlpattern/

Co-authored-by: crowlKats < crowlkats@toaxl.com >
This commit is contained in:
Luca Casonato 2021-09-08 11:14:29 +02:00 committed by GitHub
parent 2de5587547
commit e07f28d301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 589 additions and 3 deletions

View file

@ -41,6 +41,7 @@ delete Object.prototype.__proto__;
const performance = window.__bootstrap.performance;
const crypto = window.__bootstrap.crypto;
const url = window.__bootstrap.url;
const urlPattern = window.__bootstrap.urlPattern;
const headers = window.__bootstrap.headers;
const streams = window.__bootstrap.streams;
const fileReader = window.__bootstrap.fileReader;
@ -431,8 +432,9 @@ delete Object.prototype.__proto__;
};
const unstableWindowOrWorkerGlobalScope = {
WebSocketStream: util.nonEnumerable(webSocket.WebSocketStream),
BroadcastChannel: util.nonEnumerable(broadcastChannel.BroadcastChannel),
URLPattern: util.nonEnumerable(urlPattern.URLPattern),
WebSocketStream: util.nonEnumerable(webSocket.WebSocketStream),
GPU: util.nonEnumerable(webgpu.GPU),
GPUAdapter: util.nonEnumerable(webgpu.GPUAdapter),