demo · v142
interestfor
Hover or keyboard-focus the buttons. The left one wires up a popover by hand with JS; the right one uses interestfor — zero JS, same behaviour, plus dismiss-on-leave handled by the browser.
not supported
This browser does not implement
interestfor. The right-hand demo will not reveal the hovercard. Use Chrome 142+ for the real behaviour.
manual · hover handlers
How you wired this up before Chrome 142.
Paula Kinlan
Software engineer at Example Inc. 1.2k followers.
Software engineer at Example Inc. 1.2k followers.
declarative · interestfor
Same UX, no JS, automatic dismiss.
Paula Kinlan
Software engineer at Example Inc. 1.2k followers.
Software engineer at Example Inc. 1.2k followers.
interestfor attribute supported
—
events fired (right-hand button)
—
relevant API
<button interestfor="auto-tip">Profile link</button>
<div id="auto-tip" popover="hint">Paula Kinlan…</div>
// Browser handles hover, focus, long-press, and dismissal.
see also
- Interest Invokers — feature index
- ChromeStatus entry