## HTML DOM seeked Event (`onseeked`)
The `seeked` event fires when the user has finished moving or skipping to a new playback position in an audio or video element.
---
## Definition and Usage
The `onseeked` event attribute (or the `seeked` event) is triggered when a seek operation on a media element (like `
` or ``) completes.
### Key Differences and Related Concepts:
* **`seeking` vs. `seeked`**: The `seeking` event fires as soon as the user *starts* moving the playback slider (the playhead) to a new position. The `seeked` event fires only *after* the user has finished moving the slider and the media has successfully jumped to the new position.
* **`currentTime`**: You can use the `currentTime` property of the media element to get or set the current playback position in seconds.
---
## Browser Support
The numbers in the table specify the first browser version that fully supports this event.
| Event | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
| :--- | :--- | :--- | :--- | :--- | :--- |
| `onseeked` | Yes | 9.0 | Yes | Yes | Yes |
---
## Syntax
You can register this event in three ways:
### 1. In HTML
```html
```
### 2. In JavaScript (DOM Property)
```javascript
object.onseeked = function() {
// Your code here
};
```
### 3. In JavaScript (Event Listener)
```javascript
object.addEventListener("seeked", myScript);
```
*Note: The `addEventListener()` method is supported in modern browsers (Internet Explorer 9 and above).*
---
## Technical Details
| Property | Value |
| :--- | :--- |
| **Bubbles** | No |
| **Cancelable** | No |
| **Event Type** | `Event` |
| **Supported HTML Tags** | ``, `` |
---
## Code Examples
### Example 1: Basic Video Seeked Event
This example executes a JavaScript function once the user finishes seeking to a new position in the video.
```html
Your browser does not support the video tag.
```
---
### Example 2: Displaying the Current Playback Position
This example uses the `currentTime` property to display the exact second the user jumped to after seeking.
```html
Your browser does not support the video tag.
New playback position: 0 seconds
```
---
### Example 3: Comparing `seeking` and `seeked`
This example demonstrates the sequence of events by tracking both the `seeking` (start of seek) and `seeked` (end of seek) events.
```html
Your browser does not support the video tag.
Interact with the video timeline.
```
---
### Example 4: Audio Seeked Event
The event works identically on `` elements.
```html
Your browser does not support the audio element.
```