Results for “event”
Small, practical examples. Search by task or narrow things down below.
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
Read a handler result without event bubbling
jQuery: triggerHandler invokes the first matched element’s handlers without native default behavior.
jQuery✓ Tested
Read a selection when its change event fires
jQuery: A change handler observes the current selected value.
jQuery✓ Tested
Read a typed input event
Read a typed input event with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Remove related events by namespace
jQuery: Namespaced events let a feature clean up its own handlers.
jQuery✓ Tested
Reuse event subscription cleanup
Reuse event subscription cleanup with a small React component and explicit browser behavior.
React✓ Tested
Run an event handler once
Use jQuery one for a handler that removes itself after the first event.
jQuery✓ Tested
Stop a child event from reaching its parent
jQuery: stopPropagation leaves other handlers on the same element intact.
jQuery✓ Tested
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
Submit a readonly value while preventing edits
HTML: Readonly controls remain in form data, unlike disabled controls.
HTML✓ Tested
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
Allow pointer input to pass through a decorative overlay
CSS: Pointer-events none excludes the overlay from ordinary pointer hit testing.
CSS✓ Tested