Interest invokersLimited availability
Interest invokers, registered by the interestfor HTML attribute, trigger events and actions on a target element when a user shows interest in the element, through behaviors such as hover, focus, or long-press. Pseudo-elements apply styles to sources and targets of interest.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–141Not supported
142+Supportedsince Oct 28, 2025
Current: 155Edge
12–141Not supported
142+Supportedsince Oct 31, 2025
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
18–141Not supported
142+Supportedsince Oct 28, 2025
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: interestForElement.
Feature detection
JS · check before using
if ("InterestEvent" in globalThis) {
// InterestEvent is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (15). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLAnchorElement.interestForElement | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| HTMLAreaElement.interestForElement | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| HTMLButtonElement.interestForElement | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| HTMLElement.interest_event | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| HTMLElement.loseinterest_event | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| InterestEvent | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| InterestEvent.InterestEvent | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| InterestEvent.source | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| SVGAElement.interestForElement | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| interest-source | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| interest-target | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| a.interestfor | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| area.interestfor | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| button.interestfor | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |
| a.interestfor | 142 | 142 | ✕ | ✕ | 142 | ✕ | ✕ |