mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 15:30:00 -04:00
add some more fun properties to the event
This commit is contained in:
parent
3e33b628b9
commit
94b92bc348
1 changed files with 8 additions and 0 deletions
|
@ -245,6 +245,10 @@ async function handleResponse(
|
||||||
ev.responseHeaders = responseHeaders;
|
ev.responseHeaders = responseHeaders;
|
||||||
ev.status = response.status;
|
ev.status = response.status;
|
||||||
ev.statusText = response.statusText;
|
ev.statusText = response.statusText;
|
||||||
|
ev.destination = destination;
|
||||||
|
ev.url = url;
|
||||||
|
ev.rawResponse = response;
|
||||||
|
ev.client = client;
|
||||||
swtarget.dispatchEvent(ev);
|
swtarget.dispatchEvent(ev);
|
||||||
|
|
||||||
return new Response(ev.responseBody, {
|
return new Response(ev.responseBody, {
|
||||||
|
@ -259,4 +263,8 @@ export class ScramjetHandleResponseEvent extends Event {
|
||||||
public responseBody: string | ArrayBuffer | ReadableStream;
|
public responseBody: string | ArrayBuffer | ReadableStream;
|
||||||
public status: number;
|
public status: number;
|
||||||
public statusText: string;
|
public statusText: string;
|
||||||
|
public destination: string;
|
||||||
|
public url: URL;
|
||||||
|
public rawResponse: BareResponseFetch;
|
||||||
|
public client: Client;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue