YAML Validator & Formatter - Online Check Syntax
Validate YAML syntax with line‑by‑line error messages. Also format messy YAML into clean, indented output. All in your browser.
UD5 Toolkit
Explore the Invoker Commands API — a declarative way to wire up buttons to dialogs, popovers, and more without writing any JavaScript. Part of the modern HTML specification for building cleaner, more accessible UIs.
commandfor
No JavaScript needed — the button opens and closes the dialog declaratively.
<!-- Button triggers dialog via commandfor --> <button commandfor="demoDialog" command="show-modal"> Open Dialog </button> <button commandfor="demoDialog" command="close"> Close Dialog </button> <!-- The dialog itself --> <dialog id="demoDialog"> <h5>Dialog Opened!</h5> <p>No JavaScript needed.</p> <!-- Internal close button --> <button commandfor="demoDialog" command="close"> Close </button> </dialog>
<button id="myBtn">Open</button> <dialog id="myDialog">...</dialog> <script> document.getElementById('myBtn') .addEventListener('click', () => { document.getElementById('myDialog') .showModal(); }); </script>
<!-- No JavaScript needed! --> <button commandfor="myDialog" command="show-modal"> Open </button> <dialog id="myDialog">...</dialog>
| Browser | commandfor / command | Popover API | Notes |
|---|---|---|---|
| Chrome | âś… 125+ | âś… 114+ | Full support |
| Edge | âś… 125+ | âś… 114+ | Full support |
| Firefox | ⚠️ Partial | ✅ 125+ | commandfor behind flag; popover supported |
| Safari | ❌ Not yet | ⚠️ 17+ | Under development |
Last updated: Check Can I Use for the latest support data. Progressive enhancement recommended.
commandfor attribute?
commandfor is an HTML attribute placed on a <button> that references the id of a target element
(like a <dialog> or popover). Combined with the command attribute, it declaratively wires up
interactive behavior without JavaScript. It's part of the Invoker Commands API specification.
command attribute take?
Currently supported values: show-modal (opens a dialog modally), close (closes a dialog),
show-popover, hide-popover, and toggle-popover.
The value you use depends on the target element type and desired behavior.
No. That's the entire point! In supporting browsers, commandfor + command
work entirely through the browser's built-in HTML parser and rendering engine. Zero JavaScript is required.
For unsupported browsers, you can add a small polyfill or fallback.
commandfor keeps behavior in HTML where it belongs, making intent clearer and code more maintainable.
It works even when JavaScript is blocked or fails, improves accessibility by leveraging native browser mechanics,
and eliminates boilerplate event listener code.
A single commandfor attribute references one target ID. To control multiple elements,
you'd need multiple buttons. However, you can have multiple buttons all targeting the same element with different
command values (e.g., one for show, one for hide).
The popover attribute is placed on the target element to designate it as a popover.
commandfor is placed on the triggering button to reference and control that popover.
They work together: popover makes an element a popover; commandfor controls it declaratively.
Currently, commandfor is primarily designed for <dialog> and popover elements.
The Invoker Commands API may expand to support custom elements and other interactive targets in future
specification updates. For forms, traditional form attributes are still recommended.
Use progressive enhancement: keep your commandfor buttons, and add a small feature-detection script
that checks 'commandFor' in HTMLButtonElement.prototype. If unsupported, attach traditional
addEventListener handlers as a fallback. This ensures all users get a working experience.
Validate YAML syntax with line‑by‑line error messages. Also format messy YAML into clean, indented output. All in your browser.
Easily format, validate, and beautify XML documents. Minify XML data with a single click. All processing happens locally in your browser for maximum privacy.
A searchable list of essential Docker CLI commands for managing containers, images, and volumes. Copy-paste friendly. Always handy.
Paste HTML and detect unclosed tags, invalid nesting, and duplicate IDs. Lightweight client‑side validation.
Build and test regular expressions against sample text. Real-time match highlighting, capture groups display, and flavor options. All inside your browser.
Type a mathematical expression like 'sqrt(16)+sin(pi/2)' and get the result instantly. Supports popular functions. Local.
Paste your sitemap XML and check for missing namespaces, invalid URLs, or size limit violations. Keep your SEO healthy.
Online JSON formatting and validation tool, supporting JSON minify/beautify, syntax highlighting, and error locating. Data processed locally in browser for security.
Build 'I feel... when... because...' statements interactively. Improve communication in relationships. Local only.
Press keys on your physical keyboard and see them highlighted on a virtual keyboard. Detects multi-key rollover. Quick hardware check.
Paste your SQL query and check for basic syntax errors. Highlights missing commas, wrong keywords. Local analysis.
Build a printable table for your electrical panel. Label each breaker number with its room or appliance. Stay organized.
Interactive visual guide to figure out if a door is left-handed or right-handed. Click through steps. Avoid ordering the wrong door.
Create a polished HTML email signature with your photo, links, and company details. Live preview and copy HTML to clipboard. Works with Gmail, Outlook, Apple Mail.
Select stain type (wine, grease, ink) and surface to get immediate first-aid cleaning steps. Local reference.
Enter your bag dimensions and compare against major airline carry-on and checked limits. Visual pass/fail gauge. Avoid gate fees.
Adjust material types (leaves, grass) to achieve the ideal 30:1 C:N ratio. Improve compost bin performance. Local only.
Write JavaScript code and see the output or console.log results immediately. Safe iframe sandbox. For quick experiments.
Convert between whole fruit, juice volume, and zest quantity. Never wonder how many lemons for 1/4 cup.
Create your own oral rehydration solution by mixing salt, potassium, and sugar to WHO formula. Convert to teaspoon amounts.
Send conditional requests to a URL and verify that the server correctly handles ETag and If‑None‑Match. Audit caching.
Paste tab‑separated or CSV data and instantly get a beautifully aligned Markdown table. Essential for documentation.
Paste JavaScript and catch syntax errors instantly with line numbers. Lightweight pre‑commit check. Local.
Click on leaf symptoms (yellow, brown tips, spots) to diagnose common houseplant issues and solutions.
Enter a topic and get a list of suggested hashtags. Mix popular and niche tags. Copy all with one click. Local only.
Experiment with the CSS color-mix() function. Pick two colors and mix them in different color spaces (srgb, oklch). Copy the CSS.
Interactive checklist of the classic 10 essentials for safe hiking. Check items, see explanations, and never forget critical gear for the trail.
Calculate board feet for dimensional lumber and generate a cut list with waste factor. Quick carpentry tool.
Check if your A/B test results are statistically significant using chi-squared test. Enter visitors & conversions for control/variant. Results in plain English.
Plan your travel budget by entering flights, accommodation, meals, activities, transport. See cost breakdown and per-person share. Fully local.