Extension.triggerAction() 方法
🌐 Extension.triggerAction() method
触发指定页面的扩展默认操作。这通常模拟用户点击浏览器工具栏中扩展的操作图标,可能会打开弹出窗口或执行操作脚本。
🌐 Triggers the default action of the extension for a specified page. This typically simulates a user clicking the extension's action icon in the browser toolbar, potentially opening a popup or executing an action script.
语法
🌐 Signature
class Extension {
abstract triggerAction(page: Page): Promise<void>;
}
参数
🌐 Parameters
范围 🌐 Parameter | 类型 🌐 Type | 描述 🌐 Description |
|---|---|---|
page | 触发操作的页面。 🌐 The page to trigger the action on. |
返回:
Promise<void>