( timingInfo, requestedUrl, initiatorType, global, cacheMode, bodyInfo, responseStatus, deliveryType = '', )
| 232 | |
| 233 | // https://w3c.github.io/resource-timing/#dfn-mark-resource-timing |
| 234 | function markResourceTiming( |
| 235 | timingInfo, |
| 236 | requestedUrl, |
| 237 | initiatorType, |
| 238 | global, |
| 239 | cacheMode, |
| 240 | bodyInfo, |
| 241 | responseStatus, |
| 242 | deliveryType = '', |
| 243 | ) { |
| 244 | // https://w3c.github.io/resource-timing/#dfn-setup-the-resource-timing-entry |
| 245 | assert( |
| 246 | cacheMode === '' || cacheMode === 'local', |
| 247 | 'cache must be an empty string or \'local\'', |
| 248 | ); |
| 249 | const resource = createPerformanceResourceTiming( |
| 250 | requestedUrl, |
| 251 | initiatorType, |
| 252 | timingInfo, |
| 253 | cacheMode, |
| 254 | bodyInfo, |
| 255 | responseStatus, |
| 256 | deliveryType, |
| 257 | ); |
| 258 | |
| 259 | enqueue(resource); |
| 260 | bufferResourceTiming(resource); |
| 261 | return resource; |
| 262 | } |
| 263 | |
| 264 | module.exports = { |
| 265 | PerformanceResourceTiming, |
no test coverage detected
searching dependent graphs…