Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / JavaScript

Knowledge base — JavaScript

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 1003

JavaScript

ReadableStream.getReader(): readers and stream locking

getReader() returns a reader and locks the stream. Reading is asynchronous; releaseLock() releases the lock without canceling the stream.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ReadableStream.pipeThrough(): transforming a stream

pipeThrough() routes stream data to a supplied pair’s writable side and immediately returns its readable side. It supports chaining transformations with backpressure propagation; it does not return a completion promise.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ReadableStream.pipeTo — piping to a writable stream

pipeTo() transfers chunks to a WritableStream, respects backpressure, and returns a promise for completion.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Request — describing a Fetch request

Request represents a request for Fetch. Its constructor prepares the URL, method, headers, and optional body without sending anything. The body is a stream: reading it affects whether it can be reused.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

requestAnimationFrame — updates before rendering

requestAnimationFrame requests a one-shot callback during a rendering update. It lets you animate using elapsed time rather than assuming a fixed number of frames per second.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

requestIdleCallback — work during idle periods

requestIdleCallback schedules nonurgent work during browser idle periods. Its callback receives an estimated time budget, but must split work and yield control itself.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ResizeObserver — observing element size

ResizeObserver reports element sizes even when the window does not resize. It lets a component respond to available space without repeatedly polling the DOM.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ResizeObserver.disconnect() — stop all observations

The disconnect() method stops observing every element registered with one ResizeObserver instance. It does not destroy the observer: observe() can start observation again.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ResizeObserverEntry — the observed element and its size

ResizeObserverEntry describes one element in a ResizeObserver notification. Its target property identifies the element, while contentRect provides its dimensions. Learn the distinction between an HTML content box and an SVG bounding box.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ResizeObserver.observe — observing element size

ResizeObserver.observe registers an element for asynchronous size notifications. The box option selects the observed area.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ResizeObserver.unobserve() — stop observing one element

The unobserve(target) method removes one element from a ResizeObserver's observations while leaving its other targets unchanged.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response — a Fetch API response

Response represents a Fetch API response: its status, headers, and body. The body is read asynchronously.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response.blob(): read a response body as a Blob

The response.blob() method reads the entire response body and returns a Promise<Blob> containing its bytes.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response.json(): creating a JSON response

The static Response.json() method creates a response containing JSON data. Do not confuse it with response.json(), which reads a response body.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response.ok — checking response status

Response.ok is a read-only Boolean property indicating whether the response status is in the inclusive range 200–299.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response.status — response status code

Response.status exposes a response’s numeric status code. Distinguish the HTTP status, the ok property, and rejection of the fetch() promise.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Response.text() — reading a body as text

Response.text() reads the entire response body and returns a Promise containing text decoded as UTF-8.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Selection — document selection

Selection represents document selection. Learn rangeCount and how to attach a range using addRange.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Selection.getRangeAt — retrieving a selection range

Selection.getRangeAt(0) returns the Range object associated with the document selection, not a copy.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Selection.removeAllRanges() — clearing the selection

Selection.removeAllRanges() empties the document selection without deleting text or nodes. The method takes no arguments and returns undefined.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

sessionStorage — tab-session storage

sessionStorage stores string key-value pairs for an origin and a tab session. It suits temporary state such as a form draft, but accessing storage or writing to it can fail.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

setInterval — calling a function repeatedly

setInterval() schedules repeated function calls with a requested delay in milliseconds. Its returned identifier lets you stop the timer with clearInterval(); exact execution timing is not guaranteed.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

setTimeout — schedule a function once

setTimeout schedules a function to run once without blocking the current code. The delay does not guarantee an exact execution time, and the returned identifier lets you cancel the pending invocation.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

ShadowRoot — the root of a Shadow DOM tree

ShadowRoot represents the root of a Shadow DOM tree associated with a host element. It provides access to a component's internal structure. The open and closed modes differ in access through host.shadowRoot, but neither creates a security boundary.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support