Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
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.
Advanced DOM in JavaScript: Navigation, closest, dataset, template and Batched Updates
We navigate the DOM with parent, children, siblings and closest, use dataset, insertAdjacentHTML, DocumentFragment, template, cloneNode and getBoundingClientRect, then meet reflow and batch our updates.
TypeScript in the Browser: DOM Types, querySelector and Events
We look at the lib.dom types, what querySelector returns and its generic form, element types like HTMLInputElement, event types and the event.target trap, then run tsc output on a page as a module script.
JavaScript Forms: Reading Values, Handling Submit and Simple Validation
We read form values with value, checked and selectedIndex, catch the submit event, write checks for empty fields, email and length, show errors on the page and get to know HTML's built-in validation.
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.
Intro to the JavaScript DOM: Selecting, Changing and Creating Elements
We meet the DOM tree the browser builds from HTML, select elements with querySelector, see why textContent and innerHTML differ and what XSS is, then change the page live with classList and createElement.