Results for “Refs & DOM interaction”
Small, practical examples. Search by task or narrow things down below.
Handle Escape to dismiss a panel
Handle Escape to dismiss a panel with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle the Enter key specifically
Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Prevent a link’s default navigation
Prevent a link’s default navigation with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Read a typed input event
Read a typed input event with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Stop a nested click from reaching its parent
Stop a nested click from reaching its parent with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Validate a field when focus leaves it
Validate a field when focus leaves it with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Change visual order without changing DOM order
CSS: Order changes flex painting positions while keyboard and reading order still follow the document.
CSS✓ Tested
Raise and catch a domain-specific exception
Python: Give a validation failure its own exception type so callers can handle it narrowly.
Python✓ Tested
Alternate row backgrounds with a structural selector
CSS: Nth-child counts sibling positions starting at one.
CSS✓ Tested
Change a control’s appearance on hover
CSS: Hover applies while a pointing device is positioned over the element.
CSS✓ Tested
Display a hint for a truly empty container
CSS: The empty selector requires no element or text children, including whitespace text nodes.
CSS✓ Tested
Highlight a group containing keyboard focus
CSS: Focus-within matches a parent when any descendant has focus.
CSS✓ Tested