|
|
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[88107],{64267:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var r=s(85893),t=s(11151);const i={sidebar_label:"ExtensionTransport"},o="ExtensionTransport class",c={id:"api/puppeteer.extensiontransport",title:"ExtensionTransport class",description:"Experimental ExtensionTransport allows establishing a connection via chrome.debugger API if Puppeteer runs in an extension. Since Chrome DevTools Protocol is restricted for extensions, the transport implements missing commands and events.",source:"@site/versioned_docs/version-22.10.1/api/puppeteer.extensiontransport.md",sourceDirName:"api",slug:"/api/puppeteer.extensiontransport",permalink:"/api/puppeteer.extensiontransport",draft:!1,unlisted:!1,tags:[],version:"22.10.1",frontMatter:{sidebar_label:"ExtensionTransport"},sidebar:"api",previous:{title:"ExperimentsConfiguration",permalink:"/api/puppeteer.experimentsconfiguration"},next:{title:"ExtensionTransport.close",permalink:"/api/puppeteer.extensiontransport.close"}},d={},a=[{value:"Signature:",id:"signature",level:4},{value:"Remarks",id:"remarks",level:2},{value:"Properties",id:"properties",level:2},{value:"Methods",id:"methods",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"extensiontransport-class",children:"ExtensionTransport class"}),"\n",(0,r.jsx)(n.p,{children:"Experimental ExtensionTransport allows establishing a connection via chrome.debugger API if Puppeteer runs in an extension. Since Chrome DevTools Protocol is restricted for extensions, the transport implements missing commands and events."}),"\n",(0,r.jsx)(n.h4,{id:"signature",children:"Signature:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"export declare class ExtensionTransport implements ConnectionTransport\n"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Implements:"})," ",(0,r.jsx)(n.a,{href:"/api/puppeteer.connectiontransport",children:"ConnectionTransport"})]}),"\n",(0,r.jsx)(n.h2,{id:"remarks",children:"Remarks"}),"\n",(0,r.jsxs)(n.p,{children:["The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ",(0,r.jsx)(n.code,{children:"ExtensionTransport"})," class."]}),"\n",(0,r.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Property"})}),(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Modifiers"})}),(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Type"})}),(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Description"})})]})}),(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"onclose",children:"onclose"})}),(0,r.jsx)("td",{children:(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"optional"})})}),(0,r.jsx)("td",{children:(0,r.jsx)(n.p,{children:"() => void"})}),(0,r.jsx)("td",{})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"onmessage",children:"onmessage"})}),(0,r.jsx)("td",{children:(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"optional"})})}),(0,r.jsx)("td",{children:(0,r.jsx)(n.p,{children:"(message: string) => void"})}),(0,r.jsx)("td",{})]})]})]}),"\n",(0,r.jsx)(n.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)(n.p,{children:"Method"})}),(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Modifiers"})}),(0,r.jsx)("th",{children:(0,r.jsx)(n.p,{children:"Description"})})]})}),(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"close",children:(0,r.jsx)(n.a,{href:"/api/puppeteer.extensiontransport.close",childre
|