Open
Description
"Abort a running script" is defined in terms of stopping invocations of TC39 operations to evaluate a (classic or module) script, but the way it is defined it doesn't allow killing an invocation of a JS function. Likewise, "run a classic script" and "run a module script" handle script abortions, but WebIDL's "call a user object's operation", and "invoke" and "construct" a callback function don't.
Everywhere that deals with killing script execution in the HTML spec (the section on "user agents may impose resource limitations" after the "abort a running script" definition, as well as worker and worklet termination) use "abort a running script", which means an endless loop like this could not be stopped:
setTimeout(() => {
while (true) {}
}, 0);