UNPKG

puppeteer-core

Version:

A high-level API to control headless Chrome over the DevTools Protocol

1 lines 10.3 kB
{"version":3,"file":"TargetManager.js","sourceRoot":"","sources":["../../../../src/cdp/TargetManager.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAKH,wDAAiE;AACjE,+DAAuD;AACvD,+CAA6C;AAC7C,iDAAyC;AACzC,qDAA6C;AAE7C,mDAA8C;AAE9C,2CAA4D;AAa5D,SAAS,2BAA2B,CAClC,MAAiB,EACjB,aAAyC;IAEzC,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;AAC9D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,aACX,SAAQ,8BAAiC;IAGzC,WAAW,CAAa;IACxB;;;;;;;;;OASG;IACH,4BAA4B,GAAG,IAAI,GAAG,EAAsC,CAAC;IAC7E;;;OAGG;IACH,0BAA0B,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC1D;;OAEG;IACH,2BAA2B,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC3D;;;OAGG;IACH,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,qBAAqB,CAAmC;IACxD,cAAc,CAAgB;IAE9B,mCAAmC,GAAG,IAAI,OAAO,EAG9C,CAAC;IACJ,qCAAqC,GAAG,IAAI,OAAO,EAGhD,CAAC;IAEJ,mBAAmB,GAAG,sBAAQ,CAAC,MAAM,EAAQ,CAAC;IAC9C,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;IACvC,kCAAkC,GAAG,IAAI,CAAC;IAE1C,gBAAgB,GAAkC,CAAC,EAAE,CAAC,CAAC;IAEvD,YACE,UAAsB,EACtB,aAA4B,EAC5B,oBAA2C,EAC3C,iCAAiC,GAAG,IAAI;QAExC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC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