https://github.com/canjs/dom-patch
dom-patch
https://github.com/canjs/dom-patch
Last synced: about 1 year ago
JSON representation
dom-patch
- Host: GitHub
- URL: https://github.com/canjs/dom-patch
- Owner: canjs
- License: mit
- Created: 2015-07-18T19:00:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-03-30T01:33:44.000Z (about 6 years ago)
- Last Synced: 2024-10-11T13:49:09.400Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/dom-patch
- Size: 216 KB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# dom-patch
[](https://travis-ci.org/canjs/dom-patch)
[](http://badge.fury.io/js/dom-patch)
A library for patching DOMs. Binding to a document will return patches as they happen, which can be re-applied to another document.
This is useful when syncing DOMs, such as with web worker rendering.
## Usage
```js
var patch = require("dom-patch");
var apply = require("dom-patch/apply");
patch(document, function(patches){
apply(otherDocument, patches);
});
```
## License
MIT