( requestedUrl, initiatorType, timingInfo, cacheMode = '', bodyInfo, responseStatus, deliveryType, )
| 207 | }); |
| 208 | |
| 209 | function createPerformanceResourceTiming( |
| 210 | requestedUrl, |
| 211 | initiatorType, |
| 212 | timingInfo, |
| 213 | cacheMode = '', |
| 214 | bodyInfo, |
| 215 | responseStatus, |
| 216 | deliveryType, |
| 217 | ) { |
| 218 | const resourceTiming = new PerformanceResourceTiming(kSkipThrow, requestedUrl, 'resource'); |
| 219 | |
| 220 | resourceTiming[kInitiatorType] = initiatorType; |
| 221 | resourceTiming[kRequestedUrl] = requestedUrl; |
| 222 | // https://fetch.spec.whatwg.org/#fetch-timing-info |
| 223 | // This class is using timingInfo assuming it's already validated. |
| 224 | // The spec doesn't say to validate it in the class construction. |
| 225 | resourceTiming[kTimingInfo] = timingInfo; |
| 226 | resourceTiming[kCacheMode] = cacheMode; |
| 227 | resourceTiming[kDeliveryType] = deliveryType; |
| 228 | resourceTiming[kResponseStatus] = responseStatus; |
| 229 | |
| 230 | return resourceTiming; |
| 231 | } |
| 232 | |
| 233 | // https://w3c.github.io/resource-timing/#dfn-mark-resource-timing |
| 234 | function markResourceTiming( |
no outgoing calls
no test coverage detected
searching dependent graphs…