Add basics to README and runnable examples for wiki - #2
Merged
Conversation
Agent-Logs-Url: https://github.com/Mubarrat/dom-builder/sessions/97b54605-4463-45a9-8588-583052da2fd5 Co-authored-by: Mubarrat <35663095+Mubarrat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Mubarrat/dom-builder/sessions/14de4583-2889-48da-9cd2-d4b1ed771b82 Co-authored-by: Mubarrat <35663095+Mubarrat@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Mubarrat
April 28, 2026 14:49
View session
Mubarrat
marked this pull request as ready for review
April 28, 2026 14:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The README had no usage guidance beyond installation — no API examples, no reactive patterns, nothing to help a new user get started. The repo also lacked any runnable demos.
README — new Basics section
Six progressive sections with minimal, illustrative code snippets:
$html.<tag>(attrs, ...children)call signatureonclick/on,data-*observable— getter/setter pattern, DOM child binding, attribute binding, two-way<input>bindingcomputed&cstr— deriving values from observables; tagged template reactive stringsarrayObservable—push/splice/reverse+.bind.map()for live listsvalidatable()—isValidcomputed, inline error messages, disabled submitexamples/— 10 self-contained HTML demosEach file loads
dist/dom.jsvia a relative path and runs in-browser with no build step.Static (dom-builder only):
01-hello-world— card element02-static-list— array →<ul>03-contact-form— form + submit handler04-data-table— table from object array05-svg-badge—$svgnamespaceReactive (dom-builder + observable):
01-live-counter—observablebound to DOM02-todo-list—arrayObservable,computed,cstr03-live-search— computed filter + match highlight04-registration-form—validatable(), computed errors, disabled submit05-optimistic-like—observable.optimistic()with automatic rollback on simulated server failureAn
examples/index.htmllinks all demos; README's new More Examples table points into the directory.