|
|
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[81021],{79103:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=t(85893),n=t(11151);const o={sidebar_label:"ConsoleMessage"},c="ConsoleMessage class",i={id:"api/puppeteer.consolemessage",title:"ConsoleMessage class",description:"ConsoleMessage objects are dispatched by page via the 'console' event.",source:"@site/versioned_docs/version-22.8.0/api/puppeteer.consolemessage.md",sourceDirName:"api",slug:"/api/puppeteer.consolemessage",permalink:"/api/puppeteer.consolemessage",draft:!1,unlisted:!1,tags:[],version:"22.8.0",frontMatter:{sidebar_label:"ConsoleMessage"},sidebar:"api",previous:{title:"Dialog.type",permalink:"/api/puppeteer.dialog.type"},next:{title:"ConsoleMessage.(constructor)",permalink:"/api/puppeteer.consolemessage._constructor_"}},a={},l=[{value:"Signature:",id:"signature",level:4},{value:"Constructors",id:"constructors",level:2},{value:"Methods",id:"methods",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,n.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"consolemessage-class",children:"ConsoleMessage class"}),"\n",(0,r.jsx)(s.p,{children:"ConsoleMessage objects are dispatched by page via the 'console' event."}),"\n",(0,r.jsx)(s.h4,{id:"signature",children:"Signature:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:"export declare class ConsoleMessage\n"})}),"\n",(0,r.jsx)(s.h2,{id:"constructors",children:"Constructors"}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Constructor"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Modifiers"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Description"})})]})}),(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"_constructor_",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage._constructor_",children:"(constructor)(type, text, args, stackTraceLocations)"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsxs)(s.p,{children:["Constructs a new instance of the ",(0,r.jsx)(s.code,{children:"ConsoleMessage"})," class"]})})]})})]}),"\n",(0,r.jsx)(s.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Method"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Modifiers"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Description"})})]})}),(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"args",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage.args",children:"args()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsx)(s.p,{children:"An array of arguments passed to the console."})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"location",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage.location",children:"location()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsx)(s.p,{children:"The location of the console message."})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"stacktrace",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage.stacktrace",children:"stackTrace()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsx)(s.p,{children:"The array of locations on the stack of the console message."})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"text",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage.text",children:"text()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsx)(s.p,{children:"The text of the console message."})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"type",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.consolemessage.type",children:"type()"})})}
|