mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-10-22 17:55:23 +00:00
代码梳理
This commit is contained in:
@@ -26,8 +26,14 @@ export class PluginEvent {
|
||||
msg: Msg | null = null;
|
||||
data: any = null;
|
||||
|
||||
source: Page | null = null; // 事件发送的源头
|
||||
target: Page | null = null; // 事件要发送的目标
|
||||
/**
|
||||
* 事件发送的源头
|
||||
*/
|
||||
source: Page | null = null;
|
||||
/**
|
||||
* 事件要发送的目标
|
||||
*/
|
||||
target: Page | null = null;
|
||||
|
||||
static check(event: PluginEvent, source: Page, target: Page) {
|
||||
return event && source && target && event.source === source && event.target === target;
|
||||
@@ -40,6 +46,9 @@ export class PluginEvent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static finish(event: PluginEvent) {
|
||||
event.source = event.target = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user