browsertrix-crawler/tests/custom-behaviors/custom-2.js
Ilya Kreymer af1e0860e4
TypeScript Conversion (#425)
Follows #424. Converts the upcoming 1.0.0 branch based on native browser-based traffic capture and recording to TypeScript. Fixes #426

---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
Co-authored-by: emma <hi@emma.cafe>
2023-11-09 11:27:11 -08:00

23 lines
391 B
JavaScript

/* eslint-disable @typescript-eslint/no-unused-vars */
class TestBehavior2
{
static init() {
return {
state: {}
};
}
static get id() {
return "TestBehavior2";
}
static isMatch() {
return window.location.origin === "https://webrecorder.net";
}
async* run(ctx) {
ctx.log("In Test Behavior 2!");
yield ctx.Lib.getState(ctx, "test-stat-2");
}
}