Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Front End Technology Articles
Page 24 of 652
HTML DOM TransitionEvent Object
The HTML DOM TransitionEvent Object represents events that occur during CSS transitions. It provides information about the transition that has started, is running, or has ended. This object is automatically created when transition-related events are fired on HTML elements with CSS transitions. Syntax TransitionEvent objects are created automatically by the browser. You typically interact with them through event listeners − element.addEventListener("transitionend", function(event) { // event is a TransitionEvent object console.log(event.propertyName); console.log(event.elapsedTime); }); Properties The TransitionEvent object inherits from the Event object and has the ...
Read MoreHTML DOM Event type Property
The HTML DOM Event type property returns a string corresponding to the event's type such as click, keypress, load, or touchend. This property is useful for identifying which specific event was triggered when using the same event handler function for multiple event types. Syntax Following is the syntax for accessing the Event type property − event.type Return Value The event.type property returns a string representing the type of event that was fired. Common event types include: "click" − Mouse click event "keydown" − Key press event "load" − Page load event ...
Read MoreHTML DOM UiEvent detail Property
The HTML DOM UiEvent detail property returns a number that indicates how many times a mouse button was clicked in rapid succession. This property is particularly useful for detecting single clicks, double clicks, triple clicks, and other consecutive click patterns. Note − The detail property returns 2 for double-click events, 3 for triple-click events, and always 0 for mouse events that don't involve clicking such as onmouseover or onmouseout. Syntax Following is the syntax for accessing the detail property − event.detail Return Value The detail property returns an integer representing the number ...
Read MoreHTML DOM Underline Object
The HTML DOM Underline Object represents the element in the Document Object Model. The element is used to display text with an underline, though modern HTML5 recommends using CSS for styling instead of semantic meaning. The Underline Object provides access to all standard HTML element properties, methods, and events, allowing you to manipulate underlined text dynamically through JavaScript. Syntax To create a new element using JavaScript − var uObject = document.createElement("U"); To access an existing element − var uObject = document.getElementById("elementId"); Creating a Underline Element ...
Read MoreHTML DOM Video buffered Property
The HTML DOM Video buffered property returns a TimeRanges object that provides information about the buffered portions of the video. This read-only property helps determine which parts of the video have been downloaded and are ready for playback without interruption. The TimeRanges object contains information about buffered time ranges, including the length of buffered ranges and their start and end positions in seconds. Syntax Following is the syntax for accessing the buffered property − videoElement.buffered Return Value The buffered property returns a TimeRanges object with the following methods − length ...
Read MoreHTML DOM Video currentTime Property
The HTML DOM Video currentTime property returns or sets the current playback position of a video element in seconds. This property is commonly used to create custom video controls, implement seek functionality, or track video progress. Syntax Following is the syntax to get the current time position − mediaObject.currentTime Following is the syntax to set the current time position − mediaObject.currentTime = seconds Parameters seconds − A numeric value representing the time position in seconds where you want to set the playback position. The value should be within the ...
Read MoreHTML DOM Video defaultMuted Property
The HTML DOM Video defaultMuted property sets or returns a boolean value that indicates whether the video's audio should be muted by default when the page loads. This property reflects the state of the HTML muted attribute and determines the initial mute state of the video element. Note − This property only affects the default state when the video loads. It does not dynamically mute or unmute the video during playback. To control muting during playback, use the muted property instead. Syntax Following is the syntax for getting the defaultMuted property − videoObject.defaultMuted ...
Read MoreHTML DOM Video duration Property
The HTML DOM Video duration property returns the duration of a video in seconds as a numeric value. This read-only property is essential for creating custom video controls, progress bars, and displaying video information to users. Note − For live streams, the duration property returns Infinity because live content has no predefined end time. Syntax Following is the syntax for accessing the duration property − videoObject.duration Return Value The duration property returns a numeric value representing − The length of the video in seconds (for recorded videos) Infinity for live ...
Read MoreHTML DOM Video ended Property
The HTML DOM Video ended property returns a boolean value indicating whether a video has finished playing. It returns true when the video has reached its end, and false otherwise. This property is read-only and useful for detecting when video playback is complete. Syntax Following is the syntax for accessing the ended property − videoElement.ended Return Value The ended property returns a Boolean value − true − The video has reached its end false − The video is still playing or paused before the end Example − Checking Video ...
Read MoreHTML DOM Video height Property
The HTML DOM Video height property gets or sets the height of a video element in pixels. This property corresponds to the height attribute of the element and allows dynamic resizing of video content through JavaScript. Syntax Following is the syntax for getting the height property − mediaObject.height Following is the syntax for setting the height property − mediaObject.height = number Parameters The height property accepts the following parameter − number − A numeric value representing the height of the video element in pixels. The value ...
Read More