coderef

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: 155
Edge
12–141Not supported
142+Supportedsince Oct 31, 2025
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–141Not supported
142+Supportedsince Oct 28, 2025
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How 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-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
HTMLAnchorElement.interestForElement142142✕✕142✕✕
HTMLAreaElement.interestForElement142142✕✕142✕✕
HTMLButtonElement.interestForElement142142✕✕142✕✕
HTMLElement.interest_event142142✕✕142✕✕
HTMLElement.loseinterest_event142142✕✕142✕✕
InterestEvent142142✕✕142✕✕
InterestEvent.InterestEvent142142✕✕142✕✕
InterestEvent.source142142✕✕142✕✕
SVGAElement.interestForElement142142✕✕142✕✕
interest-source142142✕✕142✕✕
interest-target142142✕✕142✕✕
a.interestfor142142✕✕142✕✕
area.interestfor142142✕✕142✕✕
button.interestfor142142✕✕142✕✕
a.interestfor142142✕✕142✕✕