FIND YOUR NEXT FEW LINES

Results for “event”

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

69 snippets foundClear filters
AngularGetting Started

Call a component method from an event

Call a component method from an event with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Handle an event emitted by a child

Handle an event emitted by a child with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryInsertion & wrapping

Move a node without losing its event handler

jQuery: detach retains jQuery data and events for reinsertion.

jQuery✓ Tested
jQueryEvent control

Pass values through a custom event

jQuery: trigger passes its extra argument array after the event object.

jQuery✓ 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
Bash ScriptsDiagnostics & defensive scripting

Prevent a variable value from expanding as a filename pattern

Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.

Bash Scripts✓ Tested
CSSFlexbox alignment

Prevent an item from shrinking

CSS: Flex-shrink zero preserves a required size even when the container overflows.

CSS✓ Tested
Linux CommandsGetting Started

Prevent expansion with single quotes

Linux Commands: Prevent expansion with single quotes using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Docker / ComposeLimits & process security

Prevent gaining privileges through exec

Docker / Compose: The no-new-privileges flag is visible in process status.

Docker / Compose✓ Tested
jQueryEvent control

Prevent navigation from a handled link

jQuery: preventDefault cancels the browser action without cancelling event bubbling.

jQuery✓ Tested
Arduino / CSensor calculations

Prevent output chatter with separate thresholds

Arduino / C: Use different on and off thresholds to retain state between them.

Arduino / C✓ Tested
JavaScriptObject behavior & collections

Prevent runtime changes to top-level properties

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

JavaScript✓ Tested