DOMREPLAY
Record and Replay your events in the browser.
Installation
npm install --save git+https://github.com/Eskalol/DOMReplay.git#dist
# or
yarn add git+https://github.com/Eskalol/DOMReplay.git#dist
Documentation
Demo
Demo auto replay
Demo app
Tip: Clear local storage when playing around with the framework.
API doc
Demo API repo
Demo App repo
Basic usage
domreplay.initialize() has to be called after the registry has been populated.
import DomReplay, { Hud, Registry, events } from 'domreplay';
// Populate the registry.
Registry.registerEvent(new events.ClickEvent());
Registry.registerEvent(new events.InputEvent());
// create the dom replay instance and initialize it.
const domreplay = new DomReplay({debugmode: true});
domreplay.initialize();
// If you also want to render the shipped hud.
const hud = new Hud(domreplay, {showRecordIndicator: true, showReplayIndicator: true});
hud.render();
If you also need the hud you should also import the styles.
@import '../node_modules/domreplay/dist/styles.css';