file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
api/sharedstorage/append/index.md
API - SharedStorage - append - Syntax - Exceptions: - The `Promise` rejects with a `TypeError` if: - The appended entry was not successfully stored in the database due to shared storage not being available (for example it is disabled using a browser setting). - `key` and/or `value` exceed the browser-defined maxim...
[ 0.07552478462457657, -0.4336405396461487, -0.18497958779335022, 0.4244917035102844, 0.10688258707523346, -0.8199141621589661, 0.06640075147151947, 1.0299125909805298, 0.37300392985343933, -0.11877968907356262, -0.3036324083805084, 0.1673688143491745, -0.09005384147167206, 0.177431508898735...
api/sharedstorage/append/index.md
API - SharedStorage - append - Examples: Example: window.sharedStorage .append("integer-list", ",9") .then(() => console.log("Value appended to integer list"));
[ -0.4831424653530121, -0.5266290307044983, -0.3869304955005646, 0.2879794239997864, -0.5565469264984131, -1.1061393022537231, 0.5411016941070557, 0.5514175295829773, 0.1769666075706482, -0.4770125448703766, -0.5996496081352234, 0.46468186378479004, -0.37955209612846375, 0.30929994583129883,...
api/sharedstorage/clear/index.md
API - SharedStorage - clear: Deprecated: This feature is no longer recommended. Non-standard: This feature is not standardized. The `clear()` method of the `SharedStorage` interface clears the current origin's shared storage, removing all data from it.
[ 0.333330899477005, -0.06022597849369049, -0.8117341995239258, 0.4976431727409363, 0.16468596458435059, -1.3911404609680176, 1.060276985168457, 1.6024420261383057, 0.32166588306427, -0.18025456368923187, -0.47473111748695374, 0.7331570982933044, 0.25951865315437317, 1.1313304901123047, 0....
api/sharedstorage/clear/index.md
API - SharedStorage - clear - Syntax: Example: clear()
[ -0.22041931748390198, -0.6233351826667786, -0.14726093411445618, -0.031738363206386566, 0.046564340591430664, -1.286935806274414, 0.7908570170402527, 0.8150594830513, -0.299978107213974, -0.45712724328041077, 0.46860820055007935, 1.005379319190979, -0.21887654066085815, 0.3311973512172699,...
api/sharedstorage/clear/index.md
API - SharedStorage - clear - Syntax - Parameters: None.
[ -0.012030171230435371, -0.21764783561229706, 0.06522102653980255, -0.27217885851860046, -0.10163027793169022, -0.740253210067749, 0.5886382460594177, 1.2117000818252563, -0.19781965017318726, -0.46015575528144836, -0.5638160705566406, 0.2495710253715515, -0.7600895166397095, 0.524793028831...
api/sharedstorage/clear/index.md
API - SharedStorage - clear - Syntax - Return value: A `Promise` that fulfills with `undefined`.
[ 0.35735923051834106, 0.27822890877723694, 0.07722243666648865, -0.10512080043554306, -0.08308972418308258, -1.3210186958312988, 0.8361200094223022, 0.7608477473258972, -0.8144904971122742, 0.17061230540275574, -0.25064462423324585, 0.7789607048034668, -0.12673145532608032, 0.50101488828659...
api/sharedstorage/clear/index.md
API - SharedStorage - clear - Syntax - Exceptions: - The `Promise` rejects with a `TypeError` if: - The database was not cleared successfully due to shared storage not being available (for example it is disabled using a browser setting). - The calling site does not have the Shared Storage API included in a success...
[ -0.11360444128513336, -0.45160818099975586, -0.17230002582073212, 0.3063693642616272, 0.42322838306427, -1.1621553897857666, 0.20409508049488068, 1.1126688718795776, 0.08696132898330688, -0.12698988616466522, -0.30999788641929626, 0.029701627790927887, 0.11046187579631805, 0.29357421398162...
api/sharedstorage/clear/index.md
API - SharedStorage - clear - Examples: Example: window.sharedStorage.clear().then(() => console.log("Shared storage cleared"));
[ -0.4308083653450012, -0.11592388898134232, -0.5358591675758362, -0.029843904078006744, -0.3878571391105652, -1.464707374572754, 0.6275516748428345, 0.3757569491863251, -0.08910001814365387, -0.7187404632568359, 0.4249263107776642, 0.4854181408882141, 0.2871261239051819, 0.7269833087921143,...
api/sharedstorage/delete/index.md
API - SharedStorage - delete: Deprecated: This feature is no longer recommended. Non-standard: This feature is not standardized. The `delete()` method of the `SharedStorage` interface deletes an existing key-value pair from the current origin's shared storage.
[ 0.22513282299041748, 0.2242584377527237, -0.886431097984314, 0.6479195952415466, 0.19471469521522522, -1.2199006080627441, 0.7972497344017029, 1.5305038690567017, -0.2936055064201355, -0.5886597633361816, -0.5461869835853577, 0.6501169800758362, 0.08132211863994598, 1.111168622970581, 1....
api/sharedstorage/delete/index.md
API - SharedStorage - delete - Syntax: Example: delete(key)
[ 0.1473713517189026, -0.7151710987091064, -0.42996013164520264, -0.18927806615829468, -0.20502474904060364, -1.521546483039856, 0.5888165831565857, 0.48506152629852295, -0.04509058594703674, -0.24943271279335022, 0.33188897371292114, 0.7726885676383972, -0.3372838795185089, 0.48291450738906...
api/sharedstorage/delete/index.md
API - SharedStorage - delete - Syntax - Parameters: - `key`: A string representing the key of the key-value pair you want to delete.
[ 0.38906675577163696, 0.14371700584888458, -0.34410789608955383, 0.07648004591464996, 0.10903936624526978, -1.8791656494140625, 0.991018533706665, 0.3906461000442505, 0.038017526268959045, -0.12933950126171112, -0.052412133663892746, 0.5716735124588013, -0.5718041062355042, 0.39398172497749...
api/sharedstorage/delete/index.md
API - SharedStorage - delete - Syntax - Return value: A `Promise` that fulfills with `undefined`.
[ -0.25988683104515076, 0.17773059010505676, 0.13343028724193573, -0.3307298719882965, -0.5910120010375977, -1.122307538986206, 0.829654335975647, 0.6360650062561035, -0.7381447553634644, 0.115186408162117, -0.4457913041114807, 0.4839705228805542, -0.10825362056493759, 0.6120652556419373, ...
api/sharedstorage/delete/index.md
API - SharedStorage - delete - Syntax - Exceptions: - The `Promise` rejects with a `TypeError` if: - The database was not cleared successfully due to shared storage not being available (for example it is disabled using a browser setting). - `key` exceeds the browser-defined maximum length. - The calling site doe...
[ 0.0450565405189991, -0.2722306251525879, -0.269203245639801, 0.4145050346851349, 0.37296921014785767, -1.0488948822021484, 0.06428131461143494, 1.1015944480895996, 0.21482336521148682, -0.08505808562040329, -0.1439393162727356, 0.2260611355304718, -0.036027662456035614, 0.09758122265338898...
api/sharedstorage/delete/index.md
API - SharedStorage - delete - Examples: Example: window.sharedStorage .delete("ab-testing-group") .then(() => console.log("Value deleted"));
[ -0.4130864143371582, -0.7946957945823669, 0.34623557329177856, 0.322629451751709, -0.19206979870796204, -1.4703078269958496, 0.6305524110794067, 0.6786991357803345, 0.17487066984176636, -0.0892079621553421, -0.07661022245883942, 0.5276263952255249, 0.022100716829299927, 0.435910165309906, ...
api/sharedstorage/set/index.md
API - SharedStorage - set: Deprecated: This feature is no longer recommended. Non-standard: This feature is not standardized. The `set()` method of the `SharedStorage` interface either stores a new key-value pair in the current origin's shared storage or updates an existing one.
[ 0.07258909940719604, 0.060366466641426086, -0.7331928610801697, 0.6831556558609009, -0.3839211165904999, -1.2692986726760864, 0.8605120182037354, 1.3047401905059814, -0.022136036306619644, -0.6277440786361694, -0.7438687086105347, 0.41671863198280334, 0.31667691469192505, 0.391703695058822...
api/sharedstorage/set/index.md
API - SharedStorage - set - Syntax: Example: set(key, value) set(key, value, options)
[ -0.3794393539428711, -0.7141065001487732, -0.5383497476577759, 0.12332269549369812, -0.19927659630775452, -1.0761597156524658, -0.005412178114056587, 0.745356559753418, 0.15957733988761902, -0.5986077189445496, -0.15456527471542358, 0.18324850499629974, -0.27161112427711487, 0.497262418270...
api/sharedstorage/set/index.md
API - SharedStorage - set - Syntax - Parameters: - `key`: A string representing the key in the key-value pair that you want to add or update. - `value`: A string representing the value you want to add or update. - `options` (optional): An options object containing the following properties: - `ignoreIfPresent`: A boo...
[ -0.13711705803871155, -0.46280741691589355, -0.7035916447639465, 0.6808594465255737, 0.197222501039505, -1.4265077114105225, 1.1054739952087402, 1.109555721282959, 0.33344101905822754, -0.0433073565363884, -0.22620578110218048, -0.24908719956874847, -0.24223989248275757, 0.4881999492645263...
api/sharedstorage/set/index.md
API - SharedStorage - set - Syntax - Return value: A `Promise` that fulfills with `undefined`.
[ 0.1557745337486267, 0.2809276282787323, -0.011134684085845947, -0.10032926499843597, -0.18594583868980408, -1.4187192916870117, 0.6993088126182556, 0.7927550673484802, -0.8769699335098267, 0.1793953776359558, -0.17035718262195587, 0.7803753614425659, -0.1104353815317154, 0.4424922466278076...
api/sharedstorage/set/index.md
API - SharedStorage - set - Syntax - Exceptions: - The `Promise` rejects with a `TypeError` if: - The created entry was not successfully stored in the database due to shared storage not being available (for example it is disabled using a browser setting). - `key` and/or `value` exceed the browser-defined maximum l...
[ -0.23559841513633728, -0.2899298369884491, -0.04783787578344345, 0.6830231547355652, 0.46886664628982544, -0.9285869002342224, 0.1042248010635376, 1.0323954820632935, 0.23682904243469238, -0.030813075602054596, -0.25818654894828796, 0.15081273019313812, 0.25079724192619324, -0.020566713064...
api/sharedstorage/set/index.md
API - SharedStorage - set - Examples: Example: window.sharedStorage .set("ab-testing-group", "0", { ignoreIfPresent: true, }) .then(() => console.log("Set operation completed"));
[ -0.5383079648017883, -0.7659586668014526, -0.2198752462863922, 0.8214095234870911, -0.08185851573944092, -0.9241605401039124, 0.6299452185630798, 0.7097985744476318, 0.3467172682285309, -0.18400068581104279, -0.3734397292137146, 0.43150296807289124, 0.218194842338562, 0.4270719289779663, ...
api/sanitizerconfig/index.md
API - SanitizerConfig: The `SanitizerConfig` dictionary of the HTML Sanitizer API specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an `Element` or `ShadowRoot`, or when parsing an HTML string into a `Document`. Note that normally `Sanitizer` instanc...
[ 0.2492494136095047, -0.37722185254096985, 0.06509072333574295, 1.0877104997634888, 0.12906280159950256, -2.16426420211792, -0.0070963334292173386, 0.04540063440799713, 0.9385125637054443, 0.6721344590187073, -0.7347895503044128, 0.08779716491699219, 0.4125370383262634, -0.07005861401557922...
api/sanitizerconfig/index.md
API - SanitizerConfig - Instance properties: - `elements`: An array indicating the elements to allow when sanitizing HTML, optionally also specifying their allowed or removed attributes. Each element can be specified by name (a string), or as an object with the following properties: - `name`: A string containing the ...
[ 0.24566034972667694, -0.47265681624412537, -0.15206418931484222, 0.5322032570838928, 0.08577089011669159, -1.6008353233337402, 1.5620800256729126, 0.7359355688095093, 0.2036922574043274, 0.6750036478042603, -0.3982376754283905, 0.6437714099884033, 0.02407827600836754, -0.15603676438331604,...
api/sanitizerconfig/index.md
API - SanitizerConfig - Description: A `SanitizerConfig` specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an `Element` or `ShadowRoot`, or when parsing an HTML string into a `Document`. An instance of this type can be passed to the `Sanitizer()` con...
[ 0.21461568772792816, -0.518983781337738, -0.5359860062599182, 1.11866295337677, -0.13898730278015137, -2.1610167026519775, 1.017675757408142, 1.1456916332244873, 0.2674296498298645, 0.8774653077125549, -0.5751632452011108, 0.1467120349407196, 0.19110585749149323, -0.42715004086494446, 0....
api/sanitizerconfig/index.md
API - SanitizerConfig - Description - Valid configuration: The configuration object structure allows for the declaration of filter options that are contradictory or redundant, such as specifying an element in both allow and remove lists, or listing an attribute in a list multiple times. In order to avoid any ambiguity...
[ 0.2898208200931549, -0.7229927182197571, -0.4446917474269867, 0.6375596523284912, -0.10056991875171661, -1.9101678133010864, 0.6546651721000671, 0.7406746745109558, 0.48886585235595703, 0.6966990828514099, 0.028217069804668427, 0.29789233207702637, -0.22015148401260376, -0.2327615618705749...
api/sanitizerconfig/index.md
API - SanitizerConfig - Description - Allow and remove configurations: One of the main implications of the previous section is that a valid configuration can specify either `elements` or `removeElements` arrays (but not both) and either the `attributes` or `removeAttributes` arrays (but not both). A configuration tha...
[ 1.191007375717163, -0.5467751622200012, -1.0642400979995728, 0.4192509651184082, 0.3299032747745514, -1.949446201324463, 0.552167534828186, 1.724413514137268, 0.09101304411888123, 0.6134452819824219, -0.06328139454126358, 0.6522517800331116, 0.23587483167648315, 0.16167941689491272, -0.4...
api/sanitizerconfig/index.md
API - SanitizerConfig - Examples - Creating an "allow" configuration: This example shows how you might create an "allow" sanitizer configuration that allows specific elements and attributes, replaces `b` elements with their children, allows comments to be included in the output, and requires that `data-*` attributes a...
[ 0.2956593334674835, -0.6814467310905457, -0.6483914852142334, 0.9292489290237427, -0.09981808066368103, -1.6712050437927246, 1.4114892482757568, 1.3758440017700195, 0.33515939116477966, 0.7113409638404846, -0.016633696854114532, 0.6910223364830017, -0.010503435507416725, 0.3000893592834472...
api/sanitizerconfig/index.md
API - SanitizerConfig - Examples - Creating a "remove" configuration: This example shows how you might create a "remove" sanitizer configuration that removes both elements and attributes. Example: const sanitizer = new Sanitizer({ removeElements: ["span", "script"], removeAttributes: ["lang", "id"], comments: ...
[ 0.3343132436275482, -0.3275069296360016, -0.6402698159217834, 0.7113896012306213, -0.23564240336418152, -2.5462710857391357, 0.21032162010669708, 0.7305570840835571, 0.2587542235851288, 0.38324272632598877, -0.3507864773273468, 0.262471079826355, -0.19940711557865143, -0.38733944296836853,...
api/sanitizerconfig/index.md
API - SanitizerConfig - Examples - Allow element and remove attribute configuration: This example shows how you might create a "hybrid" sanitizer configuration that allows some elements and removes certain attributes. You might similarly specify a configuration that removes elements and allows attributes. Example: c...
[ 0.08587618172168732, -0.38959866762161255, -0.8201677203178406, 0.48653560876846313, -0.42855536937713623, -2.545461416244507, 0.6422001123428345, 0.7919474840164185, 0.3282693326473236, 0.31873273849487305, -0.6603524684906006, 0.15227241814136505, 0.1454460322856903, -0.4443027675151825,...
api/sanitizerconfig/index.md
API - SanitizerConfig - Examples - Invalid configurations: This sections shows a number of invalid configurations. These will throw a `TypeError`. Invalid because both `elements` and `removeElements` are defined: Example: const sanitizer1 = new Sanitizer({ elements: ["span", "script"], removeElements: ["div", "...
[ 0.22077660262584686, -0.3755284547805786, -0.5673765540122986, 1.035971999168396, -0.011410608887672424, -1.9347748756408691, 0.46244895458221436, 0.8512566089630127, 0.49889254570007324, 0.45859014987945557, -0.9259265065193176, 0.18700817227363586, -0.17891952395439148, -0.42242914438247...
api/window/settimeout/index.md
API - Window - setTimeout: Warning: When the `code` parameter is used, this method dynamically executes its value as JavaScript. APIs like this are known as injection sinks, and are potentially a vector for cross-site-scripting (XSS) attacks. You can mitigate this risk by always assigning `TrustedScript` objects inste...
[ 0.379346638917923, -0.18541529774665833, -0.24434971809387207, 0.902664303779602, 0.07932189106941223, -0.9192445874214172, 0.09711357951164246, 0.5670662522315979, 0.467987060546875, 0.32819679379463196, 0.2311873435974121, 0.10083399713039398, 0.0685945451259613, -0.050136081874370575, ...
api/window/settimeout/index.md
API - Window - setTimeout - Syntax: Example: setTimeout(code) setTimeout(code, delay) setTimeout(func) setTimeout(func, delay) setTimeout(func, delay, param1) setTimeout(func, delay, param1, param2) setTimeout(func, delay, param1, param2, /* …, */ paramN)
[ -0.01753525249660015, 0.4028316140174866, -0.20231255888938904, 0.28779855370521545, -0.54945307970047, -1.3032721281051636, -0.29787930846214294, 0.15377697348594666, 0.4821794629096985, 0.08936163038015366, -0.36524587869644165, -0.4603452980518341, -0.05240148305892944, 0.59841567277908...
api/window/settimeout/index.md
API - Window - setTimeout - Syntax - Parameters: - `func`: A `function` to be executed after the timer expires. - `code`: A `TrustedScript` or a string of arbitrary code that is compiled and executed after `delay` milliseconds. This can be used instead of passing a function, but is strongly discouraged for the same re...
[ 0.5222451090812683, -0.1659206748008728, -0.9349759817123413, 0.45566800236701965, 0.395818293094635, -0.7105361819267273, 0.4412207007408142, 1.2957725524902344, -0.40462759137153625, -0.18559211492538452, -0.07066282629966736, 0.48454731702804565, -0.004187518730759621, 0.405148148536682...
api/window/settimeout/index.md
API - Window - setTimeout - Syntax - Return value: A positive integer (typically within the range of 1 to 2,147,483,647) that uniquely identifies the timer created by the call. This identifier, often referred to as a "timeout ID", can be passed to `clearTimeout()` to cancel the timer. Within the same global environme...
[ -0.48166966438293457, 0.18632930517196655, -0.2609279155731201, 0.9160943627357483, -0.43702420592308044, -1.641401767730713, 0.3929872512817383, 0.8148255348205566, -0.2829585075378418, 0.6944254040718079, -0.842891275882721, 0.29287245869636536, 0.08256405591964722, 0.3514783978462219, ...
api/window/settimeout/index.md
API - Window - setTimeout - Syntax - Exceptions: - `SyntaxError`: The `code` can't be parsed as a script. - `TypeError`: Thrown if the `code` parameter is set to a string when Trusted Types are enforced by a CSP and no default policy is defined. It is also thrown if the first parameter is not one of the supported type...
[ 0.1597166657447815, -0.5164698362350464, -0.5177493691444397, 0.8400589227676392, -0.3468608558177948, -1.7159206867218018, -0.24432621896266937, 0.6033116579055786, 0.5025799870491028, 0.1335725337266922, -0.03623807057738304, -0.10590720176696777, 0.1266532987356186, -0.04259847104549408...
api/window/settimeout/index.md
API - Window - setTimeout - Description: The `setTimeout()` function is commonly used to call a function that is executed just once, after a delay. You can call `Window.clearTimeout()` to cancel the timeout before it completes. If you wish to call a function repeatedly (e.g., every N milliseconds), you can use `setIn...
[ -0.17643995583057404, -0.0032639792189002037, -0.6609136462211609, 0.9355231523513794, -0.03638052940368652, -1.4706649780273438, 0.3001980781555176, 0.1497335284948349, 0.5727260708808899, 0.4385509192943573, -0.47041288018226624, 0.3917812705039978, 0.12713104486465454, 0.541654109954834...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Working with asynchronous functions: `setTimeout()` is an asynchronous function, meaning that it returns immediately after scheduling the callback function or code to run. It does not "wait", blocking execution of the lines of code after `setTimeout()` until the scheduled code...
[ 0.2952288091182709, 0.04883352667093277, -0.47980496287345886, 0.41348737478256226, 0.3562648296356201, -0.7529373168945312, 0.07932856678962708, 1.2015389204025269, -0.6342924237251282, 0.6151134967803955, 0.011235576122999191, 0.7438119649887085, 0.3712392747402191, 0.5170236229896545, ...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Functions are called with the global `this`: The functions passed to `setTimeout()` is run with normal function call semantics for determining the reference of `this`. This problem is explained in detail in the JavaScript reference. For non-arrow functions, the `this` context...
[ 0.18145976960659027, -0.343803346157074, -0.4496164917945862, 0.8410816788673401, 0.17611229419708252, -1.7323083877563477, -0.167995423078537, 0.5714647769927979, 0.444987952709198, 0.2987960875034332, -0.6484374403953552, 0.5599815845489502, -0.335141658782959, 0.3990813195705414, 0.42...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Non-number delay values are silently coerced into numbers: If `setTimeout()` is called with delay value that's not a number, implicit type coercion is silently done on the value to convert it to a number. For example, the following code incorrectly uses the string `"1000"` for...
[ -0.22596342861652374, -0.4895021915435791, -0.20618683099746704, 0.7234244346618652, 0.1831461489200592, -1.191039800643921, 0.18986821174621582, 0.5274025201797485, 0.21676397323608398, 0.32045093178749084, -0.812450110912323, 0.07827222347259521, -0.31361234188079834, -0.1406436711549759...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Maximum delay value: The `delay` argument is converted to a signed 32-bit integer, which limits the value to 2147483647 ms, or roughly 24.8 days. Delays of more than this value will cause an integer overflow. So for example, this code: Example: setTimeout(() => console.log("...
[ 0.18770354986190796, -0.13248878717422485, -0.38699835538864136, 0.9259714484214783, 0.2960417866706848, -1.8625917434692383, 0.14696186780929565, 0.5423409342765808, 0.16655294597148895, 0.17330217361450195, -0.37795642018318176, 0.7299275398254395, 0.7338006496429443, -0.0883838087320327...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified: There are a number of reasons why a timeout may take longer to fire than anticipated. This section describes the most common reasons.
[ -0.5833274126052856, -0.5620466470718384, -0.409760057926178, 0.4299655854701996, -0.27449819445610046, -1.4486325979232788, -0.26721251010894775, 0.06035469472408295, 0.6700978875160217, 0.26685115694999695, 0.19271691143512726, 0.2324286699295044, -0.35066163539886475, 0.6053896546363831...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified - Nested timeouts: As specified in the HTML standard, browsers will enforce a minimum timeout of 4 milliseconds once a nested call to `setTimeout` has been scheduled 5 times. This can be seen in the following example, in which we nest ...
[ 0.059332482516765594, 0.1456349939107895, 0.12439560890197754, 0.9958093166351318, 0.2009330689907074, -1.13862943649292, 0.40824347734451294, 0.4573485851287842, 0.42815160751342773, 0.44099587202072144, -0.5495485067367554, 0.3256160616874695, -0.02174060046672821, 0.02419884502887726, ...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified - Timeouts in inactive tabs: To reduce the load (and associated battery usage) from background tabs, browsers will enforce a minimum timeout delay in inactive tabs. It may also be waived if a page is playing sound using a Web Audio API ...
[ 0.7716359496116638, -0.2715822756290436, -0.38814210891723633, 0.8863880038261414, 0.5325667858123779, -0.9630130529403687, 0.7090104222297668, 0.822838544845581, -0.6148850321769714, 1.1366912126541138, 0.09728580713272095, -0.12769314646720886, -0.2785111665725708, -0.1584063470363617, ...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified - Throttling of tracking scripts: Firefox enforces additional throttling for scripts that it recognizes as tracking scripts. When running in the foreground, the throttling minimum delay is still 4ms. In background tabs, however, the thr...
[ -0.6363223195075989, -0.11763502657413483, -0.059296201914548874, 0.9148732423782349, -0.25588974356651306, -1.0331435203552246, 0.10251970589160919, 0.539915144443512, 0.5596921443939209, 0.5954961180686951, -0.5007553100585938, 0.3197973668575287, -0.5727307200431824, 0.01294248551130294...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified - Late timeouts: The timeout can also fire later than expected if the page (or the OS/browser) is busy with other tasks. One important case to note is that the function or code snippet cannot be executed until the thread that called `se...
[ 0.9545367956161499, -0.07510305941104889, -0.7176740765571594, 0.9201869368553162, -0.16104747354984283, -1.52285635471344, 0.5230227112770081, 0.040975578129291534, -0.11069376021623611, 0.298001229763031, 0.11699588596820831, 0.06431661546230316, 0.03890363872051239, 0.07806602120399475,...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Reasons for longer delays than specified - Deferral of timeouts during pageload: Firefox will defer firing `setTimeout()` timers while the current tab is loading. Firing is deferred until the main thread is deemed idle (similar to `Window.requestIdleCallback()`), or until the ...
[ -0.18117493391036987, -0.29687803983688354, -0.03736157715320587, 0.7043668031692505, -0.12983345985412598, -1.2486437559127808, 0.5145828723907471, 0.14785689115524292, 0.2123487889766693, 0.5932760834693909, -0.509600043296814, 0.3812407851219177, -0.5018326044082642, 0.43686985969543457...
api/window/settimeout/index.md
API - Window - setTimeout - Description - WebExtension background pages and timers: In WebExtensions, `setTimeout()` does not work reliably. Extension authors should use the `alarms` API instead.
[ -1.2642934322357178, 0.10720077157020569, 0.012063603848218918, 0.5605751276016235, -0.4452552795410156, -1.7145649194717407, 0.08121000975370407, 0.7555121779441833, 0.5008633732795715, 0.044711582362651825, -1.0695066452026367, 0.7512181997299194, 0.002465181052684784, -0.141068100929260...
api/window/settimeout/index.md
API - Window - setTimeout - Description - Security considerations: The method can be used to execute arbitrary input passed in the `code` parameter. If the input is a potentially unsafe string provided by a user, this is a possible vector for Cross-site-scripting (XSS) attacks. For example, the following code shows h...
[ 0.49665868282318115, -0.016605457291007042, -0.4829232692718506, 0.29102271795272827, 0.1417761743068695, -1.0038737058639526, -0.018478404730558395, 0.08865263313055038, 0.5479233264923096, 0.20303316414356232, 0.007418505847454071, 0.054153844714164734, -0.2157442271709442, -0.5619058609...
api/window/settimeout/index.md
API - Window - setTimeout - Examples: Note that these examples omit the use of trusted types for brevity. See Using `TrustedScript` in `eval()` for code showing the expected approach.
[ -0.515380859375, -0.1776856631040573, -0.24314269423484802, 0.7090165615081787, -0.09279133379459381, -1.1037228107452393, 0.16746293008327484, 0.11489236354827881, 0.6207690238952637, -0.23146316409111023, -0.4734690487384796, 0.5681276917457581, -0.3273524343967438, 0.15894323587417603, ...
api/window/settimeout/index.md
API - Window - setTimeout - Examples - Setting and clearing timeouts: The following example sets up two simple buttons in a web page and hooks them to the `setTimeout()` and `clearTimeout()` routines. Pressing the first button will set a timeout which shows a message after two seconds and stores the timeout id for use...
[ -0.5408973693847656, 0.1740182638168335, -0.31131893396377563, 0.6955917477607727, -0.31922993063926697, -1.4558050632476807, 0.3880423903465271, 0.7325341701507568, 0.5575233697891235, 0.09163621068000793, -0.6369526386260986, 0.5076026916503906, -0.118881456553936, 0.22519800066947937, ...
api/window/settimeout/index.md
API - Window - setTimeout - Examples - Setting and clearing timeouts - HTML: Example: <button id="show">Show a message after two seconds</button> <button id="cancel">Cancel message before it happens</button> <div id="output"></div>
[ -1.0419551134109497, 0.08678766340017319, 0.18974047899246216, 0.4066644310951233, 0.07218530774116516, -1.3292068243026733, 0.03738832473754883, 0.028664495795965195, -0.23050469160079956, 0.03635250777006149, -0.8041675090789795, 0.6798754930496216, 0.38021689653396606, 0.465290307998657...
api/window/settimeout/index.md
API - Window - setTimeout - Examples - Setting and clearing timeouts - JavaScript: Example: let timeoutID; function setOutput(outputContent) { document.querySelector("#output").textContent = outputContent; } function delayedMessage() { setOutput(""); timeoutID = setTimeout(setOutput, 2 * 1000, "That was reall...
[ -0.4274336099624634, 0.07768362760543823, -0.19920645654201508, 0.20196479558944702, -0.24623703956604004, -1.059766411781311, -0.00209825299680233, 0.7883594036102295, -0.5497634410858154, 0.26924964785575867, -1.0608171224594116, 0.03257624804973602, -0.14935165643692017, 0.0962699651718...
api/htmltablerowelement/bgcolor/index.md
API - HTMLTableRowElement - bgColor: Deprecated: This feature is no longer recommended. The `HTMLTableRowElement.bgColor` property is used to set the background color of a row or retrieve the value of the obsolete `bgColor` attribute, if present. Note: This property is deprecated and CSS should be used to set the ba...
[ -0.1140933632850647, -0.20527616143226624, -0.6907996535301208, 0.4964832663536072, 0.02239474654197693, -1.4725372791290283, 0.5445664525032043, 0.5314685702323914, -0.14144179224967957, 0.31869742274284363, -0.6790438890457153, 0.8326021432876587, 0.842803955078125, 0.3399282395839691, ...
api/htmltablerowelement/bgcolor/index.md
API - HTMLTableRowElement - bgColor - Value: One of the following value types can be used: - a named color, like `red` or `blue` - a hex code, like `#0000dd` Note: The values accepted here are a subset of the CSS color values. You can reuse HTML color values in CSS, but not in the other direction: the unknown colors...
[ -0.7180308699607849, -0.4511146545410156, -0.42486199736595154, 0.11849118769168854, -0.014431953430175781, -1.1372706890106201, 0.7214938998222351, 1.1860816478729248, 0.04772919416427612, 0.27195093035697937, -0.05150599777698517, 0.5998330116271973, 1.06940758228302, -0.2622453570365906...
api/htmltablerowelement/bgcolor/index.md
API - HTMLTableRowElement - bgColor - Examples: Use CSS `background-color` instead. An example is available on the `background-color` page.
[ -0.13454413414001465, 0.7166808843612671, -0.4767441749572754, -0.452228307723999, -0.34245750308036804, -2.044924020767212, 0.7751749753952026, 0.7966398596763611, -0.9100676774978638, 0.46611151099205017, 0.4591808021068573, 0.6112046837806702, 0.5045856833457947, 0.1365329623222351, -...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event: The `abort` event is fired when media resource loading is stopped before completion, but not as the result of an error. This is usually achieved by removing the `src` attribute or setting it to the empty string (`""`), then calling `load()`. This event is not cancelable and does ...
[ -0.5001993775367737, -0.015007239766418934, 0.017777681350708008, 1.0010490417480469, -0.2950597107410431, -0.8984545469284058, 0.6960051655769348, 1.2009817361831665, -0.03485579788684845, 0.5079026222229004, -0.6824319958686829, 0.30091628432273865, -0.19790369272232056, 0.95494103431701...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("abort", (event) => { }) onabort = (event) => { }
[ -0.18120086193084717, -0.15136951208114624, 0.09800839424133301, 0.9475467801094055, -0.3524352014064789, -1.3671863079071045, 0.24558338522911072, 0.7036991119384766, -0.16060495376586914, 0.3670450747013092, -0.6278464794158936, 0.37388667464256287, -0.22116133570671082, 0.30004951357841...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Event type: A generic `Event`.
[ -0.5799233913421631, 0.17098425328731537, 0.36274227499961853, 0.07899855077266693, -0.5215219855308533, -0.9786356091499329, 0.07757018506526947, 0.6518908739089966, -0.39350980520248413, 0.19448970258235931, -0.1305444836616516, 0.1538049876689911, -0.34630823135375977, 0.600031614303588...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Examples - Abort loading a media resource: The following example demonstrates how to abort a video. When you press the button it starts loading a video resource. After a short timeout it aborts the load by removing the `src` attribute and calling the `load()` method. If the video...
[ -0.29969877004623413, -0.15708310902118683, -0.26982975006103516, 0.9552179574966431, -0.24367369711399078, -0.7064759135246277, 0.6122180223464966, 1.0869213342666626, -0.4410954415798187, 0.07275734841823578, -0.5430549383163452, 0.16811572015285492, -0.09367687255144119, 0.6384435892105...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Examples - Abort loading a media resource - HTML: Example: <video controls width="250"></video> <button id="loadAndAbort">Load and abort video</button> <pre id="log"></pre>
[ -0.6908080577850342, -0.1352756917476654, -0.1873585432767868, 0.9389240741729736, -0.3731772303581238, -0.677387535572052, 0.06244654953479767, 0.4430273771286011, -0.6062676906585693, 0.16935995221138, -0.6067860722541809, 0.2105334997177124, 0.06311574578285217, 0.49393200874328613, 0...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Examples - Abort loading a media resource - CSS: Example: video, button, pre { display: block; margin-block: 1rem; }
[ -0.47489428520202637, 0.06863187253475189, 0.12254224717617035, 0.23548227548599243, 0.025571636855602264, -0.3991954028606415, -0.15108267962932587, 0.2576043903827667, -0.5743547081947327, 0.6062463521957397, 0.05670306086540222, 0.4665723443031311, -0.28503504395484924, 0.53715223073959...
api/htmlmediaelement/abort_event/index.md
API - HTMLMediaElement - abort event - Examples - Abort loading a media resource - JavaScript: Example: const video = document.querySelector("video"); const loadAndAbortButton = document.querySelector("#loadAndAbort"); const log = document.querySelector("#log"); video.addEventListener("abort", () => { log.textCont...
[ -0.3387543559074402, -0.780910074710846, -0.3093031942844391, 0.8554883003234863, -0.3732563853263855, -0.5579578876495361, -0.02867930196225643, 0.5272162556648254, -0.16721639037132263, 0.19182556867599487, -0.35961705446243286, 0.04072190076112747, -0.10954762250185013, 0.32454821467399...
api/xrview/index.md
API - XRView: Secure context: This feature is available only in secure contexts (HTTPS). The WebXR Device API's `XRView` interface describes a single view into the XR scene for a specific frame, providing orientation and position information for the viewpoint. You can think of it as a description of a specific eye o...
[ 0.3074275255203247, -0.12961730360984802, -0.25151658058166504, -0.09663017839193344, 0.20582684874534607, -0.30328914523124695, 0.6300225257873535, 1.602598786354065, 0.1634523719549179, -0.159445658326149, 0.10203792154788971, 0.5280481576919556, 0.45951980352401733, 0.46012943983078003,...
api/xrview/index.md
API - XRView - Instance properties: - `eye` (read only) (experimental): Which of the two eyes (`left`) or (`right`) for which this `XRView` represents the perspective. This value is used to ensure that any content which is pre-rendered for presenting to a specific eye is distributed or positioned correctly. The value ...
[ 0.13134051859378815, -0.23654715716838837, 0.4487878680229187, 0.5323781967163086, -0.034174010157585144, -0.7672169208526611, 0.6530359387397766, 0.9402688145637512, 0.6908813714981079, 0.0805964320898056, -0.09234017133712769, 0.4388360381126404, -0.016378946602344513, 0.474806010723114,...
api/xrview/index.md
API - XRView - Instance methods: - `requestViewportScale()` (read only) (experimental): Requests that the user agent should set the requested viewport scale for this viewport to the requested value.
[ -0.7470331788063049, -0.3118555247783661, -0.20326633751392365, 0.3193734586238861, -0.23361539840698242, -0.46683019399642944, 0.8246837258338928, -0.13025438785552979, 0.07192011177539825, -0.021662287414073944, -0.48938652873039246, 0.093695268034935, 0.5713831782341003, -0.183899566531...
api/xrview/index.md
API - XRView - Usage notes - Positions and number of XRViews per frame: While rendering a scene, the set of views that are used to render the scene for the viewer as of the current frame are obtained by calling the `XRFrame` object's `getViewerPose()` method to get the `XRViewerPose` representing (in essence) the posi...
[ 0.5169607400894165, -0.03249601274728775, -0.33053290843963623, 0.39045393466949463, -0.11570077389478683, -0.8910422325134277, 0.4369639456272125, 1.3981746435165405, 0.16617189347743988, -0.3880050480365753, 0.3485274314880371, 0.41573238372802734, 0.35349902510643005, 0.9218450784683228...
api/xrview/index.md
API - XRView - Usage notes - The destination rendering layer: To render a frame, you iterate over the `XRViewerPose`'s views, rendering each of them into the appropriate viewport within the frame's `XRWebGLLayer`. Currently, the specification (and therefore all current implementations of WebXR) is designed around rend...
[ 0.23983575403690338, -0.7676630020141602, 0.08692202717065811, 0.17250895500183105, -0.4854559302330017, -1.260099172592163, -0.3106772005558014, 0.4615415334701538, 0.7797143459320068, 0.2519923448562622, -0.12159007042646408, -0.16578888893127441, 1.2429888248443604, 0.7479305267333984, ...
api/xrview/index.md
API - XRView - Examples - Preparing to render every view for a pose: To draw everything the user sees, each frame requires iterating over the list of views returned by the `XRViewerPose` object's `views` list: Example: for (const view of pose.views) { const viewport = glLayer.getViewport(view); gl.viewport(view...
[ -0.23420120775699615, -0.47077301144599915, -0.41605520248413086, 0.5167428255081177, -0.6242163777351379, -0.49848026037216187, 0.11505874991416931, 0.3697505295276642, 0.46179360151290894, 0.13755646347999573, -0.3478647470474243, -0.6285765171051025, 0.9450515508651733, 0.42864316701889...
api/xrview/index.md
API - XRView - Examples - Special view transforms: There are a few special transforms that are used on the view while rendering and lighting a scene.
[ -0.13765789568424225, -0.32328853011131287, -0.4833315908908844, 0.24102070927619934, -0.8083539605140686, -0.6127189993858337, 0.7481563091278076, 0.32175326347351074, 0.05794699490070343, 0.26468169689178467, 0.010854627937078476, -0.1869000792503357, 0.5725347399711609, 0.14078246057033...
api/xrview/index.md
API - XRView - Examples - Special view transforms - Model view matrix: The model view matrix is a matrix which defines the position of an object relative to the space in which it's located: If `objectMatrix` is a transform applied to the object to provide its basic position and rotation, then the model view matrix can...
[ -0.7567018866539001, -0.24050812423229218, -0.448112428188324, 0.6520130634307861, 0.09906823933124542, -0.6127442717552185, 0.2795220911502838, 0.7420608997344971, 1.3324549198150635, 0.16507837176322937, -0.5177069902420044, -0.7705175876617432, 0.7741568088531494, 0.3871850073337555, ...
api/xrview/index.md
API - XRView - Examples - Special view transforms - Normal matrix: The model view's normal matrix is used when lighting the scene, in order to transform each surface's normal vectors to ensure that the light is reflected in the correct direction given the orientation and position of the surface relative to the light s...
[ -0.47602730989456177, 0.09022686630487442, -0.6015509963035583, 0.5024265050888062, -0.43187034130096436, -1.3271957635879517, 0.5928086042404175, 0.8350563049316406, 0.3709900975227356, 0.5590855479240417, -0.7842410802841187, -0.4636998772621155, 0.5207276344299316, 0.2337278425693512, ...
api/xrview/index.md
API - XRView - Examples - Teleporting an object: To programmatically move and/or rotate (often referred to as teleporting) an object, you need to create a new reference space for that object which applies a transform that encapsulates the desired changes. The `createTeleportTransform()` function returns the transform ...
[ -0.31843259930610657, 0.3277287483215332, -0.1968703269958496, 0.8113081455230713, 0.39184728264808655, 0.33985844254493713, 0.12451481819152832, 0.4260845482349396, 0.5716347098350525, 0.20319245755672455, -0.7183389663696289, -0.21684116125106812, 0.5989917516708374, 0.48723119497299194,...
api/xrview/index/index.md
API - XRView - index: Secure context: This feature is available only in secure contexts (HTTPS). The `index` read-only property of the `XRView` interface indicates the index of the current `XRView` in the `XRViewerPose.views` array.
[ -0.23427706956863403, -0.03982033208012581, -0.3252057135105133, 0.5680122375488281, -0.29282814264297485, -0.7060558199882507, 0.7033492922782898, 0.3259405791759491, 0.2521229088306427, -0.452168732881546, -0.29693323373794556, -0.3646112382411957, 0.7773802876472473, 0.08791787922382355...
api/xrview/index/index.md
API - XRView - index - Value: A number.
[ -0.3795143961906433, -0.0879579409956932, 0.3252132534980774, -0.1947557032108307, -0.47399917244911194, -0.40397632122039795, 0.7617141604423523, 0.17867545783519745, -0.4668468236923218, 0.06216367334127426, -0.22788527607917786, -0.12852013111114502, -0.02497054822742939, 0.276899546384...
api/xrview/index/index.md
API - XRView - index - Examples - Basic usage: Example: console.log(xrView.index);
[ -0.20145265758037567, -0.12209178507328033, -0.3876990079879761, 0.1747363656759262, -0.9109456539154053, -0.5884596705436707, 0.4919300675392151, 0.07191634178161621, -0.23266065120697021, -0.3201562166213989, 0.5262861251831055, 0.07545620203018188, 0.4748935103416443, 0.4011398255825043...
api/webtransportsendgroup/index.md
API - WebTransportSendGroup: Secure context: This feature is available only in secure contexts (HTTPS). Note: This feature is available in Web Workers. The `WebTransportSendGroup` interface of the `WebTransport API` represents a group of streams and datagrams, within which relative send priority is determined by the...
[ -0.34931331872940063, -0.14138200879096985, 0.061904795467853546, 0.0322914645075798, 0.2109677493572235, -1.5549598932266235, 0.6646597981452942, 0.27580299973487854, 0.6141446828842163, 0.35022059082984924, 0.08275403082370758, 0.6161360144615173, 0.5279895663261414, 0.05114341527223587,...
api/webtransportsendgroup/index.md
API - WebTransportSendGroup - Instance methods: - `getStats()` (experimental): Returns a `Promise` that resolves with an object containing statistics aggregated across all of the `WebTransportSendStream` and `WebTransportDatagramsWritable` objects currently associated with this group.
[ -1.234653353691101, -0.38936683535575867, -0.20286086201667786, 0.24220672249794006, 0.11789266765117645, -1.7150672674179077, 0.8183990716934204, 0.6623328328132629, -0.447338730096817, 0.5255481600761414, -0.6008206009864807, 0.6706336736679077, 0.732154905796051, -0.01157810166478157, ...
api/webtransportsendgroup/index.md
API - WebTransportSendGroup - Description: Unlike for `WritableStream` instances, for which the priority at which bytes are sent on different streams is implementation-dependent, a `WebTransportDatagramsWritable` or `WebTransportSendStream` allows you to set the priority at which bytes will be sent on each instance re...
[ -0.13964328169822693, 0.049285583198070526, -0.06468319892883301, 0.30569466948509216, 0.851405918598175, -1.7627756595611572, 0.952900230884552, 1.133496642112732, -0.2451861947774887, 0.4915318787097931, 0.4606945216655731, 0.827051043510437, -0.3281690180301666, 0.3982735872268677, 0....
api/webtransportsendgroup/index.md
API - WebTransportSendGroup - Examples - Basic usage: The example below creates a send group, then associates a unidirectional stream and the connection's outgoing datagram stream with it, giving each a `sendOrder`. Bytes on the datagram stream will be prioritized ahead of any bytes on the unidirectional stream, becau...
[ 0.21738727390766144, -0.5655686259269714, -0.22846873104572296, 0.20811758935451508, 0.1584015041589737, -2.1301300525665283, 0.6574457287788391, 0.23571088910102844, -0.2589111924171448, 0.29834434390068054, -0.4351922571659088, 0.0717078447341919, -0.067806176841259, 0.21646171808242798,...
api/webtransportsendgroup/getstats/index.md
API - WebTransportSendGroup - getStats: Secure context: This feature is available only in secure contexts (HTTPS). Note: This feature is available in Web Workers. The `getStats()` method of the `WebTransportSendGroup` interface returns a `Promise` that resolves to an object containing statistics aggregated across al...
[ -0.3495570421218872, -0.13617625832557678, -0.2109268754720688, -0.08101915568113327, 0.2981465458869934, -1.3635382652282715, 0.5667557120323181, 1.5350815057754517, -0.29907041788101196, 0.18235310912132263, 0.19898481667041779, 0.8787367939949036, 0.442415714263916, 0.2578877806663513, ...
api/webtransportsendgroup/getstats/index.md
API - WebTransportSendGroup - getStats - Syntax: Example: getStats()
[ -1.6643457412719727, -0.8905033469200134, 0.19809556007385254, -0.5695624947547913, -0.3985004425048828, -1.336972713470459, -0.3463243842124939, 0.3598646819591522, -0.5732898712158203, 0.14904125034809113, -0.7824208736419678, 0.5422829389572144, 0.3452977240085602, 0.26881664991378784, ...
api/webtransportsendgroup/getstats/index.md
API - WebTransportSendGroup - getStats - Syntax - Parameters: None.
[ -0.5460003018379211, -0.2654556632041931, 0.08977609872817993, 0.1288437396287918, -0.35514748096466064, -0.7035169005393982, 0.3543686270713806, 0.9961025714874268, -0.7332573533058167, -0.1837620735168457, -1.2136856317520142, 0.22541257739067078, 0.5486990809440613, 0.17289021611213684,...
api/webtransportsendgroup/getstats/index.md
API - WebTransportSendGroup - getStats - Syntax - Return value: A `Promise` that resolves to an object containing aggregated statistics for the group's members. The returned object has the following properties: - `bytesAcknowledged`: A positive integer indicating the number of bytes written to the group's members tha...
[ 0.3306046426296234, -0.00685951067134738, -0.5360479354858398, 0.2815413773059845, 0.8152725100517273, -1.4135417938232422, 1.3043636083602905, 1.4409748315811157, -0.2917383909225464, 0.3588908612728119, -0.5778474807739258, 1.2174241542816162, 0.13545843958854675, 0.6156027913093567, -...
api/webtransportsendgroup/getstats/index.md
API - WebTransportSendGroup - getStats - Examples - Basic usage: The code snippet below uses `await` to wait on the `Promise` returned by `getStats()`, then logs the number of bytes that have been sent across the group's members but not yet acknowledged: Example: const stats = await sendGroup.getStats(); const bytes...
[ -0.7981995940208435, -0.21315287053585052, -0.7527625560760498, 0.13980750739574432, -0.14929687976837158, -1.6786353588104248, 0.33288776874542236, 0.37801459431648254, -0.34303468465805054, 0.22334273159503937, -0.6316718459129333, 0.4472031593322754, 0.5911858081817627, 0.20951497554779...
api/audioencoder/configure/index.md
API - AudioEncoder - configure: Secure context: This feature is available only in secure contexts (HTTPS). Note: This feature is available in Web Workers. The `configure()` method of the `AudioEncoder` interface enqueues a control message to configure the audio encoder for encoding chunks.
[ -0.06370197236537933, 0.30095672607421875, -0.8702692985534668, 1.0141221284866333, 0.3965702950954437, -0.584352970123291, 0.5865263938903809, 1.0394145250320435, 0.16175520420074463, 0.06497267633676529, 0.10475312173366547, 0.5606733560562134, 0.13390493392944336, -0.21739812195301056, ...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Syntax: Example: configure(config)
[ 0.24708624184131622, 0.021582596004009247, -0.8964219093322754, 0.8786273002624512, 0.09919819235801697, -0.9482924938201904, 0.4078022241592407, 0.2385481595993042, -0.2642742991447449, 0.2254311442375183, -0.0371294841170311, 0.33499300479888916, -0.5106630325317383, -0.25991180539131165...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Syntax - Parameters: - `config`: A dictionary object containing the following members: - `codec`: A string containing a valid codec string. See "codecs" parameter for details on codec string construction. - `sampleRate`: An integer representing the number of frame samples per secon...
[ 0.9749631285667419, -0.008468829095363617, -0.8065074682235718, 0.2864052653312683, 1.1049169301986694, -0.8067954778671265, 1.0298727750778198, 1.1478549242019653, -0.21959616243839264, -0.07026327401399612, -0.2906063497066498, 0.19813746213912964, -0.013174593448638916, 0.29895436763763...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Syntax - Return value: None (`undefined`).
[ -0.23655201494693756, -0.1384778618812561, -0.6418676972389221, 0.5699468851089478, -0.22704392671585083, -0.5579282641410828, 0.5870644450187683, 1.0564082860946655, -0.4902605414390564, 0.222969189286232, -0.10209421068429947, 0.3081924319267273, -0.09027878940105438, -0.0412259474396705...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Syntax - Exceptions: - `TypeError`: Thrown if the provided `config` is invalid. - `InvalidStateError` `DOMException`: Thrown if the `state` is `"closed"`. - `NotSupportedError` `DOMException`: Thrown if the provided `config` is valid but the user agent cannot provide a codec that can d...
[ 0.35557764768600464, -0.560432493686676, -0.5648563504219055, 1.1194342374801636, -0.039537955075502396, -1.3716275691986084, 0.22722020745277405, 0.616171658039093, 0.5181982517242432, 0.24119919538497925, -0.541904628276825, -0.059718649834394455, 0.35653048753738403, -0.4065030217170715...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Examples - Basic configuration example: The following example creates a new `AudioEncoder` and configures it with some of the available options. Example: const init = { output: handleOutput, error(e) { console.log(e.message); }, }; let config = { codec: "mp3", sampleRa...
[ 0.22764952480793, -0.40645357966423035, -0.950003445148468, 0.9719340801239014, 0.4656206965446472, -0.4636960029602051, 0.7204325199127197, 1.1667349338531494, -0.629669189453125, 0.39773938059806824, -0.2673046588897705, -0.12825560569763184, 0.39109915494918823, -0.4266414940357208, 0...
api/audioencoder/configure/index.md
API - AudioEncoder - configure - Examples - Opus-specific configuration example: The following example creates a new `AudioEncoder` and configures it with Opus-specific options. Example: const init = { output: handleOutput, error(e) { console.log(e.message); }, }; let opusConfig = { application: "voip",...
[ 0.49221524596214294, 0.21422778069972992, -1.166556477546692, 1.2909497022628784, 0.38303422927856445, -1.278138279914856, 0.7744283676147461, 0.8393846154212952, -0.20823140442371368, 0.6208482980728149, -0.7652317881584167, -0.16477692127227783, 0.1741100400686264, -0.07478989660739899, ...
api/xrsession/index.md
API - XRSession: Secure context: This feature is available only in secure contexts (HTTPS). The `XRSession` interface of the WebXR Device API represents an ongoing session between a web application and a user's XR device (such as a VR headset), providing methods and properties used to interact with and control the s...
[ -0.24868977069854736, -0.30639976263046265, -1.0307512283325195, 0.8161659240722656, -0.48380789160728455, -0.3468873202800751, 0.6458814144134521, 0.2035771906375885, 0.9723681211471558, -0.03941715508699417, -0.1192222312092781, 0.49006199836730957, 0.9796700477600098, -0.277658283710479...
api/xrsession/index.md
API - XRSession - Instance properties: In addition to the properties listed below, `XRSession` inherits properties from its parent interface, `EventTarget`. - `depthDataFormat` (experimental) (read only): Returns the depth-sensing data format with which the session was configured. - `depthUsage` (experimental) (read ...
[ -0.12505172193050385, -0.676619827747345, -1.247403860092163, 0.6335001587867737, -0.49655893445014954, -0.15077966451644897, 0.8711077570915222, 0.8134250044822693, -0.27004438638687134, 0.43397530913352966, -0.24335844814777374, 0.688005805015564, -0.0268758125603199, 0.7658200860023499,...
api/xrsession/index.md
API - XRSession - Instance methods: `XRSession` provides the following methods in addition to those inherited from its parent interface, `EventTarget`. - `cancelAnimationFrame()` (experimental): Removes a callback from the animation frame painting callback from `XRSession`'s set of animation frame rendering callbacks...
[ -0.39513352513313293, -0.2693847715854645, -0.5282214283943176, 0.38680967688560486, -0.22308014333248138, -1.0043659210205078, 0.9634079933166504, 0.4700718820095062, -0.611794650554657, 0.3116849958896637, -0.4457813501358032, 0.1515684425830841, 0.5108410716056824, 0.42239782214164734, ...
api/xrsession/index.md
API - XRSession - Events: The following events are delivered to `XRSession` objects. - `end` (experimental): Sent to the `XRSession` object after the WebXR session has ended and all hardware-related functions have completed. The event is represented by an object of type `XRSessionEvent`. Also available through the `o...
[ 0.678839385509491, -0.5321973562240601, -0.6159294247627258, 0.5309715270996094, 0.1548684984445572, -0.6658408641815186, 0.6885157227516174, 1.1737462282180786, -0.6192477941513062, 0.4744955599308014, 0.206259623169899, 1.1211570501327515, 0.23492175340652466, 0.3344667851924896, 0.324...
api/xrsession/index.md
API - XRSession - Example: This example establishes a new `XRSession` in `inline` mode so that it can be displayed within an HTML element, avoiding the need for a dedicated AR or VR viewing device such as a headset. Example: const XR = navigator.xr; if (XR) { XR.requestSession("inline").then((xrSession) => { ...
[ -0.5212494134902954, -0.8835431337356567, -0.7225824594497681, 0.6734250783920288, -0.7387884259223938, -0.46676141023635864, 0.433709055185318, 0.15523666143417358, 0.4875396490097046, -0.02804209664463997, -0.17040760815143585, 0.30846306681632996, 0.928196370601654, -0.23194880783557892...
api/decompressionstream/decompressionstream/index.md
API - DecompressionStream: Note: This feature is available in Web Workers. The `DecompressionStream()` constructor creates a new `DecompressionStream` object which decompresses a stream of data.
[ 0.14846596121788025, -0.36608150601387024, -0.7840643525123596, 0.4341789484024048, 0.012618981301784515, -1.765415072441101, 0.6144406795501709, 0.4788860082626343, -0.5401113033294678, 0.5704894661903381, 0.12722864747047424, -0.6869164109230042, 0.09352997690439224, 0.01947416365146637,...
api/decompressionstream/decompressionstream/index.md
API - DecompressionStream - Syntax: Example: new DecompressionStream(format)
[ 0.2943556010723114, -1.0707674026489258, -0.8903486728668213, -0.2331293374300003, 0.10469649732112885, -1.6502227783203125, -0.24391955137252808, 0.4625168740749359, 0.11082610487937927, 0.3547232449054718, -0.1366233080625534, -0.6434332132339478, 0.1608564406633377, 0.4391511082649231, ...
api/decompressionstream/decompressionstream/index.md
API - DecompressionStream - Syntax - Parameters: - `format`: One of the following compression formats: - `"brotli"`: Decompress the stream using the Brotli algorithm. - `"gzip"`: Decompress the stream using the GZIP algorithm. - `"deflate"`: Decompress the stream using the DEFLATE algorithm in ZLIB Compressed Da...
[ 0.570402979850769, -0.926581621170044, -0.3315075933933258, 0.16148267686367035, 0.08399321138858795, -1.579962134361267, 1.0066425800323486, 0.1452438235282898, -0.38324636220932007, 0.4738942086696625, -1.264700174331665, -0.8879478573799133, -0.4009947180747986, 0.015859991312026978, ...
api/decompressionstream/decompressionstream/index.md
API - DecompressionStream - Syntax - Exceptions: - `TypeError`: Thrown if the format passed to the constructor is not supported.
[ 0.665259838104248, -0.8868439793586731, -0.018036313354969025, 0.09940619766712189, -0.3043675124645233, -2.0912046432495117, -0.2819962203502655, 0.41726574301719666, 0.17619335651397705, 0.08328771591186523, -0.3886759877204895, -0.29943984746932983, 0.03757020831108093, 0.15667678415775...
api/decompressionstream/decompressionstream/index.md
API - DecompressionStream - Examples: In this example a gzip-compressed blob is decompressed. Example: const ds = new DecompressionStream("gzip"); const decompressedStream = blob.stream().pipeThrough(ds);
[ 0.5678772926330566, -0.7758715748786926, -0.7303109765052795, 0.2575029134750366, 0.200041264295578, -1.717722773551941, 0.08359669893980026, -0.11763781309127808, 0.14131659269332886, 0.7820647358894348, -0.5711350440979004, -0.24135413765907288, 0.30273905396461487, 0.09263123571872711, ...