"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[27570],{3905:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>f});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=n.createContext({}),c=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):p(p({},r),e)),t},s=function(e){var r=c(e.components);return n.createElement(l.Provider,{value:r},e.children)},u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=c(t),f=a,g=m["".concat(l,".").concat(f)]||m[f]||u[f]||i;return t?n.createElement(g,p(p({ref:r},s),{},{components:t})):n.createElement(g,p({ref:r},s))}));function f(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,p=new Array(i);p[0]=m;var o={};for(var l in r)hasOwnProperty.call(r,l)&&(o[l]=r[l]);o.originalType=e,o.mdxType="string"==typeof e?e:a,p[1]=o;for(var c=2;c{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>m,frontMatter:()=>p,metadata:()=>l,toc:()=>s});t(67294);var n=t(3905);function a(){return a=Object.assign||function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}const p={sidebar_label:"Page.mainFrame"},o="Page.mainFrame() method",l={unversionedId:"api/puppeteer.page.mainframe",id:"version-20.5.0/api/puppeteer.page.mainframe",title:"Page.mainFrame() method",description:"The page's main frame.",source:"@site/versioned_docs/version-20.5.0/api/puppeteer.page.mainframe.md",sourceDirName:"api",slug:"/api/puppeteer.page.mainframe",permalink:"/api/puppeteer.page.mainframe",draft:!1,tags:[],version:"20.5.0",frontMatter:{sidebar_label:"Page.mainFrame"},sidebar:"api",previous:{title:"Page.isServiceWorkerBypassed",permalink:"/api/puppeteer.page.isserviceworkerbypassed"},next:{title:"Page.metrics",permalink:"/api/puppeteer.page.metrics"}},c={},s=[{value:"Signature:",id:"signature",level:4},{value:"Remarks",id:"remarks",level:2}],u={toc:s};function m(e){var{components:r}=e,t=i(e,["components"]);return(0,n.kt)("wrapper",a({},u,t,{components:r,mdxType:"MDXLayout"}),(0,n.kt)("h1",a({},{id:"pagemainframe-method"}),"Page.mainFrame() method"),(0,n.kt)("p",null,"The page's main frame."),(0,n.kt)("h4",a({},{id:"signature"}),"Signature:"),(0,n.kt)("pre",null,(0,n.kt)("code",a({parentName:"pre"},{className:"language-typescript"}),"class Page {\n mainFrame(): Frame;\n}\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returns:")),(0,n.kt)("p",null,(0,n.kt)("a",a({parentName:"p"},{href:"/api/puppeteer.frame"}),"Frame")),(0,n.kt)("h2",a({},{id:"remarks"}),"Remarks"),(0,n.kt)("p",null,"Page is guaranteed to have a main frame which persists during navigations."))}m.isMDXComponent=!0}}]);