puppeteer/assets/js/092c361a.585ffe30.js
release-please[bot] 5432142959 deploy: ea480c24e1
2024-06-04 08:22:15 +00:00

2 lines
5.8 KiB
JavaScript

/*! For license information please see 092c361a.585ffe30.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[95625],{33713:(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/../docs/api/puppeteer.extensiontransport.md",sourceDirName:"api",slug:"/api/puppeteer.extensiontransport",permalink:"/next/api/puppeteer.extensiontransport",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"ExtensionTransport"},sidebar:"api",previous:{title:"ExperimentsConfiguration",permalink:"/next/api/puppeteer.experimentsconfiguration"},next:{title:"ExtensionTransport.close",permalink:"/next/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:"/next/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:"/next/api/puppeteer.extensiontransport.close",children:"close()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"connecttab",children:(0,r.jsx)(n.a,{href:"/next/api/puppeteer.extensiontransport.connecttab",children:"connectTab(tabId)"})})}),(0,r.jsx)("td",{children:(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"static"})})}),(0,r.jsx)("td",{})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"send",children:(0,r.jsx)(n.a,{href:"/next/api/puppeteer.extensiontransport.send",children:"send(message)"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},75251:(e,n,s)=>{var r=s(67294),t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,s){var r,i={},a=null,l=null;for(r in void 0!==s&&(a=""+s),void 0!==n.key&&(a=""+n.key),void 0!==n.ref&&(l=n.ref),n)o.call(n,r)&&!d.hasOwnProperty(r)&&(i[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===i[r]&&(i[r]=n[r]);return{$$typeof:t,type:e,key:a,ref:l,props:i,_owner:c.current}}n.Fragment=i,n.jsx=a,n.jsxs=a},85893:(e,n,s)=>{e.exports=s(75251)},11151:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>o});var r=s(67294);const t={},i=r.createContext(t);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);