Skip to content

Jashepp/ScopeDom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScopeDom

ScopeDom is a Reactive DOM Orchestrator.

Most modern frameworks attempt to manage the DOM by creating a complex, virtual representation of it.
ScopeDom does the opposite — it makes the DOM itself intelligent.

By leveraging native Web APIs — specifically Proxies, WeakMaps and MutationObservers — ScopeDom turns standard HTML attributes into reactive, scoped expressions. It doesn't try to replace the browser; it orchestrates it.


🚀 The Core Philosophy

  • DOM as Source of Truth: No Virtual DOM. If it's in your HTML, it's part of your application state.

  • Zero-Build Architecture: Write plain JavaScript and standard HTML. There is no compiler, no transpiler, and no build step. It works the moment you load the script.

  • Declarative Reactivity: Transform static markup into dynamic interfaces using intuitive attributes (eg: $on-click, $if, $repeat) and interpolation (eg: {{expression}}).

  • Hierarchical Scoping: Variables and methods flow naturally through the DOM tree, mimicking the way developers already think about nested UI components.

  • Immediate DOM Parsing: Prioritises responsiveness by observing elements as they arrive, rather than deferring to DOMContentLoaded.

Pronounced similarly to "Kingdom"


⚡ Quick Start

<!-- The data-scopedom-init attribute auto-activates the engine -->
<script src="scopedom.umd.js" data-scopedom-init></script>
<!-- Optional: Enable {{expression}} syntax via the parse plugin -->
<script src="parse.umd.js"></script>

<!-- The $scope attribute defines encapsulated scope variables -->
<div $scope="{ count: 0 }">
	<!-- Use $parse:text to enable interpolation within text nodes -->
	<p $parse:text>Count is: {{count}}</p>
	<!-- Increment count on click event -->
	<button $on-click="count++">Increment</button>
</div>

Note: Replace scopedom.js with the actual path to the script.


🛠 Project Status

Feature Status
Core Engine 🧪 Experimental / PoC
Core Plugins 🧪 Experimental
Commercial Use ❌ Not Ready
Hobbyist Use 🧪 Experimental
Unit Tests 🚧 In Progress

ScopeDom is currently in an experimental / proof-of-concept stage. It is intended for research and hobbyist use and is not yet ready for production environments.


🤝 Contribution

To submit a contribution, please create an issue or a pull request on the GitHub repository.

Note: Please ensure you run all existing tests after making any changes. All help, from code to documentation improvements, is greatly appreciated!


⚖️ License

Copyright (c) 2026 Jason Sheppard @Jashepp.

All rights reserved. Licensing will transition to an open-source model once the project reaches a stable milestone.


🔗 Links

Github Repository: https://github.com/Jashepp/ScopeDom

About

[Experimental] ScopeDom is a Reactive DOM Orchestrator. Turn standard HTML attributes into reactive, scoped expressions. No Virtual DOM. No compiler, no transpiler, no build step.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors