google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.31k stars 1.15k forks source link

Add missing AbortSignal static methods #4134

Closed ecrider closed 5 months ago

ecrider commented 7 months ago

In browser externs added 3 missing static methods to AbortSignal type - defined in w3c_abort.js file. Missing statics are any(), timeout() and abort().

At this point the last 2 of those methods are living standard, any() still lacks support in Firefox and Safari, but it's practical and can be used care-free in the realm of Chromium-based browser extensions so I imagine it won't just disappear overnight.

Anyway I use those methods, can't drag my own build of the compiler to every project and I hate suppressing warnings, so here it is.

h-joo commented 6 months ago

Hi, thank you for your contribution. I've tried testing this over google codebase, but there's some bug in the infrastructure that's preventing us from merging this right now, so I'll have to hold this PR until the other issue has been resolved, I doubt that the other issue will be resolved soon.