chrome-devtools-frontend
Version:
Chrome DevTools UI
65 lines (57 loc) • 1.6 kB
text/typescript
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export const enum Category {
ANIMATION = 'animation',
AUCTION_WORKLET = 'auction-worklet',
CANVAS = 'canvas',
CLIPBOARD = 'clipboard',
CONTROL = 'control',
DEVICE = 'device',
DOM_MUTATION = 'dom-mutation',
DRAG_DROP = 'drag-drop',
GEOLOCATION = 'geolocation',
KEYBOARD = 'keyboard',
LOAD = 'load',
MEDIA = 'media',
MOUSE = 'mouse',
NOTIFICATION = 'notification',
PARSE = 'parse',
PICTURE_IN_PICTURE = 'picture-in-picture',
POINTER = 'pointer',
SCRIPT = 'script',
SHARED_STORAGE_WORKLET = 'shared-storage-worklet',
TIMER = 'timer',
TOUCH = 'touch',
TRUSTED_TYPE_VIOLATION = 'trusted-type-violation',
WEB_AUDIO = 'web-audio',
WINDOW = 'window',
WORKER = 'worker',
XHR = 'xhr',
}
export class CategorizedBreakpoint {
/**
* The name of this breakpoint as passed to 'setInstrumentationBreakpoint',
* 'setEventListenerBreakpoint' and 'setBreakOnCSPViolation'.
*
* Note that the backend adds a 'listener:' and 'instrumentation:' prefix
* to this name in the 'Debugger.paused' CDP event.
*/
readonly name: string;
readonly
constructor(category: Category, name: string) {
this.
this.name = name;
this.
}
category(): Category {
return this.
}
enabled(): boolean {
return this.
}
setEnabled(enabled: boolean): void {
this.
}
}