Search completed in 1.17 seconds.
20 results for "indexsizeerror":
Your results are loading. Please wait...
AudioNode.disconnect() - Web APIs
utions to that computed parameter become 0 going forward once the change takes effect. If no matching connection is found, an InvalidAccessError exception is thrown. output Optional An index describing which output from the current AudioNode is to be disconnected. The index numbers are defined according to the number of output channels (see Audio channels). ...
...rs are defined according to the number of output channels (see Audio channels). If this parameter is out-of-bound, an IndexSizeError exception is thrown. input Optional An index describing which input into the specified destination AudioNode is to be disconnected. The index numbers are defined according to the number of input channels (see Audio channels). If this parameter is out-of-bound, an IndexSizeError exception is thrown. Exceptions IndexSizeError A value specified for input or output is invalid, referring to a node which doesn't exist or outside the permitted range. InvalidAccessError The node on which disconnect() was called isn't connected to the specified destination node. Example var AudioContext = window.AudioContext || window.webkitAudioContext; var audioCtx = new AudioConte...
AnalyserNode.fftSize - Web APIs
ize of the FFT, given in number of samples. A higher value will result in more details in the frequency domain but fewer details in the time domain. Must be a power of 2 between 252^5 and 2152^15, so one of: 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, and 32768. Defaults to 2048. Note: If its value is not a power of 2, or it is outside the specified range, a DOMException with the name IndexSizeError is thrown. Example The following example shows basic usage of an AudioContext to create an AnalyserNode, then requestAnimationFrame and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input. For more complete applied examples/information, check out our Voice-change-O-matic demo (see app.js lines 128-205 for relevant code). var audioC...
AnalyserNode.maxDecibels - Web APIs
value for scaling the FFT analysis data, where 0 dB is the loudest possible sound, -10 dB is a 10th of that, etc. The default value is -30 dB. When getting data from getFloatFrequencyData() or getByteFrequencyData(), any frequencies with an amplitude of maxDecibels or higher will be returned as +1.0 or 255, respectively. Note: If a value less than or equal to AnalyserNode.minDecibels is set, an IndexSizeError exception is thrown. Example The following example shows basic usage of an AudioContext to create an AnalyserNode, then requestAnimationFrame and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input. For more complete applied examples/information, check out our Voice-change-O-matic demo (see app.js lines 128-205 for relevant code). ...
AudioBuffer.copyFromChannel() - Web APIs
destination A Float32Array to copy the channel's samples to. channelNumber The channel number of the current AudioBuffer to copy the channel data from. startInChannel Optional An optional offset into the source channel's buffer from which to begin copying samples. If not specified, a value of 0 (the beginning of the buffer) is assumed by default. Return value undefined. Exceptions indexSizeError One of the input parameters has a value that is outside the accepted range: The value of channelNumber specifies a channel number which doesn't exist (that is, it's greater than or equal to the value of numberOfChannels on the channel). The value of startInChannel is outside the current range of samples that already exist in the source buffer; that is, it's greater than its current length.
AudioNode.connect() - Web APIs
Web › API › AudioNode › connect
on is thrown. This parameter is not allowed if the destination is an AudioParam. Return value If the destination is a node, connect() returns a reference to the destination AudioNode object, allowing you to chain multiple connect() calls. In some browsers, older implementations of this interface return undefined. If the destination is an AudioParam, connect() returns undefined. Exceptions IndexSizeError The value specified as outputIndex or inputIndex doesn't correspond to an existing input or output. InvalidAccessError The destination node is not part of the same audio context as the source node. NotSupportedError The specified connection would create a cycle (in which the audio loops back through the same nodes repeatedly) and there are no DelayNodes in the cycle to prevent the resulting ...
AudioWorkletNode() - Web APIs
ng the name of a custom parameter and value being its initial value. processorOptions Optional Any additional data that can be used for custom initialization of the underlying AudioWorkletProcessor. Return value The newly constructed AudioWorkletNode instance. Exceptions NotSupportedError The specified options.outputChannelCount is 0 or larger than the current implementation supports. IndexSizeError The length of options.outputChannelCount array does not match options.numberOfOutputs. Example For a complete example demonstrating user-defined audio processing, see the AudioWorkletNode page. Specifications Specification Status Comment Web Audio APIThe definition of 'AudioWorkletNode()' in that specification. Working Draft Initial definition. ...
AudioWorkletNodeOptions - Web APIs
ta that can be used for custom initialization of the underlying AudioWorkletProcessor. Usage notes When creating an AudioWorkletNode, these options can have various effects. If the number of inputs and number of outputs are both set to 0, a NotSupportedError will be thrown and the node construction process aborted. If the length of the outputChannelCount array doesn't match numberOfOutputs, an IndexSizeError will be thrown. If outputChannelCount isn't specified, and numberOfInputs and numberOfOutputs are both 1, the AudioWorkletNode's initial channel count is set to 1. This has the effect of changing the output channel count to dynamically change to the computed number of channels, based on the input's channel count and the current setting of the AudioNode property channelCountMode. Otherwise, if o...
CSSStyleSheet.insertRule() - Web APIs
ault is 0. (In older implementations, this was required. See Browser compatibility for details.) Return value The newly inserted rule's index within the stylesheet's rule-list. Restrictions CSS has some intuitive and not-so-intuitive restrictions affecting where rules can be inserted. Violating them will likely raise a DOMException. If index > CSSRuleList.length, the method aborts with an IndexSizeError. If rule cannot be inserted at index 0 due to some CSS constraint, the method aborts with a HierarchyRequestError. If more than one rule is given in the rule parameter, the method aborts with a SyntaxError. If trying to insert an @import at-rule after a style rule, the method aborts with a HierarchyRequestError. If rule is @namespace and the rule-list has more than just @import at-rules and/o...
CanvasRenderingContext2D.createImageData() - Web APIs
e vertical axis. height The height to give the new ImageData object. A negative value flips the rectangle around the horizontal axis. imagedata An existing ImageData object from which to copy the width and height. The image itself is not copied. Return value A new ImageData object with the specified width and height. The new object is filled with transparent black pixels. Errors thrown IndexSizeError Thrown if either of the width or height arguments is zero. Examples Creating a blank ImageData object This snippet creates a blank ImageData object using the createImageData() method. HTML <canvas id="canvas"></canvas> JavaScript The generated object is 100 pixels wide and 50 pixels tall, making 5,000 pixels in all. Each pixel within an ImageData object consists of four array values, so...
CanvasRenderingContext2D.getImageData() - Web APIs
d negative to the left. sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up. Return value An ImageData object containing the image data for the rectangle of the canvas specified. The coordinates of the rectangle's top-left corner are (sx, sy), while the coordinates of the bottom corner are (sx + sw, sy + sh). Exceptions IndexSizeError Thrown if either sw or sh are zero. SecurityError The canvas contains or may contain pixels which were loaded from an origin other than the one from which the document itself was loaded. To avoid SecurityError being thrown in this situation, configure CORS to allow the source image to be used in this way. See Allowing cross-origin use of images and canvas. Example Getting image data from a ...
DOMError - Web APIs
Web › API › DOMError
The DOMError interface describes an error object that contains an error name. Properties DOMError.name Read only Returns a DOMString representing one of the error type names (see below). DOMError.message Read only Returns a DOMString representing a message or description associated with the given error type name. Error types Type Description IndexSizeError The index is not in the allowed range (e.g. thrown in a range object). HierarchyRequestError The node tree hierarchy is not correct. WrongDocumentError The object is in the wrong document. InvalidCharacterError The string contains invalid characters. NoModificationAllowedError The object can not be modified. NotFoundError The object can not be found ...
DOMException - Web APIs
error name. Error names Common error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list. Note: Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past. IndexSizeError The index is not in the allowed range. For example, this can be thrown by the Range object. (Legacy code value: 1 and legacy constant name: INDEX_SIZE_ERR) HierarchyRequestError The node tree hierarchy is not correct. (Legacy code value: 3 and legacy constant name: HIERARCHY_REQUEST_ERR) WrongDocumentError The object is in the wrong Document. (Legacy code value: 4 and legacy constant name: W...
HTMLTableElement.insertRow() - Web APIs
d be the case if Document.createElement() had been used to create the new <tr> element. Syntax var newRow = HTMLTableElement.insertRow(index); HTMLTableElement is a reference to an HTML <table> element. Parameters index Optional The row index of the new row. If index is -1 or equal to the number of rows, the row is appended as the last row. If index is greater than the number of rows, an IndexSizeError exception will result. If index is omitted it defaults to -1. Return value newRow is an HTMLTableRowElement that references the new row. Example This example uses insertRow(-1) to append a new row to a table. We then use HTMLTableRowElement.insertCell() to insert a new cell in the new row. (To be valid HTML, a <tr> must have at least one <td> element.) Finally, we add some text to the cell ...
HTMLTableElement - Web APIs
nt.insertRow() Returns an HTMLTableRowElement representing a new row of the table. It inserts it in the rows collection immediately before the <tr> element at the given index position. If necessary a <tbody> is created. If the index is -1, the new row is appended to the collection. If the index is smaller than -1 or greater than the number of rows in the collection, a DOMException with the value IndexSizeError is raised. HTMLTableElement.deleteRow() Removes the row corresponding to the index given in parameter. If the index value is -1 the last row is removed; if it smaller than -1 or greater than the amount of rows in the collection, a DOMException with the value IndexSizeError is raised. Specifications Specification Status Comment HTML Living StandardThe definition of...
HTMLTableRowElement.insertCell() - Web APIs
t use insertCell() to create a new <th> element though. Syntax var newCell = HTMLTableRowElement.insertCell(index); HTMLTableRowElement is a reference to an HTML <tr> element. Parameters index Optional index is the cell index of the new cell. If index is -1 or equal to the number of cells, the cell is appended as the last cell in the row. If index is greater than the number of cells, an IndexSizeError exception will result. If index is omitted it defaults to -1. Return value newCell is an HTMLTableCellElement that references the new cell. Example This example uses HTMLTableElement.insertRow() to append a new row to a table. We then use insertCell(0) to insert a new cell in the new row. (To be valid HTML, a <tr> must have at least one <td> element.) Finally, we add some text to the cell u...
HTMLTableRowElement - Web APIs
n attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". Methods Inherits methods from its parent, HTMLElement. HTMLTableRowElement.deleteCell() Removes the cell at the given position in the row. If the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than 0, it raises a DOMException with the IndexSizeError value. HTMLTableRowElement.insertCell() Inserts a new cell just before the given position in the row. If the given position is not given or is -1, it appends the cell to the row. If the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than -1, it raises a DOMException with the IndexSizeError value. Returns a reference to a HTMLTableCel...
HTMLTableSectionElement - Web APIs
e and can have one of the following values: "top", "middle", "bottom", or "baseline". Methods Inherits methods from its parent, HTMLElement. HTMLTableSectionElement.deleteRow() Removes the cell at the given position in the section. If the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than 0, it raises a DOMException with the IndexSizeError value. HTMLTableSectionElement.insertRow() Inserts a new row just before the given position in the section. If the given position is not given or is -1, it appends the row to the end of section. If the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than -1, it raises a DOMException with the IndexSizeError value. Specifications ...
ImageData() - Web APIs
ven, an image with a transparent black rectangle of the specified width and height will be created. width An unsigned long representing the width of the image. height An unsigned long representing the height of the image. This value is optional if an array is given: the height will be inferred from the array's size and the given width. Return value A new ImageData object. Errors thrown IndexSizeError Thrown if array is specified, but its length is not a multiple of (4 * width) or (4 * width * height). Examples Creating a blank ImageData object This example creates an ImageData object that is 200 pixels wide and 100 pixels tall, containing a total of 20,000 pixels. let imageData = new ImageData(200, 100); // ImageData { width: 200, height: 100, data: Uint8ClampedArray[80000] } Initiali...
Range.setEnd() - Web APIs
Web › API › Range › setEnd
which the Range should end. endOffset An integer greater than or equal to zero representing the offset for the end of the Range from the start of endNode. Return value undefined. Exceptions Exceptions are thrown as DOMException objects of the following types: InvalidNodeTypeError The node specified by endNode is a doctype node; range endpoints cannot be located inside a doctype node. IndexSizeError The value specified by endOffset is either greater than or equal to the length of the node or is less than zero. Usage notes If the endNode is a Node of type Text, Comment, or CDataSection, then endOffset is the number of characters from the start of endNode. For other Node types, endOffset is the number of child nodes between the start of the endNode. Example const range = document.createR...
Selection.setBaseAndExtent() - Web APIs
t the beginning of the text rather the end, which matters for any keyboard command that might follow. For example, Shift + ? would cause the selection to narrow from the beginning rather than grow at the end. Return Value Void. Exceptions If anchorOffset is larger than the number of child nodes inside anchorNode, or if focusOffset is larger than the number of child nodes inside focusNode, an IndexSizeError exception is thrown. Examples In this example, we have two paragraphs containing spans, each one containing a single word. The first one is set as the anchorNode and the second is set as the focusNode. We also have an additional paragraph that sits in between the two nodes. Next, we have two form inputs that allow you to set the anchorOffset and focusOffset -- they both have a default value of...