w3c / webtransport

WebTransport is a web API for flexible data transport
https://w3c.github.io/webtransport/
Other
821 stars 51 forks source link

wt.ready and wt.closed trigger unhandled rejections #601

Closed jan-ivar closed 1 month ago

jan-ivar commented 1 month ago

The wt.closed and wt.ready promises are rejected on connection failure, which seems fine (similar to stream spec's reader.closed).

However, unlike reader.closed we don't set promise.[[PromiseIsHandled]].

As discovered in https://github.com/w3c/webtransport/issues/539#issuecomment-1932987189 this makes it hard for a JS library to polyfill a wt.state attribute without side-effects.