https://github.com/regular/subdom
subdom component. wraps component/dom to isolate a sub dom, sort of chroot. Useful for widgets.
https://github.com/regular/subdom
Last synced: 10 months ago
JSON representation
subdom component. wraps component/dom to isolate a sub dom, sort of chroot. Useful for widgets.
- Host: GitHub
- URL: https://github.com/regular/subdom
- Owner: regular
- Created: 2013-04-04T09:14:53.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-22T10:21:13.000Z (almost 13 years ago)
- Last Synced: 2025-05-24T11:08:28.385Z (11 months ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# subdom
wraps component/dom to isolate a sub branch of the dom, sort of chroot. Useful for widgets
## Installation
$ component install regular/subdom
## API
This HTML contains two sub doms named `foo` and `bar`
title goes here
title goes here
A widget-like component can now create an instance of
component/dom that will only access elements of the named subdom.
mySubDom = require("subdom")("foo");
mySubDom(function(dom) {
dom("h1").html("Foo title"); // only changes h1 in scope 'foo'
});
## License
MIT