MCPcopy Create free account
hub / github.com/angular/dev-infra / addAll

Method addAll

github-actions/saucelabs/set-saucelabs-env.js:15841–15947  ·  view source on GitHub ↗
(_0)

Source from the content-addressed store, hash-verified

15839 /**
15840 * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list
15841 * @type {requestResponseList}
15842 */
15843 __privateAdd(this, _relevantRequestResponseList, void 0);
15844 if (arguments[0] !== kConstruct) {
15845 webidl.illegalConstructor();
15846 }
15847 webidl.util.markAsUncloneable(this);
15848 __privateSet(this, _relevantRequestResponseList, arguments[1]);
15849 }
15850 match(_0) {
15851 return __async(this, arguments, function* (request, options = {}) {
15852 webidl.brandCheck(this, _Cache);
15853 const prefix = "Cache.match";
15854 webidl.argumentLengthCheck(arguments, 1, prefix);
15855 request = webidl.converters.RequestInfo(request, prefix, "request");
15856 options = webidl.converters.CacheQueryOptions(options, prefix, "options");
15857 const p = __privateMethod(this, _internalMatchAll, internalMatchAll_fn).call(this, request, options, 1);
15858 if (p.length === 0) {
15859 return;
15860 }
15861 return p[0];
15862 });
15863 }
15864 matchAll() {
15865 return __async(this, arguments, function* (request = void 0, options = {}) {
15866 webidl.brandCheck(this, _Cache);
15867 const prefix = "Cache.matchAll";
15868 if (request !== void 0)
15869 request = webidl.converters.RequestInfo(request, prefix, "request");
15870 options = webidl.converters.CacheQueryOptions(options, prefix, "options");
15871 return __privateMethod(this, _internalMatchAll, internalMatchAll_fn).call(this, request, options);
15872 });
15873 }
15874 add(_0) {
15875 return __async(this, arguments, function* (request) {
15876 webidl.brandCheck(this, _Cache);
15877 const prefix = "Cache.add";
15878 webidl.argumentLengthCheck(arguments, 1, prefix);
15879 request = webidl.converters.RequestInfo(request, prefix, "request");
15880 const requests = [request];
15881 const responseArrayPromise = this.addAll(requests);
15882 return yield responseArrayPromise;
15883 });
15884 }
15885 addAll(_0) {
15886 return __async(this, arguments, function* (requests) {
15887 webidl.brandCheck(this, _Cache);
15888 const prefix = "Cache.addAll";
15889 webidl.argumentLengthCheck(arguments, 1, prefix);
15890 const responsePromises = [];
15891 const requestList = [];
15892 for (let request of requests) {
15893 if (request === void 0) {
15894 throw webidl.errors.conversionFailed({
15895 prefix,
15896 argument: "Argument 1",
15897 types: ["undefined is not allowed"]
15898 });

Callers 1

addMethod · 0.95

Calls 6

__asyncFunction · 0.70
urlIsHttpHttpsSchemeFunction · 0.70
createDeferredPromiseFunction · 0.70
fetchingFunction · 0.70
__privateMethodFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected