
JavaScript element.animate(): The Web Animations API
How element.animate() runs keyframe animations from JavaScript: timing options, the finished promise, pause and reverse, commitStyles() and reduced motion.
Tag
13 posts

How element.animate() runs keyframe animations from JavaScript: timing options, the finished promise, pause and reverse, commitStyles() and reduced motion.

How JavaScript element.contains() tells whether a node is inside another, with outside clicks, shadow DOM limits, text nodes and compareDocumentPosition().

When the JavaScript toggle event fires for details, popovers and dialogs, how beforetoggle and newState work, and how to lazy-load content with it.

Build a quiz app in vanilla JavaScript with a question data model, one render function, scoring, answer feedback, a results screen and accessible radio inputs.

When the JavaScript keydown event fires, how key, code and repeat differ, modifier keys, shortcuts, IME composition and accessible keyboard handling.

Create elements dynamically with createElement, append, template and replaceChildren, set text and attributes safely, and add many nodes quickly.

When the JavaScript transitionend event fires, why it fires once per property and bubbles, how to avoid missed events, and when to use animation promises.

Build a kanban board with drag and drop in vanilla JavaScript using the Drag and Drop API, drop positions, localStorage and a keyboard-accessible move option.

Build a markdown editor with live preview in vanilla JavaScript: a textarea, a small parser, sanitized output, toolbar buttons and autosave to localStorage.

Build a todo app in vanilla JavaScript with add, complete, edit, delete, filters and localStorage persistence, using event delegation and no framework.

A DOM manipulation cheat sheet: select, create, insert, move, remove, classes, attributes, data, styles, events, forms, scrolling and observers, with examples.

Build a calculator in vanilla JavaScript with a pure state reducer, button and keyboard input, decimals, division by zero and floating-point rounding fixes.