Skip to content

Alcune API Web non sono rilevanti nel contesto di un runtime server-first come Bun, come l'API DOM o l'API History. Molte altre, tuttavia, sono ampiamente utili anche al di fuori del contesto del browser; quando possibile, Bun implementa queste API standard web invece di introdurre nuove API.

Le seguenti API Web sono supportate parzialmente o completamente.

CategoriaAPI
HTTPfetch, Response, Request, Headers, AbortController, AbortSignal
URLURL, URLSearchParams
Web WorkersWorker, self.postMessage, structuredClone, MessagePort, MessageChannel, BroadcastChannel
StreamsReadableStream, WritableStream, TransformStream, ByteLengthQueuingStrategy, CountQueuingStrategy e classi associate
BlobBlob
WebSocketsWebSocket
Codifica e decodificaatob, btoa, TextEncoder, TextDecoder
JSONJSON
TimeoutsetTimeout, clearTimeout
IntervallisetInterval, clearInterval
Cryptocrypto, SubtleCrypto, CryptoKey
Debugconsole, performance
MicrotaskqueueMicrotask
ErrorireportError
Interazione utentealert, confirm, prompt (destinati a CLI interattive)
RealmShadowRealm
EventiEventTarget, Event, ErrorEvent, CloseEvent, MessageEvent

Bun a cura di www.bunjs.com.cn