Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
d49943b
Document interest invokers
chrisdavidmills Nov 19, 2025
8acc235
Add interestfor attribute to element reference pages
chrisdavidmills Nov 19, 2025
307a9f9
Document interestForElement property
chrisdavidmills Nov 20, 2025
e2b424e
Remove interface prefixes from events
chrisdavidmills Nov 20, 2025
20cdaef
Add interest and loseinterest events
chrisdavidmills Nov 20, 2025
4b88315
Add InterestEvent reference docs
chrisdavidmills Nov 20, 2025
c6ceb25
Add interest-delay ref pages
chrisdavidmills Nov 20, 2025
4d4aafd
Add pseudo-classes
chrisdavidmills Nov 21, 2025
f5ec776
Merge branch 'main' into interest-invokers
chrisdavidmills Nov 22, 2025
743bc14
fixes for mfreed7 review comments
chrisdavidmills Nov 22, 2025
002d7a5
Add working :has() example
chrisdavidmills Nov 25, 2025
18e86f5
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
ba0c27f
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
95ee0af
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
14bb78a
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
c02e2da
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
2b68d91
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
d354692
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
b844a71
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
c898f5e
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
09296b3
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
9246f6d
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
f755044
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
c1294b4
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
b3fd5a2
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
1814ad6
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
66caa0a
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
3a66210
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
4fbc74a
Update files/en-us/web/api/popover_api/interest_invokers/index.md
chrisdavidmills Dec 2, 2025
0382a5f
Merge branch 'main' into interest-invokers
chrisdavidmills Dec 2, 2025
317b4e9
Change guide URL
chrisdavidmills Dec 2, 2025
5976782
Fixes for dipika review comments
chrisdavidmills Dec 2, 2025
9a7b830
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
c5a702d
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
f90becb
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
ca8d15c
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
6399a16
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
87af3e9
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
13586ed
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
ba4a5ec
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
a46581b
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
b5b1bfc
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
00420e9
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
007eda3
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
9f93c49
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
8ba9e44
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
89245b9
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
cf0eaeb
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
513a9bb
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
d395402
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
14f7628
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
c079e95
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
8c7e7a9
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
e43cd22
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
4f9ce91
Replace CSS links with macros
chrisdavidmills Dec 3, 2025
77abdec
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
e35f4ca
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
655ca8f
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
1452d34
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
880b0b9
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
318aa7b
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
7e27c64
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
20a2e93
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
18ca014
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
64b76b4
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
5a15c59
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
d0ad34c
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
9f9b191
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
48b0d11
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 3, 2025
4e8f531
Merge branch 'main' into interest-invokers
caugner Dec 3, 2025
4d35e12
Add links to interest invoker examples landing page
chrisdavidmills Dec 3, 2025
d4e5bc7
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
e769044
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
3925802
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
5a83210
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
e89a360
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
221a17f
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
4d99b0f
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
b6c3693
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
c164332
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
8df6ccd
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
dcdea93
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
a175873
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
3893614
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
8eee88a
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
533eec7
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
8b83526
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
7ae2751
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
63ff21f
Update files/en-us/web/api/popover_api/index.md
chrisdavidmills Dec 4, 2025
6b5a69d
Update files/en-us/web/api/popover_api/index.md
chrisdavidmills Dec 4, 2025
2da1b4b
Update files/en-us/web/api/popover_api/index.md
chrisdavidmills Dec 4, 2025
37c8d9f
Update files/en-us/web/api/popover_api/index.md
chrisdavidmills Dec 4, 2025
7fda6e2
Update files/en-us/web/api/popover_api/index.md
chrisdavidmills Dec 4, 2025
d74997a
Update files/en-us/web/api/popover_api/using/index.md
chrisdavidmills Dec 4, 2025
b8080ab
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
919953a
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
8002ffb
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
a1dced1
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
1b1d8b8
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
e0e414a
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
c9e0fe3
Update files/en-us/web/html/reference/elements/a/index.md
chrisdavidmills Dec 4, 2025
1ad58c4
Update files/en-us/web/html/reference/elements/area/index.md
chrisdavidmills Dec 4, 2025
4d398ae
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
1cf1664
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
9433726
Update files/en-us/web/api/popover_api/using_interest_invokers/index.md
chrisdavidmills Dec 4, 2025
1420822
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
b924c4c
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 4, 2025
9544a2e
Update files/en-us/web/html/reference/elements/button/index.md
chrisdavidmills Dec 4, 2025
3449159
Update files/en-us/web/svg/reference/element/a/index.md
chrisdavidmills Dec 4, 2025
2d7789c
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
fd517a1
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
ba106e4
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
f7b3b67
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
a59ae36
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
511bf9f
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
b73069d
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
10d9ba2
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
33ea5dd
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
601a989
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
4428dd5
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
200504a
Update files/en-us/web/css/reference/selectors/_colon_interest-source…
chrisdavidmills Dec 4, 2025
6e7a3d5
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
6f2c5af
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
bff3611
Update files/en-us/web/css/reference/selectors/_colon_interest-target…
chrisdavidmills Dec 4, 2025
424b389
Update files/en-us/web/api/htmlanchorelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
541cd7d
Update files/en-us/web/api/htmlanchorelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
9f2a084
Update files/en-us/web/api/htmlanchorelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
aa3a4ce
Update files/en-us/web/api/htmlanchorelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
3c8b5fd
Update files/en-us/web/api/htmlanchorelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
38908e0
Update files/en-us/web/api/htmlanchorelement/index.md
chrisdavidmills Dec 4, 2025
e8ba0e1
Update files/en-us/web/api/htmlareaelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
e0547f9
Update files/en-us/web/api/interestevent/interestevent/index.md
chrisdavidmills Dec 4, 2025
a294766
Update files/en-us/web/api/htmlbuttonelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
772d84b
Update files/en-us/web/api/htmlareaelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
763016c
Update files/en-us/web/api/interestevent/interestevent/index.md
chrisdavidmills Dec 4, 2025
0bcd95b
Update files/en-us/web/api/interestevent/source/index.md
chrisdavidmills Dec 4, 2025
7615e85
Update files/en-us/web/api/htmlbuttonelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
2288aad
Update files/en-us/web/api/htmlareaelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
459be29
Update files/en-us/web/api/htmlbuttonelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
570eaad
Update files/en-us/web/api/htmlareaelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
e84ce14
Update files/en-us/web/api/htmlbuttonelement/interestforelement/index.md
chrisdavidmills Dec 4, 2025
8f88046
Update files/en-us/web/api/htmlareaelement/index.md
chrisdavidmills Dec 4, 2025
652fa81
Update files/en-us/web/api/htmlbuttonelement/index.md
chrisdavidmills Dec 4, 2025
4b2af23
Update files/en-us/web/api/interestevent/index.md
chrisdavidmills Dec 4, 2025
ceab2d5
Update files/en-us/web/api/interestevent/index.md
chrisdavidmills Dec 4, 2025
eb987fd
A few more fixes for dipika review comments
chrisdavidmills Dec 4, 2025
939f3ae
Update files/en-us/web/api/htmlelement/index.md
chrisdavidmills Dec 5, 2025
167363b
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
46766c8
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
99c68ef
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
52d2420
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
1a79d88
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
7d8d994
Update files/en-us/web/api/htmlelement/interest_event/index.md
chrisdavidmills Dec 5, 2025
b66b9af
Update files/en-us/web/api/htmlelement/loseinterest_event/index.md
chrisdavidmills Dec 5, 2025
c796bc1
Update files/en-us/web/api/htmlelement/loseinterest_event/index.md
chrisdavidmills Dec 5, 2025
e6ce430
Update files/en-us/web/api/svgaelement/interestforelement/index.md
chrisdavidmills Dec 5, 2025
3f8d0b3
Update files/en-us/web/api/svgaelement/interestforelement/index.md
chrisdavidmills Dec 5, 2025
47d794f
Update files/en-us/web/api/svgaelement/interestforelement/index.md
chrisdavidmills Dec 5, 2025
3c52df0
Update files/en-us/web/api/svgaelement/interestforelement/index.md
chrisdavidmills Dec 5, 2025
4351cc6
Update files/en-us/web/api/svgaelement/interestforelement/index.md
chrisdavidmills Dec 5, 2025
6f69d30
Update files/en-us/web/api/svgaelement/index.md
chrisdavidmills Dec 5, 2025
8507e15
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
86d87bd
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
5fba1bc
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
5147382
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
fec819c
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
7e65243
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
e65a51f
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
815c268
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
3423635
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
cd8827e
Update files/en-us/web/css/reference/properties/interest-delay/index.md
chrisdavidmills Dec 5, 2025
1e70559
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
8479409
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
b16f459
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
225e416
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
4d53afb
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
7594c0f
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
5a15cb8
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
28e4e12
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
fe4f475
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
95712ad
Update files/en-us/web/css/reference/properties/interest-delay-end/in…
chrisdavidmills Dec 5, 2025
e224a37
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
7fa40de
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
15928ad
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
33010d4
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
af6ae3c
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
8e54157
Update files/en-us/web/css/reference/properties/interest-delay-start/…
chrisdavidmills Dec 5, 2025
652cfd9
Dipika review fixes, plus fixes for broken markdown syntax
chrisdavidmills Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions files/en-us/web/api/htmlanchorelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ _Inherits properties from its parent, {{domxref("HTMLElement")}}._
- : A string that is the result of parsing the [`href`](/en-US/docs/Web/HTML/Reference/Elements/a#href) HTML attribute relative to the document, containing a valid URL of a linked resource.
- {{domxref("HTMLAnchorElement.hreflang")}}
- : A string that reflects the [`hreflang`](/en-US/docs/Web/HTML/Reference/Elements/a#hreflang) HTML attribute, indicating the language of the linked resource.
- {{domxref("HTMLAnchorElement.interestForElement")}} {{experimental_inline}}
- : Gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("a")}} element is specified as an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker).
- {{domxref("HTMLAnchorElement.origin")}} {{ReadOnlyInline}}
- : Returns a string containing the origin of the URL, that is its scheme, its domain and its port.
- {{domxref("HTMLAnchorElement.password")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "HTMLAnchorElement: interestForElement property"
short-title: interestForElement
slug: Web/API/HTMLAnchorElement/interestForElement
page-type: web-api-instance-property
browser-compat: api.HTMLAnchorElement.interestForElement
---

{{ApiRef("HTML DOM")}}

The **`interestForElement`** property of the {{domxref("HTMLAnchorElement")}} interface gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("a")}} element is specified as an interest invoker.

