Results for “handler”
Small, practical examples. Search by task or narrow things down below.
Recover from an expected promise rejection
TypeScript: Return a fallback from catch so later handlers receive an ordinary resolved value.
TypeScript✓ Tested
Remove related events by namespace
jQuery: Namespaced events let a feature clean up its own handlers.
jQuery✓ Tested
Report progress before completion
jQuery: notify calls registered progress handlers while the deferred is pending.
jQuery✓ Tested
Stop a child event from reaching its parent
jQuery: stopPropagation leaves other handlers on the same element intact.
jQuery✓ Tested
Toggle a native popover from a button
HTML: The popovertarget relationship handles show and hide behavior without a click handler.
HTML✓ Tested
Toggle a state class
Toggle a CSS class in a jQuery click handler.
jQuery✓ Tested
Transform a resolved promise result
JavaScript: A then handler returns the value passed to the next promise in the chain.
JavaScript✓ Tested
Transform a resolved promise result
TypeScript: A then handler returns the value passed to the next promise in the chain.
TypeScript✓ Tested