File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -151,13 +151,13 @@ function makeAbortController() {
151
151
async function fetchWithNetworkEvents ( el : Element , url : string , options : RequestInit ) : Promise < Response > {
152
152
try {
153
153
const response = await fetch ( url , options )
154
- el . dispatchEvent ( new CustomEvent ( 'load' ) )
155
- el . dispatchEvent ( new CustomEvent ( 'loadend' ) )
154
+ el . dispatchEvent ( new Event ( 'load' ) )
155
+ el . dispatchEvent ( new Event ( 'loadend' ) )
156
156
return response
157
157
} catch ( error ) {
158
158
if ( ( error as Error ) . name !== 'AbortError' ) {
159
- el . dispatchEvent ( new CustomEvent ( 'error' ) )
160
- el . dispatchEvent ( new CustomEvent ( 'loadend' ) )
159
+ el . dispatchEvent ( new Event ( 'error' ) )
160
+ el . dispatchEvent ( new Event ( 'loadend' ) )
161
161
}
162
162
throw error
163
163
}
@@ -203,7 +203,7 @@ async function check(autoCheckElement: AutoCheckElement) {
203
203
if ( state . controller ) {
204
204
state . controller . abort ( )
205
205
} else {
206
- autoCheckElement . dispatchEvent ( new CustomEvent ( 'loadstart' ) )
206
+ autoCheckElement . dispatchEvent ( new Event ( 'loadstart' ) )
207
207
}
208
208
209
209
state . controller = makeAbortController ( )
You can’t perform that action at this time.
0 commit comments