See [Creating an interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker) for more details.

## Value

An {{domxref("Element")}} object instance, or `null` if the associated `<a>` element does not have a target element set.

## Examples

### Basic `interestForElement` usage

In this example, we use an `<a>` element's `interestForElement` property to set its target element and then retrieve that element's `tagName`. The `tagName` is then printed in the `<a>` element's text content.

#### HTML

The markup includes an `<a>` element and a `<div>` element. We turn the `<div>` element into a popover by setting a `popover` attribute on it.

```html live-sample___basic-interest-invoker
<a href="#">a link</a>
<div id="mypopover" popover>I am a <code>&lt;div&gt;</code> element.</div>
```

#### JavaScript

We get references to the `<a>` and `<div>` elements in script. We then create the interest invoker-target relationship between the `<a>` and the `<div>` by setting the `<a>` element's `interestForElement` property equal to a reference to the `<div>`. We then update the `<a>` element's text content to include a string containing the target element's `tagName`, retrieved via `invoker.interestForElement.tagName`.

```js live-sample___basic-interest-invoker
const invoker = document.querySelector("a");
const popover = document.querySelector("div");

invoker.interestForElement = popover;

invoker.textContent = `My target is a ${invoker.interestForElement.tagName} element`;
```

#### Result

The example renders like this:

