Console❌️
此域已弃用 - 请改用 ''Runtime'' 或 Log。
EN
This domain is deprecated - use Runtime or Log instead.
✅️️ Methods
🔨Console.clearMessages
什么都不做。
EN
Does nothing.
🔨Console.disable
禁用控制台域,防止后续的控制台消息被报告给客户端。
EN
Disables console domain, prevents further console messages from being reported to the client.
🔨Console.enable
启用控制台域,通过messageAdded通知将迄今为止收集的消息发送给客户端。
EN
Enables console domain, sends the messages collected so far to the client by means of the
messageAdded notification.✅️️ Events
👋Console.messageAdded
当新控制台消息被添加时发出。
EN
Issued when new console message is added.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| message | ✔️ | ConsoleMessage | 已添加的控制台消息。 | ENConsole message that has been added. |
✅️️ Types
📌Console.ConsoleMessage
控制台消息。
EN
Console message.
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| source | ✔️ | string | 消息来源。 允许的值: xml、javascript、network、console-api、storage、appcache、rendering、security、other、deprecation、worker | ENMessage source.Allowed Values: xml, javascript, network, console-api, storage, appcache, rendering, security, other, deprecation, worker | |
| level | ✔️ | string | 消息严重性。 允许的取值: log、warning、error、debug、info | ENMessage severity.Allowed Values: log, warning, error, debug, info | |
| text | ✔️ | string | 消息文本。 | ENMessage text. | |
| url | string | 消息来源的URL。 | ENURL of the message origin. | ||
| line | integer | 生成此消息的资源中的行号(从1开始计数)。 | ENLine number in the resource that generated this message (1-based). | ||
| column | integer | 生成此消息的资源中的列号(从1开始计数)。 | ENColumn number in the resource that generated this message (1-based). |