跳到主要内容

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消息来源。
允许的值:xmljavascriptnetworkconsole-apistorageappcacherenderingsecurityotherdeprecationworker
ENMessage source.
Allowed Values: xml, javascript, network, console-api, storage, appcache, rendering, security, other, deprecation, worker
level✔️string消息严重性。
允许的取值:logwarningerrordebuginfo
ENMessage severity.
Allowed Values: log, warning, error, debug, info
text✔️string消息文本。
ENMessage text.
urlstring消息来源的URL。
ENURL of the message origin.
lineinteger生成此消息的资源中的行号(从1开始计数)。
ENLine number in the resource that generated this message (1-based).
columninteger生成此消息的资源中的列号(从1开始计数)。
ENColumn number in the resource that generated this message (1-based).