{{embedlivesample("basic-interest-invoker", "100%", "100")}}

Try showing interest in the link (for example, by hovering or focusing it) to make the `<div>` appear.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
- [The Popover API](/en-US/docs/Web/API/Popover_API)
2 changes: 2 additions & 0 deletions files/en-us/web/api/htmlareaelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ _Inherits properties from its parent {{domxref("HTMLElement")}}._
- : A string containing the hostname in the referenced URL.
- {{domxref("HTMLAreaElement.href")}}
- : A string containing that reflects the [`href`](/en-US/docs/Web/HTML/Reference/Elements/area#href) HTML attribute, containing a valid URL of a linked resource.
- {{domxref("HTMLAreaElement.interestForElement")}} {{experimental_inline}}
- : Gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("area")}} element is specified as an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker).
- {{domxref("HTMLAreaElement.noHref")}} {{deprecated_inline}}
- : A boolean flag indicating if the area is inactive (`true`) or active (`false`).
- {{domxref("HTMLAreaElement.origin")}} {{ReadOnlyInline}}
Expand Down
77 changes: 77 additions & 0 deletions files/en-us/web/api/htmlareaelement/interestforelement/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: "HTMLAreaElement: interestForElement property"
short-title: interestForElement
slug: Web/API/HTMLAreaElement/interestForElement
page-type: web-api-instance-property
browser-compat: api.HTMLAreaElement.interestForElement
---

