onmouseup — handling mouse button release
The global HTML attribute onmouseup contains JavaScript code that handles the mouseup event, associated with releasing a mouse button.
CKTIS / HTML
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
The global HTML attribute onmouseup contains JavaScript code that handles the mouseup event, associated with releasing a mouse button.
The onoffline attribute on body sets a handler for the Window object's offline event. It lets a page react when the browser reports lost connectivity, but does not check whether a particular server is reachable.
The ononline attribute on body specifies JavaScript that handles the Window object's online event. It signals a change in the browser's assessment of network availability, but does not confirm that a particular server is reachable.
The onpagehide attribute on body registers a handler for the Window object's pagehide event. In a browser-generated event, event.persisted set to true indicates an intent to retain the document for possible reuse, not that it is actually retained.
The onpagereveal attribute on body sets the handler for the Window object's pagereveal event. The event occurs when the document begins rendering after initialization or reactivation.
The onpageshow attribute on body assigns JavaScript code to the Window object's pageshow event. It handles both showing a newly loaded document and showing a preserved document again during history navigation.
The onpageswap attribute on body sets the Window handler for the pageswap event. This event concerns the outgoing document during navigation; it is not a notification that a new page has appeared.
The onpaste attribute assigns JavaScript code to handle the paste event. It is available on all HTML elements, but adding it does not make an element editable.
The onpause attribute contains JavaScript that handles the pause event, usually on an audio or video element. It reacts to playback being paused but does not itself pause playback.
The onplay attribute contains JavaScript executed for the play event, typically on an audio or video element. This event signals leaving the paused state, not a guarantee that sound or video is already playing.
The onplaying attribute contains code that handles the playing event, used by audio and video when playback is ready to start or resume after an interruption. It does not start playback and is not equivalent to onplay.
The onpopstate attribute on body sets the Window object's popstate event handler. It lets a page respond to session history traversal, such as Back and Forward navigation, and read the destination entry's state.
The onprogress attribute contains JavaScript that handles the progress event. For audio and video elements, it concerns media data downloading, not the passage of playback time.
The onratechange attribute specifies JavaScript that handles the ratechange event, fired after a media element's playbackRate or defaultPlaybackRate changes.
The body attribute onrejectionhandled registers a handler for the Window rejectionhandled event: a previously unhandled Promise rejection has subsequently acquired a handler.
The onreset attribute contains JavaScript that handles a form's reset event. The handler runs before default values are restored and can cancel the reset.
The onresize attribute contains JavaScript that handles a resize event. On the body element, it targets Window rather than changes to the size of the body element itself.
The onscroll attribute contains JavaScript executed when a scroll event is received. It lets an element react to scrolling, but does not itself create a scrollable area.
The onscrollend attribute assigns JavaScript code to the scrollend event, which signals that scrolling has finished. Distinguish the attribute name from the event name used with addEventListener().
The onsecuritypolicyviolation attribute specifies JavaScript that handles the securitypolicyviolation event associated with a Content Security Policy (CSP) violation. It does not establish a security policy, and CSP can block its inline code.
The onseeked attribute specifies JavaScript to run for the seeked event. On audio and video elements, this event signals that a seek has completed, not that media playback has ended.
`onseeking` specifies code that handles the `seeking` event. The event signals the start of a seek operation in audio or video, even if the playback position stays the same. It does not signal completion.
The onselect attribute defines JavaScript that runs when a select event occurs, typically when text is selected in an input or textarea control. It does not detect option selection in a select element.
onslotchange specifies a handler for the slotchange event. In Shadow DOM, this event can fire when a slot’s assigned nodes change or when a direct child is added to or removed from a slot with no assigned nodes.