v8/tools/system-analyzer/events.mjs
Zeynep Cankara 34b652607a [tools][system-analyzer] Change naming conventions
This CL establishes a naming consistency
across the app by renaming classes.

Class Name Changes:
SelectEvent -> FocusEvent
Entry -> IcLogEvent
V8Map -> MapLogEvent

Bug: v8:10644
Change-Id: Id075d9aa36ac6f03af0224feb0e38985b1445013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349300
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69382}
2020-08-13 13:39:44 +00:00

34 lines
959 B
JavaScript

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
class SelectionEvent extends CustomEvent {
static name = "showentries";
constructor(entries) {
super(SelectionEvent.name, { bubbles: true, composed: true });
if (!Array.isArray(entries) || entries.length == 0) {
throw new Error("No valid entries selected!");
}
this.entries = entries;
}
}
class FocusEvent extends CustomEvent {
static name = "showentrydetail";
constructor(entry) {
super(FocusEvent.name, { bubbles: true, composed: true });
this.entry = entry;
}
}
class SelectTimeEvent extends CustomEvent {
static name = 'timerangeselect';
constructor(start, end) {
super(SelectTimeEvent.name, { bubbles: true, composed: true });
this.start = start;
this.end = end;
}
}
export { SelectionEvent, FocusEvent, SelectTimeEvent };