A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/statechange_event below:

BaseAudioContext: statechange event - Web APIs

BaseAudioContext: statechange event

Baseline Widely available

A statechange event is fired at a BaseAudioContext object when its state member changes.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("statechange", (event) => { })

onstatechange = (event) => { }
Event type

A generic Event.

Examples

The following snippet is taken from our AudioContext states demo (see it running live.) The onstatechange handler is used to log the current state to the console every time it changes.

audioCtx.onstatechange = () => {
  console.log(audioCtx.state);
};
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4