{{ApiRef("HTML DOM")}}

The **`interestForElement`** property of the {{domxref("HTMLAreaElement")}} interface gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("area")}} element is specified as an interest invoker.

See [Creating an interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker) for more details.

## Value

An {{domxref("Element")}} object instance, or `null` if the associated `<area>` element does not have a target element set.

## Examples

### Basic `interestForElement` usage

In this example, we use an `<area>` element's `interestForElement` property to set its target element and then retrieve the target element's `tagName`. The `tagName` is then printed in the `<area>` element's text content.

#### HTML

We include an `<area>` element and a `<div>` element. We turn the `<div>` element into a popover by setting a `popover` attribute on it.

```html live-sample___basic-interest-invoker
<map>
<area href="#" shape="default" />
</map>
<div id="mypopover" popover>I am a <code>&lt;div&gt;</code> element.</div>
```

```css hidden live-sample___basic-interest-invoker
map {
width: 200px;
height: 100px;
background-color: pink;
padding: 5px;
}
```

#### JavaScript

We get references to the `<area>` and `<div>` elements in script, then declare an interest invoker-target relationship between the `<area>` and the `<div>` by setting the `<area>` element's `interestForElement` property equal to a reference to the `<div>`. We then set the `<area>` element's text content equal to a string containing the target element's `tagName`, retrieved via `invoker.interestForElement.tagName`.

```js live-sample___basic-interest-invoker
const invoker = document.querySelector("area");
const popover = document.querySelector("div");

invoker.interestForElement = popover;

invoker.textContent = `My target is a ${invoker.interestForElement.tagName} element`;
```

#### Result

The example renders like this:

{{embedlivesample("basic-interest-invoker", "100%", "100")}}

