diff --git a/files/en-us/web/api/backgroundfetchupdateuievent/updateui/index.md b/files/en-us/web/api/backgroundfetchupdateuievent/updateui/index.md index 220c9f4429be14e..b75d1dde6146048 100644 --- a/files/en-us/web/api/backgroundfetchupdateuievent/updateui/index.md +++ b/files/en-us/web/api/backgroundfetchupdateuievent/updateui/index.md @@ -18,7 +18,7 @@ This method may only be run once, to notify the user on a failed or a successful ## Syntax ```js -let updateUI = BackgroundFetchUpdateUIEvent.updateUI(options); +updateUI(options); ``` ### Parameters diff --git a/files/en-us/web/api/baseaudiocontext/createanalyser/index.md b/files/en-us/web/api/baseaudiocontext/createanalyser/index.md index f2cd20da7223d70..3a1164334cd16a3 100644 --- a/files/en-us/web/api/baseaudiocontext/createanalyser/index.md +++ b/files/en-us/web/api/baseaudiocontext/createanalyser/index.md @@ -27,14 +27,14 @@ can be used to expose audio time and frequency data and create data visualizatio ## Syntax ```js -var analyserNode = baseAudioContext.createAnalyser(); +createAnalyser(); ``` -### Returns +### Return value An {{domxref("AnalyserNode")}}. -## Example +## Examples The following example shows basic usage of an AudioContext to create an Analyser node, then use requestAnimationFrame() to collect time domain data repeatedly and draw an diff --git a/files/en-us/web/api/baseaudiocontext/createbiquadfilter/index.md b/files/en-us/web/api/baseaudiocontext/createbiquadfilter/index.md index a34888078724d4b..5cd9a344f1ef66d 100644 --- a/files/en-us/web/api/baseaudiocontext/createbiquadfilter/index.md +++ b/files/en-us/web/api/baseaudiocontext/createbiquadfilter/index.md @@ -24,14 +24,14 @@ filter configurable as several different common filter types. ## Syntax ```js -baseAudioContext.createBiquadFilter(); +createBiquadFilter(); ``` -### Returns +### Return value A {{domxref("BiquadFilterNode")}}. -## Example +## Examples The following example shows basic usage of an AudioContext to create a Biquad filter node. For a complete working example, check out our [voice-change-o-matic](https://mdn.github.io/voice-change-o-matic/) demo (look diff --git a/files/en-us/web/api/baseaudiocontext/createbuffer/index.md b/files/en-us/web/api/baseaudiocontext/createbuffer/index.md index 808ad3fa680f0c0..795ba9974ed4d6b 100644 --- a/files/en-us/web/api/baseaudiocontext/createbuffer/index.md +++ b/files/en-us/web/api/baseaudiocontext/createbuffer/index.md @@ -37,7 +37,7 @@ reference page. ## Syntax ```js -var buffer = baseAudioContext.createBuffer(numOfChannels, length, sampleRate); +createBuffer(numOfChannels, length, sampleRate); ``` ### Parameters @@ -58,7 +58,7 @@ var buffer = baseAudioContext.createBuffer(numOfChannels, length, sampleRate); - : The sample rate of the linear audio data in sample-frames per second. All browsers must support sample rates in at least the range 8,000 Hz to 96,000 Hz. -### Returns +### Return value An {{domxref("AudioBuffer")}} configured based on the specified options. diff --git a/files/en-us/web/api/baseaudiocontext/createbuffersource/index.md b/files/en-us/web/api/baseaudiocontext/createbuffersource/index.md index dd2dc1b58fcc116..acb996af0797027 100644 --- a/files/en-us/web/api/baseaudiocontext/createbuffersource/index.md +++ b/files/en-us/web/api/baseaudiocontext/createbuffersource/index.md @@ -28,14 +28,14 @@ track. ## Syntax ```js -var source = baseAudioContext.createBufferSource(); +createBufferSource(); ``` -### Returns +### Return value An {{domxref("AudioBufferSourceNode")}}. -## Example +## Examples In this example, we create a two second buffer, fill it with white noise, and then play it via an {{ domxref("AudioBufferSourceNode") }}. The comments should clearly explain diff --git a/files/en-us/web/api/baseaudiocontext/createchannelmerger/index.md b/files/en-us/web/api/baseaudiocontext/createchannelmerger/index.md index 92461eab49ff475..ffa761c8d142259 100644 --- a/files/en-us/web/api/baseaudiocontext/createchannelmerger/index.md +++ b/files/en-us/web/api/baseaudiocontext/createchannelmerger/index.md @@ -24,7 +24,7 @@ which combines channels from multiple audio streams into a single audio stream. ## Syntax ```js -createChannelMerger(numberOfInputs) +createChannelMerger(numberOfInputs); ``` ### Parameters @@ -33,11 +33,11 @@ createChannelMerger(numberOfInputs) - : The number of channels in the input audio streams, which the output stream will contain; the default is 6 if this parameter is not specified. -### Returns +### Return value A {{domxref("ChannelMergerNode")}}. -## Example +## Examples The following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. To use them, you need to use diff --git a/files/en-us/web/api/baseaudiocontext/createchannelsplitter/index.md b/files/en-us/web/api/baseaudiocontext/createchannelsplitter/index.md index 2579c919d68b333..80366a3823b1a30 100644 --- a/files/en-us/web/api/baseaudiocontext/createchannelsplitter/index.md +++ b/files/en-us/web/api/baseaudiocontext/createchannelsplitter/index.md @@ -23,7 +23,7 @@ which is used to access the individual channels of an audio stream and process t ## Syntax ```js -createChannelSplitter(numberOfOutputs) +createChannelSplitter(numberOfOutputs); ``` ### Parameters @@ -32,11 +32,11 @@ createChannelSplitter(numberOfOutputs) - : The number of channels in the input audio stream that you want to output separately; the default is 6 if this parameter is not specified. -### Returns +### Return value A {{domxref("ChannelSplitterNode")}}. -## Example +## Examples The following simple example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. To use them, you need to diff --git a/files/en-us/web/api/baseaudiocontext/createconstantsource/index.md b/files/en-us/web/api/baseaudiocontext/createconstantsource/index.md index 8da8a986a4bb0e1..cfeaff08bff32c6 100644 --- a/files/en-us/web/api/baseaudiocontext/createconstantsource/index.md +++ b/files/en-us/web/api/baseaudiocontext/createconstantsource/index.md @@ -27,14 +27,14 @@ value. ## Syntax ```js -var constantSourceNode = AudioContext.createConstantSource() +createConstantSource(); ``` ### Parameters None. -### Returns +### Return value A {{domxref('ConstantSourceNode')}} instance. diff --git a/files/en-us/web/api/baseaudiocontext/createconvolver/index.md b/files/en-us/web/api/baseaudiocontext/createconvolver/index.md index 4bf374c77542479..71a0b48140f9b02 100644 --- a/files/en-us/web/api/baseaudiocontext/createconvolver/index.md +++ b/files/en-us/web/api/baseaudiocontext/createconvolver/index.md @@ -25,14 +25,14 @@ Convolution](https://webaudio.github.io/web-audio-api/#background-3) for more in ## Syntax ```js -baseAudioContext.createConvolver(); +createConvolver(); ``` -### Returns +### Return value A {{domxref("ConvolverNode")}}. -## Example +## Examples The following example shows basic usage of an AudioContext to create a convolver node. The basic premise is that you create an AudioBuffer containing a sound sample to be used diff --git a/files/en-us/web/api/baseaudiocontext/createdelay/index.md b/files/en-us/web/api/baseaudiocontext/createdelay/index.md index 829378bb8283f74..8551f68e4fd4f0e 100644 --- a/files/en-us/web/api/baseaudiocontext/createdelay/index.md +++ b/files/en-us/web/api/baseaudiocontext/createdelay/index.md @@ -24,7 +24,7 @@ which is used to delay the incoming audio signal by a certain amount of time. ## Syntax ```js -var delayNode = audioCtx.createDelay(maxDelayTime); +createDelay(maxDelayTime); ``` ### Parameters @@ -33,12 +33,12 @@ var delayNode = audioCtx.createDelay(maxDelayTime); - : The maximum amount of time, in seconds, that the audio signal can be delayed by. Must be less than 180 seconds, and defaults to 1 second if not specified. -### Returns +### Return value A {{domxref("DelayNode")}}. The default {{domxref("DelayNode.delayTime")}} is 0 seconds. -## Example +## Examples We have created a simple example that allows you to play three different samples on a constant loop — see [create-delay](https://chrisdavidmills.github.io/create-delay/) (you can also diff --git a/files/en-us/web/api/baseaudiocontext/createdynamicscompressor/index.md b/files/en-us/web/api/baseaudiocontext/createdynamicscompressor/index.md index 51b629ac8b7ce59..c30a3209b11d70f 100644 --- a/files/en-us/web/api/baseaudiocontext/createdynamicscompressor/index.md +++ b/files/en-us/web/api/baseaudiocontext/createdynamicscompressor/index.md @@ -31,14 +31,14 @@ help avoid clipping (distorting) of the audio output. ## Syntax ```js -baseAudioCtx.createDynamicsCompressor(); +createDynamicsCompressor(); ``` -### Returns +### Return value A {{domxref("DynamicsCompressorNode")}}. -## Example +## Examples The code below demonstrates a simple usage of `createDynamicsCompressor()` to add compression to an audio track. For a more complete example, have a look at our [basic Compressor diff --git a/files/en-us/web/api/baseaudiocontext/creategain/index.md b/files/en-us/web/api/baseaudiocontext/creategain/index.md index 5bfce71240c7e6e..9aa10fe8aecdecb 100644 --- a/files/en-us/web/api/baseaudiocontext/creategain/index.md +++ b/files/en-us/web/api/baseaudiocontext/creategain/index.md @@ -27,7 +27,7 @@ overall gain (or volume) of the audio graph. ## Syntax ```js -var gainNode = AudioContext.createGain(); +createGain(); ``` ### Return value @@ -37,7 +37,7 @@ audio whose volume has been adjusted in gain (volume) to a level specified by th {{domxref("GainNode.gain")}} [a-rate](/en-US/docs/Web/API/AudioParam#a-rate) parameter. -## Example +## Examples The following example shows basic usage of an {{domxref("AudioContext")}} to create a `GainNode`, which is then used to mute and unmute the audio when a Mute diff --git a/files/en-us/web/api/baseaudiocontext/createiirfilter/index.md b/files/en-us/web/api/baseaudiocontext/createiirfilter/index.md index 559bcb3525e759b..ee8a043b7b45198 100644 --- a/files/en-us/web/api/baseaudiocontext/createiirfilter/index.md +++ b/files/en-us/web/api/baseaudiocontext/createiirfilter/index.md @@ -28,7 +28,7 @@ of filter. ## Syntax ```js -var iirFilter = AudioContext.createIIRFilter(feedforward, feedback); +createIIRFilter(feedforward, feedback); ``` ### Parameters diff --git a/files/en-us/web/api/baseaudiocontext/createoscillator/index.md b/files/en-us/web/api/baseaudiocontext/createoscillator/index.md index 6e3c602d1257994..e81e20ff2f34d32 100644 --- a/files/en-us/web/api/baseaudiocontext/createoscillator/index.md +++ b/files/en-us/web/api/baseaudiocontext/createoscillator/index.md @@ -24,14 +24,14 @@ waveform. It basically generates a constant tone. ## Syntax ```js -var oscillatorNode = audioCtx.createOscillator(); +createOscillator(); ``` -### Returns +### Return value An {{domxref("OscillatorNode")}}. -## Example +## Examples The following example shows basic usage of an AudioContext to create an oscillator node. For applied examples/information, check out our [Violent Theremin demo](https://mdn.github.io/violent-theremin/) ([see diff --git a/files/en-us/web/api/baseaudiocontext/createpanner/index.md b/files/en-us/web/api/baseaudiocontext/createpanner/index.md index cc5e27d331e7ae9..99e77d06191de13 100644 --- a/files/en-us/web/api/baseaudiocontext/createpanner/index.md +++ b/files/en-us/web/api/baseaudiocontext/createpanner/index.md @@ -32,11 +32,11 @@ audio. createPanner(); ``` -### Returns +### Return value A {{domxref("PannerNode")}}. -## Example +## Examples In the following example, you can see an example of how the `createPanner()` method, {{domxref("AudioListener")}} and {{domxref("PannerNode")}} would be used to diff --git a/files/en-us/web/api/baseaudiocontext/createperiodicwave/index.md b/files/en-us/web/api/baseaudiocontext/createperiodicwave/index.md index d6cf7b6b7fded1d..08fe84d42071d1f 100644 --- a/files/en-us/web/api/baseaudiocontext/createperiodicwave/index.md +++ b/files/en-us/web/api/baseaudiocontext/createperiodicwave/index.md @@ -22,10 +22,11 @@ that can be used to shape the output of an {{ domxref("OscillatorNode") }}. ## Syntax ```js -var wave = AudioContext.createPeriodicWave(real, imag[, constraints]); +createPeriodicWave(real, imag); +createPeriodicWave(real, imag, constraints); ``` -### Returns +### Return value A {{domxref("PeriodicWave")}}. @@ -50,7 +51,7 @@ otherwise an error is thrown. > **Note:** If normalized, the resulting wave will have a maximum absolute peak value of 1. -## Example +## Examples The following example illustrates simple usage of `createPeriodicWave()`, to create a {{domxref("PeriodicWave")}} object containing a simple sine wave. diff --git a/files/en-us/web/api/baseaudiocontext/createscriptprocessor/index.md b/files/en-us/web/api/baseaudiocontext/createscriptprocessor/index.md index 54a6822bb78219d..bd7643d7213c2ad 100644 --- a/files/en-us/web/api/baseaudiocontext/createscriptprocessor/index.md +++ b/files/en-us/web/api/baseaudiocontext/createscriptprocessor/index.md @@ -21,7 +21,7 @@ creates a {{domxref("ScriptProcessorNode")}} used for direct audio processing. ## Syntax ```js -var scriptProcessor = audioCtx.createScriptProcessor(bufferSize, numberOfInputChannels, numberOfOutputChannels); +createScriptProcessor(bufferSize, numberOfInputChannels, numberOfOutputChannels); ``` ### Parameters @@ -54,11 +54,11 @@ var scriptProcessor = audioCtx.createScriptProcessor(bufferSize, numberOfInputCh > **Note:** It is invalid for both `numberOfInputChannels` and > `numberOfOutputChannels` to be zero. -### Returns +### Return value A {{domxref("ScriptProcessorNode")}}. -## Example +## Examples The following example shows basic usage of a `ScriptProcessorNode` to take a track loaded via {{domxref("BaseAudioContext/decodeAudioData", "AudioContext.decodeAudioData()")}}, process it, adding a bit diff --git a/files/en-us/web/api/baseaudiocontext/createstereopanner/index.md b/files/en-us/web/api/baseaudiocontext/createstereopanner/index.md index 523d528e6044bd7..17e217bf76d268a 100644 --- a/files/en-us/web/api/baseaudiocontext/createstereopanner/index.md +++ b/files/en-us/web/api/baseaudiocontext/createstereopanner/index.md @@ -25,14 +25,14 @@ It positions an incoming audio stream in a stereo image using a [low-cost pannin ## Syntax ```js -baseAudioContext.createStereoPanner(); +createStereoPanner(); ``` -### Returns +### Return value A {{domxref("StereoPannerNode")}}. -## Example +## Examples In our [StereoPannerNode example](https://mdn.github.io/webaudio-examples/stereo-panner-node/) ([see diff --git a/files/en-us/web/api/baseaudiocontext/createwaveshaper/index.md b/files/en-us/web/api/baseaudiocontext/createwaveshaper/index.md index 3e2a59d7aeb326f..80ed97a232377b5 100644 --- a/files/en-us/web/api/baseaudiocontext/createwaveshaper/index.md +++ b/files/en-us/web/api/baseaudiocontext/createwaveshaper/index.md @@ -24,14 +24,14 @@ distortion. It is used to apply distortion effects to your audio. ## Syntax ```js -baseAudioCtx.createWaveShaper(); +createWaveShaper(); ``` -### Returns +### Return value A {{domxref("WaveShaperNode")}}. -## Example +## Examples The following example shows basic usage of an AudioContext to create a wave shaper node. For applied examples/information, check out our [Voice-change-O-matic](https://mdn.github.io/voice-change-o-matic/) [demo](https://mdn.github.io/voice-change-o-matic/) ([see diff --git a/files/en-us/web/api/beforeinstallpromptevent/prompt/index.md b/files/en-us/web/api/beforeinstallpromptevent/prompt/index.md index 922df09eacf102d..97c92de9a9abb26 100644 --- a/files/en-us/web/api/beforeinstallpromptevent/prompt/index.md +++ b/files/en-us/web/api/beforeinstallpromptevent/prompt/index.md @@ -17,18 +17,18 @@ install prompt at a time of their own choosing. ## Syntax ```js -BeforeInstallPromptEvent.prompt() +prompt(); ``` ### Parameters None. -### Returns +### Return value An empty {{jsxref("Promise")}}. -## Example +## Examples ```js var isTooSoon = true; diff --git a/files/en-us/web/api/biquadfilternode/getfrequencyresponse/index.md b/files/en-us/web/api/biquadfilternode/getfrequencyresponse/index.md index ca826343f7f6c39..b2a2540bc91d09c 100644 --- a/files/en-us/web/api/biquadfilternode/getfrequencyresponse/index.md +++ b/files/en-us/web/api/biquadfilternode/getfrequencyresponse/index.md @@ -26,7 +26,7 @@ must be the same size as the array of input frequency values ## Syntax ```js -BiquadFilterNode.getFrequencyResponse(frequencyArray, magResponseOutput, phaseResponseOutput); +getFrequencyResponse(frequencyArray, magResponseOutput, phaseResponseOutput); ``` ### Parameters @@ -58,7 +58,7 @@ BiquadFilterNode.getFrequencyResponse(frequencyArray, magResponseOutput, phaseRe - `InvalidAccessError` - : The three arrays provided are not all of the same length. -## Example +## Examples In the following example we are using a biquad filter on a media stream (for the full demo, see our [stream-source-buffer @@ -95,7 +95,7 @@ var freqResponseOutput = document.querySelector('.freq-response-output'); Finally, after creating our biquad filter, we use `getFrequencyResponse()` to generate the response data and put it in our arrays, then loop through each data set -and output them in a human-readable list at the bottom of the page: +and output them in a human-readable list at the bottom of the page: ```js var biquadFilter = audioCtx.createBiquadFilter(); diff --git a/files/en-us/web/api/blob/text/index.md b/files/en-us/web/api/blob/text/index.md index f9409942f990d42..5bce558a58e6b03 100644 --- a/files/en-us/web/api/blob/text/index.md +++ b/files/en-us/web/api/blob/text/index.md @@ -23,7 +23,7 @@ text(); ### Return value -A promise that resolves with a {{domxref("USVString")}} which contains the blob's data +A promise that resolves with a string which contains the blob's data as a text string. The data is _always_ presumed to be in UTF-8 format. ## Usage notes diff --git a/files/en-us/web/api/bluetooth/requestdevice/index.md b/files/en-us/web/api/bluetooth/requestdevice/index.md index 7bd3eb910602259..ad853d577e82c3b 100644 --- a/files/en-us/web/api/bluetooth/requestdevice/index.md +++ b/files/en-us/web/api/bluetooth/requestdevice/index.md @@ -20,8 +20,8 @@ UI, this method returns the first device matching the criteria. ## Syntax ```js -Bluetooth.requestDevice([options]) - .then(function(bluetoothDevice) { /* ... */ }) +requestDevice(); +requestDevice(options); ``` ### Return value @@ -42,7 +42,7 @@ A {{jsxref("Promise")}} to a {{domxref("BluetoothDevice")}} object. requesting script can accept all Bluetooth devices. The default is `false`. -## Exceptions +### Exceptions - `TypeError` {{domxref("DOMException")}} - : Thrown if the provided `options` do not make sense. For example, @@ -56,7 +56,7 @@ A {{jsxref("Promise")}} to a {{domxref("BluetoothDevice")}} object. - : Thrown if this operation is not permitted in this context due to security concerns. For example, it is called from insecure origin. -## Example +## Examples ```js // Discovery options match any devices advertising: diff --git a/files/en-us/web/api/bluetoothremotegattcharacteristic/readvalue/index.md b/files/en-us/web/api/bluetoothremotegattcharacteristic/readvalue/index.md index 5963e9872285e77..0e5563e1eb35bdd 100644 --- a/files/en-us/web/api/bluetoothremotegattcharacteristic/readvalue/index.md +++ b/files/en-us/web/api/bluetoothremotegattcharacteristic/readvalue/index.md @@ -22,10 +22,10 @@ it throws an error. ## Syntax ```js -BluetoothRemoteGATTCharacteristic.readValue().then(function(dataView) { /* ... */ }) +readValue(); ``` -### Returns +### Return value A {{jsxref("Promise")}} that resolves to an {{jsxref("DataView")}}. diff --git a/files/en-us/web/api/bluetoothremotegattcharacteristic/startnotifications/index.md b/files/en-us/web/api/bluetoothremotegattcharacteristic/startnotifications/index.md index c52ce8446875bcc..a4c4666f1343a4e 100644 --- a/files/en-us/web/api/bluetoothremotegattcharacteristic/startnotifications/index.md +++ b/files/en-us/web/api/bluetoothremotegattcharacteristic/startnotifications/index.md @@ -21,10 +21,10 @@ there is an active notification on it. ## Syntax ```js -BluetoothRemoteGATTCharacteristic.startNotifications().then(function(BluetoothRemoteGATTCharacteristic) { /* ... */ }) +startNotifications(); ``` -### Returns +### Return value A {{jsxref("Promise")}} to the BluetoothRemoteGATTCharacteristic instance. diff --git a/files/en-us/web/api/bluetoothremotegattcharacteristic/stopnotifications/index.md b/files/en-us/web/api/bluetoothremotegattcharacteristic/stopnotifications/index.md index b1bc1041d2935d1..b642c4778fed89a 100644 --- a/files/en-us/web/api/bluetoothremotegattcharacteristic/stopnotifications/index.md +++ b/files/en-us/web/api/bluetoothremotegattcharacteristic/stopnotifications/index.md @@ -21,10 +21,10 @@ there is no longer an active notification on it. ## Syntax ```js -BluetoothRemoteGATTCharacteristic.stopNotifications().then(function(BluetoothRemoteGATTCharacteristic) { /* ... */ }) +stopNotifications(); ``` -### Returns +### Return value A {{jsxref("Promise")}}. diff --git a/files/en-us/web/api/bluetoothremotegattdescriptor/readvalue/index.md b/files/en-us/web/api/bluetoothremotegattdescriptor/readvalue/index.md index 7fcfa982b147882..7eb2d0da089e2cb 100644 --- a/files/en-us/web/api/bluetoothremotegattdescriptor/readvalue/index.md +++ b/files/en-us/web/api/bluetoothremotegattdescriptor/readvalue/index.md @@ -18,16 +18,16 @@ browser-compat: api.BluetoothRemoteGATTDescriptor.readValue The **`BluetoothRemoteGATTDescriptor.readValue()`** method returns a {{jsxref("Promise")}} that resolves to -an {{jsxref("ArrayBuffer")}} holding a duplicate of the `value` property if +an {{jsxref("ArrayBuffer")}} holding a duplicate of the `value` property if it is available and supported. Otherwise it throws an error. ## Syntax ```js -BluetoothRemoteGATTDescriptor.readValue().then(function(value[]) { /* ... */ }) +readValue(); ``` -### Returns +### Return value A {{jsxref("Promise")}} that resolves to an {{jsxref("ArrayBuffer")}}. diff --git a/files/en-us/web/api/bluetoothremotegattdescriptor/writevalue/index.md b/files/en-us/web/api/bluetoothremotegattdescriptor/writevalue/index.md index 0d268a8edd74e44..42bc9c9a7492005 100644 --- a/files/en-us/web/api/bluetoothremotegattdescriptor/writevalue/index.md +++ b/files/en-us/web/api/bluetoothremotegattdescriptor/writevalue/index.md @@ -22,7 +22,7 @@ an {{jsxref("ArrayBuffer")}} and returns a {{jsxref("Promise")}}. ## Syntax ```js -BluetoothRemoteGATTDescriptor.writeValue(array[]).then(function() { /* ... */ }) +writeValue(array); ``` ### Parameters @@ -30,7 +30,7 @@ BluetoothRemoteGATTDescriptor.writeValue(array[]).then(function() { /* ... */ }) - array - : Sets the value with the bytes contained in the array. -### Returns +### Return value A {{jsxref("Promise")}}. diff --git a/files/en-us/web/api/bluetoothremotegattserver/disconnect/index.md b/files/en-us/web/api/bluetoothremotegattserver/disconnect/index.md index aec433d0dbffa54..fe473b313563d7b 100644 --- a/files/en-us/web/api/bluetoothremotegattserver/disconnect/index.md +++ b/files/en-us/web/api/bluetoothremotegattserver/disconnect/index.md @@ -20,10 +20,10 @@ the script execution environment to disconnect from `this.device`. ## Syntax ```js -BluetoothRemoteGATTServer.disconnect() +disconnect(); ``` -### Returns +### Return value None. diff --git a/files/en-us/web/api/bluetoothuuid/canonicaluuid/index.md b/files/en-us/web/api/bluetoothuuid/canonicaluuid/index.md index e999aac37a9e3e7..2f66a8621c6a771 100644 --- a/files/en-us/web/api/bluetoothuuid/canonicaluuid/index.md +++ b/files/en-us/web/api/bluetoothuuid/canonicaluuid/index.md @@ -16,7 +16,7 @@ The **`canonicalUUID()`** method of the {{domxref("BluetoothUUID")}} interface ## Syntax ```js -BluetoothUUID.canonicalUUID(alias); +canonicalUUID(alias); ``` ### Parameters @@ -24,7 +24,7 @@ BluetoothUUID.canonicalUUID(alias); - `alias` - : A {{domxref("DOMString","string")}} containing a 16- or 32- bit UUID alias. -### Returns +### Return value A 128-bit UUID. diff --git a/files/en-us/web/api/bluetoothuuid/getcharacteristic/index.md b/files/en-us/web/api/bluetoothuuid/getcharacteristic/index.md index 577d15b4f36f35e..0e8450d8c204f94 100644 --- a/files/en-us/web/api/bluetoothuuid/getcharacteristic/index.md +++ b/files/en-us/web/api/bluetoothuuid/getcharacteristic/index.md @@ -16,7 +16,7 @@ The **`getCharacteristic()`** method of the {{domxref("BluetoothUUID")}} interf ## Syntax ```js -BluetoothUUID.getCharacteristic(name); +getCharacteristic(name); ``` ### Parameters @@ -24,7 +24,7 @@ BluetoothUUID.getCharacteristic(name); - `name` - : A {{domxref("DOMString","string")}} containing the name of the characteristic. -### Returns +### Return value A 128-bit UUID. diff --git a/files/en-us/web/api/bluetoothuuid/getdescriptor/index.md b/files/en-us/web/api/bluetoothuuid/getdescriptor/index.md index 2e63dae18173715..4b25e40e6ebfd92 100644 --- a/files/en-us/web/api/bluetoothuuid/getdescriptor/index.md +++ b/files/en-us/web/api/bluetoothuuid/getdescriptor/index.md @@ -16,7 +16,7 @@ The **`getDescriptor()`** method of the {{domxref("BluetoothUUID")}} interface ## Syntax ```js -BluetoothUUID.getDescriptor(name); +getDescriptor(name); ``` ### Parameters @@ -24,7 +24,7 @@ BluetoothUUID.getDescriptor(name); - `name` - : A {{domxref("DOMString","string")}} containing the name of the descriptor. -### Returns +### Return value A 128-bit UUID. diff --git a/files/en-us/web/api/bluetoothuuid/getservice/index.md b/files/en-us/web/api/bluetoothuuid/getservice/index.md index fb0eaec35ea2cb9..b652dced7b21d87 100644 --- a/files/en-us/web/api/bluetoothuuid/getservice/index.md +++ b/files/en-us/web/api/bluetoothuuid/getservice/index.md @@ -16,7 +16,7 @@ The **`getService()`** method of the {{domxref("BluetoothUUID")}} interface ret ## Syntax ```js -BluetoothUUID.getService(name); +getService(name); ``` ### Parameters @@ -24,7 +24,7 @@ BluetoothUUID.getService(name); - `name` - : A {{domxref("DOMString","string")}} containing the name of the service. -### Returns +### Return value A 128-bit UUID. diff --git a/files/en-us/web/api/btoa/index.md b/files/en-us/web/api/btoa/index.md index 3915534c2e3f9c4..91db1f18a6794d9 100644 --- a/files/en-us/web/api/btoa/index.md +++ b/files/en-us/web/api/btoa/index.md @@ -28,7 +28,7 @@ characters such as ASCII values 0 through 31. ## Syntax ```js -var encodedData = btoa(stringToEncode); +btoa(stringToEncode); ``` ### Parameters @@ -47,7 +47,7 @@ An ASCII string containing the Base64 representation of - : The string contained a character that did not fit in a single byte. See "Unicode strings" below for more detail. -## Example +## Examples ```js const encodedData = btoa('Hello, world'); // encode a string diff --git a/files/en-us/web/api/bytelengthqueuingstrategy/size/index.md b/files/en-us/web/api/bytelengthqueuingstrategy/size/index.md index 28e6dbd8eeacd5a..bc33359c707ff70 100644 --- a/files/en-us/web/api/bytelengthqueuingstrategy/size/index.md +++ b/files/en-us/web/api/bytelengthqueuingstrategy/size/index.md @@ -20,7 +20,7 @@ The **`size()`** method of the ## Syntax ```js -var size = byteLengthQueuingStrategy.size(chunk); +size(chunk); ``` ### Parameters diff --git a/files/en-us/web/api/cache/add/index.md b/files/en-us/web/api/cache/add/index.md index f7caa418ac0b1af..26a1feac68f417e 100644 --- a/files/en-us/web/api/cache/add/index.md +++ b/files/en-us/web/api/cache/add/index.md @@ -34,15 +34,13 @@ For more complex operations, you'll need to use {{domxref("Cache.put","Cache.put ## Syntax ```js -cache.add(request).then(function() { - // request has been added to the cache -}); +add(request); ``` ### Parameters - request - - : The request you want to add to the cache. This can be a {{domxref("Request")}} object or a URL. + - : The request you want to add to the cache. This can be a {{domxref("Request")}} object or a URL. ### Return value diff --git a/files/en-us/web/api/cache/delete/index.md b/files/en-us/web/api/cache/delete/index.md index bd26283d9448564..4f359dd218e852a 100644 --- a/files/en-us/web/api/cache/delete/index.md +++ b/files/en-us/web/api/cache/delete/index.md @@ -25,9 +25,8 @@ to `false`. ## Syntax ```js -cache.delete(request, {options}).then(function(found) { - // your cache entry has been deleted if found -}); +delete(request); +delete(request, options); ``` ### Parameters @@ -52,7 +51,7 @@ cache.delete(request, {options}).then(function(found) { - `ignoreVary`: A boolean value that, when set to `true,` tells the matching operation not to perform `VARY` header matching. In other words, if the URL matches you will get a match - regardless of whether the {{domxref("Response")}} object has a `VARY` + regardless of whether the {{domxref("Response")}} object has a `VARY` header. It defaults to `false`. - `cacheName`: A {{domxref("DOMString")}} that represents a specific cache to search within. Note that this option is ignored by diff --git a/files/en-us/web/api/cache/keys/index.md b/files/en-us/web/api/cache/keys/index.md index 818f3d816b1fc51..b4326a5fce4410a 100644 --- a/files/en-us/web/api/cache/keys/index.md +++ b/files/en-us/web/api/cache/keys/index.md @@ -25,9 +25,9 @@ The requests are returned in the same order that they were inserted. ## Syntax ```js -cache.keys(request, {options}).then(function(keys) { - // do something with your array of requests -}); +keys(); +keys(request); +keys(request, options); ``` ### Parameters @@ -52,7 +52,7 @@ cache.keys(request, {options}).then(function(keys) { - `ignoreVary`: A boolean value that, when set to `true,` tells the matching operation not to perform `VARY` header matching. In other words, if the URL matches you will get a match - regardless of whether the {{domxref("Response")}} object has a `VARY` + regardless of whether the {{domxref("Response")}} object has a `VARY` header. It defaults to `false`. - `cacheName`: A {{domxref("DOMString")}} that represents a specific cache to search within. Note that this option is ignored by diff --git a/files/en-us/web/api/canvasgradient/addcolorstop/index.md b/files/en-us/web/api/canvasgradient/addcolorstop/index.md index b5e0e41a252a639..d93401777aeb6ae 100644 --- a/files/en-us/web/api/canvasgradient/addcolorstop/index.md +++ b/files/en-us/web/api/canvasgradient/addcolorstop/index.md @@ -20,7 +20,7 @@ method adds a new color stop, defined by an `offset` and a ## Syntax ```js -void gradient.addColorStop(offset, color); +addColorStop(offset, color); ``` ### Parameters diff --git a/files/en-us/web/api/canvaspattern/settransform/index.md b/files/en-us/web/api/canvaspattern/settransform/index.md index 5aa1b335c27a99f..26615a04524d083 100644 --- a/files/en-us/web/api/canvaspattern/settransform/index.md +++ b/files/en-us/web/api/canvaspattern/settransform/index.md @@ -20,7 +20,7 @@ pattern's transformation matrix and invokes it on the pattern. ## Syntax ```js -void pattern.setTransform(matrix); +setTransform(matrix); ``` ### Parameters diff --git a/files/en-us/web/api/canvasrenderingcontext2d/arc/index.md b/files/en-us/web/api/canvasrenderingcontext2d/arc/index.md index 353fef0e5494044..ac194d0a3a09682 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/arc/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/arc/index.md @@ -19,7 +19,8 @@ method of the [Canvas 2D API ## Syntax ```js -void ctx.arc(x, y, radius, startAngle, endAngle [, counterclockwise]); +arc(x, y, radius, startAngle, endAngle); +arc(x, y, radius, startAngle, endAngle, counterclockwise); ``` The `arc()` method creates a circular arc centered at `(x, y)` diff --git a/files/en-us/web/api/canvasrenderingcontext2d/arcto/index.md b/files/en-us/web/api/canvasrenderingcontext2d/arcto/index.md index 38025f3d2b6efae..142e5bca1924f0f 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/arcto/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/arcto/index.md @@ -26,7 +26,7 @@ This method is commonly used for making rounded corners. ## Syntax ```js -void ctx.arcTo(x1, y1, x2, y2, radius); +arcTo(x1, y1, x2, y2, radius); ``` ### Parameters @@ -208,7 +208,7 @@ const control = document.getElementById('radius'); const mouse = { x: 0, y: 0 }; -let r = 100; // Radius +let r = 100; // Radius const p0 = { x: 0, y: 50 }; const p1 = { x: 100, y: 100 }; diff --git a/files/en-us/web/api/canvasrenderingcontext2d/beginpath/index.md b/files/en-us/web/api/canvasrenderingcontext2d/beginpath/index.md index f39e8f6eb889d02..632f11798f7b2cf 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/beginpath/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/beginpath/index.md @@ -22,7 +22,7 @@ this method when you want to create a new path. ## Syntax ```js -void ctx.beginPath(); +beginPath(); ``` ## Examples diff --git a/files/en-us/web/api/canvasrenderingcontext2d/beziercurveto/index.md b/files/en-us/web/api/canvasrenderingcontext2d/beziercurveto/index.md index e7cd421be2df7f4..405f28c5ece2ec0 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/beziercurveto/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/beziercurveto/index.md @@ -22,7 +22,7 @@ creating the Bézier curve. ## Syntax ```js -void ctx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); +bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); ``` ### Parameters diff --git a/files/en-us/web/api/canvasrenderingcontext2d/clearrect/index.md b/files/en-us/web/api/canvasrenderingcontext2d/clearrect/index.md index 55c513df1611628..fb2ffa6242245c5 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/clearrect/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/clearrect/index.md @@ -25,7 +25,7 @@ transparent black. ## Syntax ```js -void ctx.clearRect(x, y, width, height); +clearRect(x, y, width, height); ``` The `clearRect()` method sets the pixels in a rectangular area to diff --git a/files/en-us/web/api/canvasrenderingcontext2d/clip/index.md b/files/en-us/web/api/canvasrenderingcontext2d/clip/index.md index 7befc89fd97bf80..d091abd4f5ee5ee 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/clip/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/clip/index.md @@ -32,8 +32,10 @@ drawn. ## Syntax ```js -void ctx.clip([fillRule]); -void ctx.clip(path [, fillRule]); +clip(); +clip(path); +clip(fillRule); +clip(path, fillRule); ``` ### Parameters diff --git a/files/en-us/web/api/canvasrenderingcontext2d/closepath/index.md b/files/en-us/web/api/canvasrenderingcontext2d/closepath/index.md index 382468a5aa6d996..bc8526103822d23 100644 --- a/files/en-us/web/api/canvasrenderingcontext2d/closepath/index.md +++ b/files/en-us/web/api/canvasrenderingcontext2d/closepath/index.md @@ -24,7 +24,7 @@ the {{domxref("CanvasRenderingContext2D.stroke()", "stroke()")}} or ## Syntax ```js -void ctx.closePath(); +closePath(); ``` ## Examples