(request, fetch_url, method, body)
| 185 | } |
| 186 | |
| 187 | function cloneRequest(request, fetch_url, method, body) { |
| 188 | var options = { |
| 189 | method: method, |
| 190 | headers: request.headers, |
| 191 | referrer: request.referrer, |
| 192 | referrerPolicy: request.referrerPolicy, |
| 193 | mode: request.mode, |
| 194 | credentials: request.credentials, |
| 195 | cache: request.cache, |
| 196 | redirect: request.redirect, |
| 197 | integrity: request.integrity, |
| 198 | }; |
| 199 | if( body !== null && method !== "GET" && method !== "HEAD" ) { |
| 200 | options.body = JSON.stringify(body); |
| 201 | } |
| 202 | return new Request(fetch_url, options); |
| 203 | } |
| 204 | |
| 205 | function cloneEvent(event, new_data) { |
| 206 | return new MessageEvent('message', { |
no outgoing calls
no test coverage detected