mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-19 10:22:07 +08:00
Adds a proxy page scenario to the measurement adapter: a core-module shim serves synthetic proxy/clash/run-state data at the invoke seam (active only for the proxy scenario; other scenarios stay byte-identical), and a sawtooth scroll driver keeps the virtualizer measuring and the throttled scroll-position save running. Running the scene additionally requires the harness-side scenario contract and schema v10 from the clash-verge-rev-harness repository.
18 lines
509 B
TypeScript
18 lines
509 B
TypeScript
import { startReplay } from './replay'
|
|
|
|
// Thin loader: error handlers must precede scene module evaluation so any
|
|
// startup failure surfaces in perfError.
|
|
const data = document.documentElement.dataset
|
|
window.addEventListener('error', (event) => {
|
|
data.perfError = event.message
|
|
})
|
|
window.addEventListener('unhandledrejection', (event) => {
|
|
data.perfError = String(event.reason)
|
|
})
|
|
|
|
data.perfStage = 'loader'
|
|
await import('./proxy-scene')
|
|
data.perfStage = 'scene'
|
|
startReplay()
|
|
data.perfStage = 'replay'
|