fix(op_crates/web): define abort event handler on prototype (#8230)

This commit is contained in:
Benjamin Gruenbaum 2020-11-06 03:40:36 +02:00 committed by GitHub
parent 23557331c9
commit bfa00bef22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 19 deletions

View file

@ -95,6 +95,12 @@ function abortSignalEventOrder() {
assertEquals(arr[1], 2);
assertEquals(arr[2], 3);
}
function abortSignalHandlerLocation() {
const controller = new AbortController();
const { signal } = controller;
const abortHandler = Object.getOwnPropertyDescriptor(signal, "onabort");
assertEquals(abortHandler, undefined);
}
function main() {
basicAbortController();
signalCallsOnabort();
@ -103,6 +109,7 @@ function main() {
controllerHasProperToString();
abortSignalIllegalConstructor();
abortSignalEventOrder();
abortSignalHandlerLocation();
}
main();