puppeteer/assets/js/d621e622.199caabe.js
2021-10-07 15:21:45 +00:00

1 line
4.4 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[64853],{3905:function(e,r,t){t.d(r,{Zo:function(){return c},kt:function(){return g}});var n=t(67294);function p(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(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 u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){p(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function a(e,r){if(null==e)return{};var t,n,p=function(e,r){if(null==e)return{};var t,n,p={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(p[t]=e[t]);return p}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(p[t]=e[t])}return p}var s=n.createContext({}),i=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):u(u({},r),e)),t},c=function(e){var r=i(e.components);return n.createElement(s.Provider,{value:r},e.children)},l={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,p=e.mdxType,o=e.originalType,s=e.parentName,c=a(e,["components","mdxType","originalType","parentName"]),f=i(t),g=p,m=f["".concat(s,".").concat(g)]||f[g]||l[g]||o;return t?n.createElement(m,u(u({ref:r},c),{},{components:t})):n.createElement(m,u({ref:r},c))}));function g(e,r){var t=arguments,p=r&&r.mdxType;if("string"==typeof e||p){var o=t.length,u=new Array(o);u[0]=f;var a={};for(var s in r)hasOwnProperty.call(r,s)&&(a[s]=r[s]);a.originalType=e,a.mdxType="string"==typeof e?e:p,u[1]=a;for(var i=2;i<o;i++)u[i]=t[i];return n.createElement.apply(null,u)}return n.createElement.apply(null,t)}f.displayName="MDXCreateElement"},59464:function(e,r,t){t.r(r),t.d(r,{frontMatter:function(){return a},contentTitle:function(){return s},metadata:function(){return i},toc:function(){return c},default:function(){return f}});var n=t(87462),p=t(63366),o=(t(67294),t(3905)),u=["components"],a={},s=void 0,i={unversionedId:"puppeteer.browser.useragent",id:"version-10.0.0/puppeteer.browser.useragent",isDocsHomePage:!1,title:"puppeteer.browser.useragent",description:"Home &gt; puppeteer &gt; Browser &gt; userAgent",source:"@site/versioned_docs/version-10.0.0/puppeteer.browser.useragent.md",sourceDirName:".",slug:"/puppeteer.browser.useragent",permalink:"/puppeteer/docs/10.0.0/puppeteer.browser.useragent",editUrl:"https://github.com/facebook/puppeteer/edit/main/website/versioned_docs/version-10.0.0/puppeteer.browser.useragent.md",version:"10.0.0",frontMatter:{},sidebar:"version-10.0.0/docs",previous:{title:"puppeteer.browser.target",permalink:"/puppeteer/docs/10.0.0/puppeteer.browser.target"},next:{title:"puppeteer.browser.waitfortarget",permalink:"/puppeteer/docs/10.0.0/puppeteer.browser.waitfortarget"}},c=[{value:"Browser.userAgent() method",id:"browseruseragent-method",children:[]}],l={toc:c};function f(e){var r=e.components,t=(0,p.Z)(e,u);return(0,o.kt)("wrapper",(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/index"},"Home")," ",">"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer"},"puppeteer")," ",">"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer.browser"},"Browser")," ",">"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer.browser.useragent"},"userAgent")),(0,o.kt)("h2",{id:"browseruseragent-method"},"Browser.userAgent() method"),(0,o.kt)("p",null,"The browser's original user agent. Pages can override the browser user agent with ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer.page.setuseragent"},"Page.setUserAgent()"),"."),(0,o.kt)("b",null,"Signature:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-typescript"},"userAgent(): Promise<string>;\n")),(0,o.kt)("b",null,"Returns:"),(0,o.kt)("p",null,"Promise","<","string",">"))}f.isMDXComponent=!0}}]);