chrome-devtools-frontend
Version:
Chrome DevTools UI
49 lines (40 loc) • 1.25 kB
text/typescript
// Copyright 2023 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as UI from '../../../ui/legacy/legacy.js';
export class RecorderShortcutHelper {
constructor(timeout = 200) {
this.
this.
}
this.
if (this.
clearTimeout(this.
}
this.
}
this.
void callback();
}
handleShortcut(callback: () => void): void {
this.
document.addEventListener(
'keyup',
event => {
if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {
this.
}
},
{signal: this.
);
this.
() => this.
this.
);
}
}