file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
api/element/compositionend_event/index.md | API - Element - compositionend event - Examples - Live example - HTML:
Example:
<div class="control">
<p>First select textbox, then to open IME:</p>
<ul>
<li>on macOS type <kbd>option</kbd> + <kbd>`</kbd></li>
<li>on Windows type <kbd>windows</kbd> + <kbd>.</kbd></li>
</ul>
<label for="example">Exampl... | [
0.08986365050077438,
0.02351417765021324,
-0.07856737822294235,
0.13755440711975098,
-0.24633370339870453,
-1.4852877855300903,
0.29722124338150024,
-0.07417917251586914,
0.28060439229011536,
0.5544885396957397,
-1.0029642581939697,
-0.013405479490756989,
-0.22289404273033142,
0.5432380437... |
api/element/compositionend_event/index.md | API - Element - compositionend event - Examples - Live example - JavaScript:
Example:
const inputElement = document.querySelector('input[type="text"]');
const log = document.querySelector(".event-log-contents");
const clearLog = document.querySelector(".clear-log");
clearLog.addEventListener("click", () => {
log.t... | [
0.4284009337425232,
-0.48934751749038696,
-0.08465702831745148,
0.7305447459220886,
0.13448713719844818,
-1.6044881343841553,
0.3047018051147461,
0.4618324637413025,
-0.4854291081428528,
0.6195846199989319,
0.04857603460550308,
-0.04096977412700653,
0.09741707146167755,
-0.1452387422323227... |
api/element/gotpointercapture_event/index.md | API - Element - gotpointercapture event:
The `gotpointercapture` event is fired when an element captures a pointer using `setPointerCapture()`. | [
0.28053128719329834,
-0.32126984000205994,
-0.25464582443237305,
-0.3246211111545563,
-0.536037802696228,
-1.3206145763397217,
0.42586731910705566,
0.5832569003105164,
-0.35787853598594666,
-0.37624531984329224,
-0.20384955406188965,
0.1723509579896927,
-0.33702999353408813,
0.582956016063... |
api/element/gotpointercapture_event/index.md | API - Element - gotpointercapture event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("gotpointercapture", (event) => { })
ongotpointercapture = (event) => { } | [
0.7711508274078369,
-0.16335426270961761,
-0.5292924046516418,
-0.24872253835201263,
-0.13469910621643066,
-1.2618385553359985,
0.21840731799602509,
0.6076034903526306,
0.010004676878452301,
0.1257675588130951,
-0.2537863254547119,
0.2702958583831787,
-0.40377768874168396,
0.29855978488922... |
api/element/gotpointercapture_event/index.md | API - Element - gotpointercapture event - Event type:
A `PointerEvent`. Inherits from `Event`. | [
0.29085835814476013,
-0.32470884919166565,
-0.14711932837963104,
-0.3356843590736389,
-0.7701176404953003,
-1.0026350021362305,
-0.10588028281927109,
0.72018963098526,
-0.0844159945845604,
0.11731291562318802,
-0.029464807361364365,
0.470254123210907,
-0.3011741042137146,
0.120672106742858... |
api/element/gotpointercapture_event/index.md | API - Element - gotpointercapture event - Examples:
This example gets a `<p>` element and listens for the `gotpointercapture` event. It then calls `setPointerCapture()` on the element on a `pointerdown` event, which will trigger `gotpointercapture`.
Example:
const para = document.querySelector("p");
para.addEventLi... | [
0.893546998500824,
-0.6559390425682068,
0.08782478421926498,
0.2771046459674835,
-0.30599236488342285,
-1.3221319913864136,
-0.1868198961019516,
0.8044173717498779,
0.03613733500242233,
0.19585567712783813,
-0.2195379137992859,
-0.1553984135389328,
-0.39856570959091187,
0.37218374013900757... |
api/element/webkitmouseforceup_event/index.md | API - Element - webkitmouseforceup event:
Non-standard: This feature is not standardized.
The non-standard `webkitmouseforceup` event is fired by Safari at an `Element` some time after the `webkitmouseforcedown` event, when pressure on the button has been reduced sufficiently to end the "force click".
`webkitmousefo... | [
0.5207423567771912,
-0.34673985838890076,
-0.5570721626281738,
-0.00738278403878212,
0.024811021983623505,
-1.5259641408920288,
0.7522568702697754,
1.0642820596694946,
0.267696738243103,
0.5963070392608643,
0.4439837634563446,
1.1211274862289429,
-0.6838551163673401,
0.4449787735939026,
... |
api/element/webkitmouseforceup_event/index.md | API - Element - webkitmouseforceup event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("webkitmouseforceup", (event) => { })
onwebkitmouseforceup = (event) => { } | [
0.3165481984615326,
-0.3766525685787201,
-0.5238019227981567,
-0.02471339702606201,
-0.4666723310947418,
-2.212092161178589,
0.6700518727302551,
0.706659197807312,
0.0907631367444992,
-0.0510256290435791,
-0.3533056378364563,
0.40102460980415344,
-0.20525971055030823,
-0.27538442611694336,... |
api/element/webkitmouseforceup_event/index.md | API - Element - webkitmouseforceup event - Event type:
A `MouseEvent`. Inherits from `UIEvent` and `Event`. | [
-0.20726875960826874,
-0.3921175003051758,
-0.81658935546875,
-0.3828012943267822,
-0.6458027362823486,
-1.2747986316680908,
0.3577117621898651,
0.5336095690727234,
0.44523346424102783,
0.05593053624033928,
0.292991042137146,
0.5976765751838684,
-0.024613507091999054,
-0.05171632766723633,... |
api/element/click_event/index.md | API - Element - click event:
An element receives a `click` event when any of the following occurs:
- A pointing-device button (such as a mouse's primary button) is both pressed and released while the pointer is located inside the element.
- A touch gesture is performed on the element.
- Any user interaction that is e... | [
0.6978172659873962,
-0.5763113498687744,
-0.7134499549865723,
0.6087369322776794,
0.02106500416994095,
-1.1468006372451782,
0.7262173891067505,
0.6664187908172607,
0.029424965381622314,
0.7982463240623474,
0.3120712339878082,
0.6550635695457458,
0.22116205096244812,
0.5712869763374329,
-... |
api/element/click_event/index.md | API - Element - click event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("click", (event) => { })
onclick = (event) => { } | [
0.5791926980018616,
-0.46985965967178345,
-0.2998546063899994,
-0.2712860107421875,
0.005341261625289917,
-1.1007232666015625,
0.4623751640319824,
0.33840301632881165,
-0.0323781855404377,
0.042746759951114655,
-0.3112507462501526,
0.2957168221473694,
-0.1815861314535141,
-0.03420405834913... |
api/element/click_event/index.md | API - Element - click event - Event type:
A `PointerEvent`. Inherits from `MouseEvent`.
Note: In earlier versions of the specification, the event type for this event was a `MouseEvent`. Check browser compatibility for more information. | [
0.445797860622406,
-0.6396927833557129,
-0.47100964188575745,
0.38459688425064087,
-0.389193058013916,
-1.6320208311080933,
0.7296958565711975,
0.5388323664665222,
0.06548157334327698,
0.8507180213928223,
0.4661341607570648,
0.49347764253616333,
0.22652289271354675,
-0.10346093773841858,
... |
api/element/click_event/index.md | API - Element - click event - Usage notes:
The `PointerEvent` object passed into the event handler for `click` has its `detail` property set to the number of times the `target` was clicked. In other words, `detail` will be 2 for a double-click, 3 for triple-click, and so forth. This counter resets after a short interv... | [
0.8194127082824707,
-0.7940622568130493,
-0.9395753741264343,
-0.07968012988567352,
-0.20467740297317505,
-1.059609055519104,
0.944386899471283,
0.9154384136199951,
-0.3609943687915802,
0.6127384901046753,
0.2531282901763916,
1.165000081062317,
0.1178419291973114,
0.4639105200767517,
-0.... |
api/element/click_event/index.md | API - Element - click event - Examples:
This example displays the number of consecutive clicks on a `button`. | [
-0.26122987270355225,
-0.28553253412246704,
-0.20002314448356628,
-0.07459906488656998,
-0.670731246471405,
-0.7628995180130005,
0.37121355533599854,
0.23513084650039673,
-0.04311525449156761,
0.3660299777984619,
-0.077053502202034,
0.6777662634849548,
0.1695982813835144,
0.562838852405548... |
api/element/click_event/index.md | API - Element - click event - Examples - HTML:
Example:
<button>Click</button> | [
-0.28996384143829346,
0.2717759609222412,
0.1506696343421936,
-0.12317139655351639,
-0.15483364462852478,
-1.2579588890075684,
0.1893402487039566,
-0.02803926356136799,
-0.9084252119064331,
0.2983348071575165,
0.03696567565202713,
0.46909981966018677,
0.04340989142656326,
0.240517377853393... |
api/element/click_event/index.md | API - Element - click event - Examples - JavaScript:
Example:
const button = document.querySelector("button");
button.addEventListener("click", (event) => {
button.textContent = `Click count: ${event.detail}`;
}); | [
0.15672706067562103,
-0.5090909600257874,
-0.39112573862075806,
0.39738330245018005,
-0.08702167868614197,
-1.0787458419799805,
0.13249288499355316,
-0.1101333424448967,
-0.5208961367607117,
0.5918481945991516,
-0.5788720846176147,
0.5664855241775513,
0.060902975499629974,
0.34436208009719... |
api/element/keydown_event/index.md | API - Element - keydown event:
The `keydown` event is fired when a key is pressed.
Unlike the deprecated `keypress` event, the `keydown` event is fired for all keys, regardless of whether they produce a character value.
The `keydown` and `keyup` events provide a code indicating which key is pressed, while `keypress`... | [
0.7399095296859741,
-0.12165224552154541,
-0.21804550290107727,
-0.13910913467407227,
0.2249043583869934,
-1.2844822406768799,
0.9749658107757568,
0.7483361959457397,
0.22414633631706238,
0.8545777797698975,
-0.36362728476524353,
0.08089733123779297,
-0.394226998090744,
0.4190170168876648,... |
api/element/keydown_event/index.md | API - Element - keydown event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("keydown", (event) => { })
onkeydown = (event) => { } | [
0.6191594004631042,
-0.19376865029335022,
-0.18006311357021332,
-0.3008825182914734,
-0.028431899845600128,
-1.2109204530715942,
0.40930506587028503,
0.7002630829811096,
0.35356998443603516,
0.09806392341852188,
-0.6058501601219177,
0.46724408864974976,
-0.40672221779823303,
0.321219265460... |
api/element/keydown_event/index.md | API - Element - keydown event - Event type:
A `KeyboardEvent`. Inherits from `UIEvent` and `Event`. | [
0.15492284297943115,
-0.03654490411281586,
-0.644047200679779,
-0.5813091993331909,
-0.4841582775115967,
-0.7468398809432983,
0.3243696689605713,
0.10573942959308624,
-0.16491934657096863,
0.19479604065418243,
0.24808034300804138,
0.46887415647506714,
-0.008769238367676735,
0.5797331333160... |
api/element/keydown_event/index.md | API - Element - keydown event - Examples - addEventListener keydown example:
This example logs the `KeyboardEvent.code` value whenever you press down a key inside the `input` element.
Example:
<input placeholder="Click here, then press down a key." size="40" />
<p id="log"></p>
Example:
const input = document.quer... | [
0.7751434445381165,
-0.5016052722930908,
-0.8208009004592896,
0.07389763742685318,
-0.13912859559059143,
-0.8822486400604248,
0.6385195255279541,
0.6013494729995728,
-0.5936559438705444,
0.529554009437561,
0.06619218736886978,
0.1416400969028473,
-0.008098861202597618,
0.5758136510848999,
... |
api/element/keydown_event/index.md | API - Element - keydown event - Examples - keydown events with IME:
Since Firefox 65, the `keydown` and `keyup` events are now fired during `Input method editor` composition, to improve cross-browser compatibility for CJKT users (Firefox bug 354358). To ignore all `keydown` events that are part of composition, do some... | [
0.7980784773826599,
-0.47570469975471497,
-0.08265809714794159,
0.602475106716156,
0.4908055067062378,
-1.6828490495681763,
0.4548093378543854,
1.1678931713104248,
-0.7307403683662415,
0.7034432888031006,
-0.28101444244384766,
0.058019958436489105,
-0.24203713238239288,
0.6650556325912476,... |
api/element/startviewtransition/index.md | API - Element - startViewTransition:
The `startViewTransition()` method of the `Element` interface starts a new same-document (`SPA`) element-scoped view transition and returns a `ViewTransition` object to represent it.
The sequence of steps followed when `startViewTransition()` is invoked is explained in the view tr... | [
0.33373433351516724,
-0.424242228269577,
-0.3397851884365082,
0.3994050621986389,
-0.025738373398780823,
-1.5171613693237305,
0.6920806169509888,
0.939061164855957,
-0.3325801193714142,
0.6521115899085999,
0.16443201899528503,
-0.33899807929992676,
0.7719846963882446,
1.0521786212921143,
... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Syntax:
Example:
startViewTransition()
startViewTransition(updateCallback)
startViewTransition(options) | [
-0.08031870424747467,
-0.42457008361816406,
0.02926941215991974,
0.008448459208011627,
-0.4499973952770233,
-1.1313427686691284,
0.24221324920654297,
0.3539983630180359,
0.19649353623390198,
-0.2412552535533905,
0.29128211736679077,
-0.5767539739608765,
0.5049587488174438,
1.19166636466979... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Syntax - Parameters:
- `updateCallback` (optional): A callback function invoked to update the element's DOM tree during the SPA view transition process. It returns a `Promise`. The callback is invoked once the API has taken a snapshot of the current page. When the promise returned... | [
0.27770623564720154,
-0.32921624183654785,
-0.13340024650096893,
0.3062528073787689,
-0.2559822201728821,
-1.4443025588989258,
1.2272188663482666,
1.0080714225769043,
-0.00930621474981308,
0.43993914127349854,
-0.014297392219305038,
-0.39291912317276,
0.544667661190033,
0.7312805652618408,... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Syntax - Return value:
A `ViewTransition` object instance. | [
0.14779433608055115,
-0.576412558555603,
-0.2528647184371948,
0.09963828325271606,
-0.11934211850166321,
-1.2348963022232056,
0.38812899589538574,
0.6817628741264343,
-0.09875676035881042,
0.25427672266960144,
0.27551397681236267,
-0.10121890157461166,
0.7498941421508789,
1.048500299453735... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Description:
Calling `Element.startViewTransition()` on an element creates a view transition scoped to that element's DOM subtree. Any DOM changes performed inside the `startViewTransition()` callback will transition only if those updates happen inside the calling element's DOM su... | [
0.3726746141910553,
-0.4921681880950928,
-0.4509662985801697,
0.5714646577835083,
0.43083250522613525,
-0.9632099866867065,
1.0122219324111938,
1.2238281965255737,
-0.4705910384654999,
0.5750395059585571,
0.10368700325489044,
0.2351265251636505,
0.21106524765491486,
0.8510459065437317,
-... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Examples:
See Using element-scoped view transitions for more examples. | [
0.02227536030113697,
-0.003956340253353119,
0.1586933434009552,
0.17755864560604095,
-0.31996071338653564,
-0.452283650636673,
0.3930141031742096,
0.9916564226150513,
-0.37667277455329895,
0.03147289156913757,
0.6895217299461365,
-0.442751944065094,
0.2986205816268921,
0.8709276914596558,
... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Examples - Animating a slideshow:
This is a basic example of using an element-scoped view transition to smoothly animate the DOM changes to a slideshow when a button is clicked. | [
0.0245706457644701,
-0.614254355430603,
-0.15891152620315552,
-0.1718699038028717,
0.14447341859340668,
-1.0416057109832764,
0.5910772681236267,
0.27297767996788025,
0.044964082539081573,
0.16064247488975525,
0.034086085855960846,
0.36520954966545105,
0.09530933201313019,
0.549355268478393... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Examples - Animating a slideshow - HTML:
The HTML includes a `section` element to represent the slideshow, a `button` to press to change the slide content, and some surrounding `p` content.
Example:
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Donec a diam lec... | [
-0.36485451459884644,
-0.6609167456626892,
0.1815216988325119,
-0.12886223196983337,
0.3282182812690735,
-1.6228095293045044,
0.32313889265060425,
0.5410024523735046,
0.2790140211582184,
0.5447731018066406,
-0.14861106872558594,
0.40917161107063293,
-0.1514168083667755,
0.3879440426826477,... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Examples - Animating a slideshow - CSS:
The CSS uses flexbox to center the slide's content and sets the `animation-duration` of the view transition to `1s` via the `::view-transition-group` pseudo-element.
Example:
html {
font-family: sans-serif;
}
section {
height: 200px;
... | [
-0.1471654772758484,
-0.574942946434021,
-0.12375839054584503,
-0.1117943599820137,
-0.2088976800441742,
-0.9206932187080383,
0.35250452160835266,
0.7180362939834595,
0.029669061303138733,
0.3059876561164856,
0.33933553099632263,
-0.28863146901130676,
0.5122780203819275,
0.6639642715454102... |
api/element/startviewtransition/index.md | API - Element - startViewTransition - Examples - Animating a slideshow - JavaScript:
The script starts by grabbing references to the `<section>` and `<button>` elements and adding a `click` event listener to the button.
Example:
const slide = document.querySelector("section");
const btn = document.querySelector("but... | [
-0.32939988374710083,
-0.25001323223114014,
-0.03010292537510395,
0.27663299441337585,
0.20675763487815857,
-0.5676431655883789,
0.3853747546672821,
1.4522489309310913,
0.03613030165433884,
0.7981727719306946,
-0.14353005588054657,
0.07804547250270844,
-0.08657127618789673,
0.0510726198554... |
api/element/touchmove_event/index.md | API - Element - touchmove event:
The `touchmove` event is fired when one or more touch points are moved along the touch surface. | [
-0.05968870222568512,
-0.1655842512845993,
-0.7260884642601013,
-0.24563072621822357,
-0.37683412432670593,
-1.1230745315551758,
0.25120195746421814,
-0.23591360449790955,
-0.15659183263778687,
0.5495381355285645,
0.24920478463172913,
0.026628948748111725,
-0.042420122772455215,
0.53674858... |
api/element/touchmove_event/index.md | API - Element - touchmove event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("touchmove", (event) => { })
ontouchmove = (event) => { } | [
0.8729782104492188,
-0.22070743143558502,
-0.7295750379562378,
0.04466037452220917,
-0.29505106806755066,
-1.2429273128509521,
0.3724108338356018,
0.529022753238678,
0.09903579950332642,
0.31615304946899414,
-0.12587089836597443,
0.39814838767051697,
0.04165806621313095,
0.0331471115350723... |
api/element/touchmove_event/index.md | API - Element - touchmove event - Event type:
A `TouchEvent`. Inherits from `Event`. | [
0.5724152326583862,
-0.21778003871440887,
-0.8303907513618469,
-0.4910183250904083,
-0.42773112654685974,
-1.1292202472686768,
0.10775189101696014,
0.16146059334278107,
-0.0682605430483818,
0.6368239521980286,
0.10091884434223175,
0.2497335970401764,
0.28678035736083984,
0.2057852149009704... |
api/element/touchmove_event/index.md | API - Element - touchmove event - Examples:
Code samples for those events are available on the dedicated page: Touch events. | [
0.3557557165622711,
0.03430818393826485,
-0.8767303228378296,
-0.6167790293693542,
-0.16983836889266968,
-1.2966978549957275,
0.28269293904304504,
0.3791252374649048,
-0.4090149402618408,
0.802152156829834,
0.6115576028823853,
0.9512877464294434,
-0.0734827071428299,
0.7994486689567566,
... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event:
The `animationiteration` event is fired when an iteration of a CSS Animation ends, and another one begins. This event does not occur at the same time as the `animationend` event, and therefore does not occur for animations with an `animation-iteration-count` of one. | [
-0.0620034895837307,
-0.7115797400474548,
-0.16743692755699158,
0.141831636428833,
-0.07920912653207779,
-1.70439612865448,
0.11131788790225983,
0.13202495872974396,
-0.45555782318115234,
0.1723618507385254,
-0.09095849096775055,
-0.3938852846622467,
-0.06891557574272156,
0.710108816623687... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("animationiteration", (event) => { })
onanimationiteration = (event) => { } | [
0.6067769527435303,
-0.559696614742279,
-0.031870171427726746,
0.02052030712366104,
-0.16890349984169006,
-1.0548770427703857,
0.3058750331401825,
0.5001559853553772,
-0.12640134990215302,
-0.19417230784893036,
-0.06738661229610443,
-0.03818358853459358,
-0.23842759430408478,
0.33744651079... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Event type:
An `AnimationEvent`. Inherits from `Event`. | [
0.3042369782924652,
-0.4274323284626007,
-0.04551040381193161,
-0.3102148771286011,
-0.821600615978241,
-0.8414815664291382,
0.09226423501968384,
0.5480318665504456,
-0.47108277678489685,
-0.11942113935947418,
0.03536490350961685,
-0.11207330226898193,
-0.22693222761154175,
0.2004152536392... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Examples:
This code uses `animationiteration` to keep track of the number of iterations an animation has completed:
Example:
const animated = document.querySelector(".animated");
let iterationCount = 0;
animated.addEventListener("animationiteration", () => {
iterationCo... | [
0.776861310005188,
-0.6778439283370972,
-0.20828422904014587,
0.18132078647613525,
-0.03719246760010719,
-1.377517580986023,
0.08560638129711151,
0.6271844506263733,
-0.5576103925704956,
-0.20441186428070068,
-0.1846427023410797,
-0.10309534519910812,
-0.277080774307251,
0.3216517567634582... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Examples - Live example - HTML:
Example:
<div class="animation-example">
<div class="container">
<p class="animation">You chose a cold night to visit our planet.</p>
</div>
<button class="activate" type="button">Activate animation</button>
<div class="event-log">... | [
0.1276424080133438,
-0.6163140535354614,
0.3134744465351105,
0.38480326533317566,
-0.4763721525669098,
-1.4331823587417603,
0.5560305118560791,
0.04953739047050476,
-1.1284114122390747,
0.19104976952075958,
-0.3323056399822235,
-0.22055211663246155,
-0.36305204033851624,
0.0720694363117218... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Examples - Live example - CSS:
Example:
.container {
height: 3rem;
}
.event-log {
width: 25rem;
height: 2rem;
border: 1px solid black;
margin: 0.2rem;
padding: 0.2rem;
}
.animation.active {
animation-duration: 2s;
animation-name: slide-in;
animation-itera... | [
-0.14719444513320923,
-0.9027290940284729,
-0.1812388300895691,
-0.1776946783065796,
-0.14509285986423492,
-0.734344482421875,
-0.23991332948207855,
0.5014828443527222,
-0.6045017838478088,
0.292633980512619,
0.23864173889160156,
0.6804282665252686,
0.015364918857812881,
0.2372415065765380... |
api/element/animationiteration_event/index.md | API - Element - animationiteration event - Examples - Live example - JavaScript:
Example:
const animation = document.querySelector("p.animation");
const animationEventLog = document.querySelector(
".animation-example>.event-log",
);
const applyAnimation = document.querySelector(
".animation-example>button.activat... | [
0.5159316062927246,
-0.6548055410385132,
0.07150448858737946,
0.5647599101066589,
-0.0012346133589744568,
-1.13837730884552,
0.24813592433929443,
0.688277542591095,
-0.22537730634212494,
0.3346523940563202,
-0.4537089169025421,
-0.26409661769866943,
-0.5217031836509705,
0.21756264567375183... |
api/element/keypress_event/index.md | API - Element - keypress event:
Deprecated: This feature is no longer recommended.
The `keypress` event is fired when a letter, number, punctuation, or symbol key is pressed, or else when the Enter key is pressed — including when the Enter key is pressed in combination with the Shift key or Ctrl key. Otherwise, when ... | [
0.46923360228538513,
-0.09308524429798126,
-0.6248271465301514,
0.05639088898897171,
-0.3050556778907776,
-1.125251054763794,
0.6539610028266907,
0.8695362210273743,
0.10473446547985077,
0.6740450263023376,
0.08074025064706802,
0.029570303857326508,
0.40167558193206787,
0.36213621497154236... |
api/element/keypress_event/index.md | API - Element - keypress event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("keypress", (event) => { })
onkeypress = (event) => { } | [
0.9064643979072571,
-0.22045192122459412,
-0.9619432091712952,
0.28995057940483093,
-0.15155932307243347,
-1.387757420539856,
0.10158033668994904,
0.45099547505378723,
-0.007957980036735535,
0.4141509234905243,
-0.23267221450805664,
0.23050233721733093,
-0.031807053834199905,
0.25146350264... |
api/element/keypress_event/index.md | API - Element - keypress event - Event type:
A `KeyboardEvent`. Inherits from `UIEvent` and `Event`. | [
0.6316737532615662,
-0.14051860570907593,
-1.39523446559906,
-0.4523584544658661,
-0.2932266592979431,
-0.6059362888336182,
0.2103290855884552,
0.14485718309879303,
-0.3920483887195587,
0.21341417729854584,
0.5770785808563232,
0.07549799978733063,
0.4266901910305023,
0.7210391759872437,
... |
api/element/keypress_event/index.md | API - Element - keypress event - Examples - addEventListener keypress example:
This example logs the `KeyboardEvent.code` value whenever you press a key after focussing the `input` element.
To see which keys cause a `keypress` event to fire, and which keys don't, try pressing the following:
- letter keys, number key... | [
0.6109246611595154,
-0.39074599742889404,
-0.6450043320655823,
0.5819348096847534,
0.18881970643997192,
-1.351689100265503,
0.9266727566719055,
0.864997386932373,
-0.4229847192764282,
0.340289831161499,
0.4095640182495117,
-0.11757134646177292,
0.004991617053747177,
0.18008965253829956,
... |
api/element/keypress_event/index.md | API - Element - keypress event - Examples - onkeypress equivalent:
Example:
input.onkeypress = logKey; | [
0.40986621379852295,
0.3016604781150818,
-0.7199647426605225,
-0.38557884097099304,
0.01756586879491806,
-1.10019052028656,
-0.1847706139087677,
0.10528293251991272,
-0.2339441478252411,
0.034448809921741486,
0.2806876301765442,
-0.4126936197280884,
0.2775735557079315,
0.254276305437088,
... |
api/element/touchstart_event/index.md | API - Element - touchstart event:
The `touchstart` event is fired when one or more touch points are placed on the touch surface. | [
0.1813182830810547,
-0.24557480216026306,
-0.741621732711792,
-0.4804338216781616,
-0.2865259051322937,
-1.0081069469451904,
0.3866615295410156,
0.17082884907722473,
-0.0893600806593895,
0.47261446714401245,
0.03474849462509155,
0.27873387932777405,
0.026158839464187622,
0.4812724590301513... |
api/element/touchstart_event/index.md | API - Element - touchstart event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("touchstart", (event) => { })
ontouchstart = (event) => { } | [
0.9394717812538147,
-0.08734530210494995,
-0.8468207716941833,
-0.09807339310646057,
-0.3434000015258789,
-1.18392813205719,
0.21809114515781403,
0.6016973257064819,
0.23597058653831482,
0.3996241092681885,
-0.46666309237480164,
0.443240225315094,
-0.033523544669151306,
-0.1727710068225860... |
api/element/touchstart_event/index.md | API - Element - touchstart event - Event type:
A `TouchEvent`. Inherits from `Event`. | [
0.5287467837333679,
-0.10232517123222351,
-0.7761740684509277,
-0.5903342366218567,
-0.5107487440109253,
-1.1082721948623657,
-0.06285468488931656,
0.3685623109340668,
0.5463799238204956,
0.34137049317359924,
-0.5337632894515991,
0.41968342661857605,
-0.005261128768324852,
-0.0647913143038... |
api/element/touchstart_event/index.md | API - Element - touchstart event - Examples:
Code samples for those events are available on the dedicated page: Touch events. | [
0.22190386056900024,
0.0033600907772779465,
-0.699561357498169,
-0.8590020537376404,
-0.3146705627441406,
-1.0054333209991455,
0.36013394594192505,
0.5134299397468567,
-0.13344761729240417,
0.615369439125061,
0.214797243475914,
1.0031694173812866,
-0.1572236716747284,
0.39441755414009094,
... |
api/element/focus_event/index.md | API - Element - focus event:
The `focus` event fires when an element has received focus. The event does not bubble, but the related `focusin` event that follows does bubble.
The opposite of `focus` is the `blur` event, which fires when the element has lost focus.
The `focus` event is not cancelable. | [
-0.2800321578979492,
-0.24842993915081024,
-0.0859908014535904,
0.320063054561615,
-0.029768582433462143,
-1.68303644657135,
0.400983065366745,
0.41355910897254944,
-0.3309926390647888,
0.34717148542404175,
-0.5354480147361755,
0.1911555826663971,
-0.25071167945861816,
0.8410244584083557,
... |
api/element/focus_event/index.md | API - Element - focus event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("focus", (event) => { })
onfocus = (event) => { } | [
0.8702489137649536,
-0.31302139163017273,
-0.21335984766483307,
-0.4862010180950165,
-0.13464611768722534,
-1.0573904514312744,
0.18357816338539124,
0.5683674812316895,
0.10562996566295624,
-0.061235345900058746,
-0.6286474466323853,
0.49254727363586426,
-0.19048084318637848,
0.31230223178... |
api/element/focus_event/index.md | API - Element - focus event - Event type:
A `FocusEvent`. Inherits from `UIEvent` and `Event`. | [
0.07194039225578308,
-0.2588196098804474,
-0.6952901482582092,
-0.4442332088947296,
-0.5550547242164612,
-0.6940528154373169,
-0.0646219253540039,
0.2766548991203308,
-0.43999695777893066,
0.5879106521606445,
-0.011059317737817764,
0.9965918064117432,
0.010033726692199707,
0.75191897153854... |
api/element/focus_event/index.md | API - Element - focus event - Examples - Simple example - HTML:
Example:
<form id="form">
<label>
Some text:
<input type="text" placeholder="text input" />
</label>
<label>
Password:
<input type="password" placeholder="password" />
</label>
</form> | [
-0.3986395001411438,
-0.12347255647182465,
-0.07456906884908676,
-0.26586422324180603,
0.10333625972270966,
-0.8674590587615967,
0.46556389331817627,
-0.18999502062797546,
-0.44614899158477783,
-0.3188863694667816,
-0.21291057765483856,
-0.025138210505247116,
0.1903938502073288,
0.10208228... |
api/element/focus_event/index.md | API - Element - focus event - Examples - Simple example - JavaScript:
Example:
const password = document.querySelector('input[type="password"]');
password.addEventListener("focus", (event) => {
event.target.style.background = "pink";
});
password.addEventListener("blur", (event) => {
event.target.style.backgrou... | [
-0.1471022367477417,
-0.3637109100818634,
-0.40463465452194214,
-0.5189828276634216,
-0.29703330993652344,
-0.5154999494552612,
0.5264352560043335,
0.3019219934940338,
-0.42154625058174133,
0.07859797030687332,
-0.627487301826477,
0.17316403985023499,
-0.11197498440742493,
0.05540804564952... |
api/element/focus_event/index.md | API - Element - focus event - Examples - Event delegation:
There are two ways of implementing event delegation for this event: by using the `focusin` event, or by setting the `useCapture` parameter of `addEventListener()` to `true`. | [
0.6570147275924683,
-0.9532502889633179,
-0.2979571521282196,
0.40351220965385437,
-0.24513359367847443,
-0.957633376121521,
0.3869423270225525,
0.3993222713470459,
-0.10241040587425232,
0.5618129968643188,
-0.03875918313860893,
0.7153370976448059,
0.1755581796169281,
0.8958212733268738,
... |
api/element/focus_event/index.md | API - Element - focus event - Examples - Event delegation - HTML:
Example:
<form id="form">
<label>
Some text:
<input type="text" placeholder="text input" />
</label>
<label>
Password:
<input type="password" placeholder="password" />
</label>
</form> | [
-0.30631670355796814,
-0.3927590250968933,
0.3007422685623169,
-0.12621772289276123,
-0.11444457620382309,
-1.2474250793457031,
0.5829784274101257,
-0.24636785686016083,
-0.3606075048446655,
-0.1757565289735794,
0.20024380087852478,
-0.18184703588485718,
0.253615140914917,
0.31432542204856... |
api/element/focus_event/index.md | API - Element - focus event - Examples - Event delegation - JavaScript:
Example:
const form = document.getElementById("form");
form.addEventListener(
"focus",
(event) => {
event.target.style.background = "pink";
},
true,
);
form.addEventListener(
"blur",
(event) => {
event.target.style.backgroun... | [
-0.1424013376235962,
-0.7520650029182434,
0.05814468115568161,
-0.6624734401702881,
-0.4565220773220062,
-0.9071418046951294,
0.3906930983066559,
0.42763790488243103,
-0.7508081793785095,
0.6552197933197021,
-0.269350528717041,
0.4033268094062805,
0.05062051862478256,
0.18857504427433014,
... |
api/element/transitionend_event/index.md | API - Element - transitionend event:
The `transitionend` event is fired when a CSS transition has completed. In the case where a transition is removed before completion, such as if the `transition-property` is removed or `display` is set to `none`, then the event will not be generated.
The `transitionend` event is fi... | [
-0.07199341803789139,
-0.294205904006958,
-0.20108886063098907,
-0.08352476358413696,
0.6337111592292786,
-1.5244190692901611,
0.5398953557014465,
1.818001627922058,
-1.04896080493927,
0.9524060487747192,
0.6029907464981079,
0.3359811007976532,
-0.015568820759654045,
0.9272691011428833,
... |
api/element/transitionend_event/index.md | API - Element - transitionend event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("transitionend", (event) => { })
ontransitionend = (event) => { } | [
0.5571874380111694,
-0.3522314131259918,
-0.4359690546989441,
-0.006842285394668579,
0.05407889187335968,
-1.0808029174804688,
0.20422273874282837,
0.7717597484588623,
-0.11103072017431259,
0.15764537453651428,
-0.1838846355676651,
0.45801234245300293,
-0.053974397480487823,
0.243398755788... |
api/element/transitionend_event/index.md | API - Element - transitionend event - Event type:
A `TransitionEvent`. Inherits from `Event`. | [
0.3052522540092468,
0.06028224527835846,
-0.50250244140625,
-0.5630909204483032,
-0.46454179286956787,
-1.127240538597107,
0.1680421531200409,
0.6700500249862671,
0.06173555552959442,
-0.020373370498418808,
-0.05059729889035225,
-0.24056853353977203,
-0.0995292067527771,
0.5084971189498901... |
api/element/transitionend_event/index.md | API - Element - transitionend event - Examples:
This code gets an element that has a transition defined and adds a listener to the `transitionend` event:
Example:
const transition = document.querySelector(".transition");
transition.addEventListener("transitionend", () => {
console.log("Transition ended");
});
Th... | [
0.39255696535110474,
-0.2692936360836029,
-0.8388501405715942,
0.25123777985572815,
0.21325144171714783,
-1.2832982540130615,
0.09393240511417389,
0.41768878698349,
0.046722158789634705,
0.6623005270957947,
-0.15790195763111115,
-0.07172802835702896,
-0.020068932324647903,
0.55906623601913... |
api/element/transitionend_event/index.md | API - Element - transitionend event - Examples - Live example:
In the following example, we have a simple `div` element, styled with a transition that includes a delay:
Example:
<div class="transition">Hover over me</div>
<div class="message"></div>
Example:
.transition {
width: 100px;
height: 100px;
backgro... | [
-0.6492618918418884,
-0.5016648769378662,
0.3026890754699707,
-0.32550299167633057,
-0.16397014260292053,
-0.27765190601348877,
0.16548222303390503,
0.834532618522644,
-0.3397396206855774,
-0.10422132909297943,
-0.5652881264686584,
0.33307236433029175,
0.15286654233932495,
0.68626397848129... |
api/element/scrollto/index.md | API - Element - scrollTo:
The `scrollTo()` method of the `Element` interface scrolls to a particular set of coordinates inside a given element.
This method is an alias for `Element.scroll()`. | [
0.06389955431222916,
-0.30596163868904114,
-0.2767375111579895,
0.09496016800403595,
-0.0017010346055030823,
-1.874284029006958,
0.47343218326568604,
0.2527531087398529,
-0.0960712805390358,
0.12005507946014404,
-0.4383236765861511,
0.26676157116889954,
0.5253973007202148,
0.46023404598236... |
api/element/scrollto/index.md | API - Element - scrollTo - Syntax:
Example:
scrollTo(xCoord, yCoord)
scrollTo(options) | [
-0.7516293525695801,
0.5160224437713623,
-0.1843511462211609,
-0.36740314960479736,
-0.48837319016456604,
-1.0953612327575684,
0.4934026598930359,
0.8996962904930115,
0.26314738392829895,
-0.4580978453159332,
0.4122360348701477,
-0.15867963433265686,
-0.3110167384147644,
0.4794823527336120... |
api/element/scrollto/index.md | API - Element - scrollTo - Syntax - Parameters:
- `xCoord`: The x-coordinate of the element's scrollable content that you want the left edge of the element's scrollport to scroll to.
- `yCoord`: The y-coordinate of the element's scrollable content that you want the top edge of the element's scrollport to scroll to.
- ... | [
0.005294290371239185,
-0.7074013948440552,
-0.6036378741264343,
-0.18057753145694733,
0.3361513614654541,
-1.1222357749938965,
0.9354028105735779,
0.684784471988678,
-0.2536563277244568,
0.41520169377326965,
-0.1714828759431839,
0.1532178819179535,
0.139658123254776,
0.6008235216140747,
... |
api/element/scrollto/index.md | API - Element - scrollTo - 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 ongo... | [
-0.5712506175041199,
-0.31118857860565186,
0.0965229868888855,
0.40358078479766846,
-0.03725068271160126,
-1.2133017778396606,
0.3648274540901184,
0.41785383224487305,
-0.31877899169921875,
0.1469515562057495,
-0.157523974776268,
0.3543100357055664,
0.21054019033908844,
0.43063774704933167... |
api/element/scrollto/index.md | API - Element - scrollTo - Examples - Basic usage:
Example:
element.scrollTo(0, 1000);
Using `options`:
Example:
element.scrollTo({
top: 100,
left: 100,
behavior: "smooth",
}); | [
-0.5557678937911987,
-0.2660696804523468,
-0.16014589369297028,
0.12544430792331696,
-0.4218071699142456,
-1.1982916593551636,
0.524972140789032,
0.25068390369415283,
-0.4753274619579315,
-0.20014405250549316,
-0.3650875687599182,
-0.24647286534309387,
0.1964779794216156,
-0.25572389364242... |
api/element/scrollto/index.md | API - Element - scrollTo - Examples - Responding to the end of the scroll:
Our element methods demo (see source code) demonstrates how the promise return value of `scrollTo()` 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 t... | [
-0.35374927520751953,
-0.12102746963500977,
-0.24916942417621613,
0.196891188621521,
0.018468648195266724,
-1.4098050594329834,
1.0628626346588135,
0.7239061594009399,
-0.4961493909358978,
0.5649111866950989,
-0.0023282580077648163,
0.43271446228027344,
0.6336106657981873,
0.49430167675018... |
api/element/scrollto/index.md | API - Element - scrollTo - Examples - Responding to the end of the scroll - HTML:
Our HTML includes a `section` element containing several paragraphs of content and a `div` element toolbar containing `button` elements that trigger various scrolling operations on the `<section>`.
Example:
<div>
<button class="scrol... | [
-0.8030706644058228,
-0.4464952349662781,
0.06619788706302643,
0.8573493361473083,
0.23847666382789612,
-0.9153673052787781,
0.39000365138053894,
0.3602176606655121,
-0.20374396443367004,
0.7999020218849182,
-0.2002049684524536,
0.10892920196056366,
-0.09062538295984268,
0.5996721386909485... |
api/element/scrollto/index.md | API - Element - scrollTo - Examples - Responding to the end of the scroll - CSS:
We give the `<section>` element a fixed `height` and an `overflow-y` value of `scroll` so that it scrolls vertically, and set its `scroll-behavior` property to `smooth` so that any scroll operations are animated smoothly over time rather ... | [
-0.23903605341911316,
-0.6128438115119934,
-0.083733931183815,
0.1430499106645584,
0.3340734839439392,
-1.2508879899978638,
0.3958717882633209,
0.6031793355941772,
-0.14945805072784424,
1.1817529201507568,
-0.3481336534023285,
-0.5133284330368042,
0.1841931939125061,
0.1746852993965149,
... |
api/element/scrollto/index.md | API - Element - scrollTo - Examples - Responding to the end of the scroll - JavaScript:
We start by grabbing references to the `<button>` that runs the `scrollTo()` operation, the toolbar `<div>`, and the scrolling `<section>`:
Example:
const scrollToBtn = document.querySelector(".scroll-to");
const toolbar = docume... | [
-0.08745820075273514,
-0.3208138942718506,
-0.15838398039340973,
0.254615843296051,
0.26639169454574585,
-0.7544201612472534,
0.36078616976737976,
0.8515583276748657,
0.27612730860710144,
0.5230988264083862,
-0.6742026209831238,
0.24127134680747986,
-0.4151441752910614,
0.1461130976676941,... |
api/element/scrollto/index.md | API - Element - scrollTo - 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 fin... | [
-0.07478086650371552,
-0.06708376109600067,
-0.5233232975006104,
0.6673409342765808,
0.703136146068573,
-1.3804036378860474,
0.08879818022251129,
1.003688931465149,
-0.013162270188331604,
0.5661330819129944,
-0.23200549185276031,
-0.13946279883384705,
0.3921319544315338,
0.4831516742706299... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event:
The `mouseenter` event is fired at an `Element` when a pointing device (usually a mouse) is initially moved so that its hotspot is within the element at which the event was fired.
Note that "moving into an element" refers to the element's position in the DOM tree, not to its visual p... | [
0.6912992000579834,
-1.1346964836120605,
-0.7960760593414307,
-0.12308622151613235,
-0.2409307360649109,
-1.4594426155090332,
0.6474490761756897,
1.273396611213684,
0.07156576216220856,
0.6571572422981262,
0.18834690749645233,
0.5371565222740173,
0.21449655294418335,
0.12917514145374298,
... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("mouseenter", (event) => { })
onmouseenter = (event) => { } | [
0.9083300828933716,
-0.6580030918121338,
-0.5981391072273254,
-0.21996593475341797,
-0.058841340243816376,
-1.0811415910720825,
0.07939413189888,
0.2669638693332672,
0.8008059859275818,
-0.16146478056907654,
-0.23860059678554535,
0.09952771663665771,
-0.12499099224805832,
-0.30413389205932... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Event type:
A `MouseEvent`. Inherits from `UIEvent` and `Event`. | [
0.24516986310482025,
-0.4622746407985687,
-0.895478367805481,
-0.07446061819791794,
-0.4172733426094055,
-0.6944943070411682,
-0.05390680581331253,
0.005628237500786781,
0.45455682277679443,
-0.017017506062984467,
0.14516884088516235,
0.14217492938041687,
0.25684690475463867,
0.07895752787... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Usage notes:
Though similar to `mouseover`, `mouseenter` differs in that it doesn't bubble and it isn't sent to any descendants when the pointer is moved from one of its descendants' physical space to its own physical space. Other than that, enter and over events for the same situati... | [
-0.3366532623767853,
-0.4204695522785187,
-0.8121814131736755,
0.32098621129989624,
-0.3083600401878357,
-1.7250722646713257,
-0.2728425860404968,
0.10616704821586609,
0.8109979033470154,
-0.1310185045003891,
-0.19003267586231232,
0.07605552673339844,
0.0008840784430503845,
0.2272546291351... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Usage notes - Behavior of `mouseenter` events:
This describes the mouseenter events received by each of four concentric divs with no padding or margin, so the events all happen at the same time: One `mouseenter` event is sent to each element of the hierarchy when entering them. Here... | [
0.08031123876571655,
-0.7507248520851135,
-0.19372768700122833,
0.5119984745979309,
-0.21149520576000214,
-1.470850944519043,
0.4602849781513214,
0.3364492654800415,
0.10882571339607239,
0.3512864410877228,
0.0770123153924942,
-0.3151208460330963,
-0.10168489813804626,
0.24867793917655945,... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Usage notes - Behavior of `mouseover` events:
A single `mouseover` event is sent to the deepest element of the DOM tree, then it bubbles up the hierarchy until it is canceled by a handler or reaches the root.
With deep hierarchies, the number of `mouseenter` events sent can be quit... | [
0.3062426447868347,
-0.7302287817001343,
-0.5010202527046204,
-0.33765679597854614,
0.4468976855278015,
-1.1660099029541016,
0.2145838439464569,
1.3840571641921997,
-0.26351743936538696,
0.6767190098762512,
0.46948331594467163,
0.3749443590641022,
-0.07963483780622482,
0.33002233505249023,... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Examples:
The `mouseover` documentation has an example illustrating the difference between `mouseover` and `mouseenter`. | [
0.16712594032287598,
-0.296886682510376,
-0.4605861008167267,
-0.10342434048652649,
-0.7116878032684326,
-1.5650303363800049,
0.06455138325691223,
-0.10564836114645004,
0.615045428276062,
0.20862649381160736,
0.1790592074394226,
0.03557109087705612,
-0.045988284051418304,
0.185930103063583... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Examples - mouseenter:
The following trivial example uses the `mouseenter` event to change the border on the `div` when the mouse enters the space allotted to it. It then adds an item to the list with the number of the `mouseenter` or `mouseleave` event. | [
0.5063031315803528,
-0.020778480917215347,
-0.7494416832923889,
0.028537005186080933,
-0.20710067451000214,
-1.1630505323410034,
0.07367205619812012,
0.3327140212059021,
0.6553382277488708,
-0.056958310306072235,
-0.17570233345031738,
0.07898864150047302,
-0.7665787935256958,
0.39959782361... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Examples - mouseenter - HTML:
Example:
<div id="mouseTarget">
<ul id="unorderedList">
<li>No events yet!</li>
</ul>
</div> | [
-0.503004252910614,
-0.24430903792381287,
-0.20665737986564636,
-0.7117503881454468,
-0.3209075331687927,
-0.7777884602546692,
0.25270509719848633,
0.16222716867923737,
0.013940021395683289,
-0.30445724725723267,
-0.2094925343990326,
-0.37452811002731323,
-0.02781473845243454,
-0.064869523... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Examples - mouseenter - CSS:
Styling the `div` to make it more visible.
Example:
#mouseTarget {
box-sizing: border-box;
width: 15rem;
border: 1px solid #333333;
} | [
-0.04107890650629997,
-0.17261101305484772,
-0.5542349219322205,
-0.2988373935222626,
0.04926250874996185,
-1.138740062713623,
-0.03338097035884857,
-0.2749112546443939,
0.053506702184677124,
0.537678599357605,
-0.013392139226198196,
0.31630250811576843,
-0.243490532040596,
0.0521963387727... |
api/element/mouseenter_event/index.md | API - Element - mouseenter event - Examples - mouseenter - JavaScript:
Example:
let enterEventCount = 0;
let leaveEventCount = 0;
const mouseTarget = document.getElementById("mouseTarget");
const unorderedList = document.getElementById("unorderedList");
mouseTarget.addEventListener("mouseenter", (e) => {
mouseTarg... | [
0.20898932218551636,
-0.9443923234939575,
-0.5065948367118835,
0.4074154794216156,
-0.1287968009710312,
-1.128707766532898,
-0.010143399238586426,
0.68132084608078,
0.28139981627464294,
0.27536433935165405,
-0.47008994221687317,
0.17752790451049805,
-0.10467249900102615,
0.0505896881222724... |
api/element/gesturestart_event/index.md | API - Element - gesturestart event:
Non-standard: This feature is not standardized.
The `gesturestart` event is fired when multiple fingers contact the touch surface, thus starting a new gesture. During the gesture, `gesturechange` events will be fired. When the gesture has ended, a `gestureend` event will be fired.
... | [
0.1354244351387024,
-0.04903949424624443,
-0.6558603644371033,
-0.029248716309666634,
-0.05303549766540527,
-1.4674025774002075,
0.39983612298965454,
1.3411033153533936,
-0.2711218595504761,
0.2893448770046234,
0.23551487922668457,
0.9843268394470215,
-0.07995852828025818,
0.25558948516845... |
api/element/gesturestart_event/index.md | API - Element - gesturestart event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("gesturestart", (event) => { })
ongesturestart = (event) => { } | [
0.3250696063041687,
-0.5169357061386108,
-0.14039139449596405,
-0.730316162109375,
-0.11763919144868851,
-0.7520385980606079,
0.0724690780043602,
0.6684471964836121,
0.0032515302300453186,
-0.027349557727575302,
0.009557627141475677,
0.20671063661575317,
0.0027623362839221954,
-0.068796709... |
api/element/gesturestart_event/index.md | API - Element - gesturestart event - Event type:
A `GestureEvent`. Inherits from `Event`. | [
0.041466619819402695,
-0.04468031972646713,
-0.37623509764671326,
-0.5048917531967163,
-0.7580485939979553,
-0.8506245017051697,
0.17019107937812805,
0.6953601837158203,
0.21357682347297668,
0.19194543361663818,
0.002326853573322296,
0.3874432444572449,
-0.06349508464336395,
0.025788329541... |
api/element/pointerdown_event/index.md | API - Element - pointerdown event:
The `pointerdown` event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons pressed to at least one button pressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus mak... | [
0.7733630537986755,
-0.5704455375671387,
-0.6397851705551147,
-0.1469632089138031,
0.241729736328125,
-1.5574805736541748,
0.7520908117294312,
1.1596397161483765,
0.13127167522907257,
1.0071885585784912,
-0.4377085864543915,
0.17861634492874146,
-0.2801876664161682,
0.3007887005805969,
0... |
api/element/pointerdown_event/index.md | API - Element - pointerdown event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("pointerdown", (event) => { })
onpointerdown = (event) => { } | [
0.6572110056877136,
-0.42428070306777954,
0.13328413665294647,
-0.2173243910074234,
-0.040625762194395065,
-1.3120884895324707,
0.32354459166526794,
0.7335382699966431,
0.18882620334625244,
0.2665717899799347,
-0.45665448904037476,
0.47752612829208374,
-0.15625768899917603,
0.2189926207065... |
api/element/pointerdown_event/index.md | API - Element - pointerdown event - Event type:
A `PointerEvent`. Inherits from `Event`. | [
0.5982732772827148,
-0.1253652125597,
-0.05919964239001274,
-0.4780898690223694,
-0.3874695599079132,
-1.3616738319396973,
0.3460654318332672,
0.5027499198913574,
0.0019407346844673157,
0.43036311864852905,
-0.20142361521720886,
0.18128807842731476,
-0.22269488871097565,
0.2405837476253509... |
api/element/pointerdown_event/index.md | API - Element - pointerdown event - Examples:
Using `addEventListener()`:
Example:
const para = document.querySelector("p");
para.addEventListener("pointerdown", (event) => {
console.log("Pointer down event");
});
Using the `onpointerdown` event handler property:
Example:
const para = document.querySelector("p... | [
0.3668646216392517,
-0.2907797396183014,
-0.7407445907592773,
0.5944966673851013,
-0.24161118268966675,
-1.3018854856491089,
0.515475869178772,
0.7203434705734253,
0.18426164984703064,
0.42839884757995605,
-0.30504828691482544,
0.6025745868682861,
-0.02584896981716156,
0.3526977300643921,
... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event:
The `compositionupdate` event is fired when a new character is received in the context of a text composition session controlled by a text composition system such as an `input method editor`.
For example, this event could be fired while a user enters a Chinese character using a... | [
-0.045585304498672485,
-0.07504606246948242,
-0.10398034006357193,
0.7985668778419495,
0.5419269800186157,
-1.531895637512207,
0.5286901593208313,
1.5214054584503174,
-0.12810133397579193,
0.5537458658218384,
0.25379496812820435,
-0.20455846190452576,
-0.0608687624335289,
0.888345658779144... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("compositionupdate", (event) => { })
oncompositionupdate = (event) => { } | [
0.7537137866020203,
0.11470404267311096,
-0.21170085668563843,
0.5065103769302368,
0.1819050908088684,
-1.6964277029037476,
0.3096809387207031,
0.6158866286277771,
0.027944840490818024,
0.12630538642406464,
-0.21671642363071442,
0.07961754500865936,
-0.6400187015533447,
0.15401418507099152... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event - Event type:
A `CompositionEvent`. Inherits from `UIEvent` and `Event`. | [
-0.00815881323069334,
-0.1257714331150055,
-0.38006147742271423,
0.3380766212940216,
-0.17610019445419312,
-1.5731825828552246,
0.0126412995159626,
0.4936476945877075,
-0.3915240168571472,
0.3167566955089569,
0.3496440052986145,
0.21418744325637817,
-0.4772352874279022,
0.6433204412460327,... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event - Examples:
Example:
const inputElement = document.querySelector('input[type="text"]');
inputElement.addEventListener("compositionupdate", (event) => {
console.log(`generated characters were: ${event.data}`);
}); | [
0.30402055382728577,
-0.1869255155324936,
0.05851215124130249,
0.39969193935394287,
0.37014368176460266,
-1.683429479598999,
0.4798813462257385,
0.4677126705646515,
-0.2760409116744995,
0.4789367616176605,
0.15099695324897766,
-0.053681012243032455,
-0.28853797912597656,
0.1948502361774444... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event - Examples - Live example - HTML:
Example:
<div class="control">
<p>First select textbox, then to open IME:</p>
<ul>
<li>on macOS type <kbd>option</kbd> + <kbd>`</kbd></li>
<li>on Windows type <kbd>windows</kbd> + <kbd>.</kbd></li>
</ul>
<label for="example">Exa... | [
0.3036102056503296,
-0.10047922283411026,
0.0327288880944252,
0.17512069642543793,
-0.1790851652622223,
-1.813589334487915,
0.47493380308151245,
0.041149623692035675,
0.1096629947423935,
0.4825741946697235,
-0.7988565564155579,
-0.3676428198814392,
-0.40346381068229675,
0.5737060904502869,... |
api/element/compositionupdate_event/index.md | API - Element - compositionupdate event - Examples - Live example - JavaScript:
Example:
const inputElement = document.querySelector('input[type="text"]');
const log = document.querySelector(".event-log-contents");
const clearLog = document.querySelector(".clear-log");
clearLog.addEventListener("click", () => {
lo... | [
0.25308743119239807,
-0.38898614048957825,
-0.03322667255997658,
0.7324243187904358,
0.1626429259777069,
-1.7151161432266235,
0.2548576295375824,
0.6819157600402832,
-0.5209109783172607,
0.3638273775577545,
0.22117459774017334,
-0.08891955018043518,
-0.2113855630159378,
-0.1274333000183105... |
api/element/beforexrselect_event/index.md | API - Element - beforexrselect event:
The `beforexrselect` event is fired before WebXR select events (`select`, `selectstart`, `selectend`) are dispatched. It can be used to suppress XR world input events while the user is interacting with a DOM overlay UI.
This event bubbles, is cancelable and is composed. | [
-0.4119013845920563,
-0.1645825058221817,
-0.5061167478561401,
0.5554122924804688,
-0.16928298771381378,
-1.1119319200515747,
0.42742761969566345,
1.3416967391967773,
-0.7511889934539795,
0.42989811301231384,
-0.11301571875810623,
0.7284029126167297,
-0.10256771743297577,
0.343388259410858... |
api/element/beforexrselect_event/index.md | API - Element - beforexrselect event - Syntax:
Use the event name in methods like `addEventListener()`, or set an event handler property.
Example:
addEventListener("beforexrselect", (event) => { })
onbeforexrselect = (event) => { } | [
0.1859467625617981,
-0.5013279318809509,
-0.32034891843795776,
0.2919459342956543,
-0.12714418768882751,
-0.9527966380119324,
0.697191059589386,
0.6211338043212891,
-0.3246292173862457,
0.39956188201904297,
-0.025711731985211372,
-0.10679452866315842,
0.09257885813713074,
-0.06860841810703... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.