20 lines
473 B
Markdown
20 lines
473 B
Markdown
# Projector [WIP]
|
|
|
|
A DOM-abstraction communicator. Projector consumes patches to update the DOM in _frames_ and
|
|
provides sanitized event objects to subscribers. This doesn't work yet. Please go look at the
|
|
gallery. :grinning:
|
|
|
|
# Usage
|
|
|
|
## Instantiation
|
|
|
|
```js
|
|
const projector = Projector(rootElement):
|
|
|
|
projector.subscribe(evt => {
|
|
console.log(`Received ${evt.type} event from:`, projector.getElement(evt.target));
|
|
);
|
|
|
|
projector.queuePatch(/* array of patches */);
|
|
```
|