"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[52761],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});varr=n(67294);functiona(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functioni(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functiono(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functionl(e,t){if(null==e)return{};varn,r,a=function(e,t){if(null==e)return{};varn,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);returna}(e,t);if(Object.getOwnPropertySymbols){vari=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}returna}varp=r.createContext({}),c=function(e){vart=r.useContext(p),n=t;returne&&(n="function"==typeofe?e(t):o(o({},t),e)),n},u=function(e){vart=c(e.components);returnr.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){vart=e.children;returnr.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){varn=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(p,".").concat(d)]||m[d]||s[d]||i;returnn?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));functiond(e,t){varn=arguments,a=t&&t.mdxType;if("string"==typeofe||a){vari=n.length,o=newArray(i);o[0]=m;varl={};for(varpint)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeofe?e:a,o[1]=l;for(varc=2;c<i;c++)o[c]=n[c];returnr.createElement.apply(null,o)}returnr.createElement.apply(null,n)}m.displayName="MDXCreateElement"},39568:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>p,toc:()=>u});n(67294);varr=n(3905);functiona(){returna=Object.assign||function(e){for(vart=1;t<arguments.length;t++){varn=arguments[t];for(varrinn)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}returne},a.apply(this,arguments)}functioni(e,t){if(null==e)return{};varn,r,a=function(e,t){if(null==e)return{};varn,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);returna}(e,t);if(Object.getOwnPropertySymbols){vari=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}returna}consto={sidebar_label:"EventEmitter.on"},l="EventEmitter.on() method",p={unversionedId:"api/puppeteer.eventemitter.on",id:"api/puppeteer.eventemitter.on",title:"EventEmitter.on() method",description:"Bind an event listener to fire when an event occurs.",source:"@site/../docs/api/puppeteer.eventemitter.on.md",sourceDirName:"api",slug:"/api/puppeteer.eventemitter.on",permalink:"/next/api/puppeteer.eventemitter.on",draft:!1,tags:[],version:"current",frontMatter:{sidebar_label:"EventEmitter.on"},sidebar:"api",previous:{title:"EventEmitter.off",permalink:"/next/api/puppeteer.eventemitter.off"},next:{title:"EventEmitter.once",permalink:"/next/api/puppeteer.eventemitter.once"}},c={},u=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2}],s={toc:u};functionm(e){var{components:t}=e,n=i(e,["components"]);return(0,r.kt)("wrapper",a({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",a({},{id:"eventemitteron-method"}),"EventEmitter.on() method"),(0,r.kt)("p",null,"Bind an event listener to fire when an event occurs."),(0,r.kt)("h4",a({},{id:"signature"}),"Signature:"),(0,r.kt)("pre",null,(0,r.kt)("code",a({parentName:"pre"}