(url, destination, corsAttributeState, sameOriginFallback)
| 16348 | } |
| 16349 | __name(isASCIINumber, "isASCIINumber"); |
| 16350 | function createPotentialCORSRequest(url, destination, corsAttributeState, sameOriginFallback) { |
| 16351 | let mode = corsAttributeState === "no cors" ? "no-cors" : "cors"; |
| 16352 | if (sameOriginFallback && mode === "no-cors") { |
| 16353 | mode = "same-origin"; |
| 16354 | } |
| 16355 | let credentialsMode = "include"; |
| 16356 | if (corsAttributeState === "anonymous") { |
| 16357 | credentialsMode = "same-origin"; |
| 16358 | } |
| 16359 | return makeRequest({ |
| 16360 | urlList: [url], |
| 16361 | destination, |
| 16362 | mode, |
| 16363 | credentials: credentialsMode, |
| 16364 | useCredentials: true |
| 16365 | }); |
| 16366 | } |
| 16367 | __name(createPotentialCORSRequest, "createPotentialCORSRequest"); |
| 16368 | module2.exports = { |
| 16369 | isValidLastEventId, |
no test coverage detected