Skip to content

Commit 62e7cf1

Browse files
authored
Merge pull request #22 from typed-sigterm/fix/target
fix: event `target` and `currentTarget`
2 parents d4d5d61 + 3fd652b commit 62e7cf1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/dummy/xhr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export default class dummyXMLHttpRequest {
101101
private event(type: string) {
102102
return {
103103
type,
104-
target: null,
105-
currentTarget: null,
104+
target: this,
105+
currentTarget: this,
106106
eventPhase: 0,
107107
bubbles: false,
108108
cancelable: false,

src/interceptor/xml-http-request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ export default class XMLHttpRequestInterceptor extends Base {
329329
private event(type: string) {
330330
return {
331331
type,
332-
target: null,
333-
currentTarget: null,
332+
target: this.xhr,
333+
currentTarget: this.xhr,
334334
eventPhase: 0,
335335
bubbles: false,
336336
cancelable: false,

0 commit comments

Comments
 (0)