Method
respondWith
({ status = 200, statusText = 'OK', responseText = '' } = {})
Source from the content-addressed store, hash-verified
| 39 | } |
| 40 | |
| 41 | respondWith({ status = 200, statusText = 'OK', responseText = '' } = {}) { |
| 42 | this.status = status; |
| 43 | this.statusText = statusText; |
| 44 | this.responseText = responseText; |
| 45 | this.response = responseText; |
| 46 | this.readyState = 4; |
| 47 | |
| 48 | queueMicrotask(() => { |
| 49 | if (this.onloadend) { |
| 50 | this.onloadend(); |
| 51 | } else if (this.onreadystatechange) { |
| 52 | this.onreadystatechange(); |
| 53 | } |
| 54 | }); |
| 55 | } |
| 56 | |
| 57 | abort() {} |
| 58 | } |
Tested by
no test coverage detected