file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
api/animation/remove_event/index.md
API - Animation - remove event - Event type: An `AnimationPlaybackEvent`. Inherits from `Event`.
[ -0.14447283744812012, -0.5047760009765625, -0.35109052062034607, -0.14000266790390015, -0.627917468547821, -1.1543889045715332, 0.5920191407203674, 0.5580297708511353, -0.720744788646698, -0.18485230207443237, -0.0017793606966733932, -0.320712685585022, -0.21193815767765045, 0.139194011688...
api/animation/remove_event/index.md
API - Animation - remove event - Examples - Removing replaced animations: In this example we have a `<button id="start">` element, and an event listener that runs whenever the mouse moves. The `mousemove` event handler sets up an animation that animates the `<button>` to the position of the mouse pointer. This could r...
[ 0.19513806700706482, -0.39185020327568054, -0.33053722977638245, 0.26625940203666687, 0.24713000655174255, -1.5766464471817017, 0.03959605097770691, 0.8090153932571411, 0.5111235976219177, -0.07966560870409012, -0.010136662051081657, -0.2883548140525818, -0.4021731913089752, 0.534770429134...
api/animation/remove_event/index.md
API - Animation - remove event - Examples - Removing replaced animations - HTML: Example: <button id="start">Click to drag</button> <br /> <button id="reset">Reset example</button> <p> Click the button to start the animation (disabled by default to protect those who suffer migraines when experiencing such animati...
[ 0.33014029264450073, -0.39549392461776733, -0.09151528775691986, 0.2699947953224182, -0.5847032070159912, -1.45440673828125, 0.24298882484436035, 0.47978609800338745, -0.2867698073387146, 0.020338835194706917, -0.2412242293357849, -0.20015493035316467, 0.5311320424079895, 0.127682819962501...
api/animation/remove_event/index.md
API - Animation - remove event - Examples - Removing replaced animations - CSS: Example: :root, body { margin: 0; padding: 0; height: 100%; } button { margin: 0.5rem 0; }
[ -0.46671009063720703, 0.09563063085079193, -0.0794331282377243, -0.38055071234703064, 0.046783894300460815, -1.3327077627182007, 0.16647683084011078, -0.2533506751060486, -1.1421159505844116, 0.31781208515167236, 0.6626153588294983, -0.20364154875278473, -0.017861541360616684, 0.5375682115...
api/animation/remove_event/index.md
API - Animation - remove event - Examples - Removing replaced animations - JavaScript: Example: const button = document.querySelector("#start"); let created = 0; let removed = 0; button.addEventListener( "click", () => { document.body.addEventListener("mousemove", (event) => { const animation = button....
[ 0.03251321241259575, -0.5004002451896667, -0.03899557515978813, 0.8459958434104919, 0.2689029276371002, -1.5351018905639648, -0.11853157728910446, 0.6377044916152954, -0.42253318428993225, 0.24928823113441467, -0.1660367250442505, 0.023282721638679504, -0.35702547430992126, 0.3069283664226...
api/animation/cancel_event/index.md
API - Animation - cancel event: The `cancel` event of the `Animation` interface is fired when the `Animation.cancel()` method is called or when the animation enters the `"idle"` play state from another state, such as when the animation is removed from an element before it finishes playing. Note: Creating a new animat...
[ -0.03509530797600746, -0.4252931475639343, -0.38033878803253174, -0.01758314110338688, -0.023930281400680542, -1.223839521408081, 0.35510486364364624, 0.9661973714828491, -0.9287055730819702, 0.12131507694721222, -0.36800286173820496, -0.049072690308094025, 0.1591031849384308, 0.5059958696...
api/animation/cancel_event/index.md
API - Animation - cancel event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("cancel", (event) => { }) oncancel = (event) => { }
[ 0.2688596844673157, 0.04706574231386185, 0.025853388011455536, 0.004212509840726852, -0.02729818969964981, -1.3699736595153809, 0.037860430777072906, 0.8907691240310669, -0.015935711562633514, 0.0425277054309845, -0.7916605472564697, 0.04774302989244461, -0.15528079867362976, -0.2456510066...
api/animation/cancel_event/index.md
API - Animation - cancel event - Event type: An `AnimationPlaybackEvent`. Inherits from `Event`.
[ -0.08332907408475876, -0.3469066619873047, -0.07187199592590332, -0.04201788455247879, -0.555952787399292, -1.1269086599349976, 0.3562130331993103, 0.647879421710968, -0.9227624535560608, 0.006590905599296093, 0.008610188961029053, -0.3857402801513672, -0.30246153473854065, 0.3040022552013...
api/animation/cancel_event/index.md
API - Animation - cancel event - Examples: If this animation is canceled, remove its element. Example: animation.oncancel = (event) => { animation.effect.target.remove(); };
[ -0.2560509443283081, 0.11590228974819183, 0.33822062611579895, -0.7216736078262329, 0.02828451246023178, -1.4983351230621338, -0.1549069583415985, 0.4217691719532013, -0.4726223945617676, -0.1931280940771103, -0.27077579498291016, -0.3309473991394043, -0.013413148000836372, -0.221913635730...
api/animation/finish_event/index.md
API - Animation - finish event: The `finish` event of the `Animation` interface is fired when the animation finishes playing, either when the animation completes naturally, or when the `Animation.finish()` method is called to immediately cause the animation to finish up. Note: The `"paused"` play state supersedes the...
[ 1.0624909400939941, -0.34447747468948364, -0.5257946252822876, 0.0618458166718483, -0.243501678109169, -1.0549321174621582, 0.13423261046409607, 1.401957392692566, -1.2271170616149902, 0.3152395188808441, 0.08536511659622192, -0.03888142481446266, -0.1848946064710617, 0.5799574851989746, ...
api/animation/finish_event/index.md
API - Animation - finish event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("finish", (event) => { }) onfinish = (event) => { }
[ 0.37624868750572205, -0.37897491455078125, 0.07838933914899826, 0.20505402982234955, -0.2908921539783478, -1.2012548446655273, 0.28053104877471924, 0.8838551640510559, -0.05332529544830322, -0.1613287478685379, -0.6803887486457825, 0.249912828207016, -0.08473525941371918, -0.25752064585685...
api/animation/finish_event/index.md
API - Animation - finish event - Event type: An `AnimationPlaybackEvent`. Inherits from `Event`.
[ 0.2724027931690216, -0.5442110300064087, -0.17375081777572632, -0.37266805768013, -0.8732135891914368, -0.8363925218582153, 0.23732024431228638, 0.47751420736312866, -0.90885329246521, -0.17677010595798492, 0.0031943880021572113, -0.3465878963470459, -0.3095281422138214, 0.2687961459159851...
api/animation/finish_event/index.md
API - Animation - finish event - Examples: `Animation.onfinish` is used several times in the Alice in Web Animations API Land Growing/Shrinking Alice Game. Here is one instance where we add pointer events back to an element after its opacity animation has faded it in: Example: // Add an animation to the game's endin...
[ -0.14747397601604462, -0.33785778284072876, -0.5422552824020386, 0.40108850598335266, -0.4336315989494324, -1.678118348121643, 0.3063206672668457, 0.965130090713501, -0.9349392652511597, 0.35095566511154175, 0.13827329874038696, -0.018338095396757126, 0.4004974663257599, 0.4522209763526916...
api/htmlcanvaselement/webglcontextlost_event/index.md
API - HTMLCanvasElement - webglcontextlost event: The `webglcontextlost` event of the WebGL API is fired if the user agent detects that the drawing buffer associated with a `WebGLRenderingContext` object has been lost. This event does not bubble.
[ -1.4949344396591187, -0.5336971282958984, 0.49615049362182617, -0.061989493668079376, -0.08812835067510605, -1.3902127742767334, -0.4292582869529724, 0.5096107125282288, -0.16117313504219055, -0.16927209496498108, -0.4882667064666748, 0.16915170848369598, 0.5963719487190247, 0.462028741836...
api/htmlcanvaselement/webglcontextlost_event/index.md
API - HTMLCanvasElement - webglcontextlost event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("webglcontextlost", (event) => { }) onwebglcontextlost = (event) => { }
[ -0.25690504908561707, -0.06465582549571991, -0.11559752374887466, 0.2088167667388916, -0.1808675080537796, -1.3670799732208252, 0.059137582778930664, 0.6068978905677795, -0.007647134363651276, 0.1887979507446289, -0.8562861084938049, 0.7031667232513428, 0.2453918159008026, 0.66746592521667...
api/htmlcanvaselement/webglcontextlost_event/index.md
API - HTMLCanvasElement - webglcontextlost event - Event type: A `WebGLContextEvent`. Inherits from `Event`.
[ -0.932165265083313, 0.02022656425833702, 0.12574677169322968, -0.22109279036521912, -0.16956736147403717, -1.3127686977386475, -0.4656107425689697, 0.2385314702987671, -0.19844374060630798, -0.1498013734817505, -0.5164347887039185, 1.0631780624389648, 0.11761309206485748, 0.661435306072235...
api/htmlcanvaselement/webglcontextlost_event/index.md
API - HTMLCanvasElement - webglcontextlost event - Example: With the help of the `WEBGL_lose_context` extension, you can simulate the `webglcontextlost` event: Example: const canvas = document.getElementById("canvas"); const gl = canvas.getContext("webgl"); canvas.addEventListener("webglcontextlost", (event) => { ...
[ -0.9598730206489563, 0.16701087355613708, 0.04369313269853592, 0.4988871216773987, -0.19804871082305908, -1.7350798845291138, -0.26508504152297974, 0.6623150706291199, 0.003655537962913513, 0.035535335540771484, -0.5209376811981201, 0.5991794466972351, 0.569546639919281, 0.56761234998703, ...
api/htmlcanvaselement/webglcontextrestored_event/index.md
API - HTMLCanvasElement - webglcontextrestored event: The `webglcontextrestored` event of the WebGL API is fired if the user agent restores the drawing buffer for a `WebGLRenderingContext` object. Once the context is restored, WebGL resources such as textures and buffers that were created before the context was lost ...
[ -0.8305575251579285, 0.13393166661262512, -0.018534284085035324, -0.17251870036125183, 0.13038353621959686, -1.1039398908615112, 0.2823171317577362, 1.2207099199295044, -0.5801122784614563, -0.1657724678516388, -0.33253157138824463, 1.0158296823501587, 0.6388038992881775, 0.643652558326721...
api/htmlcanvaselement/webglcontextrestored_event/index.md
API - HTMLCanvasElement - webglcontextrestored event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("webglcontextrestored", (event) => { }) onwebglcontextrestored = (event) => { }
[ -0.1207738071680069, 0.2555493116378784, 0.16679887473583221, 0.9077938199043274, -0.5026171207427979, -1.899916648864746, 0.27380889654159546, 0.901023805141449, -0.38959580659866333, 0.26327043771743774, -1.0519286394119263, 0.7382346391677856, 0.24667593836784363, 0.26489773392677307, ...
api/htmlcanvaselement/webglcontextrestored_event/index.md
API - HTMLCanvasElement - webglcontextrestored event - Event type: A `WebGLContextEvent`. Inherits from `Event`.
[ -0.8235787153244019, 0.9443126916885376, 0.5130574107170105, 0.12229634821414948, -0.4826590120792389, -1.5374341011047363, -0.2779538631439209, 0.7716956734657288, -0.35520654916763306, 0.18339554965496063, -0.5407768487930298, 1.0307950973510742, -0.0772322416305542, 0.42596951127052307,...
api/htmlcanvaselement/webglcontextrestored_event/index.md
API - HTMLCanvasElement - webglcontextrestored event - Example: With the help of the `WEBGL_lose_context` extension, you can simulate the `webglcontextrestored` event: Example: const canvas = document.getElementById("canvas"); const gl = canvas.getContext("webgl"); canvas.addEventListener("webglcontextrestored", (e...
[ -0.922117292881012, 0.3817107379436493, 0.1551380753517151, 0.6073749661445618, -0.4108622968196869, -1.5405057668685913, -0.1299852579832077, 0.878623366355896, -0.15444716811180115, 0.3552495837211609, -0.724350094795227, 0.7706332206726074, 0.3472861349582672, 0.7265597581863403, -0.5...
api/htmlcanvaselement/webglcontextcreationerror_event/index.md
API - HTMLCanvasElement - webglcontextcreationerror event: The `webglcontextcreationerror` event of the WebGL API is fired if the user agent is unable to create a `WebGLRenderingContext` context. This event has a `WebGLContextEvent.statusMessage` property, which can contain a platform dependent string with more infor...
[ -0.6272011995315552, -0.042714305222034454, 0.6118134260177612, 0.32717016339302063, 0.3875223398208618, -1.4435518980026245, 0.009557615965604782, 0.9898964166641235, 0.04041997343301773, 0.038073502480983734, -0.4343678951263428, 0.006118379533290863, 1.0290045738220215, 0.21347260475158...
api/htmlcanvaselement/webglcontextcreationerror_event/index.md
API - HTMLCanvasElement - webglcontextcreationerror event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("webglcontextcreationerror", (event) => { }) onwebglcontextcreationerror = (event) => { }
[ -0.04464525356888771, 0.02967119589447975, 0.04220712184906006, 0.9863144159317017, 0.03224100172519684, -1.784940242767334, 0.09353399276733398, 0.8911396265029907, -0.5545416474342346, -0.1636003851890564, -0.8402983546257019, 0.6464565396308899, 0.5932515263557434, 0.1443796008825302, ...
api/htmlcanvaselement/webglcontextcreationerror_event/index.md
API - HTMLCanvasElement - webglcontextcreationerror event - Event type: A `WebGLContextEvent`. Inherits from `Event`.
[ -0.6840285062789917, 0.22945305705070496, 0.5694023370742798, -0.03078388422727585, -0.09760165214538574, -1.5692379474639893, -1.017275094985962, 0.4808708429336548, 0.10509920120239258, -0.04150620475411415, -0.291043758392334, 0.8886051177978516, 0.22411346435546875, -0.0577032417058944...
api/htmlcanvaselement/webglcontextcreationerror_event/index.md
API - HTMLCanvasElement - webglcontextcreationerror event - Example: Example: const canvas = document.getElementById("canvas"); canvas.addEventListener("webglcontextcreationerror", (e) => { console.log(e.statusMessage || "Unknown error"); }); const gl = canvas.getContext("webgl"); // logs statusMessage or "Unknow...
[ -0.3321880102157593, 0.33817124366760254, 0.22637063264846802, 0.5697294473648071, -0.043486956506967545, -2.010516881942749, -0.6825425624847412, 0.67901211977005, -0.34651821851730347, 0.4819958806037903, -0.24671563506126404, 0.28413039445877075, 0.9013130068778992, 0.42867743968963623,...
api/managedsourcebuffer/bufferedchange_event/index.md
API - ManagedSourceBuffer - bufferedchange event: Note: This feature is available in Web Workers. The `bufferedchange` event of the `ManagedSourceBuffer` interface is fired when the `ManagedSourceBuffer`'s buffered range changes. This can occur following a call to `appendBuffer()`, `remove()`, `endOfStream()`, or as...
[ -0.04845130071043968, -0.4377051889896393, -0.8196401596069336, 0.13124050199985504, 0.31222090125083923, -1.508693814277649, 0.21913248300552368, 1.7550411224365234, 0.33484581112861633, 0.21825094521045685, -0.16311874985694885, 0.33399224281311035, 0.42791101336479187, 0.421912729740142...
api/managedsourcebuffer/bufferedchange_event/index.md
API - ManagedSourceBuffer - bufferedchange event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("bufferedchange", (event) => {}); onbufferedchange = (event) => {};
[ 0.08896514028310776, -0.5398725867271423, -0.49840423464775085, -0.09055917710065842, 0.17560932040214539, -1.4423186779022217, -0.14042873680591583, 0.8997047543525696, 0.16139183938503265, 0.07809305936098099, -0.6709498763084412, 0.45203399658203125, -0.1057446077466011, 0.2179744243621...
api/managedsourcebuffer/bufferedchange_event/index.md
API - ManagedSourceBuffer - bufferedchange event - Event type: A `BufferedChangeEvent`. Inherits from `Event`.
[ -0.47811445593833923, -0.87604820728302, -0.5374366641044617, -0.16457541286945343, -0.387868195772171, -1.397005319595337, -0.2986224591732025, 0.9976493120193481, 0.581708550453186, 0.1441783905029297, -0.053130485117435455, 0.11277784407138824, -0.2671619653701782, 0.25945064425468445, ...
api/managedsourcebuffer/bufferedchange_event/index.md
API - ManagedSourceBuffer - bufferedchange event - Examples - Tracking buffered range changes: This example sets up a `ManagedMediaSource`, adds a source buffer, fetches a fragmented MP4 file, and listens for the `bufferedchange` event to log any changes to the buffered ranges. Example: const videoUrl = "https://m...
[ -0.3776344954967499, -1.041069746017456, -0.2525952458381653, 0.19641798734664917, -0.030406851321458817, -0.6330351829528809, -0.10606321692466736, 0.9372862577438354, 0.37282049655914307, 0.17904195189476013, -0.48968249559402466, -0.26638102531433105, -0.3331127166748047, 0.328831672668...
api/webgluniformlocation/index.md
API - WebGLUniformLocation: Note: This feature is available in Web Workers. The WebGLUniformLocation interface is part of the WebGL API and represents the location of a uniform variable in a shader program.
[ -1.271135926246643, -0.5161433815956116, -0.4420992434024811, -0.03602275997400284, -0.22939012944698334, -1.4555881023406982, 0.06335701048374176, 0.5651146769523621, 0.5495820045471191, 0.22115059196949005, 0.12837162613868713, 0.2848586440086365, 1.0188566446304321, 0.30389583110809326,...
api/webgluniformlocation/index.md
API - WebGLUniformLocation - Description: The `WebGLUniformLocation` object does not define any methods or properties of its own and its content is not directly accessible. When working with `WebGLUniformLocation` objects, the following methods of the `WebGLRenderingContext` are useful: - `WebGLRenderingContext.getUn...
[ -0.8433544039726257, -0.13816587626934052, -0.6606158018112183, 0.5983350872993469, 0.10651910305023193, -1.3714627027511597, 0.6663877367973328, 0.6290310025215149, -0.17323994636535645, -0.10776140540838242, -0.13312605023384094, 0.7803636193275452, 0.8217611908912659, 0.5384605526924133...
api/webgluniformlocation/index.md
API - WebGLUniformLocation - Examples - Getting a uniform location: Example: const canvas = document.getElementById("canvas"); const gl = canvas.getContext("webgl"); const location = gl.getUniformLocation(WebGLProgram, "uniformName");
[ -0.6979315280914307, 0.24797013401985168, -0.2397734373807907, 0.13251148164272308, -0.20017971098423004, -1.9025299549102783, -0.3369618058204651, 0.4918273091316223, -0.15105941891670227, 0.3625968098640442, -0.32675400376319885, 0.29540058970451355, 0.5532320737838745, 0.225890308618545...
api/htmlmediaelement/encrypted_event/index.md
API - HTMLMediaElement - encrypted event: The `encrypted` event is fired when initialization data is found in the media that indicates it is encrypted. This event is not cancelable and does not bubble.
[ -0.39814531803131104, 0.4521859288215637, 0.3405541181564331, 0.19319075345993042, -0.04957995563745499, -1.5118930339813232, 0.3130027949810028, 1.322448492050171, -0.6811292767524719, 0.00014785025268793106, -0.028571728616952896, 0.45642954111099243, -0.507874608039856, 0.65744274854660...
api/htmlmediaelement/encrypted_event/index.md
API - HTMLMediaElement - encrypted event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("encrypted", (event) => { }) onencrypted = (event) => { }
[ -0.028933174908161163, 0.014683220535516739, 0.5697717666625977, 0.19182875752449036, -0.3183969259262085, -1.1974095106124878, 0.05813974887132645, 0.4463236331939697, -0.276259183883667, -0.11598962545394897, -0.4713646471500397, 0.4886622428894043, -0.07442327588796616, -0.1881001591682...
api/htmlmediaelement/encrypted_event/index.md
API - HTMLMediaElement - encrypted event - Event type: A `MediaEncryptedEvent`. Inherits from `Event`.
[ -0.11463218927383423, 0.33119848370552063, 0.6209271550178528, 0.005309842526912689, -0.32329612970352173, -1.3399248123168945, -0.022771097719669342, 0.5876992344856262, -0.5995404124259949, -0.09264298528432846, 0.07678334414958954, 0.8671015501022339, -0.21249988675117493, 0.32728320360...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe: The `removeUnsafe()` method of the `Sanitizer` interface configures the sanitizer so that it will remove all elements and attributes that are considered XSS-unsafe by the browser. The method can be called to make any `Sanitizer` XSS-safe.
[ -0.4331999719142914, 0.011154713109135628, -1.4202752113342285, 0.31740638613700867, -0.19213303923606873, -1.7329142093658447, 0.16166625916957855, 0.602864682674408, -0.00818655639886856, 0.682928204536438, -0.6109280586242676, 0.17030879855155945, 0.6093101501464844, -0.9021550416946411...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Syntax: Example: removeUnsafe()
[ -0.22307172417640686, 0.03825052082538605, -0.7460625767707825, -0.3600175678730011, -0.35797858238220215, -1.1753426790237427, -0.3687156140804291, 0.34772545099258423, 0.1852346956729889, 0.329916775226593, -0.613659679889679, 0.22242414951324463, -0.47673988342285156, -0.479966938495636...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Syntax - Parameters: None.
[ -0.15730896592140198, 0.31668317317962646, -0.6167445778846741, -0.4980601370334625, -0.5192658305168152, -0.930505096912384, -0.19140584766864777, 0.7578721642494202, -0.2919386029243469, 0.2403375655412674, -0.5838513374328613, 0.11933024227619171, -0.4933615028858185, -0.326107740402221...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Syntax - Return value: `true` if the operation removed any elements, attributes, or event handler content attributes that are considered XSS-unsafe, and `false` if no elements or attributes were removed.
[ 0.22933660447597504, -0.38890260457992554, -0.8744001388549805, 0.37869733572006226, -0.69999760389328, -1.4319654703140259, -0.05679494887590408, 0.299813449382782, 0.26547425985336304, 0.36779794096946716, -1.0529214143753052, 0.05224056541919708, 0.5147267580032349, -0.29867997765541077...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Description: The `removeUnsafe()` method configures the sanitizer so that it will remove all elements and attributes that are considered XSS-unsafe by the browser. This includes the elements `base`, `embed`, `frame`, `iframe`, `object`, `script`, and `use`, and the event handler conten...
[ 0.1516505777835846, -0.6392678022384644, -1.2259156703948975, 0.32879912853240967, 0.3851587474346161, -0.8448992967605591, 0.600685179233551, 1.6826015710830688, -0.6172130107879639, 0.4434106647968292, -0.36376017332077026, 0.6293485164642334, 0.4071149528026581, -0.20572277903556824, ...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Examples - Basic usage: The following code shows how `removeUnsafe()` is used. Example: // Create sanitizer. const sanitizer = new Sanitizer(/* Some configuration */); // Make the configuration XSS-safe sanitizer.removeUnsafe();
[ -0.2332846075296402, -0.13628143072128296, -1.3750015497207642, 0.21191471815109253, -0.17130586504936218, -1.5209109783172607, -0.12830203771591187, 0.48175346851348877, 0.31648749113082886, 0.42525550723075867, -0.5668084621429443, 0.426824688911438, -0.06227220222353935, -0.655499517917...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Examples - Making a sanitizer configuration safe: This example demonstrates how calling `removeUnsafe()` makes the sanitizer configuration XSS-safe. Example: <pre id="log"></pre> Example: #log { height: 420px; overflow: scroll; padding: 0.5rem; border: 1px solid black; } E...
[ -0.6672924757003784, 0.025036562234163284, -1.4487509727478027, -0.15761533379554749, -0.4320824444293976, -1.0986573696136475, -0.0781930610537529, 1.0603708028793335, -0.6259565949440002, 0.4617764353752136, -0.5698508620262146, 0.08688801527023315, 0.32417261600494385, -0.74757385253906...
api/sanitizer/removeunsafe/index.md
API - Sanitizer - removeUnsafe - Examples - Making a sanitizer configuration safe - JavaScript: The code first creates a new `Sanitizer` object that allows the safe element `p`, the unsafe elements `script` and `iframe`, and the unsafe `onwebkitanimationend` event handler attribute. The code then calls `removeUnsafe(...
[ 0.41342440247535706, -0.14315693080425262, -0.6870401501655579, 0.35149842500686646, -0.00035056471824645996, -1.2395323514938354, -0.24769844114780426, 0.9086868762969971, 0.21147391200065613, 0.799134373664856, -0.8768571615219116, 0.4598151445388794, -0.09308989346027374, -0.67293298244...
api/cssmathmin/index.md
API - CSSMathMin: The `CSSMathMin` interface of the CSS Typed Object Model API represents the CSS `min()` function. It inherits properties and methods from its parent `CSSNumericValue`.
[ -0.4153349995613098, -0.7406865358352661, -0.4913952350616455, 0.15470825135707855, 0.0813504308462143, -2.040874481201172, -0.017094433307647705, -0.17135542631149292, 0.8213827610015869, 0.3953426480293274, -0.6605373024940491, 0.23846876621246338, 0.38245221972465515, 0.2551455795764923...
api/cssmathmin/index.md
API - CSSMathMin - Constructor: - `CSSMathMin()` (experimental): Creates a new `CSSMathMin` object.
[ -1.371303915977478, -0.19389696419239044, -0.4776308834552765, 0.1882859617471695, 0.187677800655365, -1.2204984426498413, -0.10394302755594254, -0.10349179804325104, 0.2213069200515747, 0.2204843908548355, -0.18721333146095276, 0.31788501143455505, -0.12692353129386902, 0.3194285631179809...
api/cssmathmin/index.md
API - CSSMathMin - Instance properties: - `CSSMathMin.values` (read only): Returns a `CSSNumericArray` object which contains one or more `CSSNumericValue` objects.
[ -0.8632733821868896, 0.4118560254573822, -0.25486132502555847, 0.18487395346164703, -0.38868653774261475, -1.7744355201721191, 0.6113787889480591, 0.17309100925922394, 0.2870079278945923, 0.07769202440977097, 0.17884308099746704, 0.3815084993839264, 0.4547603130340576, -0.26680654287338257...
api/cssmathmin/index.md
API - CSSMathMin - Static methods: The interface may also inherit methods from its parent interface, `CSSMathValue`.
[ -0.17047463357448578, 0.8525716662406921, 0.0008320268243551254, 0.18940840661525726, -0.22379456460475922, -1.5390859842300415, 0.4021053910255432, -0.0989517867565155, 0.7288476824760437, 0.3782520592212677, -0.43516191840171814, 0.39108890295028687, 0.46183452010154724, -0.1494868844747...
api/cssmathmin/index.md
API - CSSMathMin - Instance methods: The interface may also inherit methods from its parent interface, `CSSMathValue`.
[ 0.12133768200874329, 0.8400540351867676, -0.039622604846954346, 0.20480185747146606, -0.19934731721878052, -1.5845215320587158, 0.48195362091064453, 0.13386361300945282, 0.7211145758628845, 0.24169130623340607, -0.21966202557086945, 0.38030388951301575, 0.4927424192428589, -0.0989368110895...
api/cssmathmin/index.md
API - CSSMathMin - Examples: To do
[ -0.46323978900909424, 0.5548461675643921, 0.02453729882836342, 0.4532391130924225, 0.1685308814048767, -0.6389729380607605, 1.1162574291229248, 0.22513613104820251, -0.38118886947631836, 0.562041699886322, -0.1608545035123825, 0.9154433608055115, -0.24329392611980438, -0.268337607383728, ...
api/cssmathmin/cssmathmin/index.md
API - CSSMathMin: The `CSSMathMin()` constructor creates a new `CSSMathMin` object that represents the CSS `min()` function.
[ -0.8857183456420898, 0.2349293828010559, -0.6404936909675598, 0.10864287614822388, 0.5610183477401733, -1.4235317707061768, 0.3243637979030609, 0.09742937982082367, -0.36968544125556946, 0.4283471703529358, 0.056451596319675446, 0.07090723514556885, -0.4545574188232422, 0.12324288487434387...
api/cssmathmin/cssmathmin/index.md
API - CSSMathMin - Syntax: Example: new CSSMathMin(args)
[ -0.7742114663124084, -0.14435693621635437, -0.45398253202438354, -0.34817907214164734, -0.23605790734291077, -2.127490997314453, 0.3019076883792877, 0.08679872006177902, 0.5835343599319458, -0.22084030508995056, -0.22302520275115967, 0.6619070768356323, -0.5392996072769165, 0.2034323513507...
api/cssmathmin/cssmathmin/index.md
API - CSSMathMin - Syntax - Parameters: - `args`: A list of numbers or `CSSNumericValue` objects.
[ 0.4687235653400421, 0.5130223035812378, -0.26792192459106445, -0.259571373462677, -0.23132288455963135, -2.6005544662475586, 0.58290034532547, 0.22375734150409698, -0.21170634031295776, 0.34756970405578613, -0.43137800693511963, 0.10410293936729431, -0.2863665819168091, 0.23168432712554932...
api/cssmathmin/cssmathmin/index.md
API - CSSMathMin - Syntax - Exceptions: - `TypeError`: Thrown if there is a failure when adding all of the values in args.
[ -0.7324677109718323, -0.02459869533777237, -0.5185447931289673, 0.3350747525691986, -0.39085862040519714, -1.530236840248108, 0.572284460067749, 0.25652748346328735, 0.5599299073219299, 0.045774076133966446, -0.306104838848114, 0.6720688939094543, 0.5671897530555725, 0.40159159898757935, ...
api/cssmathmin/cssmathmin/index.md
API - CSSMathMin - Examples: To do
[ -0.46323978900909424, 0.5548461675643921, 0.02453729882836342, 0.4532391130924225, 0.1685308814048767, -0.6389729380607605, 1.1162574291229248, 0.22513613104820251, -0.38118886947631836, 0.562041699886322, -0.1608545035123825, 0.9154433608055115, -0.24329392611980438, -0.268337607383728, ...
api/cssmathmin/values/index.md
API - CSSMathMin - values: The CSSMathMin.values read-only property of the `CSSMathMin` interface returns a `CSSNumericArray` object which contains one or more `CSSNumericValue` objects.
[ -0.551423192024231, -0.03745119273662567, -0.2545814514160156, 0.09385216236114502, -0.2244633287191391, -1.065246820449829, 0.14198675751686096, -0.26251521706581116, 1.2542611360549927, 0.19064919650554657, -0.3104090094566345, -0.0528053380548954, 0.5701398253440857, -0.0053810812532901...
api/cssmathmin/values/index.md
API - CSSMathMin - values - Value: A `CSSNumericArray`.
[ -0.726956844329834, 0.6928528547286987, -0.2288280874490738, -0.38437098264694214, 0.22549572587013245, -1.789359211921692, 1.046082615852356, -0.05488729476928711, -0.11899125576019287, 0.5079349875450134, 0.26339036226272583, 0.7144931554794312, 0.41533464193344116, 0.39638856053352356, ...
api/cssmathmin/values/index.md
API - CSSMathMin - values - Examples: To do
[ -0.729313850402832, 0.3351140320301056, -0.24240867793560028, 0.24795299768447876, 0.027788281440734863, -0.7722416520118713, 0.9435759782791138, 0.1553928554058075, -0.10872460901737213, 0.20306706428527832, 0.07979924976825714, 0.7326259613037109, 0.05164361000061035, -0.1797839701175689...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event: The `dragover` event is fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds). This event is cancelable and may bubble up to the `Document` and `Window` objects.
[ -0.42326629161834717, -0.5281685590744019, -0.4179476201534271, -0.05489589273929596, -0.36205989122390747, -1.226383924484253, 0.17819932103157043, 1.0242557525634766, 0.02370462566614151, 0.566718339920044, -0.30079373717308044, 0.5338174700737, 0.26755577325820923, 0.8674155473709106, ...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("dragover", (event) => { }) ondragover = (event) => { }
[ -0.42361772060394287, -0.07692810893058777, -0.4520341157913208, -0.10612854361534119, -1.0309100151062012, -1.0351895093917847, 0.8891302943229675, 1.223558783531189, 0.2775879204273224, -0.6155192852020264, 0.08249763399362564, 0.42961275577545166, -0.7951316237449646, -0.580000758171081...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Event type: A `DragEvent`. Inherits from `Event`.
[ -0.058796707540750504, -0.3958587646484375, 0.13751162588596344, -0.5900590419769287, -1.1969534158706665, -0.9167925119400024, 0.2825073301792145, 1.0823739767074585, -0.7338449954986572, 0.1760006844997406, 0.1015588641166687, 0.9491673707962036, -0.27259570360183716, 0.5009008049964905,...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Examples - A minimal drag-and-drop example: In this example, we have a draggable element inside a container. Try grabbing the element, dragging it over the other container, and releasing it. We use three event handlers here: - in the `dragstart` event handler, we get a reference ...
[ 0.4400104582309723, -0.8122588396072388, -0.044609084725379944, 0.08463858813047409, -0.08163582533597946, -1.123749017715454, 0.17892292141914368, 1.2757312059402466, -0.7675350904464722, 0.7407087683677673, -0.05908491462469101, 0.8850162625312805, -0.04828881472349167, 0.561455249786377...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Examples - A minimal drag-and-drop example - HTML: Example: <div class="dropzone"> <div id="draggable" draggable="true">This div is draggable</div> </div> <div class="dropzone" id="drop-target"></div>
[ -1.0934034585952759, -0.4955287277698517, 0.16639406979084015, 0.008374631404876709, -0.27202922105789185, -1.3178761005401611, 0.1658872365951538, 0.43392157554626465, -0.5747898817062378, 0.45544931292533875, -0.5427408814430237, 0.18507488071918488, -0.26366084814071655, 0.1953151822090...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Examples - A minimal drag-and-drop example - CSS: Example: body { /* Prevent the user from selecting text in the example */ user-select: none; } #draggable { text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; ...
[ -0.4575450122356415, -0.34075987339019775, -0.19053080677986145, -0.5707525014877319, -0.31925931572914124, -1.039117693901062, 0.08041442185640335, 0.848418653011322, -0.27119773626327515, 1.1283262968063354, 0.22556465864181519, 0.1644473671913147, 0.272335410118103, 0.251409649848938, ...
api/htmlelement/dragover_event/index.md
API - HTMLElement - dragover event - Examples - A minimal drag-and-drop example - JavaScript: Example: let dragged = null; const source = document.getElementById("draggable"); source.addEventListener("dragstart", (event) => { // store a ref. on the dragged elem dragged = event.target; }); const target = documen...
[ 0.10478872805833817, -0.6765409708023071, -0.25405383110046387, -0.2317383587360382, -0.5412238240242004, -0.908340334892273, 0.5505499839782715, 0.7868548631668091, -0.4905778169631958, 0.7745412588119507, -0.3659180998802185, 0.43414735794067383, -0.43588218092918396, 0.16181528568267822...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover: The `togglePopover()` method of the `HTMLElement` interface toggles a `popover` element (i.e., one that has a valid `popover` attribute) between the hidden and showing states. When `togglePopover()` is called on an element with the `popover` attribute: - A `beforetoggle` event is f...
[ -0.28050491213798523, -0.5678479075431824, -0.084637351334095, 0.5892906188964844, -0.10942552238702774, -1.1655162572860718, 0.44069334864616394, 1.108490228652954, -0.4296012818813324, 0.32007601857185364, -0.8148244023323059, 1.1670851707458496, 0.3574676513671875, 0.4201211631298065, ...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Syntax: Example: togglePopover() togglePopover(force) togglePopover(options)
[ -0.7642639875411987, -0.07927901297807693, 0.14887520670890808, 0.41229623556137085, -0.19431135058403015, -1.7296618223190308, 0.5768563151359558, 0.571641743183136, -0.04276769608259201, -0.41056689620018005, -0.3737854063510895, 0.6036455631256104, 0.20464570820331573, -0.06231003254652...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Syntax - Parameters: A boolean (`force`) or an options object: - `force` (optional): A boolean, which causes `togglePopover()` to behave like `showPopover()` or `hidePopover()`. - If set to `true`, the popover is shown if it was initially hidden. If it was initially shown, nothin...
[ 0.2794976234436035, -0.2625328600406647, -0.36302947998046875, 0.3681165277957916, 0.1906505525112152, -1.0101313591003418, 0.9234247207641602, 1.4120243787765503, 0.03777129203081131, -0.3350733816623688, -0.6924427151679993, 1.0561304092407227, 0.2608141601085663, 0.19872009754180908, ...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Syntax - Exceptions: - `InvalidStateError` `DOMException`: Thrown if this method is called while another popover is already in the process of being shown or hidden (e.g., within a `beforetoggle` event listener).
[ -0.19741028547286987, -0.5422868728637695, -0.7527234554290771, 0.6383164525032043, -0.29864972829818726, -1.4328410625457764, -0.11444307118654251, 1.2420856952667236, -0.4862629771232605, 0.03420177102088928, -0.9158350229263306, 0.5859100818634033, 0.7893580198287964, -0.405755937099456...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Syntax - Return value: `true` if the popup is open after the call, and `false` otherwise. None (`undefined`) may be returned in older browser versions (see browser compatibility).
[ -0.7212533354759216, -0.5863139033317566, -0.03929278999567032, 0.3318566083908081, -0.7189455628395081, -1.3193035125732422, -0.10416614264249802, 0.43769142031669617, -0.3366050720214844, -0.11370344460010529, -0.5515220165252686, 0.8713819980621338, 0.2913391888141632, -0.05847778916358...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Examples: See the Popover API examples landing page to access the full collection of MDN popover examples.
[ -0.7146539092063904, -0.25377047061920166, 0.25595003366470337, -0.039671432226896286, -0.11694084852933884, -0.785561203956604, 0.2953079342842102, 0.5207053422927856, 0.13765846192836761, 0.031376928091049194, -0.27255141735076904, 0.5292377471923828, 0.3805714249610901, 0.26644814014434...
api/htmlelement/togglepopover/index.md
API - HTMLElement - togglePopover - Examples - Simple auto-popup: This is a slightly modified version of the Toggle Help UI Popover Example. The example toggles a popover on and off by pressing a particular key on the keyboard (when the example window has focus). The HTML for the example is shown below. This first el...
[ -0.312043160200119, -0.09154409170150757, 0.16407597064971924, 0.5933595895767212, 0.011139415204524994, -0.9899480938911438, 0.8071792125701904, 0.8098381757736206, -0.1527387499809265, 0.2630237936973572, -0.8216300010681152, 0.5589534044265747, -0.1270521581172943, 0.2969343960285187, ...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event: The `drop` event is fired when an element or text selection is dropped on a valid drop target. To ensure that the `drop` event always fires as expected, you should always include a `preventDefault()` call in the part of your code which handles the `dragover` event. This event is cancel...
[ -0.6127622127532959, -0.01238678116351366, 0.29472315311431885, 0.30203530192375183, -0.05814463645219803, -1.9813264608383179, 0.38462069630622864, 0.7670275568962097, -0.2561034560203552, 0.7691248059272766, -0.4986889660358429, 0.1608305275440216, 0.012007784098386765, 0.827821254730224...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("drop", (event) => { }) ondrop = (event) => { }
[ -0.1382862776517868, 0.185795396566391, 0.25354138016700745, 0.32875382900238037, -0.08158750087022781, -1.6272733211517334, 0.08168419450521469, 0.6856863498687744, -0.465599924325943, -0.11486080288887024, -0.5826363563537598, 0.4371160864830017, -0.10486134141683578, 0.2708660960197449,...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Event type: A `DragEvent`. Inherits from `Event`.
[ -0.5475898385047913, 0.12659597396850586, 0.3400511145591736, -0.2622372508049011, -0.7310556769371033, -0.8465060591697693, -0.1265893578529358, 0.5399469137191772, -0.7236727476119995, 0.3340727686882019, -0.040159158408641815, 0.5455890893936157, 0.12056390941143036, 0.4611102342605591,...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Examples - A minimal drag-and-drop example: In this example, we have a draggable element inside a container. Try grabbing the element, dragging it over the other container, and releasing it. We use three event handlers here: - in the `dragstart` event handler, we get a reference to t...
[ 0.027521591633558273, -0.2600286602973938, 0.2867354452610016, 0.16134153306484222, -0.1437259167432785, -1.515889286994934, 0.2976295053958893, 0.6969789862632751, -0.5180035829544067, 0.777612030506134, -0.4190976023674011, 0.7277871370315552, -0.1274685263633728, 0.23608076572418213, ...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Examples - A minimal drag-and-drop example - HTML: Example: <div class="dropzone"> <div id="draggable" draggable="true">This div is draggable</div> </div> <div class="dropzone" id="drop-target"></div>
[ -0.8248050808906555, -0.15923210978507996, 0.3407725691795349, -0.0388290211558342, 0.09141303598880768, -1.5846543312072754, 0.04693052917718887, 0.2488415539264679, -0.6807489395141602, 0.5929712057113647, -0.6109012961387634, 0.2952795922756195, -0.21282833814620972, 0.34573477506637573...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Examples - A minimal drag-and-drop example - CSS: Example: body { /* Prevent the user from selecting text in the example */ user-select: none; } #draggable { text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; marg...
[ -0.8087046146392822, 0.0878257229924202, -0.08081866055727005, -0.42730486392974854, -0.15864470601081848, -1.376720666885376, 0.1067788153886795, 0.8086397051811218, -0.627198338508606, 1.192867636680603, 0.33027714490890503, -0.0813617929816246, 0.06969232857227325, 0.14627201855182648, ...
api/htmlelement/drop_event/index.md
API - HTMLElement - drop event - Examples - A minimal drag-and-drop example - JavaScript: Example: let dragged = null; const source = document.getElementById("draggable"); source.addEventListener("dragstart", (event) => { // store a ref. on the dragged elem dragged = event.target; }); const target = document.ge...
[ 0.09464405477046967, -0.5284653306007385, 0.013883903622627258, -0.10212299972772598, -0.22595472633838654, -0.9872816205024719, 0.4546962380409241, 0.4138806462287903, -0.31180045008659363, 0.8579588532447815, -0.3318342864513397, 0.3390316665172577, -0.47361448407173157, 0.18688857555389...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event: The `dragstart` event is fired when the user starts dragging an element or text selection. This event is cancelable and may bubble up to the `Document` and `Window` objects.
[ 0.04368959739804268, -0.31000760197639465, -0.3328765034675598, -0.006047569215297699, -0.288066029548645, -1.362612009048462, 0.6155223846435547, 1.1705361604690552, -0.44818127155303955, 0.21046040952205658, -0.7111192941665649, 0.7500112056732178, -0.23315462470054626, 0.549027800559997...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("dragstart", (event) => { }) ondragstart = (event) => { }
[ 0.15875297784805298, -0.34352508187294006, 0.044251613318920135, 0.09060502052307129, -0.37945079803466797, -0.9329292178153992, 0.2707560956478119, 0.9482598900794983, -0.25792157649993896, 0.22227981686592102, -0.49405497312545776, 0.798606276512146, 0.016247045248746872, 0.0924616158008...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Event type: A `DragEvent`. Inherits from `Event`.
[ -0.08040420711040497, -0.2606216371059418, 0.13505010306835175, -0.5508901476860046, -1.009508728981018, -0.5650097131729126, 0.07609402388334274, 1.064767599105835, -0.5827566981315613, 0.39122700691223145, -0.22680582106113434, 0.7973858118057251, -0.3271705210208893, 0.2784671187400818,...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Examples - Setting opacity on drag start: In this example, we have a draggable element inside a container. Try grabbing the element, dragging it, and then releasing it. We listen for the `dragstart` event to make the element half transparent while dragged. For a complete example...
[ 0.43142616748809814, -0.26744788885116577, -0.22145748138427734, 0.09019298851490021, -0.43322116136550903, -1.1736021041870117, 0.26979294419288635, 0.9146108031272888, -0.29883190989494324, 1.0576599836349487, -0.6682237386703491, 0.6759803295135498, 0.14725109934806824, 0.18703240156173...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Examples - Setting opacity on drag start - HTML: Example: <div id="container"> <div id="draggable" draggable="true">This div is draggable</div> </div> <div class="dropzone"></div>
[ -0.3408442437648773, -0.36328673362731934, 0.12734940648078918, -0.4128084182739258, -0.4059242606163025, -1.1766825914382935, -0.059576164931058884, 0.8197131752967834, -0.42550644278526306, 0.6747575998306274, -1.0791897773742676, 0.10634547472000122, 0.09976190328598022, 0.2739162743091...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Examples - Setting opacity on drag start - CSS: Example: body { /* Prevent the user from selecting text in the example */ user-select: none; } #draggable { text-align: center; background: white; } #container { width: 200px; height: 20px; background: blueviolet; ...
[ -0.26755598187446594, -0.12102746963500977, -0.17037735879421234, -0.6936365962028503, -0.35378125309944153, -0.9324187636375427, -0.12057279795408249, 0.8865092992782593, -0.31134915351867676, 1.0930836200714111, -0.09472864866256714, 0.1346317082643509, 0.33692625164985657, -0.1975684016...
api/htmlelement/dragstart_event/index.md
API - HTMLElement - dragstart event - Examples - Setting opacity on drag start - JavaScript: Example: const source = document.getElementById("draggable"); source.addEventListener("dragstart", (event) => { // make it half transparent event.target.classList.add("dragging"); }); source.addEventListener("dragend", (...
[ -0.21449421346187592, -0.5208086371421814, -0.13585472106933594, -0.5836527943611145, -0.7691836953163147, -1.1634864807128906, 0.060043953359127045, 0.951619029045105, -0.39148151874542236, 0.6107385158538818, -0.8274997472763062, 0.3246258795261383, 0.2622658312320709, -0.232075870037078...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event: The `dragenter` event is fired when a dragged element or text selection enters a valid drop target. The target object is the immediate user selection (the element directly indicated by the user as the drop target), or the `body` element. This event is cancelable and may bubble up ...
[ -0.3933006823062897, -0.4647365212440491, -0.5052549242973328, 0.2659929394721985, -0.33691126108169556, -1.6979089975357056, 0.6308944225311279, 0.5863076448440552, -0.08513036370277405, 0.6354783177375793, -0.3490976095199585, 0.5066293478012085, -0.2073783427476883, 0.5915177464485168, ...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("dragenter", (event) => { }) ondragenter = (event) => { }
[ 0.023842642083764076, -0.09144645929336548, -0.24138784408569336, 0.11615341901779175, -0.2901507019996643, -1.4086816310882568, -0.05040851607918739, 1.0145083665847778, -0.20356294512748718, 0.23275737464427948, -0.16473695635795593, 1.0970795154571533, -0.04115999490022659, 0.0751248598...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Event type: A `DragEvent`. Inherits from `Event`.
[ -0.13743387162685394, 0.15843787789344788, 0.13928693532943726, -0.7938910126686096, -0.8766208291053772, -1.2539557218551636, 0.02313825860619545, 0.8697460293769836, -0.34350454807281494, 0.27908259630203247, -0.0718335211277008, 1.3017500638961792, -0.6437017917633057, 0.510075449943542...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Examples - Styling drop zones on dragenter: In this example, we have a draggable element inside a container. Try grabbing the element, dragging it over the other container, and releasing it. We listen for the `dragenter` event to give the other container a purple background while...
[ 0.16895721852779388, -1.2644391059875488, -0.06867523491382599, -0.24465104937553406, -0.41905680298805237, -1.3663781881332397, 0.22204336524009705, 1.2971292734146118, -0.4623180329799652, 0.5243869423866272, -0.12040834128856659, 0.5821869373321533, -0.037136178463697433, 0.265670299530...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Examples - Styling drop zones on dragenter - HTML: Example: <div class="dropzone"> <div id="draggable" draggable="true">This div is draggable</div> </div> <div class="dropzone" id="drop-target"></div>
[ -0.7008298635482788, -0.41216883063316345, -0.053403399884700775, -0.21713615953922272, -0.08393216878175735, -1.6204845905303955, 0.25936761498451233, 0.37870457768440247, -0.6595433950424194, 0.4105749726295471, -0.5441380143165588, 0.5536327958106995, -0.35585343837738037, 0.35129952430...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Examples - Styling drop zones on dragenter - CSS: Example: body { /* Prevent the user from selecting text in the example */ user-select: none; } #draggable { text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; ...
[ -0.8556985855102539, -0.29393067955970764, -0.32875221967697144, -0.5178822875022888, -0.29284435510635376, -1.0597649812698364, -0.32595890760421753, 0.6953046321868896, -0.1901063770055771, 1.1128202676773071, 0.3232024908065796, 0.48589026927948, 0.05160599946975708, -0.0126747488975524...
api/htmlelement/dragenter_event/index.md
API - HTMLElement - dragenter event - Examples - Styling drop zones on dragenter - JavaScript: Example: const target = document.getElementById("drop-target"); target.addEventListener("dragenter", (event) => { // highlight potential drop target when the draggable element enters it if (event.target.classList.contai...
[ -0.32868608832359314, -0.5440037846565247, -0.3638251721858978, 0.024841398000717163, -0.22911547124385834, -1.1639293432235718, 0.2604150176048279, 0.4040677547454834, -0.46570825576782227, 0.8249564170837402, -0.14406320452690125, 0.6643221378326416, -0.14542771875858307, 0.2435509562492...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event: The `dragend` event is fired when a drag operation ends (by releasing a mouse button or hitting the escape key). This event is cancelable and may bubble up to the `Document` and `Window` objects.
[ -0.5412881970405579, -0.23639078438282013, -0.4772222340106964, -0.027386117726564407, -0.1391584575176239, -1.3178833723068237, 0.286670058965683, 0.5985785722732544, 0.20330822467803955, 0.5748164653778076, -0.5613217949867249, 0.5622302889823914, 0.1797713041305542, 0.5879412889480591, ...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Syntax: Use the event name in methods like `addEventListener()`, or set an event handler property. Example: addEventListener("dragend", (event) => { }) ondragend = (event) => { }
[ 0.037887394428253174, -0.14991629123687744, -0.35592973232269287, 0.3450223207473755, -0.07332400977611542, -1.464885950088501, 0.2863275110721588, 0.9264655709266663, 0.02164863795042038, 0.2561933994293213, -0.41444459557533264, 0.9639034271240234, -0.2608192563056946, 0.1951905190944671...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Event type: A `DragEvent`. Inherits from `Event`.
[ 0.18010768294334412, 0.019012466073036194, 0.17735394835472107, -0.48165205121040344, -0.839051365852356, -1.1865570545196533, 0.05392952263355255, 0.8836618065834045, -0.6378048658370972, 0.36849328875541687, -0.021824173629283905, 1.1374624967575073, -0.49992653727531433, 0.5536578893661...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Examples - Resetting opacity on dragend: In this example, we have a draggable element inside a container. Try grabbing the element, dragging it, and then releasing it. We make the element half-transparent while it is dragged, and listen for the `dragend` event to reset the element'...
[ -0.041327524930238724, -0.2558431625366211, 0.20331831276416779, 0.36533257365226746, -0.5856808423995972, -1.3771002292633057, 0.5482925772666931, 0.8405184149742126, -0.5137777328491211, 1.1956415176391602, -0.6930823922157288, 0.7176842093467712, 0.31820762157440186, 0.28248268365859985...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Examples - Resetting opacity on dragend - HTML: Example: <div id="container"> <div id="draggable" draggable="true">This div is draggable</div> </div> <div class="dropzone"></div>
[ -0.7544368505477905, -0.20524032413959503, 0.4737700819969177, -0.20432855188846588, -0.3994104564189911, -1.1655397415161133, 0.2016373574733734, 0.5657145977020264, -0.5897238850593567, 0.9039925336837769, -1.0039548873901367, 0.5073620676994324, -0.05543006211519241, 0.49775415658950806...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Examples - Resetting opacity on dragend - CSS: Example: body { /* Prevent the user from selecting text in the example */ user-select: none; } #draggable { text-align: center; background: white; } #container { width: 200px; height: 20px; background: blueviolet; pad...
[ -0.6171421408653259, 0.09763965755701065, -0.017851626500487328, -0.5039443969726562, -0.20663321018218994, -1.0703253746032715, 0.0447443351149559, 0.8184325098991394, -0.4835207760334015, 1.1665661334991455, 0.20331807434558868, 0.4083830416202545, 0.534214198589325, -0.14741618931293488...
api/htmlelement/dragend_event/index.md
API - HTMLElement - dragend event - Examples - Resetting opacity on dragend - JavaScript: Example: const source = document.getElementById("draggable"); source.addEventListener("dragstart", (event) => { // make it half transparent event.target.classList.add("dragging"); }); source.addEventListener("dragend", (eve...
[ -0.36656156182289124, -0.7328954339027405, -0.23231405019760132, -0.3153456449508667, -0.511573314666748, -1.1362979412078857, 0.7577114105224609, 0.7404531240463257, -0.5663478374481201, 0.7568539977073669, -0.6634431481361389, 0.7512378692626953, 0.48620855808258057, 0.22790953516960144,...
api/htmlelement/drag_event/index.md
API - HTMLElement - drag event: The `drag` event is fired every few hundred milliseconds as an element or text selection is being dragged by the user. This event is cancelable and may bubble up to the `Document` and `Window` objects.
[ -0.6647090911865234, -0.12365955859422684, 0.0060116201639175415, 0.3732995390892029, -0.22641108930110931, -0.9429003000259399, 0.2638649642467499, 0.5573574900627136, -0.2518776059150696, 0.38673844933509827, -0.3010789453983307, 0.43170714378356934, 0.23657214641571045, 0.29761618375778...