file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/global_objects/error/stack/index.md
JavaScript - Global Objects - Error - stack - Examples - Using the stack property: The following script demonstrates how to use the `stack` property to output a stack trace into your browser window. You can use this to check what your browser's stack structure looks like. Example: <div id="output"></div> Example: ...
[ -1.4188543558120728, -0.05110061541199684, -0.7657191753387451, 0.3474661707878113, 0.33613598346710205, -0.24234598875045776, 0.6509045958518982, 0.9542572498321533, -0.09896790236234665, 0.2964438199996948, -0.398481547832489, 0.31929534673690796, -0.16073077917099, -0.008192586712539196...
javascript/reference/global_objects/error/filename/index.md
JavaScript - Global Objects - Error - fileName: Non-standard: This feature is not standardized. The `fileName` data property of an `Error` instance contains the path to the file that raised this error.
[ -1.0426526069641113, -0.5148677825927734, -1.3815093040466309, -0.05939565598964691, -0.33664634823799133, -1.0728598833084106, 0.14955094456672668, 0.6464529633522034, -0.935653567314148, -0.531312108039856, -0.6012598872184753, -0.19042980670928955, -0.0369831807911396, 0.370803087949752...
javascript/reference/global_objects/error/filename/index.md
JavaScript - Global Objects - Error - fileName - Value: A string.
[ -1.064634919166565, -0.7405031323432922, -1.199965476989746, -0.5445215702056885, -0.15737788379192352, -1.6101917028427124, 0.7940655946731567, 0.290765643119812, -1.0422886610031128, -1.0289995670318604, -0.08146610856056213, -0.9863691329956055, -0.44089165329933167, 0.2186005413532257,...
javascript/reference/global_objects/error/filename/index.md
JavaScript - Global Objects - Error - fileName - Description: This non-standard property contains the path to the file that raised this error. If called from a debugger context, the Firefox Developer Tools for example, "debugger eval code" is returned.
[ -1.5590267181396484, -1.1163307428359985, -1.1347883939743042, 0.462900847196579, -0.21779794991016388, -0.9972628355026245, 0.3030325174331665, 0.6061007976531982, -0.46718066930770874, -0.242219015955925, -1.2865655422210693, 0.9934605360031128, -0.6086626648902893, 0.1638384461402893, ...
javascript/reference/global_objects/error/filename/index.md
JavaScript - Global Objects - Error - fileName - Examples - Using fileName: Example: const e = new Error("Could not parse input"); throw e; // e.fileName could look like "file:///C:/example.html"
[ -0.5182195901870728, -0.22554799914360046, -0.6750251054763794, 0.5499139428138733, -0.2222733497619629, -1.3389238119125366, 0.0875239372253418, 0.09270582348108292, -0.8914666771888733, -0.5874761939048767, -0.07759574055671692, -0.38536304235458374, -0.2941625118255615, -0.3787924051284...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString: The `toString()` method of `Error` instances returns a string representing this error.
[ -0.5527980923652649, -0.3543054163455963, -0.28185519576072693, 0.15245595574378967, -0.17909574508666992, -2.3234801292419434, 0.42260947823524475, 0.357846200466156, -0.8243856430053711, -0.46961021423339844, -0.42379525303840637, 0.11385097354650497, 0.4498986005783081, 0.52472347021102...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString - Syntax: Example: toString()
[ -0.8758460283279419, 0.3213002383708954, -0.2473064512014389, -0.3578033745288849, -0.4957507848739624, -2.161512613296509, 0.02936065010726452, 0.4740007221698761, -0.8129321336746216, -1.103880524635315, -0.2319156527519226, -0.02049190364778042, -0.04098470136523247, -0.4266168475151062...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString - Syntax - Parameters: None.
[ -0.8270735144615173, 0.2272130697965622, -0.585889458656311, -1.0114529132843018, -0.5452504754066467, -1.8638452291488647, 0.46281033754348755, 0.568821370601654, -0.8717254996299744, -1.0703262090682983, -0.8301301002502441, -0.7336872816085815, 0.07071574032306671, -0.008541404269635677...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString - Syntax - Return value: A string representing the specified `Error` object.
[ -0.5064551830291748, -0.6131914258003235, -0.21022915840148926, -0.1380893439054489, -0.4528251886367798, -1.7475541830062866, 0.1938501000404358, 0.8000593781471252, -0.4749438464641571, -0.4970943033695221, -0.3754492998123169, 0.5954979658126831, -0.261584997177124, 0.9653586745262146, ...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString - Description: The `Error` object overrides the `Object.prototype.toString()` method inherited by all objects. Its semantics are as follows: Example: Error.prototype.toString = function () { if ( this === null || (typeof this !== "object" && typeof this !== "f...
[ -0.004956826101988554, 0.17645832896232605, 0.13138450682163239, 0.6070449352264404, 0.7048057317733765, -1.3318763971328735, 0.3633647561073303, 0.15547733008861542, -0.7075608968734741, -0.36447450518608093, -0.8771550059318542, -0.1915138214826584, 0.20448167622089386, 0.165799260139465...
javascript/reference/global_objects/error/tostring/index.md
JavaScript - Global Objects - Error - toString - Examples - Using toString(): Example: const e1 = new Error("fatal error"); console.log(e1.toString()); // "Error: fatal error" const e2 = new Error("fatal error"); e2.name = undefined; console.log(e2.toString()); // "Error: fatal error" const e3 = new Error("fatal er...
[ -0.7678555846214294, 0.010800469666719437, -0.7302979826927185, -0.01741155982017517, 0.018177175894379616, -1.8632932901382446, -0.4922287166118622, 0.14245666563510895, -0.4547220766544342, -0.07431633770465851, -0.29985833168029785, -0.03997701406478882, 0.6739588379859924, -0.090101376...
javascript/reference/global_objects/error/message/index.md
JavaScript - Global Objects - Error - message: The `message` data property of an `Error` instance is a human-readable description of the error.
[ 0.025747979059815407, -0.9163375496864319, -0.7353639602661133, -0.5638803839683533, 0.3299293518066406, -2.059126138687134, 0.31153392791748047, 0.7211374044418335, 0.1798620969057083, -0.40465250611305237, -1.1854628324508667, -0.1924828588962555, 0.7468904852867126, 0.759672999382019, ...
javascript/reference/global_objects/error/message/index.md
JavaScript - Global Objects - Error - message - Value: A string corresponding to the value passed to the `Error()` constructor as the first argument.
[ -0.13373205065727234, -0.8299469947814941, -0.43722403049468994, -0.14970891177654266, 0.16255225241184235, -2.1524860858917236, 0.567618191242218, 0.6182892322540283, -0.5347285866737366, -0.868116557598114, -0.3158101439476013, -0.5770270228385925, 0.1929841786623001, 0.1790551245212555,...
javascript/reference/global_objects/error/message/index.md
JavaScript - Global Objects - Error - message - Description: This property contains a brief description of the error if one is available or has been set. The `message` property combined with the `name` property is used by the `Error.prototype.toString()` method to create a string representation of the Error. By defau...
[ -1.0893172025680542, -0.6121267676353455, -0.15459910035133362, 0.13972008228302002, 0.4176939129829407, -2.693074941635132, 0.8179731369018555, 0.8614370822906494, -0.20697419345378876, -0.6943349838256836, -0.9067991971969604, 0.2895425856113434, 0.30063217878341675, -0.07943522185087204...
javascript/reference/global_objects/error/message/index.md
JavaScript - Global Objects - Error - message - Examples - Throwing a custom error: Example: const e = new Error("Could not parse input"); // e.message is 'Could not parse input' throw e;
[ 0.5037392377853394, -0.021889712661504745, -0.5698277354240417, 0.2096550315618515, -0.1499536782503128, -1.7909847497940063, -0.11737620085477829, 0.27225956320762634, -0.51771080493927, -0.1429549902677536, -0.4943287670612335, 0.3548631966114044, 0.2140810340642929, -0.26878175139427185...
javascript/reference/global_objects/error/columnnumber/index.md
JavaScript - Global Objects - Error - columnNumber: Non-standard: This feature is not standardized. The `columnNumber` data property of an `Error` instance contains the column number in the line of the file that raised this error.
[ -1.0152158737182617, -0.40977853536605835, -1.6903560161590576, -0.5533155798912048, -0.2525703012943268, -1.11698579788208, -0.46208664774894714, 0.6762917041778564, -1.1029627323150635, -0.18479885160923004, -1.1837443113327026, 0.15163230895996094, 0.12740744650363922, 1.054854512214660...
javascript/reference/global_objects/error/columnnumber/index.md
JavaScript - Global Objects - Error - columnNumber - Value: A positive integer.
[ -0.9207289218902588, -0.6438069939613342, -1.165640950202942, -0.667382538318634, -0.44656237959861755, -1.4940136671066284, 0.26190826296806335, 0.3398042619228363, -0.9254163503646851, -0.29715463519096375, -1.0394392013549805, -0.4649461507797241, -0.13155052065849304, 0.365436643362045...
javascript/reference/global_objects/error/columnnumber/index.md
JavaScript - Global Objects - Error - columnNumber - Examples - Using columnNumber: Example: try { throw new Error("Could not parse input"); } catch (err) { console.log(err.columnNumber); // 9 }
[ -0.16048987209796906, 0.3382253348827362, -0.7773284912109375, -0.32624563574790955, -0.6798565983772278, -1.2120646238327026, 0.05615587159991264, -0.1412283033132553, -1.2256256341934204, -0.11622827500104904, -0.6032623052597046, -0.34841957688331604, -0.23106896877288818, 0.32244166731...
javascript/reference/global_objects/error/linenumber/index.md
JavaScript - Global Objects - Error - lineNumber: Non-standard: This feature is not standardized. The `lineNumber` data property of an `Error` instance contains the line number in the file that raised this error.
[ -1.1827069520950317, -0.5196179747581482, -1.633376955986023, -0.925321638584137, -0.2026033252477646, -1.0550042390823364, -0.7564986944198608, 0.9160982370376587, -0.8562922477722168, -0.2931162118911743, -1.3706637620925903, 0.2656940519809723, 0.17309927940368652, 0.7025724649429321, ...
javascript/reference/global_objects/error/linenumber/index.md
JavaScript - Global Objects - Error - lineNumber - Value: A positive integer.
[ -1.0296167135238647, -0.7758048176765442, -1.2580540180206299, -1.1872438192367554, -0.18476729094982147, -1.3266466856002808, -0.31740766763687134, 0.3955976068973541, -0.6222336292266846, -0.43645501136779785, -1.1900590658187866, -0.2528405487537384, -0.2345232516527176, 0.1401409506797...
javascript/reference/global_objects/error/linenumber/index.md
JavaScript - Global Objects - Error - lineNumber - Examples - Using lineNumber: Example: try { throw new Error("Could not parse input"); } catch (err) { console.log(err.lineNumber); // 2 }
[ -0.2150532305240631, 0.22109784185886383, -0.8698421716690063, -0.5748080015182495, -0.46397385001182556, -1.0736082792282104, -0.383425772190094, 0.10208510607481003, -0.872096061706543, -0.3781798481941223, -0.7379390597343445, -0.13872872292995453, 0.046637170016765594, -0.1213414520025...
javascript/reference/global_objects/error/linenumber/index.md
JavaScript - Global Objects - Error - lineNumber - Examples - Alternative example using error event: Example: window.addEventListener("error", (e) => { console.log(e.lineNumber); // 5 }); const e = new Error("Could not parse input"); throw e; This is not a standard feature and lacks widespread support. See the bro...
[ -0.3226422369480133, -0.35076552629470825, -0.8404409289360046, 0.060499485582113266, 0.042682137340307236, -1.175140380859375, -0.5002522468566895, 0.2667188346385956, -0.1877019703388214, 0.2218196541070938, -0.36047425866127014, 0.08390141278505325, -0.35140925645828247, 0.0478808060288...
javascript/reference/global_objects/error/cause/index.md
JavaScript - Global Objects - Error - cause: The `cause` data property of an `Error` instance indicates the specific original cause of the error. It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.
[ -0.258637398481369, -0.8925873637199402, -1.1881440877914429, 0.4299509525299072, 0.029087640345096588, -1.8971343040466309, 0.04987721890211105, 0.8523412346839905, -0.4333555996417999, -0.09772942960262299, -0.8841755986213684, 0.06536263227462769, -0.21378542482852936, 1.024300456047058...
javascript/reference/global_objects/error/cause/index.md
JavaScript - Global Objects - Error - cause - Value: The value that was passed to the `Error()` constructor in the `options.cause` argument. It may not be present.
[ -0.5041110515594482, -0.9817025661468506, -0.5076724290847778, 0.1504604071378708, -0.5929203033447266, -1.759979248046875, 0.08352038264274597, 0.8480353355407715, -0.47339296340942383, -0.44905155897140503, 0.3114292323589325, -0.12212467938661575, 0.2932507395744324, 0.6343005299568176,...
javascript/reference/global_objects/error/cause/index.md
JavaScript - Global Objects - Error - cause - Description: The value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The "Providing structure...
[ 0.37417757511138916, 0.049764204770326614, -0.16320297122001648, 0.8122296333312988, 0.29954248666763306, -1.120672345161438, 0.33415400981903076, 0.7135497331619263, -0.4764433801174164, -0.07375035434961319, -0.47056591510772705, -0.28334683179855347, -0.11590322852134705, 0.340213388204...
javascript/reference/global_objects/error/cause/index.md
JavaScript - Global Objects - Error - cause - Examples - Rethrowing an error with a cause: It is sometimes useful to catch an error and re-throw it with a new message. In this case you should pass the original error into the constructor for the new `Error`, as shown. Example: try { connectToDatabase(); } catch (er...
[ 0.15232597291469574, 0.2035529911518097, -0.3595740497112274, 0.6445387601852417, -0.2629067897796631, -1.7301974296569824, 0.6176811456680298, -0.06603661179542542, -0.6508625745773315, -0.29326796531677246, -0.764400839805603, -0.04913993924856186, -0.2522263824939728, 0.8751498460769653...
javascript/reference/global_objects/error/cause/index.md
JavaScript - Global Objects - Error - cause - Examples - Providing structured data as the error cause: Error messages written for human consumption may be inappropriate for machine parsing — since they're subject to rewording or punctuation changes that may break any existing parsing written to consume them. So when t...
[ -0.08697342127561569, -0.21482263505458832, -0.5684190392494202, 0.05035175010561943, -0.14181825518608093, -0.8915728330612183, 0.38182908296585083, 0.49546143412590027, -0.2933748662471771, 0.5320892930030823, -0.47059720754623413, -0.06558476388454437, -0.06865224242210388, -0.054934542...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace: The `Error.captureStackTrace()` static method installs stack trace information on a provided object as the `stack` property.
[ -0.2367788553237915, -0.8663108348846436, -1.0852265357971191, 0.46282443404197693, -0.18291929364204407, -1.8272836208343506, 0.9623555541038513, 0.7188704609870911, -0.610766589641571, 0.07169046998023987, -0.5894728302955627, -0.4933161735534668, 0.3256996273994446, 0.6263061761856079, ...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace - Syntax: Example: Error.captureStackTrace(object) Error.captureStackTrace(object, constructor)
[ -0.1062731221318245, -0.37287217378616333, -0.6851649880409241, -0.18806537985801697, -0.5795401334762573, -1.9796030521392822, -0.23049914836883545, 0.35389944911003113, -0.9525849223136902, -0.34893175959587097, -0.3371597230434418, -0.9031195044517517, 0.07319588959217072, -0.0563300065...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace - Syntax - Parameters: - `object`: The object on which to add the `stack` property. - `constructor` (optional): A function, typically the constructor where the `object` was created. When collecting the stack trace, all frames above the topmost call to this functi...
[ -0.11760101467370987, -1.0569623708724976, -1.2480562925338745, 0.33089128136634827, 0.22668397426605225, -1.99774968624115, 0.17659956216812134, -0.00884818471968174, 0.10905781388282776, 0.0759875625371933, -0.7844218015670776, -0.21946772933006287, -0.43708640336990356, 1.10241448879241...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace - Syntax - Return value: None (`undefined`). The `object` is modified in-place with an extra own property called `stack` defined, whose string value follows the same format as `Error.prototype.stack`. This property is non-enumerable and configurable. In V8, it i...
[ -1.0894112586975098, -0.600569486618042, -0.7206811904907227, 0.16147442162036896, 0.23769213259220123, -2.1146581172943115, 0.9401421546936035, 0.5182248950004578, -0.23624162375926971, 0.03696976602077484, -0.44685372710227966, -0.13655434548854828, -0.4525684118270874, 0.130785480141639...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace - Examples - Using Error.captureStackTrace(): The `getStack()` utility function returns the current stack trace at the point it is called, removing itself from the stack. This serves the same debugging purpose as `console.trace()`, but allows you to output the st...
[ -0.34543269872665405, -0.23455452919006348, -0.4561842978000641, 0.5680981874465942, 0.7324432134628296, -0.8191147446632385, 0.3354032635688782, 0.2339036613702774, -0.4416162669658661, 0.06060437485575676, -0.5913426280021667, -0.35081392526626587, 0.3438456058502197, 0.3705270290374756,...
javascript/reference/global_objects/error/capturestacktrace/index.md
JavaScript - Global Objects - Error - captureStackTrace - Examples - Installing stack trace on a custom error object: The main use case for `Error.captureStackTrace()` is to install a stack trace on a custom error object. Typically, you define custom errors by extending the `Error` class, which automatically makes the...
[ 0.18075062334537506, -0.6082121133804321, -0.6562802195549011, 0.8275510668754578, 0.7057497501373291, -0.7342621088027954, 0.3071034550666809, 0.8327311873435974, -0.22371797263622284, 0.10575760155916214, -0.6362165212631226, -0.1298217475414276, 0.12828262150287628, 0.7400945425033569, ...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError: The `Error.isError()` static method determines whether the passed value is an `Error`.
[ -0.47773003578186035, -0.8680582642555237, -0.5415608286857605, 0.129034161567688, -0.27394387125968933, -1.5016570091247559, 0.6411092877388, 0.6039023399353027, -0.316500186920166, -0.19661319255828857, -1.2896709442138672, -0.6060839295387268, 0.7006263136863708, 0.47899752855300903, ...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Syntax: Example: Error.isError(value)
[ 0.5347607135772705, -0.2259000837802887, -0.475803017616272, -0.20873339474201202, -0.885322630405426, -1.566746711730957, 0.5555968880653381, 0.9578613042831421, -0.660083532333374, -1.167041301727295, -0.6032869219779968, -0.17120765149593353, 0.19510139524936676, 0.02176320180296898, ...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Syntax - Parameters: - `value`: The value to be checked.
[ 0.9176830649375916, -0.03589627146720886, -0.7259889245033264, -0.7343055009841919, -0.353007972240448, -1.2586981058120728, 0.6954286098480225, 0.6603531837463379, -0.23840416967868805, -0.44407758116722107, -0.88639897108078, -0.06072768568992615, -0.14869345724582672, 0.7415340542793274...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Syntax - Return value: `true` if `value` is an `Error`; otherwise, `false`.
[ 0.011467897333204746, -0.2520504593849182, -0.38552621006965637, -0.12224823981523514, -0.8162553906440735, -1.4362058639526367, 0.5950907468795776, 1.0432497262954712, -0.7159051895141602, -0.4409591555595398, -0.866538941860199, -0.20602074265480042, 0.4229523837566376, 0.541026115417480...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Description: `Error.isError()` checks if the passed value is an `Error`. It does so by performing a branded check for a private field initialized by the `Error()` constructor. This is the same mechanism used by `Array.isArray()`, which is in turn similar to the mechanism...
[ 0.1710161715745926, -0.318277508020401, -0.37881895899772644, 0.9761945605278015, 0.46755439043045044, -0.7445512413978577, 0.6235482692718506, 0.5636115074157715, -0.22725723683834076, -0.3063013553619385, -0.257439523935318, -0.157749205827713, 0.35844576358795166, 0.6845961809158325, ...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Examples - Using Error.isError(): Example: // all following calls return true Error.isError(new Error()); Error.isError(new TypeError()); Error.isError(new DOMException()); try { 1 + 1n; } catch (e) { console.log(Error.isError(e)); // The operation threw a TypeError...
[ -0.08153624832630157, 0.0010082344524562359, -0.5818231701850891, -0.11969085782766342, -0.1646999716758728, -1.009056568145752, -0.29551684856414795, 0.39422112703323364, -0.8853965401649475, -0.44415849447250366, -0.8022735714912415, -0.1727600395679474, 0.20146551728248596, -0.179581925...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Examples - instanceof vs. Error.isError(): When checking for `Error` instance, `Error.isError()` is preferred over `instanceof` because it works across realms. Example: const iframe = document.createElement("iframe"); document.body.appendChild(iframe); const xError = w...
[ 0.039691388607025146, -0.8011837005615234, -0.6311461925506592, 0.37483498454093933, 0.18380488455295563, -0.4795786440372467, -0.11873586475849152, 0.14633849263191223, 0.5833611488342285, -0.26502755284309387, -0.7204275131225586, -1.2449164390563965, 0.35921424627304077, 0.8261567354202...
javascript/reference/global_objects/error/iserror/index.md
JavaScript - Global Objects - Error - isError - Examples - Normalizing caught errors: You can use `Error.isError()` to detect if the caught value is an error and normalize it to an error object. Example: try { throw "Oops; this is not an Error object"; } catch (e) { if (!Error.isError(e)) { e = new Error(e);...
[ -0.37942028045654297, -0.07635696232318878, -0.849228024482727, 0.46356022357940674, -0.40104857087135315, -1.2221107482910156, 0.7048401832580566, 0.8479212522506714, -0.3550020158290863, -0.3677954077720642, -0.8216869235038757, -0.46532508730888367, 0.4669806957244873, 0.359875142574310...
javascript/reference/global_objects/internalerror/index.md
JavaScript - Global Objects - InternalError: Non-standard: This feature is not standardized. The `InternalError` object indicates an error that occurred internally in the JavaScript engine. Example cases are mostly when something is too large, e.g.: - "too many switch cases", - "too many parentheses in regular expr...
[ -0.3306178152561188, -0.30614930391311646, -1.3812692165374756, 0.31289440393447876, -0.34205886721611023, -1.0839605331420898, -0.08848944306373596, 1.0603129863739014, -0.8912389278411865, -0.16961823403835297, -0.9395654797554016, -0.03768410533666611, 0.11460454016923904, 0.16652677953...
javascript/reference/global_objects/internalerror/index.md
JavaScript - Global Objects - InternalError - Constructor: - `InternalError()` (non-standard): Creates a new `InternalError` object.
[ -0.6946936845779419, -0.1032719686627388, -1.0063811540603638, 0.5087941884994507, -0.42768868803977966, -1.1928514242172241, -0.3469269275665283, 0.9002854228019714, -0.6420705318450928, -0.1890152245759964, -1.065279245376587, -0.26347580552101135, -0.08443386852741241, 0.023426137864589...
javascript/reference/global_objects/internalerror/index.md
JavaScript - Global Objects - InternalError - Instance properties: Also inherits instance properties from its parent `Error`. These properties are defined on `InternalError.prototype` and shared by all `InternalError` instances. - `InternalError.prototype.constructor`: The constructor function that created the insta...
[ 0.014480051584541798, -0.1402735561132431, -0.7702394723892212, 0.6740207076072693, -0.3126745820045471, -1.1603267192840576, 0.2340850979089737, 1.0720148086547852, 0.1943366527557373, -0.18784154951572418, -1.0651711225509644, -0.04811202734708786, -0.8293622732162476, 0.3051638007164001...
javascript/reference/global_objects/internalerror/index.md
JavaScript - Global Objects - InternalError - Instance methods: Inherits instance methods from its parent `Error`.
[ -0.02449551224708557, -0.38324490189552307, -0.697252094745636, 0.010538182221353054, -0.5229303240776062, -1.6006063222885132, 0.9632927775382996, 0.9171768426895142, -0.557709813117981, -1.0036275386810303, -0.9462841153144836, -0.11719250679016113, -0.48907729983329773, 0.83709460496902...
javascript/reference/global_objects/internalerror/index.md
JavaScript - Global Objects - InternalError - Examples - Too much recursion: This recursive function runs 10 times, as per the exit condition. Example: function loop(x) { // "x >= 10" is the exit condition if (x >= 10) return; // do stuff loop(x + 1); // the recursive call } loop(0); Setting this condition...
[ -0.9676340222358704, 0.7626548409461975, -1.1570743322372437, 0.6472377181053162, -0.7344400882720947, -0.3661324083805084, 0.3385527431964874, 0.6355990767478943, -1.3225247859954834, 0.00604935921728611, -0.9780288934707642, 0.14295849204063416, -0.21911431849002838, 0.3287230432033539, ...
javascript/reference/global_objects/internalerror/internalerror/index.md
JavaScript - Global Objects - InternalError: Non-standard: This feature is not standardized. The `InternalError()` constructor creates `InternalError` objects.
[ -0.3553520739078522, 0.5495138168334961, -0.9214177131652832, -0.16930022835731506, -0.5725718140602112, -0.9610376954078674, -0.5281399488449097, 0.8894054889678955, -0.7695688009262085, 0.06538844853639603, -0.8942632079124451, 0.10228438675403595, 0.17145897448062897, -0.165013238787651...
javascript/reference/global_objects/internalerror/internalerror/index.md
JavaScript - Global Objects - InternalError - Syntax: Example: new InternalError() new InternalError(message) new InternalError(message, options) new InternalError(message, fileName) new InternalError(message, fileName, lineNumber) InternalError() InternalError(message) InternalError(message, options) InternalError(...
[ -0.5242519378662109, -0.3181159794330597, -0.5629339218139648, 0.0481930673122406, -0.058858200907707214, -1.35944402217865, -0.6325619220733643, 0.7296907305717468, -0.36627501249313354, -0.4696899652481079, -0.5143154859542847, -0.29743078351020813, 0.31311219930648804, 0.377252429723739...
javascript/reference/global_objects/internalerror/internalerror/index.md
JavaScript - Global Objects - InternalError - Syntax - Parameters: - `message` (optional): Human-readable description of the error. - `options` (optional): An object that has the following properties: - `cause` (optional): A property indicating the specific cause of the error. When catching and re-throwing an error ...
[ -0.18454019725322723, -0.6561280488967896, -1.0388234853744507, -0.2937352657318115, 0.2154034525156021, -1.520597219467163, 0.23655380308628082, 0.5416440367698669, -0.11269514262676239, -0.2293325811624527, -1.3428444862365723, 0.11108037084341049, -0.09351399540901184, 0.562622666358947...
javascript/reference/global_objects/internalerror/internalerror/index.md
JavaScript - Global Objects - InternalError - Examples - Creating a new InternalError: Example: new InternalError("Engine failure");
[ -0.10713206976652145, -0.016835061833262444, -0.4288424551486969, 0.11432398110628128, -0.4915291368961334, -1.061517357826233, 0.4194807708263397, 0.9172672629356384, -0.7930024862289429, -0.2409997135400772, -0.5908883810043335, -0.7566859126091003, 0.42447665333747864, 0.528586626052856...
javascript/reference/global_objects/disposablestack/index.md
JavaScript - Global Objects - DisposableStack: The `DisposableStack` object represents a stack of disposers to run when the stack itself is disposed. Disposer functions are executed in reverse order of registration, with strong error handling guarantees. Calling its `move()` method will transfer responsibility for cal...
[ -0.1266735941171646, -0.9747079610824585, -1.6929571628570557, 1.0497404336929321, 0.15285059809684753, -1.4118212461471558, 0.10143337398767471, 0.11721228808164597, 0.2328597903251648, 1.0493911504745483, -0.6475070714950562, 0.53453129529953, -0.5178499817848206, 0.5069058537483215, 0...
javascript/reference/global_objects/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Description: A `DisposableStack` is not exactly a "stack" in terms of its interface. It has several methods for pushing disposers to it, but it has no way to pop one disposer off. Rather, all disposers are popped and executed one-by-one when the stack is disposed. You r...
[ 0.14149023592472076, -0.3162370026111603, -1.8089007139205933, 0.7462517619132996, 0.29518669843673706, -1.184323787689209, 0.04236100614070892, 0.07816831767559052, 0.303659051656723, 0.6626670956611633, -0.5921812057495117, -0.11739720404148102, -0.7278703451156616, 0.08760064840316772, ...
javascript/reference/global_objects/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Constructor: - `DisposableStack()`: Creates a new `DisposableStack` object.
[ -0.41042834520339966, -0.5872118473052979, -0.897837221622467, 0.44816529750823975, 0.0418507419526577, -2.155630588531494, 0.6974086761474609, 0.7546565532684326, 0.34819504618644714, 0.45659998059272766, -0.32100409269332886, 0.2970145642757416, -0.46686914563179016, 0.13989929854869843,...
javascript/reference/global_objects/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Instance properties: These properties are defined on `DisposableStack.prototype` and shared by all `DisposableStack` instances. - `DisposableStack.prototype.constructor`: The constructor function that created the instance object. For `DisposableStack` instances, the ini...
[ -0.15477316081523895, -0.7135512232780457, -0.6446132063865662, 0.5619209408760071, 0.2392980009317398, -2.3370354175567627, 0.8217178583145142, 0.5573296546936035, 0.5116984844207764, 0.28011274337768555, -0.7454925775527954, 0.3632371127605438, -0.6547865271568298, 0.16546444594860077, ...
javascript/reference/global_objects/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Instance methods: - `DisposableStack.prototype.adopt()`: Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function. - `DisposableStack.prototype.defer()`: Takes a callback function to be called when the stack is...
[ 0.5585699081420898, -1.0814807415008545, -1.2895605564117432, 0.35345256328582764, -0.11017919331789017, -1.633143663406372, 0.18112356960773468, -0.005238873418420553, 0.5369771122932434, 0.42391592264175415, -0.8780131936073303, 0.8032201528549194, -0.02561115100979805, 0.646430015563964...
javascript/reference/global_objects/disposablestack/disposablestack/index.md
JavaScript - Global Objects - DisposableStack: The `DisposableStack()` constructor creates `DisposableStack` objects.
[ -0.1038605272769928, -0.45710572600364685, -0.9046539068222046, 0.6350100636482239, -0.06799072027206421, -2.08819842338562, 0.5177940130233765, 0.43260714411735535, 0.4476025700569153, 0.5532427430152893, -0.35873180627822876, 0.4873077869415283, -0.7717834711074829, 0.07155340909957886, ...
javascript/reference/global_objects/disposablestack/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Syntax: Example: new DisposableStack() Note: `DisposableStack()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.
[ -0.31144800782203674, -0.22189246118068695, -0.6380559802055359, 0.5145783424377441, 0.09082477539777756, -1.8185869455337524, 0.3492002785205841, 0.9141810536384583, 0.34909504652023315, 0.36114823818206787, 0.1499934196472168, 0.5523682832717896, 0.11487153172492981, -0.14217093586921692...
javascript/reference/global_objects/disposablestack/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Syntax - Parameters: None.
[ 0.3572447896003723, -0.07900774478912354, -1.0573958158493042, -0.3873947560787201, -0.17645250260829926, -1.7389343976974487, 1.2464463710784912, 0.8924552202224731, 0.18449518084526062, -0.04406279698014259, -0.6330679059028625, 0.11467596888542175, -0.18015867471694946, 0.08452864736318...
javascript/reference/global_objects/disposablestack/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Syntax - Return value: A new `DisposableStack` object.
[ 0.27559760212898254, -0.4742050766944885, -1.2561637163162231, -0.19642150402069092, -0.313295841217041, -2.0278873443603516, 0.9520760774612427, 1.2316330671310425, 0.6011485457420349, 0.4557584524154663, -0.14613568782806396, 0.6614370942115784, -0.38393664360046387, 0.9426329731941223, ...
javascript/reference/global_objects/disposablestack/disposablestack/index.md
JavaScript - Global Objects - DisposableStack - Examples - Creating a DisposableStack: Example: const disposer = new DisposableStack(); disposer.defer(() => console.log("Disposed!")); disposer.dispose(); // Logs: Disposed!
[ 0.29572585225105286, -0.5324082374572754, -1.178680419921875, 0.7520239353179932, -0.11107224225997925, -1.16213059425354, 0.1821841150522232, 0.2624833881855011, 0.4696747958660126, 0.5364299416542053, -0.07659810781478882, 0.6106866002082825, -0.4603915512561798, 0.2629900574684143, 0....
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose: The `dispose()` method of `DisposableStack` instances disposes this stack by calling all disposers registered to it in reverse order of registration. If the stack is already disposed, this method does nothing. It performs the same action as `using disposer = ne...
[ 0.13606072962284088, -0.6880422234535217, -1.1298550367355347, 0.7386397123336792, 0.06095930188894272, -1.4860252141952515, 0.7571243643760681, -0.5517252683639526, 0.12157198786735535, 1.0780482292175293, -0.277006596326828, 0.8624845743179321, -0.25413331389427185, 0.6356550455093384, ...
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose - Syntax: Example: dispose()
[ 0.3034617006778717, -0.23279143869876862, -0.8596014380455017, 0.06006395444273949, -0.24525582790374756, -1.5972243547439575, 0.7590210437774658, 0.7750340700149536, 0.26612040400505066, 0.1585114598274231, -0.08407294005155563, 1.1681709289550781, -0.882413387298584, 0.39342644810676575,...
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose - Syntax - Parameters: None.
[ 0.6326068639755249, -0.08804579079151154, -1.1425199508666992, -0.29947933554649353, -0.09952964633703232, -1.196627140045166, 1.2882345914840698, 1.0325770378112793, 0.388472318649292, -0.036293063312768936, -0.6373741626739502, 0.2042350023984909, -0.5994791388511658, 0.39430588483810425...
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose - Syntax - Return value: None (`undefined`).
[ -0.0024262198712676764, -0.03302786499261856, -1.0724292993545532, -0.2644689381122589, -0.2712470591068268, -1.1549334526062012, 1.2737663984298706, 1.0157603025436401, 0.011377054266631603, 0.596229076385498, -0.14543837308883667, 0.5329806804656982, -0.4081462323665619, 0.46823927760124...
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose - Syntax - Exceptions: - `SuppressedError`: Thrown if multiple disposers in the stack threw an error. If only one error is thrown, it is rethrown as-is. Otherwise, for each additional error, a new `SuppressedError` is created, with the original error as the `supp...
[ -0.013141054660081863, -0.7491941452026367, -0.7343724370002747, 0.5698854923248291, 0.15030844509601593, -1.394189715385437, 0.855791449546814, 0.84540194272995, 0.20217621326446533, -0.031434763222932816, -0.9552646279335022, -0.1391373872756958, -0.8767944574356079, 0.7371716499328613, ...
javascript/reference/global_objects/disposablestack/dispose/index.md
JavaScript - Global Objects - DisposableStack - dispose - Examples - Disposing a stack: Here we push three disposers to the stack, using the `use()`, `adopt()`, and `defer()` methods. When `dispose()` is called, the disposers are called in reverse order of registration. Note that usually you don't need to call `dispo...
[ 0.43728867173194885, -0.3252660632133484, -1.335227131843567, 0.24164080619812012, -0.19521409273147583, -1.1007603406906128, 0.1386556327342987, -0.2341643124818802, 0.0560704730451107, 0.5227997303009033, -0.4353712499141693, 0.7629149556159973, -0.22622406482696533, 0.3747546672821045, ...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use: The `use()` method of `DisposableStack` instances registers a value that implements the disposable protocol to the stack.
[ 0.48300090432167053, -0.8436721563339233, -1.666643500328064, 0.9809671640396118, -0.2215823382139206, -1.7675360441207886, 1.621858835220337, 0.3059600293636322, 0.2696434557437897, 0.7697007656097412, -0.5979482531547546, 0.9470476508140564, 0.8418140411376953, 0.10670969635248184, 1.1...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Syntax: Example: use(value)
[ 0.6354992985725403, -0.3795398473739624, -1.4577736854553223, 0.4029233157634735, -0.5477164387702942, -1.896604061126709, 1.6542121171951294, 0.5327662825584412, 0.22850456833839417, 0.3480788469314575, 0.08325665444135666, 1.253313422203064, -0.07519114762544632, -0.43763789534568787, ...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Syntax - Parameters: - `value`: The value to register to the stack. Must either contain a `[Symbol.dispose]()` method, or be `null` or `undefined`.
[ 0.5356624722480774, -0.7830681800842285, -0.9679134488105774, 0.32193753123283386, -0.05607397481799126, -1.8197650909423828, 1.6221641302108765, 0.6135835647583008, 0.7698832154273987, 0.11419272422790527, -0.025278303772211075, 0.9628159999847412, 0.6662000417709351, 0.46832433342933655,...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Syntax - Return value: The same `value` that was passed in.
[ 0.3340989649295807, -0.20459158718585968, -1.499120831489563, 0.018656590953469276, -0.32925429940223694, -1.3539296388626099, 1.313135027885437, 0.9685449004173279, -0.12430964410305023, 0.4611285328865051, -0.4443448781967163, 1.157187819480896, -0.23691552877426147, 1.1105376482009888, ...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Syntax - Exceptions: - `TypeError`: Thrown if `value` is not `null` or `undefined`, and does not contain a `[Symbol.dispose]()` method. - `ReferenceError`: Thrown if the stack is already disposed.
[ -0.22082272171974182, -0.39079803228378296, -0.6918811202049255, 0.6766008734703064, -0.1451466828584671, -1.7362759113311768, 1.1256879568099976, 0.6178449392318726, -0.022838842123746872, 0.3365804851055145, -0.11702284961938858, 0.22665764391422272, -0.10984024405479431, 0.0930692106485...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Description: The primary purpose of `use()` is to register a value that implements the disposable protocol to the stack, as the equivalent of the `using` declaration. If the value does not implement the disposable protocol (it doesn't have the `[Symbol.dispose]()` ...
[ -0.3911169469356537, -0.7193858027458191, -1.5355802774429321, 0.9272522330284119, -0.2885744571685791, -1.5320744514465332, 0.6641770005226135, -0.5019069910049438, 0.5584573149681091, 0.925102174282074, -0.19185292720794678, 0.2575853168964386, 0.15030473470687866, -0.16561280190944672, ...
javascript/reference/global_objects/disposablestack/use/index.md
JavaScript - Global Objects - DisposableStack - use - Examples - Using use(): This code consumes a `ReadableStream` via a `ReadableStreamDefaultReader`. The reader is automatically closed when the function completes, assuming it implements a `[Symbol.dispose]()` method that synchronously releases the lock on the strea...
[ -0.11813865602016449, -0.1943446397781372, -0.9382138848304749, -0.4086511433124542, 0.20326228439807892, -1.455758810043335, 0.5342624187469482, -0.7364883422851562, 0.025894461199641228, 0.9513267874717712, -0.32438328862190247, 0.1866752654314041, -0.818184494972229, 0.2556159496307373,...
javascript/reference/global_objects/disposablestack/disposed/index.md
JavaScript - Global Objects - DisposableStack - disposed: The `disposed` accessor property of `DisposableStack` instances returns a boolean indicating whether or not this `DisposableStack` has been disposed or moved by doing any of the following: - Calling its `dispose()` method - Calling its `move()` method - Declar...
[ -0.6446691155433655, -0.9149211645126343, -1.1021989583969116, 0.7175223231315613, -0.12278091162443161, -1.8228102922439575, 1.2805886268615723, 0.14117543399333954, -0.14210711419582367, 0.5227006673812866, -0.6913918852806091, 0.6770437359809875, -0.5550937652587891, 0.8602064251899719,...
javascript/reference/global_objects/disposablestack/disposed/index.md
JavaScript - Global Objects - DisposableStack - disposed - Examples - Checking if a stack is disposed: Example: const disposer = new DisposableStack(); console.log(disposer.disposed); // false disposer.dispose(); console.log(disposer.disposed); // true
[ 0.006724765989929438, -0.9795334339141846, -1.1208778619766235, 0.29356199502944946, -0.08612217754125595, -1.7106611728668213, 0.7269777059555054, 0.4832278788089752, 0.16434207558631897, 0.6736797094345093, -0.24177010357379913, -0.015950828790664673, -0.26137733459472656, 0.688990354537...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt: The `adopt()` method of `DisposableStack` instances registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
[ 0.6041321754455566, -0.9159323573112488, -1.252409815788269, 0.8494659066200256, -0.2245437204837799, -2.423308849334717, 0.7034123539924622, -0.28694307804107666, -0.3892076313495636, 0.7589042782783508, -0.3540666699409485, 0.3600864112377167, -0.1435713768005371, 0.23698192834854126, ...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Syntax: Example: adopt(value, onDispose)
[ 1.0492857694625854, 0.016184533014893532, -0.9500894546508789, 0.14761587977409363, -0.6708383560180664, -2.5746469497680664, 1.1865322589874268, 0.13842102885246277, 0.16958440840244293, 0.3479057252407074, 0.27853167057037354, 0.1806398332118988, -0.3700406849384308, 0.041567157953977585...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Syntax - Parameters: - `value`: Any value to be registered to the stack. - `onDispose`: A function that will be called when the stack is disposed. The function receives `value` as its only argument.
[ 1.0704394578933716, -0.3229615092277527, -1.0259780883789062, 0.46693354845046997, -0.0263740923255682, -2.29748272895813, 0.8769922852516174, 0.15084367990493774, 0.467186838388443, 0.32887259125709534, -0.0988152027130127, 0.34529954195022583, -0.3047753870487213, 0.7050041556358337, 0...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Syntax - Return value: The same `value` that was passed in.
[ 0.7208367586135864, -0.198404461145401, -1.3833575248718262, -0.0005125703173689544, -0.475624680519104, -1.8134448528289795, 1.0598270893096924, 0.7031745910644531, -0.360482782125473, 0.5652907490730286, -0.3959551453590393, 0.7562208771705627, -0.5430924892425537, 1.230741024017334, 0...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Syntax - Exceptions: - `TypeError`: Thrown if `onDispose` is not a function. - `ReferenceError`: Thrown if the stack is already disposed.
[ 0.3596099317073822, 0.15415886044502258, -0.6324048638343811, 0.4236370325088501, -0.2120230793952942, -1.9586131572723389, 0.6956506371498108, 0.3255348801612854, -0.16769707202911377, 0.27087903022766113, -0.20570652186870575, -0.24943020939826965, -0.2985546290874481, 0.1284570097923278...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Description: The primary purpose of `adopt()` is to register a value that doesn't implement the disposable protocol to the stack. If the value is already disposable, you can use `use()` instead, which automatically uses the value's `[Symbol.dispose]()` method as ...
[ 0.03594858571887016, -0.014246417209506035, -0.1771356761455536, 0.7438991069793701, 0.6108468770980835, -0.4871040880680084, -0.3821859359741211, 0.29561513662338257, 0.3779934048652649, -0.05078108608722687, -0.7256299257278442, -0.2059006541967392, -0.27590903639793396, -0.0888517349958...
javascript/reference/global_objects/disposablestack/adopt/index.md
JavaScript - Global Objects - DisposableStack - adopt - Examples - Using adopt(): This code consumes a `ReadableStream` via a `ReadableStreamDefaultReader`. The reader does not implement the disposable protocol, so we use `adopt()` to register it to the stack. Example: { using disposer = new DisposableStack(); c...
[ 0.42593786120414734, -0.19039064645767212, -0.655663788318634, 0.1193636953830719, 0.07302486896514893, -1.9736891984939575, 0.3526650667190552, -1.2369710206985474, -0.21135543286800385, 0.9258139133453369, -0.3602682054042816, -0.08985616266727448, -0.815825343132019, 0.0984380692243576,...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer: The `defer()` method of `DisposableStack` instances takes a callback function to be called when the stack is disposed.
[ 0.28316399455070496, -0.13098113238811493, -1.501800537109375, 0.37857604026794434, -0.19941815733909607, -1.4893313646316528, 0.724432647228241, -0.06695155799388885, -0.5078896880149841, 0.6465199589729309, -0.3529433310031891, 0.6481185555458069, -0.005679931025952101, 1.115000486373901...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Syntax: Example: defer(onDispose)
[ 0.5173764824867249, 0.4665789008140564, -0.5867955684661865, -0.2785894274711609, -0.45185112953186035, -1.647297739982605, 0.9914012551307678, 0.6186412572860718, 0.14008142054080963, -0.08783717453479767, -0.03551110997796059, 0.9583733081817627, -0.22175726294517517, 0.2101961225271225,...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Syntax - Parameters: - `onDispose`: A function that will be called when the stack is disposed. The function receives no arguments.
[ 0.5362063646316528, -0.06586660444736481, -0.8768767714500427, 0.09055455029010773, 0.16031986474990845, -1.3931097984313965, 0.8812698125839233, 0.5325718522071838, 0.7709184288978577, 0.05455324798822403, -0.31438761949539185, 0.31564706563949585, -0.20658181607723236, 0.9967756867408752...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Syntax - Return value: None (`undefined`).
[ -0.059880081564188004, 0.09408140182495117, -1.0840377807617188, -0.5242024660110474, -0.5274302959442139, -1.1516950130462646, 1.1693989038467407, 0.6938696503639221, -0.11259130388498306, 0.3600767254829407, -0.09441018849611282, 0.8679291009902954, -0.16591975092887878, 0.35633647441864...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Syntax - Exceptions: - `TypeError`: Thrown if `onDispose` is not a function. - `ReferenceError`: Thrown if the stack is already disposed.
[ 0.07794749736785889, 0.22655737400054932, -0.6285418272018433, 0.2902206480503082, -0.18128781020641327, -1.4780324697494507, 0.7285683155059814, 0.5398666858673096, 0.045162901282310486, 0.021020645275712013, -0.25138989090919495, 0.13433387875556946, -0.09112685173749924, 0.2066680192947...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Description: The primary purpose of `defer()` is to register a cleanup callback that's not specific to the disposal of a particular resource. If the callback is specific to a resource, you should use `use()` or `adopt()` instead. You can also use `defer` when the...
[ -0.5169562697410583, -0.37734150886535645, -1.0747581720352173, 0.2755278944969177, -0.3966130316257477, -1.3807332515716553, 0.3807869851589203, -0.11029687523841858, -0.04703887924551964, 0.7819610834121704, -0.013415895402431488, 0.6053680777549744, -0.8688483238220215, 0.13768203556537...
javascript/reference/global_objects/disposablestack/defer/index.md
JavaScript - Global Objects - DisposableStack - defer - Examples - Using defer(): This function sets a simple lock to prevent multiple async operations from running at the same time. The lock is released when the function completes. Example: let isLocked = false; async function requestWithLock(url, options) { if ...
[ 0.06197609379887581, 0.19478537142276764, -1.2758299112319946, 0.3720206320285797, -0.3755721151828766, -0.4831511676311493, 0.24963228404521942, 0.32610493898391724, -0.3160269856452942, 0.30402636528015137, -0.7526372671127319, 0.5633698105812073, -0.24819877743721008, 0.4425603151321411...
javascript/reference/global_objects/disposablestack/symbol.dispose/index.md
JavaScript - Global Objects - DisposableStack - Symbol.dispose: The `[Symbol.dispose]()` method of `DisposableStack` instances implements the disposable protocol and allows it to be disposed when used with `using` or `await using`. It is an alias for the `dispose()` method.
[ 0.13484318554401398, -0.5036964416503906, -1.187976360321045, 0.6764761209487915, 0.0058952332474291325, -2.189311981201172, 1.0130513906478882, 0.9413613080978394, 0.32441070675849915, 0.6947019100189209, -0.676205575466156, 0.5982750058174133, 0.23132896423339844, 0.713134765625, 1.207...
javascript/reference/global_objects/disposablestack/symbol.dispose/index.md
JavaScript - Global Objects - DisposableStack - Symbol.dispose - Syntax: Example: disposableStack[Symbol.dispose]()
[ 0.5389716625213623, -0.10129992663860321, -1.001159429550171, -0.19140774011611938, -0.5764983296394348, -2.451539993286133, 0.9908860325813293, 1.0071510076522827, 0.7619650959968567, 0.1236438974738121, -0.16251441836357117, 0.9424340724945068, -0.24144040048122406, 0.23449690639972687, ...
javascript/reference/global_objects/disposablestack/symbol.dispose/index.md
JavaScript - Global Objects - DisposableStack - Symbol.dispose - Syntax - Parameters: None.
[ 0.5621963739395142, -0.14923718571662903, -1.1321345567703247, -0.5020775198936462, -0.5472328662872314, -1.6447385549545288, 1.2386668920516968, 1.169556975364685, 0.4740258455276489, -0.2806614935398102, -0.5793589353561401, 0.3498210906982422, 0.11774178594350815, 0.12537185847759247, ...
javascript/reference/global_objects/disposablestack/symbol.dispose/index.md
JavaScript - Global Objects - DisposableStack - Symbol.dispose - Syntax - Return value: None (`undefined`).
[ -0.002920025959610939, -0.09983263164758682, -1.0219072103500366, -0.5808385014533997, -0.6515548229217529, -1.6449862718582153, 1.2626097202301025, 1.05489182472229, 0.041832711547613144, 0.2925841808319092, -0.08630633354187012, 0.6769983768463135, 0.07115497440099716, 0.2606945037841797...
javascript/reference/global_objects/disposablestack/symbol.dispose/index.md
JavaScript - Global Objects - DisposableStack - Symbol.dispose - Examples - Declaring a stack with `using`: The `Symbol.dispose` method is intended to be automatically called in a `using` declaration. Example: { using disposer = new DisposableStack(); const resource = disposer.use(new Resource()); resource.doS...
[ 0.17379745841026306, -0.21167640388011932, -1.0394418239593506, 0.6543064713478088, -0.31182923913002014, -1.710513710975647, 0.41806504130363464, 0.7106041312217712, 0.2822871506214142, 0.7517250776290894, 0.025679733604192734, 0.5796619653701782, 0.035079121589660645, 0.36746659874916077...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move: The `move()` method of `DisposableStack` instances creates a new `DisposableStack` instance that contains the same disposers as this stack, and then marks this stack as disposed, without calling any disposers.
[ 0.2115844190120697, -0.7759248614311218, -1.0302512645721436, 1.171796441078186, 0.22449924051761627, -1.2503775358200073, 0.25289595127105713, 0.29323431849479675, -0.2033088505268097, 0.5374690294265747, -0.39112281799316406, 0.39826175570487976, -0.3085062503814697, 0.5143038630485535, ...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move - Syntax: Example: move()
[ 0.31900572776794434, -0.09710145741701126, -0.8412822484970093, 0.33952224254608154, -0.32401812076568604, -1.5030001401901245, 0.06650712341070175, 0.7514142394065857, -0.21532168984413147, -0.07925982028245926, -0.01863771863281727, 0.8439766764640808, -0.7014148235321045, -0.22106720507...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move - Syntax - Parameters: None.
[ 0.27796250581741333, 0.016246698796749115, -1.0231378078460693, 0.08563218265771866, -0.28496646881103516, -1.1657183170318604, 0.5686209201812744, 0.9515096545219421, -0.1376579850912094, 0.03451663255691528, -0.4988018572330475, 0.03210912644863129, -0.4648174047470093, -0.07047025859355...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move - Syntax - Return value: A new `DisposableStack` instance.
[ 0.5730873942375183, -0.5734356045722961, -1.1161688566207886, 0.32057860493659973, -0.34418976306915283, -1.640753984451294, 0.5619383454322815, 0.8859725594520569, 0.42659446597099304, 0.3606180250644684, -0.16015733778476715, 0.4272521734237671, -0.49709171056747437, 0.9010555148124695, ...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move - Syntax - Exceptions: - `ReferenceError`: Thrown if the stack is already disposed.
[ 0.2980712652206421, 0.3523961007595062, -0.6690129637718201, 0.7635284662246704, -0.24897074699401855, -1.803412675857544, 0.616423487663269, 0.4537285268306732, -0.5613883137702942, 0.3669319450855255, -0.31279584765434265, 0.06520892679691315, -0.625239908695221, 0.43163368105888367, 1...
javascript/reference/global_objects/disposablestack/move/index.md
JavaScript - Global Objects - DisposableStack - move - Description: The primary purpose of `move()` is to enable transferring responsibility for disposal out of the current scope. For example, your function can claim ownership of some resources and dispose them if an error occurs; if everything completes successfully,...
[ -0.5078448057174683, 0.08779671788215637, -0.2528575360774994, 0.7024370431900024, 0.42972028255462646, -0.7758260369300842, 0.31939563155174255, 0.6585706472396851, -0.4021092355251312, 0.23379284143447876, -0.31587135791778564, 0.23002059757709503, -0.6727587580680847, 0.2923193573951721...