JavaScript Web API

URL、URLSearchParams、TextEncoder、TextDecoder、AbortController、Headers、Request、Response のリファレンスです。これらは Web API であり、ECMAScript の言語組み込みではありません。例は Node.js 22.23.3 で確認済みで、ブラウザーの見た目のテストではありません。本文は現在英語です。

モジュールページの本文は現在英語です。

これらのページは、fetch や URL 処理でよく使うプラットフォームの Web API を扱います。Array や String などの ECMAScript 組み込みの章とは別です。例は Node.js 22 で実行し、これらの API はグローバルとして利用できます。DOM のテストではなく、ネットワーク要求も送りません。CORS、Cookie、ブラウザーで禁止されるリクエストヘッダーなどは、必要な箇所で説明しますが、ここでは実行していません。本文は現在英語です。

JavaScript tutorial and built-in APIs →

APIWhat it covers
URLURL parsing, components, relative resolution, and why a successful parse is not a safety check, verified in Node.js 22.23.3.
URLSearchParamsQuery strings, repeated keys, plus encoding, and live URL.searchParams, verified in Node.js 22.23.3.
TextEncoderUTF-8 encoding, fatal decoding of invalid bytes, and streaming leftover sequences, verified in Node.js 22.23.3.
AbortControllerAbort signals, abort reasons, AbortSignal.abort, and AbortSignal.any, verified in Node.js 22.23.3, without cancelling a network request.
HeadersCase-insensitive header names, append versus set, and Node.js versus browser forbidden-header rules, verified in Node.js 22.23.3.
RequestConstructed Request and Response bodies, clone, and response.ok for 2xx only, verified in Node.js 22.23.3 without fetch or CORS.