FIND YOUR NEXT FEW LINES

Results for “Event control”

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

166 snippets foundClear filters
AngularLists & control flow

Filter a signal-backed list

Filter a signal-backed list with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Focus an input through its template reference

Focus an input through its template reference with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Handle a button click

Handle a button click with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactAccessibility & events

Handle an Escape key press

Handle an Escape key press with a small React component and explicit browser behavior.

React✓ Tested
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
C#Types & reliable control flow

Narrow an object using a type pattern

C#: A successful is pattern introduces a strongly typed local variable.

C#✓ Tested
JavaRecords & reliable control flow

Narrow an object with a pattern variable

Java: Pattern matching avoids a separate cast after a successful instanceof check.

Java✓ Tested
AngularLists & control flow

Page through a collection

Page through a collection with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Types & reliable control flow

Parse an enum name without throwing

C#: Combine TryParse and IsDefined when only named declared values should be accepted.

C#✓ Tested
C#Types & reliable control flow

Pass behavior as a function delegate

C#: Func describes a callable with typed parameters and a return value.

C#✓ Tested
C#Types & reliable control flow

Perform cleanup even after an exception

C#: A finally block runs after a handled failure as well as after success.

C#✓ Tested