Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Events in C#: EventHandler, Safe Raising and Subscription Leaks
How the event keyword protects a delegate and CS0070, the private field and add/remove methods the compiler generates, the EventHandler convention and records as event data, safe raising with ?.Invoke, custom add/remove accessors and CS0079, a 50 MB subscription leak measured with WeakReference, and a Subscribe method that returns IDisposable.
Advanced JavaScript Events: Bubbling, Capturing, Event Delegation and CustomEvent
We walk through the capturing, target and bubbling phases, stopPropagation, event delegation with a single listener, the once/passive/signal options, CustomEvent and pointer events, with runnable examples.
JavaScript Events: Handling Clicks, Keyboard and Input with addEventListener
We listen to click, input, keydown and submit events with addEventListener, and learn about target and key on the event object, preventDefault, removeEventListener and why inline onclick is discouraged.