file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
api/webrtc_api/index.md
API - WebRTC API - WebRTC reference - Encoded Transforms - Properties: - `RTCRtpReceiver.transform`: A property used to insert a transform stream into the receiver pipeline for incoming encoded video and audio frames. - `RTCRtpSender.transform`: A property used to insert a transform stream into the sender pipeline for...
[ 0.15439993143081665, 0.035661324858665466, -0.6211071610450745, 1.1387546062469482, 0.4517531991004944, -1.7635347843170166, -0.347613126039505, 0.7360652089118958, 0.11065693199634552, 0.261427104473114, -0.5870709419250488, -0.19654838740825653, 0.4305419623851776, -0.28455662727355957, ...
api/webrtc_api/index.md
API - WebRTC API - WebRTC reference - Encoded Transforms - Events: - `rtctransform`: An RTC transform is ready to run in the worker, or an encoded video or audio frame is ready to process.
[ 0.378566175699234, -0.14213664829730988, -0.36625275015830994, 1.1415009498596191, -0.09438393265008926, -1.1523993015289307, -0.5230436325073242, 0.48514240980148315, 0.29239752888679504, 0.4803369343280792, -0.16610445082187653, -0.07784051448106766, 0.40369927883148193, 0.24410235881805...
api/webrtc_api/index.md
API - WebRTC API - WebRTC reference - WebRTC-proper protocols: - Application Layer Protocol Negotiation for Web Real-Time Communications - WebRTC Audio Codec and Processing Requirements - RTCWeb Data Channels - RTCWeb Data Channel Protocol - Web Real-Time Communication (WebRTC): Media Transport and Use of RTP - WebRTC...
[ -0.40382665395736694, 0.03584566339850426, -0.21542894840240479, 1.0856516361236572, 0.024295508861541748, -0.6760331988334656, -0.42695480585098267, 0.42123177647590637, -0.25560641288757324, -0.02979407086968422, -0.25907474756240845, 0.4015868008136749, 0.40347930788993835, -0.121941678...
api/webrtc_api/index.md
API - WebRTC API - WebRTC reference - Related supporting protocols: - Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocol - Session Traversal Utilities for NAT (STUN) - URI Scheme for the Session Traversal Utilities for NAT (STUN) Protocol -...
[ 0.3913528323173523, -0.5588662624359131, -0.2517617344856262, 0.3842223286628723, -0.053628839552402496, -0.7803779244422913, 0.09400340914726257, 0.7327098846435547, 0.6330524682998657, 0.7493726015090942, -0.9691054821014404, 0.16148579120635986, 0.1630759835243225, -0.39471909403800964,...
api/cssnumericarray/length/index.md
API - CSSNumericArray - length: The read-only `length` property of the `CSSNumericArray` interface returns the number of `CSSNumericValue` objects in the list.
[ -0.6331481337547302, 0.032813671976327896, -0.30883485078811646, -0.30925607681274414, -0.20792222023010254, -1.8779548406600952, 0.6481731534004211, 0.22174420952796936, 0.3237302303314209, 0.5285483598709106, 0.06567826867103577, 0.12379196286201477, 0.7592087984085083, 0.344272971153259...
api/cssnumericarray/length/index.md
API - CSSNumericArray - length - Value: An integer representing the number of `CSSNumericValue` objects in the list.
[ -0.8464739322662354, -0.16607069969177246, -0.5233138799667358, -0.3463772237300873, 0.1786612868309021, -2.4677772521972656, 0.5493561029434204, -0.3510016202926636, -0.10088198632001877, 0.5193841457366943, 0.07770490646362305, -0.022310730069875717, 0.0395912304520607, 0.497524380683898...
api/cssnumericarray/length/index.md
API - CSSNumericArray - length - Examples: To Do
[ -0.8982776403427124, 0.11744987964630127, -0.2845417261123657, -0.26711305975914, 0.041563376784324646, -1.0787957906723022, 0.8125491142272949, -0.35674527287483215, -0.46605998277664185, 0.7440542578697205, 0.27394402027130127, 0.5844676494598389, 0.0433180034160614, 0.08752477169036865,...
api/midiinput/midimessage_event/index.md
API - MIDIInput - midimessage event: Secure context: This feature is available only in secure contexts (HTTPS). The `midimessage` event of the Web MIDI API is fired when the MIDI port corresponding to this `MIDIInput` finishes receiving one or more MIDI messages. An instance of `MIDIMessageEvent` containing the messa...
[ -0.001462173298932612, -0.4577542543411255, -0.2626068890094757, 0.6997547149658203, 0.12403491139411926, -1.5661859512329102, 0.010697033256292343, 0.6212118268013, -0.14149923622608185, -0.1210632175207138, 0.039004720747470856, -0.10183680057525635, 0.12809085845947266, 0.33600127696990...
api/midiinput/midimessage_event/index.md
API - MIDIInput - midimessage event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("midimessage", (event) => { }) onmidimessage = (event) => { }
[ 0.003133815713226795, -0.30264854431152344, -0.48618483543395996, 0.47574061155319214, 0.09692908823490143, -1.1794278621673584, 0.08330641686916351, 0.858791172504425, 0.2879117429256439, -0.07030332833528519, -0.8442234992980957, 0.030944950878620148, -0.17562326788902283, 0.115193948149...
api/midiinput/midimessage_event/index.md
API - MIDIInput - midimessage event - Event type: A `MIDIMessageEvent`. Inherits from `Event`.
[ -0.7845253348350525, -0.6571040749549866, -0.035643935203552246, -0.27385133504867554, -0.3635806441307068, -1.107602596282959, 0.16438452899456024, 0.7399317622184753, 0.13296401500701904, -0.5770848393440247, -0.6296175122261047, -0.2202119380235672, -0.04977535456418991, 0.1069321036338...
api/midiinput/midimessage_event/index.md
API - MIDIInput - midimessage event - Examples: In the following example `midimessage` events are listened for on all input ports. When a message is received the `MIDIMessageEvent.data` property is printed to the console. Example: inputs.forEach((input) => { input.onmidimessage = (message) => { console.log(mes...
[ -0.08306572586297989, -0.41144728660583496, -0.5013247728347778, 0.5687370896339417, 0.07503952085971832, -1.578319787979126, 0.08081483840942383, 0.5833916664123535, -0.02213439717888832, 0.12646517157554626, -0.3443497121334076, -0.21141433715820312, 0.3477083146572113, 0.337347477674484...
api/svgtextpathelement/index.md
API - SVGTextPathElement: The `SVGTextPathElement` interface corresponds to the `textPath` element.
[ -0.9082988500595093, -0.4215482771396637, 0.760558009147644, -0.0901310071349144, -0.08160977065563202, -2.412649154663086, 0.9186887741088867, -0.3986539840698242, 0.4928286075592041, -0.06128211319446564, 0.04612024873495102, 0.3286830484867096, 0.618361234664917, 0.4558597207069397, 0...
api/svgtextpathelement/index.md
API - SVGTextPathElement - Instance properties: This interface also inherits properties from its parent interface, `SVGTextContentElement`. - `SVGTextPathElement.href` (read only): An `SVGAnimatedString` corresponding to the `href` or `xlink:href` attribute of the given element. - `SVGTextPathElement.side` (read only...
[ -0.2876240611076355, 0.06898196041584015, 0.266485333442688, 0.32697272300720215, 0.05291330814361572, -1.8572938442230225, 1.1209012269973755, 1.157088041305542, 0.082015261054039, 0.18473276495933533, 0.14085017144680023, 0.6076964139938354, 0.4353163242340088, 0.29181092977523804, -0....
api/svgtextpathelement/index.md
API - SVGTextPathElement - Instance methods: This interface does not provide any specific methods, but implements those of its parent, `SVGTextContentElement`.
[ -0.35458827018737793, 0.48642438650131226, 0.6744105815887451, -0.018684299662709236, 0.11284179985523224, -1.1128848791122437, 0.6172806620597839, 0.6663147807121277, 0.6206064820289612, 0.0989774614572525, -0.017871098592877388, 0.7774819135665894, 0.3480074107646942, 0.3737148642539978,...
api/svgtextpathelement/index.md
API - SVGTextPathElement - Static properties: - `TEXTPATH_METHODTYPE_UNKNOWN` (0): The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. - `TEXTPATH_METHODTYPE_ALIGN` (1): Corresponds to the value `align`. - `TEXTPAT...
[ 0.01961403340101242, -0.46015918254852295, -0.0913863554596901, 0.6432567238807678, 0.5312026143074036, -1.7404553890228271, 0.7111125588417053, 1.8140313625335693, 0.5762390494346619, -0.0205182284116745, 0.17268908023834229, 0.5049517154693604, 0.8317472338676453, 0.2566128969192505, -...
api/svgtextpathelement/index.md
API - SVGTextPathElement - Examples - Basic usage: This example shows how you can set and get the properties of an `SVGTextPathElement`.
[ -0.9752894639968872, 0.26672422885894775, 0.47853565216064453, 0.18005959689617157, -0.1538453996181488, -1.7650530338287354, 1.0035680532455444, 0.1910787671804428, 0.15183047950267792, 0.06526939570903778, 0.2920575737953186, 0.879111647605896, 0.3439725935459137, 0.12856288254261017, ...
api/svgtextpathelement/index.md
API - SVGTextPathElement - Examples - Basic usage - HTML: First we define the SVG and associated CSS to draw a path with text drawn along it (this is a near-copy of the SVG in the `path` attribute topic). Example: html, body, svg { height: 400px; width: auto; /* Keeps the aspect ratio */ } Example: <svg viewBo...
[ -0.4370177090167999, -0.21932050585746765, 0.7005748748779297, 0.638817310333252, 0.2393043041229248, -1.5414938926696777, 0.46842214465141296, 0.3980652391910553, 0.4186444878578186, 0.13200989365577698, -0.24486608803272247, 0.5693736672401428, 0.2924878001213074, 0.030702129006385803, ...
api/svgtextpathelement/index.md
API - SVGTextPathElement - Examples - Basic usage - JavaScript: The code below toggles the `side.baseVal` property on the `textPath`, causing the text to swap sides. First we define a function to log each of the properties of the path element, and call it to log the initial state on load. The `side.baseVale` property...
[ -0.7074059844017029, 0.053070783615112305, 0.35256078839302063, 0.701081395149231, 0.03407065570354462, -0.8399430513381958, 0.4235180914402008, 1.0301049947738647, 0.20020020008087158, -0.06870368123054504, -0.5128850936889648, 0.3901965022087097, -0.031606536358594894, -0.276064872741699...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side: Non-standard: This feature is not standardized. The `side` read-only property of the `SVGTextPathElement` interface represents the side of the path that the text is placed on (relative to the path direction). The `side.baseVal` property reflects the `side` content attribute of the gi...
[ -0.5529434084892273, -0.07985221594572067, 0.36166536808013916, 0.5927620530128479, 0.38523048162460327, -1.2956162691116333, 0.7601372599601746, 1.121329665184021, 0.36425721645355225, -0.019173171371221542, 0.3455154001712799, 0.5465596914291382, 0.8375865817070007, 0.16596297919750214, ...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side - Value: An `SVGAnimatedEnumeration` object. The following static properties indicate the values that can be returned from `side.baseVal` (and `side.animVal`): - `SVGTextPathElement.TEXTPATH_SIDETYPE_LEFT` (1): The text is rendered on the left side of the path (the default). This corr...
[ -0.4950067698955536, -0.39072808623313904, 0.24708884954452515, 0.42017602920532227, 0.07262636721134186, -1.280537724494934, 1.038986325263977, 1.7917877435684204, -0.08845357596874237, -0.2479880154132843, 0.19383852183818817, 0.8199946880340576, 0.6966962218284607, 0.067339226603508, ...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side - Examples: Also see the Example in `SVGTextPathElement`, which allows you to toggle the `side` attribute.
[ -1.3544615507125854, 0.13088580965995789, 0.9526073932647705, 0.19825083017349243, 0.028287246823310852, -1.552742838859558, 0.5876322984695435, 0.6326884031295776, 0.11876228451728821, -0.3474122881889343, 0.2381395399570465, 0.4450586438179016, 0.26110193133354187, 0.16728387773036957, ...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side - Examples - Accessing the `side` property: This example demonstrates how you can set and get the `side` property, and in particular its `baseVal`.
[ -1.2012284994125366, 0.47789788246154785, 0.5011215209960938, 0.8123997449874878, -0.15581856667995453, -1.8908240795135498, 1.0595390796661377, 0.29332250356674194, -0.11989731341600418, 0.2801453471183777, -0.12905167043209076, 0.8770281076431274, -0.15835559368133545, 0.1255380362272262...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side - Examples - Accessing the `side` property - HTML: First we define HTML and CSS for an SVG path that draws text on the right on supporting browsers using the SVG `side` attribute. Example: html, body, svg { height: 400px; width: auto; /* Keeps the aspect ratio */ } Example: <svg...
[ -0.8321715593338013, 0.41715043783187866, 0.48323243856430054, 0.6544608473777771, 0.2113478183746338, -1.592226505279541, 0.4005134701728821, 0.31787559390068054, 0.23126482963562012, 0.31549403071403503, -0.41166386008262634, 0.34315192699432373, 0.2104852795600891, -0.14101791381835938,...
api/svgtextpathelement/side/index.md
API - SVGTextPathElement - side - Examples - Accessing the `side` property - JavaScript: The code below first gets the `side.baseVal` property and compares it to the enumerated static property values to determine (and log) which side of the path the text is drawn on. If the `side` property isn't defined the code will ...
[ -0.6235674619674683, -0.007294048089534044, 0.2507364749908447, 0.6580844521522522, 0.1994953155517578, -1.3439185619354248, 0.7523304224014282, 0.7743094563484192, 0.04496467113494873, -0.04761207848787308, -0.4593568444252014, 0.6654183268547058, -0.1499081254005432, -0.32502347230911255...
api/audio_session_api/index.md
API - Audio Session API: The Audio Session API provides a mechanism for web applications to control how their audio interacts with other audio playing on a device.
[ 0.4805034101009369, -0.030498620122671127, -1.0663775205612183, 0.3850030303001404, 0.17866918444633484, -0.33946651220321655, 0.5552973747253418, 0.7913150191307068, 0.34768885374069214, 0.24712416529655457, -0.2802155613899231, 0.9213828444480896, -0.2751360535621643, 0.10187304019927979...
api/audio_session_api/index.md
API - Audio Session API - Concepts and usage: People increasingly consume media through the web: it is now a primary channel for accessing audio and video content. However, media on the web often lacks seamless integration with underlying platforms. The Audio Session API addresses this gap by allowing developers to sp...
[ 0.8382259607315063, 0.25722482800483704, -1.1280362606048584, 0.45490169525146484, 0.29918402433395386, -0.5769000053405762, 0.49551016092300415, 1.1018673181533813, 0.0963258147239685, 0.38643914461135864, 0.4322001039981842, 0.6397479176521301, -0.6568944454193115, -0.0930422991514206, ...
api/audio_session_api/index.md
API - Audio Session API - Concepts and usage - Audio session types: The API supports several audio session types, which specify the type of audio an application is producing: - `"auto"` — The default. The user agent automatically chooses the best type based on the audio APIs being used. - `"playback"` — For media pla...
[ 0.45706284046173096, -0.06157238781452179, -1.544651746749878, 1.049592137336731, -0.05795888602733612, -0.6659714579582214, 0.20575517416000366, 1.0115926265716553, -0.15079791843891144, 0.2555221915245056, 0.058238908648490906, 0.0806225836277008, 0.38015085458755493, 0.04670079052448273...
api/audio_session_api/index.md
API - Audio Session API - Interfaces: - `AudioSession` (experimental): The main interface for controlling audio session behavior, including setting the audio session type.
[ -0.21240779757499695, -0.123836450278759, -0.40772750973701477, 0.7415684461593628, -0.5287662744522095, -0.6936580538749695, 0.3631506860256195, -0.04124688357114792, 0.3906768262386322, 0.5680616497993469, -0.40880101919174194, -0.1109330952167511, 0.32337895035743713, -0.258634746074676...
api/audio_session_api/index.md
API - Audio Session API - Interfaces - Extensions to other interfaces: - `Navigator.audioSession` (read only) (experimental): Returns the `AudioSession` object for the current document.
[ 0.13452978432178497, 0.18278370797634125, -0.1822822093963623, 0.7905430197715759, -0.5819294452667236, -0.9958867430686951, 0.6638897061347961, 0.14468435943126678, -0.07726697623729706, 0.4417833387851715, -0.11559930443763733, 0.1860910803079605, 0.34333327412605286, -0.0313756540417671...
api/audio_session_api/index.md
API - Audio Session API - Examples - Setting up a video conferencing audio session: In a video conferencing application, both playback and recording are required simultaneously; this is something the Audio Session API can help with. First, we set the audio session type to `"play-and-record"` to inform the platform th...
[ 0.9226424098014832, -0.17632359266281128, -1.5096439123153687, 0.8497695326805115, 0.24718165397644043, -0.45116668939590454, 0.6159678101539612, 1.199281096458435, -0.1027536615729332, 0.2121465504169464, 0.21988514065742493, 0.15752394497394562, 0.4868888258934021, 0.017612271010875702, ...
api/window/index.md
API - Window: The `Window` interface represents a window containing a `DOM` document; the `document` property points to the DOM document loaded in that window. A window for a given document can be obtained using the `document.defaultView` property. A global variable, `window`, representing the window in which the sc...
[ 0.2837647497653961, 0.6855294108390808, -0.1852072775363922, 0.20287032425403595, 0.10286353528499603, -1.362623691558838, 0.768913745880127, 1.206087589263916, -0.3153994083404541, 0.4041835367679596, -0.13443627953529358, 0.2900884449481964, -0.023852352052927017, 1.0420091152191162, -...
api/window/index.md
API - Window - Instance properties: This interface inherits properties from the `EventTarget` interface. Note that properties which are objects (e.g., for overriding the prototype of built-in elements) are listed in a separate section below. - `Window.caches` (read only) (secure context): Returns the `CacheStorage` ...
[ 0.4216855466365814, 0.5863507390022278, -0.21367831528186798, 0.3363710641860962, 0.39683932065963745, -0.46015289425849915, 0.6197975277900696, 1.4533556699752808, -0.04581550881266594, 0.19238576292991638, 0.10226437449455261, 0.8467957377433777, 0.06819623708724976, 0.6896898746490479, ...
api/window/index.md
API - Window - Instance properties - Deprecated properties: - `Window.event` (deprecated) (read only): Returns the current event, which is the event currently being handled by the JavaScript code's context, or `undefined` if no event is currently being handled. The `Event` object passed directly to event handlers shou...
[ -0.6020742058753967, 0.15755276381969452, 0.10933490097522736, 0.5159429311752319, -0.35483795404434204, -1.3639600276947021, 0.7191498875617981, 0.5323089957237244, 0.2698749005794525, 0.4907437562942505, -0.6097095608711243, 0.44275903701782227, 0.33597615361213684, 0.7431190609931946, ...
api/window/index.md
API - Window - Instance methods: This interface inherits methods from the `EventTarget` interface. - `Window.atob()`: Decodes a string of data which has been encoded using base-64 encoding. - `Window.alert()`: Displays an alert dialog. - `Window.blur()` (deprecated): Sets focus away from the window. - `Window.btoa()`...
[ -0.2099047303199768, 0.04022974893450737, -0.31153708696365356, 0.4311637580394745, 0.7502836585044861, -0.5099358558654785, 1.1725621223449707, 1.1556109189987183, -0.42593756318092346, -0.048037875443696976, -0.4094567596912384, 0.23291617631912231, 0.00025453604757785797, 0.852592110633...
api/window/index.md
API - Window - Instance methods - Deprecated methods: - `Window.captureEvents()` (deprecated): Registers the window to capture all events of the specified type. - `Window.clearImmediate()` (non-standard) (deprecated): Cancels the repeated execution set using `setImmediate()`. - `Window.releaseEvents()` (deprecated): R...
[ 0.19755108654499054, -0.015741217881441116, -0.4237130880355835, 0.4721848964691162, 0.05163745582103729, -1.7119157314300537, 0.4310609698295593, 0.8833173513412476, 0.4752177596092224, 0.5426045656204224, -0.798618733882904, 0.30526718497276306, -0.05466800183057785, 0.4951077699661255, ...
api/window/index.md
API - Window - Events: Listen to these events using `addEventListener()` or by assigning an event listener to the `oneventname` property of this interface. In addition to the events listed below, many events can bubble from the `Document` contained in the window object. - `error`: Fired when a resource failed to load...
[ 0.6341032385826111, -0.13454601168632507, -0.12402638047933578, 0.5308083891868591, -0.19324205815792084, -1.3088371753692627, -0.01885921135544777, 0.276340514421463, 0.8731040954589844, -0.3332732021808624, 0.04519065469503403, -0.24127928912639618, -0.09809532016515732, 0.48711991310119...
api/window/index.md
API - Window - Events - Connection events: - `offline`: Fired when the browser has lost access to the network and the value of `navigator.onLine` has switched to `false`. - `online`: Fired when the browser has gained access to the network and the value of `navigator.onLine` has switched to `true`.
[ 0.2138919085264206, -0.3888667821884155, -0.21839620172977448, 0.05681728571653366, 0.0670280009508133, -1.3663173913955688, -0.17367194592952728, 0.22921398282051086, 0.622170627117157, 0.23678900301456451, -0.3560725748538971, 0.08839614689350128, 0.14279326796531677, 0.4229820668697357,...
api/window/index.md
API - Window - Events - Device orientation events: - `devicemotion` (secure context): Fired at a regular interval, indicating the amount of physical force of acceleration the device is receiving and the rate of rotation, if available. - `deviceorientation` (secure context): Fired when fresh data is available from the ...
[ 0.6022233963012695, -0.6711875796318054, -0.7744165658950806, 0.03225099295377731, -0.2745317816734314, -0.8784143924713135, 0.39969727396965027, 1.1630275249481201, -0.02468758448958397, 0.5165529251098633, -0.07859864830970764, 0.16355468332767487, 0.005567215383052826, 0.998677730560302...
api/window/index.md
API - Window - Events - Focus events: - `blur`: Fired when an element has lost focus. - `focus`: Fired when an element has gained focus.
[ -0.0024562326725572348, -0.024601977318525314, -0.39100533723831177, -0.49810510873794556, 0.0359182208776474, -1.0514017343521118, 0.4927123188972473, 0.07651984691619873, -0.5481955409049988, 0.46799468994140625, -0.44850245118141174, 0.22133409976959229, -0.2395462542772293, 1.528604269...
api/window/index.md
API - Window - Events - Gamepad events: - `gamepadconnected`: Fired when the browser detects that a gamepad has been connected or the first time a button/axis of the gamepad is used. - `gamepaddisconnected`: Fired when the browser detects that a gamepad has been disconnected.
[ -0.19668744504451752, -0.5708913207054138, -1.3366576433181763, 0.6198416352272034, -0.4194444715976715, -1.6091454029083252, 0.71534663438797, 0.06534890830516815, 0.16565442085266113, 0.694729745388031, -0.46632447838783264, 0.1322193443775177, -0.10652924329042435, 0.5718995332717896, ...
api/window/index.md
API - Window - Events - History events: - `hashchange`: Fired when the fragment identifier of the URL has changed (the part of the URL beginning with and following the `#` symbol). - `pagehide`: Sent when the browser hides the current document while in the process of switching to displaying in its place a different do...
[ -0.2978470027446747, -0.5966439247131348, -0.0218210332095623, 0.12237466871738434, 0.02865331619977951, -0.8317979574203491, 0.20346352458000183, 0.7043538689613342, 0.8495383858680725, 0.35796308517456055, -0.3354148864746094, -0.3646172285079956, 0.05073017627000809, 0.16258348524570465...
api/window/index.md
API - Window - Events - Load & unload events: - `beforeunload`: Fired when the window, the document and its resources are about to be unloaded. - `load`: Fired when the whole page has loaded, including all dependent resources such as stylesheets images. - `unload`: Fired when the document or a child resource is being ...
[ 0.12050607800483704, 0.1167483925819397, -0.5371266603469849, 0.33818450570106506, -0.2802015244960785, -0.7833448648452759, 0.14529907703399658, 0.5828718543052673, 0.6865004897117615, 0.06991173326969147, 0.027181580662727356, 0.1035972535610199, 0.25087907910346985, 0.5758741497993469, ...
api/window/index.md
API - Window - Events - Manifest events: - `appinstalled`: Fired when the browser has successfully installed a page as an application. - `beforeinstallprompt`: Fired when a user is about to be prompted to install a web application.
[ -0.3588610887527466, 0.025519419461488724, -0.3125521242618561, 0.2625926733016968, -0.5384204387664795, -1.6473356485366821, 0.501633882522583, 0.38426196575164795, 0.10780373215675354, 0.9416371583938599, 0.0064437054097652435, 0.09679070115089417, 0.16423052549362183, 0.6472431421279907...
api/window/index.md
API - Window - Events - Messaging events: - `message`: Fired when the window receives a message, for example from a call to `Window.postMessage()` from another browsing context. - `messageerror`: Fired when a `Window` object receives a message that can't be deserialized.
[ 0.320957213640213, 0.2886868417263031, 0.11591443419456482, -0.04107532650232315, 0.22183126211166382, -1.6227301359176636, -0.13152918219566345, 0.5340091586112976, 0.3768630921840668, 0.01321076788008213, 0.20974470674991608, -0.09173406660556793, 0.29190218448638916, 0.8094274401664734,...
api/window/index.md
API - Window - Events - Print events: - `afterprint`: Fired after the associated document has started printing or the print preview has been closed. - `beforeprint`: Fired when the associated document is about to be printed or previewed for printing.
[ -0.1315891593694687, -0.04736366495490074, -0.03377697244286537, -0.08949083834886551, -0.005860604345798492, -1.0720531940460205, 0.025978531688451767, 0.5583742260932922, 0.06726324558258057, 0.728088915348053, -0.5864248275756836, 0.11629408597946167, -0.03616081550717354, 0.86693024635...
api/window/index.md
API - Window - Events - Promise rejection events: - `rejectionhandled`: Sent every time a JavaScript `Promise` is rejected, regardless of whether or not there is a handler in place to catch the rejection. - `unhandledrejection`: Sent when a JavaScript `Promise` is rejected but there is no handler in place to catch the...
[ -0.2709279954433441, -0.5557522177696228, 0.051160432398319244, 0.4414278566837311, -0.01447143405675888, -1.2973560094833374, 0.3977583348751068, 0.6289839148521423, -0.5568684339523315, 0.2072778195142746, -0.3972495198249817, 1.0104070901870728, 0.3506513237953186, 0.9306290745735168, ...
api/window/index.md
API - Window - Events - Scroll events: - `scrollsnapchange` (experimental): Fired on the scroll container at the end of a scrolling operation when a new scroll snap target has been selected. - `scrollsnapchanging` (experimental): Fired on the scroll container when the browser determines a new scroll snap target is pen...
[ -0.37442564964294434, -0.3091892898082733, -0.29832974076271057, 0.04044991731643677, 0.18115267157554626, -1.5315942764282227, -0.08261820673942566, 1.3097665309906006, -0.2312525063753128, 0.5560945272445679, 0.708081066608429, 0.530031144618988, -0.07217228412628174, 0.8132389783859253,...
api/window/index.md
API - Window - Events - Deprecated events: - `orientationchange` (deprecated): Fired when the orientation of the device has changed. - `vrdisplayactivate` (deprecated) (non-standard): Fired when a display is able to be presented to. - `vrdisplayconnect` (deprecated) (non-standard): Fired when a compatible VR device ha...
[ 0.1950923651456833, -0.47007426619529724, -0.07579534500837326, 0.45087844133377075, -0.4175538718700409, -1.1467326879501343, 0.533778727054596, 1.0247256755828857, 0.5599602460861206, 0.7203724384307861, -0.38215357065200806, -0.0748787522315979, 0.001333814114332199, 0.6036078929901123,...
api/window/index.md
API - Window - Events - Bubbled events: Not all events that bubble can reach the `Window` object. Only the following do and can be listened for on the `Window` object: - `abort` - `auxclick` - `beforeinput` - `beforematch` - `beforetoggle` - `cancel` - `canplay` - `canplaythrough` - `change` - `click` - `close` - `co...
[ -0.030684206634759903, -0.02658473327755928, -0.5722418427467346, 0.39827263355255127, -0.3591207265853882, -0.7777712345123291, 0.7057941555976868, 0.9950666427612305, 0.5476635694503784, 0.36003732681274414, -0.32861655950546265, -0.49994805455207825, -0.167436420917511, 0.01884418725967...
api/window/index.md
API - Window - Interfaces: See DOM Reference.
[ 0.07267595827579498, -0.29185643792152405, -0.80483478307724, -0.40895089507102966, -0.9506519436836243, -0.35280898213386536, 1.4460816383361816, 0.6343412399291992, 0.4905654191970825, 0.2330503761768341, 0.42869341373443604, 0.09457600116729736, 0.6889047622680664, 0.8196779489517212, ...
api/window/index.md
API - Window - Listening for events on Window: HTML elements have three ways to listen for events: - Add an event listener to the element using the `EventTarget.addEventListener` method. - Assign an event handler to the element's `oneventname` property in JavaScript. - Add an `on`-prefixed attribute to the element in...
[ 0.3008788228034973, -0.008408237248659134, 0.02432795614004135, 0.44256407022476196, -0.1320904791355133, -1.3273769617080688, 0.8315345644950867, 0.32260861992836, 0.08440497517585754, 0.45465993881225586, -0.49719083309173584, 0.5644187927246094, -0.2514672577381134, 0.11158180236816406,...
api/window/rejectionhandled_event/index.md
API - Window - rejectionhandled event: The `rejectionhandled` event is sent to the script's global scope (usually `window` but also `Worker`) whenever a rejected JavaScript `Promise` is handled late, i.e., when a handler is attached to the promise after its rejection had caused an `unhandledrejection` event. This can...
[ -0.4076157808303833, 0.046739183366298676, 0.01269044354557991, 0.13544271886348724, 0.31713178753852844, -1.2739219665527344, 0.3311174213886261, 1.4314875602722168, -0.4923100471496582, 0.2760390341281891, -0.09441076219081879, 1.0175726413726807, 0.4762169122695923, 1.0901494026184082, ...
api/window/rejectionhandled_event/index.md
API - Window - rejectionhandled event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("rejectionhandled", (event) => { }) onrejectionhandled = (event) => { }
[ 0.19804713129997253, -0.18416690826416016, 0.20747239887714386, 0.820668637752533, 0.027573786675930023, -1.4132534265518188, -0.03158724308013916, 0.7060892581939697, 0.38657867908477783, 0.5363696813583374, -0.5274138450622559, 0.41628825664520264, -0.07172256708145142, 0.394228041172027...
api/window/rejectionhandled_event/index.md
API - Window - rejectionhandled event - Event type: A `PromiseRejectionEvent`. Inherits from `Event`.
[ -0.45341113209724426, -0.16318975389003754, 0.6298854947090149, 0.380409836769104, -0.20556414127349854, -1.2799097299575806, 0.2884118854999542, 0.5952936410903931, 0.06081874668598175, 0.663460373878479, 0.04726389795541763, 0.3981799781322479, -0.1337987184524536, 0.5058766603469849, ...
api/window/rejectionhandled_event/index.md
API - Window - rejectionhandled event - Event handler aliases: In addition to the `Window` interface, the event handler property `onrejectionhandled` is also available on the following targets: - `HTMLBodyElement` - `HTMLFrameSetElement` - `SVGSVGElement`
[ -0.5480343699455261, 0.3799217939376831, 0.48788946866989136, 0.5669708251953125, 0.16282761096954346, -1.687300443649292, -0.2463730126619339, 0.3733207583427429, 0.6638741493225098, 0.5802198648452759, -0.024395477026700974, 0.8316968083381653, 0.22088342905044556, 0.4813852906227112, ...
api/window/rejectionhandled_event/index.md
API - Window - rejectionhandled event - Example: You can use the `rejectionhandled` event to log promises that get rejected to the console, along with the reasons why they were rejected: Example: window.addEventListener("rejectionhandled", (event) => { console.log(`Promise rejected; reason: ${event.reason}`); });
[ 0.10623043775558472, 0.2012881487607956, -0.029312310740351677, 0.44493961334228516, -0.26708048582077026, -1.8125653266906738, 0.28019824624061584, 0.3747508227825165, -0.09520208835601807, 0.3601747453212738, 0.23268064856529236, 0.46186935901641846, 0.408448189496994, 0.5089207887649536...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event: The `unhandledrejection` event is sent to the global scope of a script when a JavaScript `Promise` that has no rejection handler is rejected; typically, this is the `window`, but may also be a `Worker`. This is useful for debugging and for providing fallback error handling for...
[ -0.8765670657157898, 0.2440822720527649, -0.25973862409591675, 0.7956379652023315, -0.1473335474729538, -1.8443427085876465, 0.16975729167461395, 0.6740642786026001, -0.3796868324279785, 0.3117433786392212, -0.6898011565208435, 0.7406088709831238, 0.2894878089427948, 1.0969011783599854, ...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("unhandledrejection", (event) => { }) onunhandledrejection = (event) => { }
[ -0.179364874958992, -0.146570086479187, 0.058665767312049866, 0.5794088244438171, -0.17919549345970154, -1.2769418954849243, -0.05663519352674484, 0.8850747346878052, 0.6922003626823425, 0.3692285120487213, -0.3386719226837158, 0.5274208784103394, -0.10126656293869019, 0.6539656519889832, ...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Event type: A `PromiseRejectionEvent`. Inherits from `Event`.
[ -0.9132890105247498, 0.012191955000162125, 0.5726941823959351, 0.27691033482551575, -0.34987717866897583, -1.236494779586792, 0.22141537070274353, 0.883489191532135, 0.22009804844856262, 0.45689353346824646, 0.08674746006727219, 0.5623583793640137, -0.06919167935848236, 0.4971656799316406,...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Event handler aliases: In addition to the `Window` interface, the event handler property `onunhandledrejection` is also available on the following targets: - `HTMLBodyElement` - `HTMLFrameSetElement` - `SVGSVGElement`
[ -0.5098692178726196, 0.4466707706451416, 0.34558427333831787, 0.9050029516220093, -0.028139427304267883, -1.6970314979553223, -0.2706618010997772, 0.3290324807167053, 0.8785187005996704, 0.15419447422027588, 0.08240348845720291, 0.5769933462142944, 0.4923068881034851, 0.5171061158180237, ...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Usage notes: Allowing the `unhandledrejection` event to bubble will eventually result in an error message being output to the console. You can prevent this by calling `preventDefault()` on the `PromiseRejectionEvent`; see Preventing default handling below for an example. Beca...
[ -0.9148167371749878, 0.041351743042469025, -0.01691325008869171, 0.32889556884765625, -0.01618153601884842, -1.4783226251602173, -0.04064002260565758, 0.6348200440406799, 0.31417375802993774, 0.27427977323532104, -0.14123937487602234, 0.2576863467693329, 0.4489787220954895, 0.2070745229721...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Examples - Basic error logging: This example logs information about the unhandled promise rejection to the console. Example: window.addEventListener("unhandledrejection", (event) => { console.warn(`UNHANDLED PROMISE REJECTION: ${event.reason}`); }); You can also use the `...
[ -0.1391448825597763, -0.167170450091362, -0.40433523058891296, 0.8714507818222046, -0.03954220935702324, -1.461248755455017, 0.42343005537986755, 0.8984547853469849, 0.19142451882362366, 0.21559366583824158, 0.35784459114074707, 0.35465288162231445, 0.23447388410568237, 0.626173734664917, ...
api/window/unhandledrejection_event/index.md
API - Window - unhandledrejection event - Examples - Preventing default handling: Many environments (such as `Node.js`) report unhandled promise rejections to the console by default. You can prevent that from happening by adding a handler for `unhandledrejection` events that—in addition to any other tasks you wish to ...
[ 0.19172197580337524, 0.2244545817375183, -0.23611126840114594, 0.554937481880188, 0.39271560311317444, -1.0895664691925049, 0.4816836714744568, 1.4189738035202026, -0.4745675325393677, 0.46439129114151, 0.00660058856010437, 0.7076870799064636, 0.04717496037483215, 0.616973340511322, 0.35...
api/window/deviceorientationabsolute_event/index.md
API - Window - deviceorientationabsolute event: Secure context: This feature is available only in secure contexts (HTTPS). The `deviceorientationabsolute` event is fired when absolute device orientation changes. This event is not cancelable and does not bubble.
[ -0.2334384322166443, -0.16636765003204346, -0.23480224609375, 0.3467195928096771, -0.5040786266326904, -1.244006872177124, 0.09271795302629471, 0.19210302829742432, 0.14480675756931305, 0.3719964623451233, -0.07805471122264862, 0.5264853239059448, 0.33603498339653015, -0.01387123391032219,...
api/window/deviceorientationabsolute_event/index.md
API - Window - deviceorientationabsolute event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("deviceorientationabsolute", (event) => { }) ondeviceorientationabsolute = (event) => { }
[ 0.3711196482181549, -0.37778398394584656, -0.5273349285125732, 0.3061230480670929, -0.6201621294021606, -0.9437307715415955, 0.28365418314933777, 0.5113387703895569, 0.7039986848831177, 0.502249002456665, -0.4401964843273163, 0.22663846611976624, 0.19678907096385956, 0.4808274507522583, ...
api/window/deviceorientationabsolute_event/index.md
API - Window - deviceorientationabsolute event - Event type: A `DeviceOrientationEvent`. Inherits from `Event`.
[ 0.186609148979187, -0.21050934493541718, -0.34754425287246704, -0.012828197330236435, -1.0318197011947632, -1.0019657611846924, 0.4365687668323517, 0.13501743972301483, 0.2099335491657257, 0.6410545110702515, 0.04008523374795914, -0.06562282890081406, 0.29071754217147827, 0.564402282238006...
api/window/popstate_event/index.md
API - Window - popstate event: The `popstate` event of the `Window` interface is fired when the active history entry changes while the user navigates the session history. It changes the current history entry to that of the last page the user visited or, if `history.pushState()` has been used to add a history entry to ...
[ 0.06676631420850754, -0.21855735778808594, -0.36338135600090027, 0.3269106447696686, -0.6740438938140869, -0.5899903178215027, 0.5367493629455566, 0.5661135315895081, 0.09982620179653168, 0.4862000048160553, -0.8952620029449463, 0.1636035293340683, 0.5551387667655945, 0.15144915878772736, ...
api/window/popstate_event/index.md
API - Window - popstate event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("popstate", (event) => { }) onpopstate = (event) => { }
[ 0.1273750364780426, -0.27155551314353943, -0.26167792081832886, 0.2565041780471802, -0.1611749231815338, -0.6274076104164124, -0.006904963403940201, 0.9691314697265625, 0.574050784111023, 0.23158137500286102, -0.9102560877799988, 0.7250421047210693, -0.003783218562602997, -0.13562552630901...
api/window/popstate_event/index.md
API - Window - popstate event - Event type: A `PopStateEvent`. Inherits from `Event`.
[ -0.13284717500209808, -0.32585281133651733, 0.18103158473968506, -0.2586819529533386, -0.668493926525116, -0.23961539566516876, 0.021704208105802536, 0.8664469122886658, -0.007320687174797058, 0.054124798625707626, -0.40170589089393616, 0.25708848237991333, 0.10476051270961761, -0.01937103...
api/window/popstate_event/index.md
API - Window - popstate event - Event handler aliases: In addition to the `Window` interface, the event handler property `onpopstate` is also available on the following elements: - `HTMLBodyElement` - `HTMLFrameSetElement` - `SVGSVGElement`
[ -0.7177954912185669, 0.38389965891838074, 0.13888044655323029, 0.3189239799976349, -0.09887134283781052, -1.2714070081710815, -0.152418851852417, 0.745268702507019, 0.23457029461860657, 0.027180474251508713, -0.2731701135635376, 0.7333181500434875, 0.28971853852272034, 0.005276858806610107...
api/window/popstate_event/index.md
API - Window - popstate event - The history stack: If the history entry being activated was created by a call to `history.pushState()` or was affected by a call to `history.replaceState()`, the `popstate` event's `state` property contains a copy of the history entry's state object. These methods and their correspondi...
[ 0.7253158688545227, -0.34869956970214844, -0.3051384389400482, 0.31698551774024963, 0.561086118221283, -0.27744022011756897, 0.1649799793958664, 1.6545110940933228, -0.7106907963752747, 0.18494142591953278, -0.5850748419761658, 0.5777319669723511, 0.18745815753936768, 0.11264997720718384, ...
api/window/popstate_event/index.md
API - Window - popstate event - When popstate is sent: It's important to first understand that — to combat unwanted pop-ups — browsers may not fire the `popstate` event at all unless the page has been interacted with. This section describes the steps that browsers follow in the cases where they do potentially fire th...
[ 0.1347070038318634, -0.4278714060783386, -0.10264613479375839, 0.8299030065536499, 0.33231914043426514, -0.2763310670852661, 0.658117413520813, 1.368534803390503, -0.5877504348754883, 0.4663083851337433, 0.23617002367973328, 0.5677215456962585, 0.24777251482009888, 0.36548295617103577, -...
api/window/popstate_event/index.md
API - Window - popstate event - Examples: A page at `http://example.com/example.html` running the following code will generate logs as indicated: Example: window.addEventListener("popstate", (event) => { console.log( `location: ${document.location}, state: ${JSON.stringify(event.state)}`, ); }); history.push...
[ -0.17366565763950348, -0.21975447237491608, -0.2748629152774811, 0.1638302505016327, 0.08944627642631531, -0.3598625361919403, -0.6767256259918213, 0.7726823091506958, -0.22767901420593262, 0.5125003457069397, -0.6932314038276672, 0.530795693397522, 0.20995527505874634, 0.24676522612571716...
api/window/storage_event/index.md
API - Window - storage event: The `storage` event of the `Window` interface fires when another document that shares the same storage area (either `localStorage` or `sessionStorage`) as the current window updates that storage area. The event is not fired on the window that made the change. - For `localStorage`, the ev...
[ 0.8584317564964294, -0.31341350078582764, 0.242692768573761, 0.060173049569129944, 0.0931243896484375, -1.1276006698608398, 0.24001875519752502, 2.002478837966919, 0.3559442162513733, 0.028854282572865486, 0.8028874397277832, 0.6681879758834839, -0.3343121409416199, 1.3377643823623657, -...
api/window/storage_event/index.md
API - Window - storage event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("storage", (event) => { }) onstorage = (event) => { }
[ 0.700024425983429, -0.19651257991790771, -0.14227527379989624, 0.555807888507843, -0.27201047539711, -1.584648609161377, -0.3183671236038208, 1.126052975654602, 0.7388234734535217, -0.31697896122932434, -0.3366428017616272, 0.565645158290863, -0.5006520748138428, 0.2092238962650299, 0.44...
api/window/storage_event/index.md
API - Window - storage event - Event type: A `StorageEvent`. Inherits from `Event`.
[ 0.21412335336208344, -0.17283836007118225, -0.24785269796848297, 0.03149434179067612, -0.9205578565597534, -1.3409818410873413, -0.17272262275218964, 0.8927898406982422, 0.3087010979652405, 0.050532691180706024, 0.22004294395446777, 0.21227458119392395, -0.3973711133003235, 0.4874162077903...
api/window/storage_event/index.md
API - Window - storage event - Event handler aliases: In addition to the `Window` interface, the event handler property `onstorage` is also available on the following targets: - `HTMLBodyElement` - `HTMLFrameSetElement` - `SVGSVGElement`
[ -0.3558788597583771, 0.4371202290058136, 0.268502414226532, 0.490719199180603, -0.05189760401844978, -1.8785675764083862, -0.29116329550743103, 0.7400697469711304, 0.5764203071594238, -0.07754921913146973, 0.10907061398029327, 0.5185894966125488, -0.10812316089868546, 0.24108093976974487, ...
api/window/storage_event/index.md
API - Window - storage event - Examples: Log the `sampleList` item to the console when the `storage` event fires: Example: window.addEventListener("storage", () => { // When local storage changes, dump the list to // the console. console.log(JSON.parse(window.localStorage.getItem("sampleList"))); }); The same...
[ 0.4543277323246002, -0.18997526168823242, -0.15817071497440338, 0.5873392820358276, -0.15418517589569092, -1.7753489017486572, 0.07074593752622604, 0.9781590700149536, 0.6434187889099121, -0.15952551364898682, 0.07436466962099075, 0.5310348868370056, -0.30102118849754333, 0.394875168800354...
api/window/messageerror_event/index.md
API - Window - messageerror event: The `messageerror` event is fired on a `Window` object when it receives a message that can't be deserialized. This event is not cancellable and does not bubble.
[ -0.43347978591918945, 0.31010839343070984, 0.1716158539056778, -0.31109023094177246, -0.1229591965675354, -1.5454866886138916, 0.19893097877502441, 0.4246525466442108, 0.2402837872505188, -0.22935424745082855, -0.010459285229444504, -0.31962892413139343, 0.41763216257095337, 0.521554172039...
api/window/messageerror_event/index.md
API - Window - messageerror event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("messageerror", (event) => { }) onmessageerror = (event) => { }
[ 0.03851096332073212, 0.02170933410525322, 0.11764557659626007, -0.3051100969314575, -0.13562792539596558, -1.2069141864776611, 0.07761873304843903, 0.8348824977874756, -0.03468402475118637, -0.003938877955079079, -0.297581285238266, 0.2691476345062256, 0.06696335226297379, 0.36319470405578...
api/window/messageerror_event/index.md
API - Window - messageerror event - Event type: A `MessageEvent`. Inherits from `Event`.
[ 0.15443135797977448, 0.14777176082134247, -0.27192312479019165, -0.3996998071670532, -0.6127038598060608, -0.8596526980400085, 0.26720738410949707, 0.5980388522148132, 0.04528539627790451, 0.06234951317310333, 0.2085585594177246, 0.38868987560272217, 0.1462017148733139, 0.4179851710796356,...
api/window/messageerror_event/index.md
API - Window - messageerror event - Examples: Listen for `messageerror` using `addEventListener()`: Example: window.addEventListener("messageerror", (event) => { console.error(event); }); The same, but using the `onmessageerror` event handler property: Example: window.onmessageerror = (event) => { console.err...
[ -0.2116224467754364, 0.25238826870918274, -0.34520861506462097, -0.5235535502433777, 0.17677274346351624, -1.0656781196594238, 0.512832760810852, 0.4752201437950134, 0.43291300535202026, -0.12687459588050842, 0.028034977614879608, -0.053251855075359344, 0.27026233077049255, 0.9013820290565...
api/window/pageswap_event/index.md
API - Window - pageswap event: The `pageswap` event is fired when you navigate across documents, when the previous document is about to unload. This is useful in the case of cross-document (MPA) view transitions for manipulating an active transition from the outbound page of a navigation. For example, you might wish ...
[ -0.7008675336837769, -0.15997834503650665, -0.44306251406669617, 0.2954355478286743, -0.12016564607620239, -0.6650537848472595, 0.8385710120201111, 1.0406551361083984, -0.11120320111513138, 0.9778680801391602, -0.04914295673370361, 0.42844992876052856, 0.09113253653049469, 0.85098189115524...
api/window/pageswap_event/index.md
API - Window - pageswap event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("pageswap", (event) => { }) onpageswap = (event) => { }
[ -0.09341790527105331, -0.03730040043592453, -0.5618993043899536, 0.42605409026145935, -0.10726533830165863, -1.187760591506958, 0.28549724817276, 0.8234853148460388, 0.5300998091697693, 0.32132306694984436, -0.45717182755470276, 0.7068055868148804, -0.1721617728471756, 0.131733700633049, ...
api/window/pageswap_event/index.md
API - Window - pageswap event - Event type: A `PageSwapEvent`. Inherits from `Event`.
[ -0.14178785681724548, -0.07321113348007202, -0.3172967731952667, 0.0058522336184978485, -0.6925009489059448, -0.6557399034500122, 0.4812234044075012, 0.886008620262146, 0.2926656901836395, 0.4313690960407257, 0.21971237659454346, 0.5022631287574768, -0.006852347403764725, 0.430463254451751...
api/window/pageswap_event/index.md
API - Window - pageswap event - Examples: Example: window.addEventListener("pageswap", async (e) => { // Only run this if an active view transition exists if (e.viewTransition) { const currentUrl = e.activation.from?.url ? new URL(e.activation.from.url) : null; const targetUrl = new URL(e.acti...
[ -0.30633974075317383, -0.2746550142765045, 0.24444043636322021, 0.45142078399658203, 0.36839133501052856, -0.823524534702301, 1.160168170928955, 0.8506066799163818, -0.4755164086818695, 0.744151771068573, 0.1932377964258194, 0.6766254305839539, -0.22420774400234222, 0.24206730723381042, ...
api/window/scroll/index.md
API - Window - scroll: The `scroll()` method of the `Window` interface scrolls the window to a particular place in the document.
[ -0.5903337597846985, 0.3793477714061737, -0.5694167017936707, 0.2403387725353241, -0.31680870056152344, -1.1319819688796997, 0.6150082349777222, -0.46173959970474243, 0.1585981845855713, 0.090117447078228, -0.32873818278312683, -0.30558305978775024, 0.6576781272888184, 0.625524640083313, ...
api/window/scroll/index.md
API - Window - scroll - Syntax: Example: scroll(xCoord, yCoord) scroll(options)
[ -0.8998011350631714, 0.3919089138507843, -0.9264261722564697, -0.5423406958580017, -0.9061577916145325, -0.4038713872432709, 0.7333759069442749, 0.7751012444496155, 0.5665727853775024, -0.5584792494773865, 0.3507575988769531, -0.06917960941791534, -0.10280122607946396, 0.7086357474327087, ...
api/window/scroll/index.md
API - Window - scroll - Syntax - Parameters: - `xCoord`: The pixel along the horizontal axis of the document that you want displayed in the upper left. - `yCoord`: The pixel along the vertical axis of the document that you want displayed in the upper left. - `options`: An object containing the following properties: ...
[ -1.0176188945770264, -0.6755503416061401, -0.5220187902450562, 0.4937478303909302, -0.23655931651592255, -1.065089225769043, 0.2988240718841553, 0.1098608672618866, 0.667528510093689, 0.36873939633369446, -0.06310512125492096, -0.22264394164085388, 0.46126219630241394, 0.9881619215011597, ...
api/window/scroll/index.md
API - Window - scroll - Syntax - Return value: A `Promise` that fulfills with an object containing the following property: - `interrupted`: A boolean value indicating whether the scrolling operation was interrupted (`true`) or not (`false`). Such an interruption typically happens when a programmatic scroll is ongoing...
[ -0.7739330530166626, 0.38356149196624756, -0.19579219818115234, 0.3845912516117096, 0.06541186571121216, -1.3091990947723389, 0.4848438501358032, 0.5134726762771606, -0.23825454711914062, 0.30069130659103394, -0.11778073012828827, 0.26065847277641296, 0.09646047651767731, 0.630707919597625...
api/window/scroll/index.md
API - Window - scroll - Examples - Basic usage: Example: // Put the 100th vertical pixel at the top of the window window.scroll(0, 100); Using `options`: Example: window.scroll({ top: 100, left: 100, behavior: "smooth", });
[ -1.3057615756988525, -0.25177377462387085, -0.3123381435871124, 0.44431430101394653, -0.508557915687561, -1.1440218687057495, 0.668359637260437, 0.1202135980129242, -0.05550680682063103, 0.23466958105564117, 0.05587846040725708, 0.12228064239025116, 0.8246365785598755, 0.564265787601471, ...
api/window/scroll/index.md
API - Window - scroll - Examples - Responding to the end of the scroll: Our window methods demo (see source code) demonstrates how the promise return value of `scroll()` can be used to respond to the end of a scrolling operation. This technique is mostly useful in cases where the scrolling occurs smoothly over time (a...
[ -0.6092988848686218, 0.17865164577960968, -0.449897825717926, 0.37410932779312134, -0.37491467595100403, -1.3771171569824219, 0.6009587645530701, 0.6277893781661987, 0.13576285541057587, 0.5480977892875671, 0.29491519927978516, 0.18411904573440552, 0.4792214632034302, 0.7387048006057739, ...
api/window/scroll/index.md
API - Window - scroll - Examples - Responding to the end of the scroll - HTML: Our HTML includes several paragraphs of content and a `div` element toolbar containing `button` elements that trigger various scrolling operations on the window. Example: <div> <button class="scroll">scroll() to 1000</button> <button ...
[ -1.4049348831176758, -0.4542548656463623, -0.2747754454612732, 0.777132511138916, -0.21834976971149445, -1.1045644283294678, 0.1626020222902298, 0.2656395137310028, -0.08805309236049652, 0.7531232237815857, -0.002156676724553108, 0.014909438788890839, 0.09402348846197128, 0.489356815814971...
api/window/scroll/index.md
API - Window - scroll - Examples - Responding to the end of the scroll - CSS: We give the `:root` element a `scroll-behavior` property value of `smooth` so that any scroll operations are animated smoothly over time rather than instantly. Example: :root { scroll-behavior: smooth; } We also create two class selecto...
[ -0.5031029582023621, -0.483969122171402, -0.25018051266670227, 0.15502890944480896, 0.4538378119468689, -1.5901131629943848, 0.688538670539856, 0.7245429754257202, -0.23322977125644684, 0.9464432001113892, 0.22631022334098816, -0.888688325881958, 0.45796117186546326, 0.16986794769763947, ...
api/window/scroll/index.md
API - Window - scroll - Examples - Responding to the end of the scroll - JavaScript: We start by grabbing references to the `<button>` that runs the `scroll()` operation and the toolbar `<div>`: Example: const scrollBtn = document.querySelector(".scroll"); const toolbar = document.querySelector("div"); Next, we def...
[ -0.51894611120224, -0.16500674188137054, -0.3723948299884796, 0.15210409462451935, 0.34867221117019653, -0.6708647012710571, 0.13519281148910522, 0.7722679972648621, 0.2385319471359253, 0.4652213752269745, -0.4501720666885376, 0.17428168654441833, -0.2569136619567871, 0.4296071231365204, ...
api/window/scroll/index.md
API - Window - scroll - Examples - Responding to the end of the scroll - Aside on feature detection: If you run this example in a browser that doesn't support promise-returning scroll operations, the scroll operations are still smooth, but the toolbar doesn't fade out and then fade back in once the operation is finish...
[ -0.0487457737326622, 0.04354425519704819, -0.9426705837249756, 0.5304494500160217, 0.41481083631515503, -1.2386507987976074, -0.0797174870967865, 1.1807050704956055, 0.3794821798801422, 0.5355706810951233, -0.0005904324352741241, -0.03728959709405899, 0.4395630359649658, 0.6729122400283813...
api/window/scrollby/index.md
API - Window - scrollBy: The `scrollBy()` method of the `Window` interface scrolls the document in the window by the given amount.
[ -0.6424520015716553, 0.5217640399932861, -0.3457132875919342, 0.31282567977905273, -0.47427815198898315, -1.2700293064117432, 0.4258158206939697, -0.15640214085578918, -0.08649159967899323, 0.027379002422094345, -0.44650503993034363, 0.10175208747386932, 0.5889856219291687, 0.5392659902572...
api/window/scrollby/index.md
API - Window - scrollBy - Syntax: Example: scrollBy(xCoord, yCoord) scrollBy(options)
[ -1.0173836946487427, 0.8421182036399841, -0.7543377876281738, -0.4148731231689453, -0.9663509130477905, -0.048330795019865036, 0.2828112840652466, 0.8677349090576172, 0.3999876081943512, -0.7097764611244202, 0.5308699607849121, -0.26795893907546997, 0.394638329744339, 0.5904354453086853, ...
api/window/scrollby/index.md
API - Window - scrollBy - Syntax - Parameters: - `xCoord`: The horizontal pixel value that you want to scroll by. - `yCoord`: The vertical pixel value that you want to scroll by. - `options`: An object containing the following properties: - `top` (optional): Specifies the number of pixels along the Y axis to scroll ...
[ -0.30556827783584595, -0.46877285838127136, -1.1420044898986816, 0.11713714897632599, 0.2567412257194519, -0.7154777646064758, 0.8749775290489197, 1.1610081195831299, 0.05095548927783966, 0.3911787271499634, 0.22868221998214722, -0.15447300672531128, 0.4470563530921936, 1.0228475332260132,...
api/window/scrollby/index.md
API - Window - scrollBy - Syntax - Return value: A `Promise` that fulfills with an object containing the following property: - `interrupted`: A boolean value indicating whether the scrolling operation was interrupted (`true`) or not (`false`). Such an interruption typically happens when a programmatic scroll is ongoi...
[ -0.8576548099517822, 0.26698800921440125, -0.04055260494351387, 0.5058173537254333, -0.184763103723526, -1.3205217123031616, 0.2711814343929291, 0.48757022619247437, -0.20344844460487366, 0.2563639283180237, -0.20208725333213806, 0.35102379322052, 0.4133179187774658, 0.5499571561813354, ...