chore: 更新学生档案数据
This commit is contained in:
37
node_modules/puppeteer-core/src/cdp/Dialog.ts
generated
vendored
Normal file
37
node_modules/puppeteer-core/src/cdp/Dialog.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import type {Protocol} from 'devtools-protocol';
|
||||
|
||||
import type {CDPSession} from '../api/CDPSession.js';
|
||||
import {Dialog} from '../api/Dialog.js';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export class CdpDialog extends Dialog {
|
||||
#client: CDPSession;
|
||||
|
||||
constructor(
|
||||
client: CDPSession,
|
||||
type: Protocol.Page.DialogType,
|
||||
message: string,
|
||||
defaultValue = '',
|
||||
) {
|
||||
super(type, message, defaultValue);
|
||||
this.#client = client;
|
||||
}
|
||||
|
||||
override async handle(options: {
|
||||
accept: boolean;
|
||||
text?: string;
|
||||
}): Promise<void> {
|
||||
await this.#client.send('Page.handleJavaScriptDialog', {
|
||||
accept: options.accept,
|
||||
promptText: options.text,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user