Try showing interest in the area (for example, by hovering or focusing it) to make the `<div>` appear.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
- [The Popover API](/en-US/docs/Web/API/Popover_API)
2 changes: 2 additions & 0 deletions files/en-us/web/api/htmlbuttonelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ _Inherits properties from its parent, {{domxref("HTMLElement")}}._
- : A boolean value indicating that the form is not to be validated when it is submitted. If specified, this attribute overrides the [`novalidate`](/en-US/docs/Web/HTML/Reference/Elements/form#novalidate) attribute of the {{HTMLElement("form")}} element that owns this element.
- {{domxref("HTMLButtonElement.formTarget")}}
- : A string reflecting a name or keyword indicating where to display the response received after submitting the form. If specified, this attribute overrides the [`target`](/en-US/docs/Web/HTML/Reference/Elements/form#target) attribute of the {{HTMLElement("form")}} element that owns this element.
- {{domxref("HTMLButtonElement.interestForElement")}} {{experimental_inline}}
- : Gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("button")}} element is specified as an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker).
- {{domxref("HTMLButtonElement.labels")}} {{ReadOnlyInline}}
- : A {{domxref("NodeList")}} that represents a list of {{HTMLElement("label")}} elements that are labels for this button.
- {{domxref("HTMLButtonElement.name")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "HTMLButtonElement: interestForElement property"
short-title: interestForElement
slug: Web/API/HTMLButtonElement/interestForElement
page-type: web-api-instance-property
browser-compat: api.HTMLButtonElement.interestForElement
---

{{ApiRef("HTML DOM")}}

The **`interestForElement`** property of the {{domxref("HTMLButtonElement")}} interface gets or sets the target element of an interest invoker, in cases where the associated {{htmlelement("button")}} element is specified as an interest invoker.

See [Creating an interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers#creating_an_interest_invoker) for more details.

## Value

An {{domxref("Element")}} object instance, or `null` if the associated `<button>` element does not have a target element set.

## Examples

### Basic `interestForElement` usage

In this example, we use a `<button>` element's `interestForElement` property to set its target element and then retrieve the target element's `tagName`. The `tagName` is then printed in the `<button>` element's text content.

#### HTML

We include a `<button>` element and a `<div>` element. We turn the `<div>` element into a popover by setting a `popover` attribute on it.

```html live-sample___basic-interest-invoker
<button href="#">a button</button>
<div id="mypopover" popover>I am a <code>&lt;div&gt;</code> element.</div>
```

#### JavaScript

We get references to the `<button>` and `<div>` elements in script, then declare an interest invoker-target relationship between the `<button>` and the `<div>` by setting the `<button>` element's `interestForElement` property equal to a reference to the `<div>`. We then set the button's text content equal to a string containing the target element's `tagName`, retrieved via `invoker.interestForElement.tagName`.

```js live-sample___basic-interest-invoker
const invoker = document.querySelector("button");
const popover = document.querySelector("div");

invoker.interestForElement = popover;

invoker.textContent = `My target is a ${invoker.interestForElement.tagName} element`;
```

#### Result

The example renders like this:

{{embedlivesample("basic-interest-invoker", "100%", "100")}}

Try showing interest in the button (for example, by hovering or focusing it) to make the `<div>` appear.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
- [The Popover API](/en-US/docs/Web/API/Popover_API)
7 changes: 7 additions & 0 deletions files/en-us/web/api/htmlelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ _Also, inherits events from its parent, {{DOMxRef("Element")}}._
- {{DOMxRef("HTMLElement/drop_event", "drop")}}
- : This event is fired when an element or text selection is dropped on a valid drop target.

### Interest invoker events

- {{domxref("HTMLElement.interest_event", "interest")}} {{experimental_inline}}
- : Fired on the target element of an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers) when interest is shown, allowing code to be run in response.
- {{domxref("HTMLElement.loseinterest_event", "loseinterest")}} {{experimental_inline}}
- : Fired on the target element of an interest invoker when interest is lost, allowing code to be run in response.

### Toggle events

- {{DOMxRef("HTMLElement/beforetoggle_event", "beforetoggle")}}
Expand Down
87 changes: 87 additions & 0 deletions files/en-us/web/api/htmlelement/interest_event/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: "HTMLElement: interest event"
slug: Web/API/HTMLElement/interest_event
page-type: web-api-event
browser-compat: api.HTMLElement.interest_event
---

{{APIRef("HTML DOM")}}

The **`interest`** event of the {{domxref("HTMLElement")}} interface is fired on an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)'s target element when interest is shown, allowing code to be run in response.

## Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.

```js-nolint
addEventListener("interest", (event) => { })

oninterest = (event) => { }
```

## Event type

An {{domxref("InterestEvent")}}. Inherits from {{domxref("Event")}}.

{{InheritanceDiagram("InterestEvent")}}

## Examples

### Basic interest invoker event usage

In this example, we use the `interest` and `loseinterest` events to report when interest is shown and lost on a {{htmlelement("button")}} element that acts as an interest invoker. We do this by printing messages into the target {{htmlelement("p")}} element's text content.

#### HTML

We set up the relationship between the `<button>` element interest invoker and its target `<p>` element by setting the value of the `<button>` element's `interestfor` attribute equal to the `<p>` element's `id`.

```html live-sample___basic-interest-invoker
<button href="#" interestfor="mytarget">Interest invoker</button>
<p id="mytarget">No interest being shown currently.</p>
```

#### JavaScript

We get a reference to the `<button>` element and its target element via the {{domxref("HTMLButtonElement.interestForElement", "interestForElement")}} property.

```js live-sample___basic-interest-invoker
const invoker = document.querySelector("[interestfor]");
const target = invoker.interestForElement;
```

We then set two event listeners on the target element, for the `interest` and `loseinterest` events.

- When interest is shown, we update the target `<p>` element's text content to report the event and include the element that triggered it; in this example, that's the `<button>` element. Note how you can get a reference to the interest invoker via the event object's {{domxref("InterestEvent.source", "source")}} property.
- When interest is lost, we update the paragraph text to report that interest is no longer being shown.

```js live-sample___basic-interest-invoker
target.addEventListener("interest", (e) => {
target.textContent = `Interest shown via the ${e.source.tagName} element.`;
});

target.addEventListener("loseinterest", () => {
target.textContent = `Interest lost.`;
});
```

#### Result

The example renders like this:

{{embedlivesample("basic-interest-invoker", "100%", "100")}}

Try showing and losing interest in the button (for example, by hovering or focusing it) to see how the `<p>` text changes.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLElement.loseinterest_event", "loseinterest")}} event
- [Popover API](/en-US/docs/Web/API/Popover_API)
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
Loading