FIND YOUR NEXT FEW LINES

Results for “Refs & DOM interaction”

Small, practical examples. Search by task or narrow things down below.

169 snippets foundClear filters
AngularEvents & DOM interaction

Handle Escape to dismiss a panel

Handle Escape to dismiss a panel with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Handle the Enter key specifically

Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Prevent a link’s default navigation

Prevent a link’s default navigation with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Read a typed input event

Read a typed input event with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

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
AngularEvents & DOM interaction

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
CSSFlexbox alignment

Change visual order without changing DOM order

CSS: Order changes flex painting positions while keyboard and reading order still follow the document.

CSS✓ Tested
PythonFunctions & error handling

Raise and catch a domain-specific exception

Python: Give a validation failure its own exception type so callers can handle it narrowly.

Python✓ Tested
CSSInteraction selectors

Alternate row backgrounds with a structural selector

CSS: Nth-child counts sibling positions starting at one.

CSS✓ Tested
CSSInteraction selectors

Change a control’s appearance on hover

CSS: Hover applies while a pointing device is positioned over the element.

CSS✓ Tested
CSSInteraction selectors

Display a hint for a truly empty container

CSS: The empty selector requires no element or text children, including whitespace text nodes.

CSS✓ Tested
CSSInteraction selectors

Highlight a group containing keyboard focus

CSS: Focus-within matches a parent when any descendant has focus.

CSS✓ Tested