fix: fix various global objects constructor length (#8373)

This commit changes various Web APIs constructors to 
match their signature in the browser.
This commit is contained in:
Benjamin Gruenbaum 2020-11-14 14:10:23 +02:00 committed by GitHub
parent 3a0ebff641
commit 3d65e57d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 12 deletions

View file

@ -118,6 +118,11 @@ function abortSignalHandlerLocation() {
const abortHandler = Object.getOwnPropertyDescriptor(signal, "onabort");
assertEquals(abortHandler, undefined);
}
function abortSignalLength() {
const controller = new AbortController();
const { signal } = controller;
assertEquals(signal.constructor.length, 0);
}
function main() {
basicAbortController();
signalCallsOnabort();
@ -128,6 +133,7 @@ function main() {
abortSignalEventOrder();
abortSignalEventOrderComplex();
abortSignalHandlerLocation();
abortSignalLength();
}
main();