FIND YOUR NEXT FEW LINES

Results for “event”

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

69 snippets foundClear filters
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested
jQueryEvent control

Read a handler result without event bubbling

jQuery: triggerHandler invokes the first matched element’s handlers without native default behavior.

jQuery✓ Tested
jQueryEvent control

Read a selection when its change event fires

jQuery: A change handler observes the current selected value.

jQuery✓ 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
jQueryEvent control

Remove related events by namespace

jQuery: Namespaced events let a feature clean up its own handlers.

jQuery✓ Tested
ReactCustom hooks

Reuse event subscription cleanup

Reuse event subscription cleanup with a small React component and explicit browser behavior.

React✓ Tested
jQueryEvents

Run an event handler once

Use jQuery one for a handler that removes itself after the first event.

jQuery✓ Tested
jQueryEvent control

Stop a child event from reaching its parent

jQuery: stopPropagation leaves other handlers on the same element intact.

jQuery✓ Tested
ReactAccessibility & events

Stop an event from reaching a parent handler

Stop an event from reaching a parent handler with a small React component and explicit browser behavior.

React✓ Tested
HTMLForm behavior

Submit a readonly value while preventing edits

HTML: Readonly controls remain in form data, unlike disabled controls.

HTML✓ Tested
ReactEffects & lifecycle

Subscribe to and clean up a window event

Subscribe to and clean up a window event with a small React component and explicit browser behavior.

React✓ Tested
CSSVisual treatment & accessibility

Allow pointer input to pass through a decorative overlay

CSS: Pointer-events none excludes the overlay from ordinary pointer hit testing.

CSS✓ Tested