forked from mystiq/hydrogen-web
add (commented out) instructions how to use record/replay
This commit is contained in:
parent
eb34fc4ef6
commit
29b531ae80
1 changed files with 12 additions and 0 deletions
12
src/main.js
12
src/main.js
|
@ -1,4 +1,5 @@
|
|||
import HomeServerApi from "./matrix/hs-api.js";
|
||||
// import {RecordRequester, ReplayRequester} from "./matrix/net/replay.js";
|
||||
import fetchRequest from "./matrix/net/fetch.js";
|
||||
import StorageFactory from "./matrix/storage/idb/create.js";
|
||||
import SessionsStore from "./matrix/sessions-store/localstorage/SessionsStore.js";
|
||||
|
@ -7,6 +8,17 @@ import BrawlView from "./ui/web/BrawlView.js";
|
|||
|
||||
export default async function main(container) {
|
||||
try {
|
||||
// to replay:
|
||||
// const fetchLog = await (await fetch("/fetchlogs/constrainterror.json")).json();
|
||||
// const replay = new ReplayRequester(fetchLog, {delay: false});
|
||||
// const request = replay.request;
|
||||
|
||||
// to record:
|
||||
// const recorder = new RecordRequester(fetchRequest);
|
||||
// const request = recorder.request;
|
||||
// window.getBrawlFetchLog = () => recorder.log();
|
||||
|
||||
// normal network:
|
||||
const request = fetchRequest;
|
||||
const vm = new BrawlViewModel({
|
||||
storageFactory: new StorageFactory(),
|
||||
|
|
Loading…
Reference in a new issue