mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
add (commented out) instructions how to use record/replay
This commit is contained in:
parent
eb34fc4ef6
commit
29b531ae80
12
src/main.js
12
src/main.js
@ -1,4 +1,5 @@
|
|||||||
import HomeServerApi from "./matrix/hs-api.js";
|
import HomeServerApi from "./matrix/hs-api.js";
|
||||||
|
// import {RecordRequester, ReplayRequester} from "./matrix/net/replay.js";
|
||||||
import fetchRequest from "./matrix/net/fetch.js";
|
import fetchRequest from "./matrix/net/fetch.js";
|
||||||
import StorageFactory from "./matrix/storage/idb/create.js";
|
import StorageFactory from "./matrix/storage/idb/create.js";
|
||||||
import SessionsStore from "./matrix/sessions-store/localstorage/SessionsStore.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) {
|
export default async function main(container) {
|
||||||
try {
|
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 request = fetchRequest;
|
||||||
const vm = new BrawlViewModel({
|
const vm = new BrawlViewModel({
|
||||||
storageFactory: new StorageFactory(),
|
storageFactory: new StorageFactory(),
|
||||||
|
Loading…
Reference in New Issue
Block a user