Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

protocol-proxy-api.d.ts 131KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496
  1. /**********************************************************************
  2. * Auto-generated by protocol-dts-generator.ts, do not edit manually. *
  3. **********************************************************************/
  4. import Protocol from './protocol'
  5. /**
  6. * API generated from Protocol commands and events.
  7. */
  8. export namespace ProtocolProxyApi {
  9. export interface ProtocolApi {
  10. Console: ConsoleApi;
  11. Debugger: DebuggerApi;
  12. HeapProfiler: HeapProfilerApi;
  13. Profiler: ProfilerApi;
  14. Runtime: RuntimeApi;
  15. Schema: SchemaApi;
  16. Accessibility: AccessibilityApi;
  17. Animation: AnimationApi;
  18. ApplicationCache: ApplicationCacheApi;
  19. Audits: AuditsApi;
  20. BackgroundService: BackgroundServiceApi;
  21. Browser: BrowserApi;
  22. CSS: CSSApi;
  23. CacheStorage: CacheStorageApi;
  24. Cast: CastApi;
  25. DOM: DOMApi;
  26. DOMDebugger: DOMDebuggerApi;
  27. DOMSnapshot: DOMSnapshotApi;
  28. DOMStorage: DOMStorageApi;
  29. Database: DatabaseApi;
  30. DeviceOrientation: DeviceOrientationApi;
  31. Emulation: EmulationApi;
  32. HeadlessExperimental: HeadlessExperimentalApi;
  33. IO: IOApi;
  34. IndexedDB: IndexedDBApi;
  35. Input: InputApi;
  36. Inspector: InspectorApi;
  37. LayerTree: LayerTreeApi;
  38. Log: LogApi;
  39. Memory: MemoryApi;
  40. Network: NetworkApi;
  41. Overlay: OverlayApi;
  42. Page: PageApi;
  43. Performance: PerformanceApi;
  44. Security: SecurityApi;
  45. ServiceWorker: ServiceWorkerApi;
  46. Storage: StorageApi;
  47. SystemInfo: SystemInfoApi;
  48. Target: TargetApi;
  49. Tethering: TetheringApi;
  50. Tracing: TracingApi;
  51. Fetch: FetchApi;
  52. WebAudio: WebAudioApi;
  53. WebAuthn: WebAuthnApi;
  54. Media: MediaApi;
  55. }
  56. export interface ConsoleApi {
  57. /**
  58. * Does nothing.
  59. */
  60. clearMessages(): Promise<void>;
  61. /**
  62. * Disables console domain, prevents further console messages from being reported to the client.
  63. */
  64. disable(): Promise<void>;
  65. /**
  66. * Enables console domain, sends the messages collected so far to the client by means of the
  67. * `messageAdded` notification.
  68. */
  69. enable(): Promise<void>;
  70. /**
  71. * Issued when new console message is added.
  72. */
  73. on(event: 'messageAdded', listener: (params: Protocol.Console.MessageAddedEvent) => void): void;
  74. }
  75. export interface DebuggerApi {
  76. /**
  77. * Continues execution until specific location is reached.
  78. */
  79. continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<void>;
  80. /**
  81. * Disables debugger for given page.
  82. */
  83. disable(): Promise<void>;
  84. /**
  85. * Enables debugger for the given page. Clients should not assume that the debugging has been
  86. * enabled until the result for this command is received.
  87. */
  88. enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
  89. /**
  90. * Evaluates expression on a given call frame.
  91. */
  92. evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
  93. /**
  94. * Execute a Wasm Evaluator module on a given call frame.
  95. */
  96. executeWasmEvaluator(params: Protocol.Debugger.ExecuteWasmEvaluatorRequest): Promise<Protocol.Debugger.ExecuteWasmEvaluatorResponse>;
  97. /**
  98. * Returns possible locations for breakpoint. scriptId in start and end range locations should be
  99. * the same.
  100. */
  101. getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
  102. /**
  103. * Returns source for the script with given id.
  104. */
  105. getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<Protocol.Debugger.GetScriptSourceResponse>;
  106. /**
  107. * This command is deprecated. Use getScriptSource instead.
  108. */
  109. getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
  110. /**
  111. * Returns stack trace with given `stackTraceId`.
  112. */
  113. getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<Protocol.Debugger.GetStackTraceResponse>;
  114. /**
  115. * Stops on the next JavaScript statement.
  116. */
  117. pause(): Promise<void>;
  118. pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<void>;
  119. /**
  120. * Removes JavaScript breakpoint.
  121. */
  122. removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<void>;
  123. /**
  124. * Restarts particular call frame from the beginning.
  125. */
  126. restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
  127. /**
  128. * Resumes JavaScript execution.
  129. */
  130. resume(params: Protocol.Debugger.ResumeRequest): Promise<void>;
  131. /**
  132. * Searches for given string in script content.
  133. */
  134. searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<Protocol.Debugger.SearchInContentResponse>;
  135. /**
  136. * Enables or disables async call stacks tracking.
  137. */
  138. setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<void>;
  139. /**
  140. * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
  141. * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
  142. * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  143. */
  144. setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<void>;
  145. /**
  146. * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
  147. * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  148. * Positions array contains positions where blackbox state is changed. First interval isn't
  149. * blackboxed. Array should be sorted.
  150. */
  151. setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<void>;
  152. /**
  153. * Sets JavaScript breakpoint at a given location.
  154. */
  155. setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<Protocol.Debugger.SetBreakpointResponse>;
  156. /**
  157. * Sets instrumentation breakpoint.
  158. */
  159. setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
  160. /**
  161. * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
  162. * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
  163. * `locations` property. Further matching script parsing will result in subsequent
  164. * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
  165. */
  166. setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
  167. /**
  168. * Sets JavaScript breakpoint before each call to the given function.
  169. * If another function was created from the same source as a given one,
  170. * calling it will also trigger the breakpoint.
  171. */
  172. setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
  173. /**
  174. * Activates / deactivates all breakpoints on the page.
  175. */
  176. setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<void>;
  177. /**
  178. * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
  179. * no exceptions. Initial pause on exceptions state is `none`.
  180. */
  181. setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<void>;
  182. /**
  183. * Changes return value in top frame. Available only at return break position.
  184. */
  185. setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<void>;
  186. /**
  187. * Edits JavaScript source live.
  188. */
  189. setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<Protocol.Debugger.SetScriptSourceResponse>;
  190. /**
  191. * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  192. */
  193. setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<void>;
  194. /**
  195. * Changes value of variable in a callframe. Object-based scopes are not supported and must be
  196. * mutated manually.
  197. */
  198. setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<void>;
  199. /**
  200. * Steps into the function call.
  201. */
  202. stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<void>;
  203. /**
  204. * Steps out of the function call.
  205. */
  206. stepOut(): Promise<void>;
  207. /**
  208. * Steps over the statement.
  209. */
  210. stepOver(params: Protocol.Debugger.StepOverRequest): Promise<void>;
  211. /**
  212. * Fired when breakpoint is resolved to an actual script and location.
  213. */
  214. on(event: 'breakpointResolved', listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void;
  215. /**
  216. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  217. */
  218. on(event: 'paused', listener: (params: Protocol.Debugger.PausedEvent) => void): void;
  219. /**
  220. * Fired when the virtual machine resumed execution.
  221. */
  222. on(event: 'resumed', listener: () => void): void;
  223. /**
  224. * Fired when virtual machine fails to parse the script.
  225. */
  226. on(event: 'scriptFailedToParse', listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void;
  227. /**
  228. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  229. * scripts upon enabling debugger.
  230. */
  231. on(event: 'scriptParsed', listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void;
  232. }
  233. export interface HeapProfilerApi {
  234. /**
  235. * Enables console to refer to the node with given id via $x (see Command Line API for more details
  236. * $x functions).
  237. */
  238. addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<void>;
  239. collectGarbage(): Promise<void>;
  240. disable(): Promise<void>;
  241. enable(): Promise<void>;
  242. getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
  243. getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
  244. getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
  245. startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<void>;
  246. startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<void>;
  247. stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
  248. stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<void>;
  249. takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<void>;
  250. on(event: 'addHeapSnapshotChunk', listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void;
  251. /**
  252. * If heap objects tracking has been started then backend may send update for one or more fragments
  253. */
  254. on(event: 'heapStatsUpdate', listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void;
  255. /**
  256. * If heap objects tracking has been started then backend regularly sends a current value for last
  257. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  258. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  259. */
  260. on(event: 'lastSeenObjectId', listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void;
  261. on(event: 'reportHeapSnapshotProgress', listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void;
  262. on(event: 'resetProfiles', listener: () => void): void;
  263. }
  264. export interface ProfilerApi {
  265. disable(): Promise<void>;
  266. enable(): Promise<void>;
  267. /**
  268. * Collect coverage data for the current isolate. The coverage data may be incomplete due to
  269. * garbage collection.
  270. */
  271. getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
  272. /**
  273. * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  274. */
  275. setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<void>;
  276. start(): Promise<void>;
  277. /**
  278. * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
  279. * coverage may be incomplete. Enabling prevents running optimized code and resets execution
  280. * counters.
  281. */
  282. startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
  283. /**
  284. * Enable type profile.
  285. */
  286. startTypeProfile(): Promise<void>;
  287. stop(): Promise<Protocol.Profiler.StopResponse>;
  288. /**
  289. * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
  290. * executing optimized code.
  291. */
  292. stopPreciseCoverage(): Promise<void>;
  293. /**
  294. * Disable type profile. Disabling releases type profile data collected so far.
  295. */
  296. stopTypeProfile(): Promise<void>;
  297. /**
  298. * Collect coverage data for the current isolate, and resets execution counters. Precise code
  299. * coverage needs to have started.
  300. */
  301. takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
  302. /**
  303. * Collect type profile.
  304. */
  305. takeTypeProfile(): Promise<Protocol.Profiler.TakeTypeProfileResponse>;
  306. /**
  307. * Enable counters collection.
  308. */
  309. enableCounters(): Promise<void>;
  310. /**
  311. * Disable counters collection.
  312. */
  313. disableCounters(): Promise<void>;
  314. /**
  315. * Retrieve counters.
  316. */
  317. getCounters(): Promise<Protocol.Profiler.GetCountersResponse>;
  318. /**
  319. * Enable run time call stats collection.
  320. */
  321. enableRuntimeCallStats(): Promise<void>;
  322. /**
  323. * Disable run time call stats collection.
  324. */
  325. disableRuntimeCallStats(): Promise<void>;
  326. /**
  327. * Retrieve run time call stats.
  328. */
  329. getRuntimeCallStats(): Promise<Protocol.Profiler.GetRuntimeCallStatsResponse>;
  330. on(event: 'consoleProfileFinished', listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void;
  331. /**
  332. * Sent when new profile recording is started using console.profile() call.
  333. */
  334. on(event: 'consoleProfileStarted', listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void;
  335. /**
  336. * Reports coverage delta since the last poll (either from an event like this, or from
  337. * `takePreciseCoverage` for the current isolate. May only be sent if precise code
  338. * coverage has been started. This event can be trigged by the embedder to, for example,
  339. * trigger collection of coverage data immediatelly at a certain point in time.
  340. */
  341. on(event: 'preciseCoverageDeltaUpdate', listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void;
  342. }
  343. export interface RuntimeApi {
  344. /**
  345. * Add handler to promise with given promise object id.
  346. */
  347. awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
  348. /**
  349. * Calls function with given declaration on the given object. Object group of the result is
  350. * inherited from the target object.
  351. */
  352. callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<Protocol.Runtime.CallFunctionOnResponse>;
  353. /**
  354. * Compiles expression.
  355. */
  356. compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<Protocol.Runtime.CompileScriptResponse>;
  357. /**
  358. * Disables reporting of execution contexts creation.
  359. */
  360. disable(): Promise<void>;
  361. /**
  362. * Discards collected exceptions and console API calls.
  363. */
  364. discardConsoleEntries(): Promise<void>;
  365. /**
  366. * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
  367. * When the reporting gets enabled the event will be sent immediately for each existing execution
  368. * context.
  369. */
  370. enable(): Promise<void>;
  371. /**
  372. * Evaluates expression on global object.
  373. */
  374. evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
  375. /**
  376. * Returns the isolate id.
  377. */
  378. getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
  379. /**
  380. * Returns the JavaScript heap usage.
  381. * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
  382. */
  383. getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
  384. /**
  385. * Returns properties of a given object. Object group of the result is inherited from the target
  386. * object.
  387. */
  388. getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<Protocol.Runtime.GetPropertiesResponse>;
  389. /**
  390. * Returns all let, const and class variables from global scope.
  391. */
  392. globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
  393. queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
  394. /**
  395. * Releases remote object with given id.
  396. */
  397. releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<void>;
  398. /**
  399. * Releases all remote objects that belong to a given group.
  400. */
  401. releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<void>;
  402. /**
  403. * Tells inspected instance to run if it was waiting for debugger to attach.
  404. */
  405. runIfWaitingForDebugger(): Promise<void>;
  406. /**
  407. * Runs script with given id in a given context.
  408. */
  409. runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
  410. /**
  411. * Enables or disables async call stacks tracking.
  412. */
  413. setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<void>;
  414. setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<void>;
  415. setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<void>;
  416. /**
  417. * Terminate current or next JavaScript execution.
  418. * Will cancel the termination when the outer-most script execution ends.
  419. */
  420. terminateExecution(): Promise<void>;
  421. /**
  422. * If executionContextId is empty, adds binding with the given name on the
  423. * global objects of all inspected contexts, including those created later,
  424. * bindings survive reloads.
  425. * If executionContextId is specified, adds binding only on global object of
  426. * given execution context.
  427. * Binding function takes exactly one argument, this argument should be string,
  428. * in case of any other input, function throws an exception.
  429. * Each binding function call produces Runtime.bindingCalled notification.
  430. */
  431. addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<void>;
  432. /**
  433. * This method does not remove binding function from global object but
  434. * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
  435. */
  436. removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<void>;
  437. /**
  438. * Notification is issued every time when binding is called.
  439. */
  440. on(event: 'bindingCalled', listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void;
  441. /**
  442. * Issued when console API was called.
  443. */
  444. on(event: 'consoleAPICalled', listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void;
  445. /**
  446. * Issued when unhandled exception was revoked.
  447. */
  448. on(event: 'exceptionRevoked', listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void;
  449. /**
  450. * Issued when exception was thrown and unhandled.
  451. */
  452. on(event: 'exceptionThrown', listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void;
  453. /**
  454. * Issued when new execution context is created.
  455. */
  456. on(event: 'executionContextCreated', listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void;
  457. /**
  458. * Issued when execution context is destroyed.
  459. */
  460. on(event: 'executionContextDestroyed', listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void;
  461. /**
  462. * Issued when all executionContexts were cleared in browser
  463. */
  464. on(event: 'executionContextsCleared', listener: () => void): void;
  465. /**
  466. * Issued when object should be inspected (for example, as a result of inspect() command line API
  467. * call).
  468. */
  469. on(event: 'inspectRequested', listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void;
  470. }
  471. export interface SchemaApi {
  472. /**
  473. * Returns supported domains.
  474. */
  475. getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
  476. }
  477. export interface AccessibilityApi {
  478. /**
  479. * Disables the accessibility domain.
  480. */
  481. disable(): Promise<void>;
  482. /**
  483. * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
  484. * This turns on accessibility for the page, which can impact performance until accessibility is disabled.
  485. */
  486. enable(): Promise<void>;
  487. /**
  488. * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
  489. */
  490. getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
  491. /**
  492. * Fetches the entire accessibility tree
  493. */
  494. getFullAXTree(): Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
  495. /**
  496. * Query a DOM node's accessibility subtree for accessible name and role.
  497. * This command computes the name and role for all nodes in the subtree, including those that are
  498. * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
  499. * node is specified, or the DOM node does not exist, the command returns an error. If neither
  500. * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
  501. */
  502. queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<Protocol.Accessibility.QueryAXTreeResponse>;
  503. }
  504. export interface AnimationApi {
  505. /**
  506. * Disables animation domain notifications.
  507. */
  508. disable(): Promise<void>;
  509. /**
  510. * Enables animation domain notifications.
  511. */
  512. enable(): Promise<void>;
  513. /**
  514. * Returns the current time of the an animation.
  515. */
  516. getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>;
  517. /**
  518. * Gets the playback rate of the document timeline.
  519. */
  520. getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
  521. /**
  522. * Releases a set of animations to no longer be manipulated.
  523. */
  524. releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<void>;
  525. /**
  526. * Gets the remote object of the Animation.
  527. */
  528. resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>;
  529. /**
  530. * Seek a set of animations to a particular time within each animation.
  531. */
  532. seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<void>;
  533. /**
  534. * Sets the paused state of a set of animations.
  535. */
  536. setPaused(params: Protocol.Animation.SetPausedRequest): Promise<void>;
  537. /**
  538. * Sets the playback rate of the document timeline.
  539. */
  540. setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<void>;
  541. /**
  542. * Sets the timing of an animation node.
  543. */
  544. setTiming(params: Protocol.Animation.SetTimingRequest): Promise<void>;
  545. /**
  546. * Event for when an animation has been cancelled.
  547. */
  548. on(event: 'animationCanceled', listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void;
  549. /**
  550. * Event for each animation that has been created.
  551. */
  552. on(event: 'animationCreated', listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void;
  553. /**
  554. * Event for animation that has been started.
  555. */
  556. on(event: 'animationStarted', listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void;
  557. }
  558. export interface ApplicationCacheApi {
  559. /**
  560. * Enables application cache domain notifications.
  561. */
  562. enable(): Promise<void>;
  563. /**
  564. * Returns relevant application cache data for the document in given frame.
  565. */
  566. getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest): Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
  567. /**
  568. * Returns array of frame identifiers with manifest urls for each frame containing a document
  569. * associated with some application cache.
  570. */
  571. getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
  572. /**
  573. * Returns manifest URL for document in the given frame.
  574. */
  575. getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest): Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
  576. on(event: 'applicationCacheStatusUpdated', listener: (params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent) => void): void;
  577. on(event: 'networkStateUpdated', listener: (params: Protocol.ApplicationCache.NetworkStateUpdatedEvent) => void): void;
  578. }
  579. export interface AuditsApi {
  580. /**
  581. * Returns the response body and size if it were re-encoded with the specified settings. Only
  582. * applies to images.
  583. */
  584. getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<Protocol.Audits.GetEncodedResponseResponse>;
  585. /**
  586. * Disables issues domain, prevents further issues from being reported to the client.
  587. */
  588. disable(): Promise<void>;
  589. /**
  590. * Enables issues domain, sends the issues collected so far to the client by means of the
  591. * `issueAdded` event.
  592. */
  593. enable(): Promise<void>;
  594. on(event: 'issueAdded', listener: (params: Protocol.Audits.IssueAddedEvent) => void): void;
  595. }
  596. export interface BackgroundServiceApi {
  597. /**
  598. * Enables event updates for the service.
  599. */
  600. startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<void>;
  601. /**
  602. * Disables event updates for the service.
  603. */
  604. stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<void>;
  605. /**
  606. * Set the recording state for the service.
  607. */
  608. setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<void>;
  609. /**
  610. * Clears all stored data for the service.
  611. */
  612. clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<void>;
  613. /**
  614. * Called when the recording state for the service has been updated.
  615. */
  616. on(event: 'recordingStateChanged', listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void;
  617. /**
  618. * Called with all existing backgroundServiceEvents when enabled, and all new
  619. * events afterwards if enabled and recording.
  620. */
  621. on(event: 'backgroundServiceEventReceived', listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void;
  622. }
  623. export interface BrowserApi {
  624. /**
  625. * Set permission settings for given origin.
  626. */
  627. setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<void>;
  628. /**
  629. * Grant specific permissions to the given origin and reject all others.
  630. */
  631. grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<void>;
  632. /**
  633. * Reset all permission management for all origins.
  634. */
  635. resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<void>;
  636. /**
  637. * Set the behavior when downloading a file.
  638. */
  639. setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<void>;
  640. /**
  641. * Close browser gracefully.
  642. */
  643. close(): Promise<void>;
  644. /**
  645. * Crashes browser on the main thread.
  646. */
  647. crash(): Promise<void>;
  648. /**
  649. * Crashes GPU process.
  650. */
  651. crashGpuProcess(): Promise<void>;
  652. /**
  653. * Returns version information.
  654. */
  655. getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
  656. /**
  657. * Returns the command line switches for the browser process if, and only if
  658. * --enable-automation is on the commandline.
  659. */
  660. getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
  661. /**
  662. * Get Chrome histograms.
  663. */
  664. getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>;
  665. /**
  666. * Get a Chrome histogram by name.
  667. */
  668. getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
  669. /**
  670. * Get position and size of the browser window.
  671. */
  672. getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>;
  673. /**
  674. * Get the browser window that contains the devtools target.
  675. */
  676. getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>;
  677. /**
  678. * Set position and/or size of the browser window.
  679. */
  680. setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<void>;
  681. /**
  682. * Set dock tile details, platform-specific.
  683. */
  684. setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<void>;
  685. }
  686. export interface CSSApi {
  687. /**
  688. * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
  689. * position specified by `location`.
  690. */
  691. addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
  692. /**
  693. * Returns all class names from specified stylesheet.
  694. */
  695. collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>;
  696. /**
  697. * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
  698. */
  699. createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>;
  700. /**
  701. * Disables the CSS agent for the given page.
  702. */
  703. disable(): Promise<void>;
  704. /**
  705. * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
  706. * enabled until the result of this command is received.
  707. */
  708. enable(): Promise<void>;
  709. /**
  710. * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
  711. * the browser.
  712. */
  713. forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<void>;
  714. getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>;
  715. /**
  716. * Returns the computed style for a DOM node identified by `nodeId`.
  717. */
  718. getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
  719. /**
  720. * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
  721. * attributes) for a DOM node identified by `nodeId`.
  722. */
  723. getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
  724. /**
  725. * Returns requested styles for a DOM node identified by `nodeId`.
  726. */
  727. getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
  728. /**
  729. * Returns all media queries parsed by the rendering engine.
  730. */
  731. getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
  732. /**
  733. * Requests information about platform fonts which we used to render child TextNodes in the given
  734. * node.
  735. */
  736. getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
  737. /**
  738. * Returns the current textual content for a stylesheet.
  739. */
  740. getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>;
  741. /**
  742. * Starts tracking the given computed styles for updates. The specified array of properties
  743. * replaces the one previously specified. Pass empty array to disable tracking.
  744. * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
  745. * The changes to computed style properties are only tracked for nodes pushed to the front-end
  746. * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
  747. * to the front-end, no updates will be issued for the node.
  748. */
  749. trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest): Promise<void>;
  750. /**
  751. * Polls the next batch of computed style updates.
  752. */
  753. takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
  754. /**
  755. * Find a rule with the given active property for the given node and set the new value for this
  756. * property
  757. */
  758. setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest): Promise<void>;
  759. /**
  760. * Modifies the keyframe rule key text.
  761. */
  762. setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
  763. /**
  764. * Modifies the rule selector.
  765. */
  766. setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
  767. /**
  768. * Modifies the rule selector.
  769. */
  770. setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
  771. /**
  772. * Sets the new stylesheet text.
  773. */
  774. setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise<Protocol.CSS.SetStyleSheetTextResponse>;
  775. /**
  776. * Applies specified style edits one after another in the given order.
  777. */
  778. setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
  779. /**
  780. * Enables the selector recording.
  781. */
  782. startRuleUsageTracking(): Promise<void>;
  783. /**
  784. * Stop tracking rule usage and return the list of rules that were used since last call to
  785. * `takeCoverageDelta` (or since start of coverage instrumentation)
  786. */
  787. stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
  788. /**
  789. * Obtain list of rules that became used since last call to this method (or since start of coverage
  790. * instrumentation)
  791. */
  792. takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
  793. /**
  794. * Enables/disables rendering of local CSS fonts (enabled by default).
  795. */
  796. setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise<void>;
  797. /**
  798. * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
  799. * web font
  800. */
  801. on(event: 'fontsUpdated', listener: (params: Protocol.CSS.FontsUpdatedEvent) => void): void;
  802. /**
  803. * Fires whenever a MediaQuery result changes (for example, after a browser window has been
  804. * resized.) The current implementation considers only viewport-dependent media features.
  805. */
  806. on(event: 'mediaQueryResultChanged', listener: () => void): void;
  807. /**
  808. * Fired whenever an active document stylesheet is added.
  809. */
  810. on(event: 'styleSheetAdded', listener: (params: Protocol.CSS.StyleSheetAddedEvent) => void): void;
  811. /**
  812. * Fired whenever a stylesheet is changed as a result of the client operation.
  813. */
  814. on(event: 'styleSheetChanged', listener: (params: Protocol.CSS.StyleSheetChangedEvent) => void): void;
  815. /**
  816. * Fired whenever an active document stylesheet is removed.
  817. */
  818. on(event: 'styleSheetRemoved', listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;
  819. }
  820. export interface CacheStorageApi {
  821. /**
  822. * Deletes a cache.
  823. */
  824. deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<void>;
  825. /**
  826. * Deletes a cache entry.
  827. */
  828. deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<void>;
  829. /**
  830. * Requests cache names.
  831. */
  832. requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
  833. /**
  834. * Fetches cache entry.
  835. */
  836. requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
  837. /**
  838. * Requests data from cache.
  839. */
  840. requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise<Protocol.CacheStorage.RequestEntriesResponse>;
  841. }
  842. export interface CastApi {
  843. /**
  844. * Starts observing for sinks that can be used for tab mirroring, and if set,
  845. * sinks compatible with |presentationUrl| as well. When sinks are found, a
  846. * |sinksUpdated| event is fired.
  847. * Also starts observing for issue messages. When an issue is added or removed,
  848. * an |issueUpdated| event is fired.
  849. */
  850. enable(params: Protocol.Cast.EnableRequest): Promise<void>;
  851. /**
  852. * Stops observing for sinks and issues.
  853. */
  854. disable(): Promise<void>;
  855. /**
  856. * Sets a sink to be used when the web page requests the browser to choose a
  857. * sink via Presentation API, Remote Playback API, or Cast SDK.
  858. */
  859. setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<void>;
  860. /**
  861. * Starts mirroring the tab to the sink.
  862. */
  863. startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise<void>;
  864. /**
  865. * Stops the active Cast session on the sink.
  866. */
  867. stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<void>;
  868. /**
  869. * This is fired whenever the list of available sinks changes. A sink is a
  870. * device or a software surface that you can cast to.
  871. */
  872. on(event: 'sinksUpdated', listener: (params: Protocol.Cast.SinksUpdatedEvent) => void): void;
  873. /**
  874. * This is fired whenever the outstanding issue/error message changes.
  875. * |issueMessage| is empty if there is no issue.
  876. */
  877. on(event: 'issueUpdated', listener: (params: Protocol.Cast.IssueUpdatedEvent) => void): void;
  878. }
  879. export interface DOMApi {
  880. /**
  881. * Collects class names for the node with given id and all of it's child nodes.
  882. */
  883. collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest): Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
  884. /**
  885. * Creates a deep copy of the specified node and places it into the target container before the
  886. * given anchor.
  887. */
  888. copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
  889. /**
  890. * Describes node given its id, does not require domain to be enabled. Does not start tracking any
  891. * objects, can be used for automation.
  892. */
  893. describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
  894. /**
  895. * Scrolls the specified rect of the given node into view if not already visible.
  896. * Note: exactly one between nodeId, backendNodeId and objectId should be passed
  897. * to identify the node.
  898. */
  899. scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest): Promise<void>;
  900. /**
  901. * Disables DOM agent for the given page.
  902. */
  903. disable(): Promise<void>;
  904. /**
  905. * Discards search results from the session with the given id. `getSearchResults` should no longer
  906. * be called for that search.
  907. */
  908. discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest): Promise<void>;
  909. /**
  910. * Enables DOM agent for the given page.
  911. */
  912. enable(): Promise<void>;
  913. /**
  914. * Focuses the given element.
  915. */
  916. focus(params: Protocol.DOM.FocusRequest): Promise<void>;
  917. /**
  918. * Returns attributes for the specified node.
  919. */
  920. getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
  921. /**
  922. * Returns boxes for the given node.
  923. */
  924. getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
  925. /**
  926. * Returns quads that describe node position on the page. This method
  927. * might return multiple quads for inline nodes.
  928. */
  929. getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
  930. /**
  931. * Returns the root DOM node (and optionally the subtree) to the caller.
  932. */
  933. getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
  934. /**
  935. * Returns the root DOM node (and optionally the subtree) to the caller.
  936. * Deprecated, as it is not designed to work well with the rest of the DOM agent.
  937. * Use DOMSnapshot.captureSnapshot instead.
  938. */
  939. getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
  940. /**
  941. * Finds nodes with a given computed style in a subtree.
  942. */
  943. getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
  944. /**
  945. * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
  946. * either returned or not.
  947. */
  948. getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest): Promise<Protocol.DOM.GetNodeForLocationResponse>;
  949. /**
  950. * Returns node's HTML markup.
  951. */
  952. getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
  953. /**
  954. * Returns the id of the nearest ancestor that is a relayout boundary.
  955. */
  956. getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
  957. /**
  958. * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
  959. * identifier.
  960. */
  961. getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise<Protocol.DOM.GetSearchResultsResponse>;
  962. /**
  963. * Hides any highlight.
  964. */
  965. hideHighlight(): Promise<void>;
  966. /**
  967. * Highlights DOM node.
  968. */
  969. highlightNode(): Promise<void>;
  970. /**
  971. * Highlights given rectangle.
  972. */
  973. highlightRect(): Promise<void>;
  974. /**
  975. * Marks last undoable state.
  976. */
  977. markUndoableState(): Promise<void>;
  978. /**
  979. * Moves node into the new container, places it before the given anchor.
  980. */
  981. moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
  982. /**
  983. * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
  984. * `cancelSearch` to end this search session.
  985. */
  986. performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
  987. /**
  988. * Requests that the node is sent to the caller given its path. // FIXME, use XPath
  989. */
  990. pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
  991. /**
  992. * Requests that a batch of nodes is sent to the caller given their backend node ids.
  993. */
  994. pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
  995. /**
  996. * Executes `querySelector` on a given node.
  997. */
  998. querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
  999. /**
  1000. * Executes `querySelectorAll` on a given node.
  1001. */
  1002. querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise<Protocol.DOM.QuerySelectorAllResponse>;
  1003. /**
  1004. * Re-does the last undone action.
  1005. */
  1006. redo(): Promise<void>;
  1007. /**
  1008. * Removes attribute with given name from an element with given id.
  1009. */
  1010. removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<void>;
  1011. /**
  1012. * Removes node with given id.
  1013. */
  1014. removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<void>;
  1015. /**
  1016. * Requests that children of the node with given id are returned to the caller in form of
  1017. * `setChildNodes` events where not only immediate children are retrieved, but all children down to
  1018. * the specified depth.
  1019. */
  1020. requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest): Promise<void>;
  1021. /**
  1022. * Requests that the node is sent to the caller given the JavaScript node object reference. All
  1023. * nodes that form the path from the node to the root are also sent to the client as a series of
  1024. * `setChildNodes` notifications.
  1025. */
  1026. requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
  1027. /**
  1028. * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
  1029. */
  1030. resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
  1031. /**
  1032. * Sets attribute for an element with given id.
  1033. */
  1034. setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise<void>;
  1035. /**
  1036. * Sets attributes on element with given id. This method is useful when user edits some existing
  1037. * attribute value and types in several attribute name/value pairs.
  1038. */
  1039. setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest): Promise<void>;
  1040. /**
  1041. * Sets files for the given file input element.
  1042. */
  1043. setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise<void>;
  1044. /**
  1045. * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
  1046. */
  1047. setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise<void>;
  1048. /**
  1049. * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
  1050. */
  1051. getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest): Promise<Protocol.DOM.GetNodeStackTracesResponse>;
  1052. /**
  1053. * Returns file information for the given
  1054. * File wrapper.
  1055. */
  1056. getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>;
  1057. /**
  1058. * Enables console to refer to the node with given id via $x (see Command Line API for more details
  1059. * $x functions).
  1060. */
  1061. setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise<void>;
  1062. /**
  1063. * Sets node name for a node with given id.
  1064. */
  1065. setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>;
  1066. /**
  1067. * Sets node value for a node with given id.
  1068. */
  1069. setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<void>;
  1070. /**
  1071. * Sets node HTML markup, returns new node id.
  1072. */
  1073. setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<void>;
  1074. /**
  1075. * Undoes the last performed action.
  1076. */
  1077. undo(): Promise<void>;
  1078. /**
  1079. * Returns iframe node that owns iframe with the given domain.
  1080. */
  1081. getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>;
  1082. /**
  1083. * Fired when `Element`'s attribute is modified.
  1084. */
  1085. on(event: 'attributeModified', listener: (params: Protocol.DOM.AttributeModifiedEvent) => void): void;
  1086. /**
  1087. * Fired when `Element`'s attribute is removed.
  1088. */
  1089. on(event: 'attributeRemoved', listener: (params: Protocol.DOM.AttributeRemovedEvent) => void): void;
  1090. /**
  1091. * Mirrors `DOMCharacterDataModified` event.
  1092. */
  1093. on(event: 'characterDataModified', listener: (params: Protocol.DOM.CharacterDataModifiedEvent) => void): void;
  1094. /**
  1095. * Fired when `Container`'s child node count has changed.
  1096. */
  1097. on(event: 'childNodeCountUpdated', listener: (params: Protocol.DOM.ChildNodeCountUpdatedEvent) => void): void;
  1098. /**
  1099. * Mirrors `DOMNodeInserted` event.
  1100. */
  1101. on(event: 'childNodeInserted', listener: (params: Protocol.DOM.ChildNodeInsertedEvent) => void): void;
  1102. /**
  1103. * Mirrors `DOMNodeRemoved` event.
  1104. */
  1105. on(event: 'childNodeRemoved', listener: (params: Protocol.DOM.ChildNodeRemovedEvent) => void): void;
  1106. /**
  1107. * Called when distrubution is changed.
  1108. */
  1109. on(event: 'distributedNodesUpdated', listener: (params: Protocol.DOM.DistributedNodesUpdatedEvent) => void): void;
  1110. /**
  1111. * Fired when `Document` has been totally updated. Node ids are no longer valid.
  1112. */
  1113. on(event: 'documentUpdated', listener: () => void): void;
  1114. /**
  1115. * Fired when `Element`'s inline style is modified via a CSS property modification.
  1116. */
  1117. on(event: 'inlineStyleInvalidated', listener: (params: Protocol.DOM.InlineStyleInvalidatedEvent) => void): void;
  1118. /**
  1119. * Called when a pseudo element is added to an element.
  1120. */
  1121. on(event: 'pseudoElementAdded', listener: (params: Protocol.DOM.PseudoElementAddedEvent) => void): void;
  1122. /**
  1123. * Called when a pseudo element is removed from an element.
  1124. */
  1125. on(event: 'pseudoElementRemoved', listener: (params: Protocol.DOM.PseudoElementRemovedEvent) => void): void;
  1126. /**
  1127. * Fired when backend wants to provide client with the missing DOM structure. This happens upon
  1128. * most of the calls requesting node ids.
  1129. */
  1130. on(event: 'setChildNodes', listener: (params: Protocol.DOM.SetChildNodesEvent) => void): void;
  1131. /**
  1132. * Called when shadow root is popped from the element.
  1133. */
  1134. on(event: 'shadowRootPopped', listener: (params: Protocol.DOM.ShadowRootPoppedEvent) => void): void;
  1135. /**
  1136. * Called when shadow root is pushed into the element.
  1137. */
  1138. on(event: 'shadowRootPushed', listener: (params: Protocol.DOM.ShadowRootPushedEvent) => void): void;
  1139. }
  1140. export interface DOMDebuggerApi {
  1141. /**
  1142. * Returns event listeners of the given object.
  1143. */
  1144. getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest): Promise<Protocol.DOMDebugger.GetEventListenersResponse>;
  1145. /**
  1146. * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
  1147. */
  1148. removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest): Promise<void>;
  1149. /**
  1150. * Removes breakpoint on particular DOM event.
  1151. */
  1152. removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest): Promise<void>;
  1153. /**
  1154. * Removes breakpoint on particular native event.
  1155. */
  1156. removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest): Promise<void>;
  1157. /**
  1158. * Removes breakpoint from XMLHttpRequest.
  1159. */
  1160. removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest): Promise<void>;
  1161. /**
  1162. * Sets breakpoint on particular operation with DOM.
  1163. */
  1164. setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest): Promise<void>;
  1165. /**
  1166. * Sets breakpoint on particular DOM event.
  1167. */
  1168. setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest): Promise<void>;
  1169. /**
  1170. * Sets breakpoint on particular native event.
  1171. */
  1172. setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest): Promise<void>;
  1173. /**
  1174. * Sets breakpoint on XMLHttpRequest.
  1175. */
  1176. setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest): Promise<void>;
  1177. }
  1178. export interface DOMSnapshotApi {
  1179. /**
  1180. * Disables DOM snapshot agent for the given page.
  1181. */
  1182. disable(): Promise<void>;
  1183. /**
  1184. * Enables DOM snapshot agent for the given page.
  1185. */
  1186. enable(): Promise<void>;
  1187. /**
  1188. * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
  1189. * template contents, and imported documents) in a flattened array, as well as layout and
  1190. * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
  1191. * flattened.
  1192. */
  1193. getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest): Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
  1194. /**
  1195. * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
  1196. * template contents, and imported documents) in a flattened array, as well as layout and
  1197. * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
  1198. * flattened.
  1199. */
  1200. captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest): Promise<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
  1201. }
  1202. export interface DOMStorageApi {
  1203. clear(params: Protocol.DOMStorage.ClearRequest): Promise<void>;
  1204. /**
  1205. * Disables storage tracking, prevents storage events from being sent to the client.
  1206. */
  1207. disable(): Promise<void>;
  1208. /**
  1209. * Enables storage tracking, storage events will now be delivered to the client.
  1210. */
  1211. enable(): Promise<void>;
  1212. getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest): Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
  1213. removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest): Promise<void>;
  1214. setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest): Promise<void>;
  1215. on(event: 'domStorageItemAdded', listener: (params: Protocol.DOMStorage.DomStorageItemAddedEvent) => void): void;
  1216. on(event: 'domStorageItemRemoved', listener: (params: Protocol.DOMStorage.DomStorageItemRemovedEvent) => void): void;
  1217. on(event: 'domStorageItemUpdated', listener: (params: Protocol.DOMStorage.DomStorageItemUpdatedEvent) => void): void;
  1218. on(event: 'domStorageItemsCleared', listener: (params: Protocol.DOMStorage.DomStorageItemsClearedEvent) => void): void;
  1219. }
  1220. export interface DatabaseApi {
  1221. /**
  1222. * Disables database tracking, prevents database events from being sent to the client.
  1223. */
  1224. disable(): Promise<void>;
  1225. /**
  1226. * Enables database tracking, database events will now be delivered to the client.
  1227. */
  1228. enable(): Promise<void>;
  1229. executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
  1230. getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest): Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
  1231. on(event: 'addDatabase', listener: (params: Protocol.Database.AddDatabaseEvent) => void): void;
  1232. }
  1233. export interface DeviceOrientationApi {
  1234. /**
  1235. * Clears the overridden Device Orientation.
  1236. */
  1237. clearDeviceOrientationOverride(): Promise<void>;
  1238. /**
  1239. * Overrides the Device Orientation.
  1240. */
  1241. setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest): Promise<void>;
  1242. }
  1243. export interface EmulationApi {
  1244. /**
  1245. * Tells whether emulation is supported.
  1246. */
  1247. canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
  1248. /**
  1249. * Clears the overriden device metrics.
  1250. */
  1251. clearDeviceMetricsOverride(): Promise<void>;
  1252. /**
  1253. * Clears the overriden Geolocation Position and Error.
  1254. */
  1255. clearGeolocationOverride(): Promise<void>;
  1256. /**
  1257. * Requests that page scale factor is reset to initial values.
  1258. */
  1259. resetPageScaleFactor(): Promise<void>;
  1260. /**
  1261. * Enables or disables simulating a focused and active page.
  1262. */
  1263. setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest): Promise<void>;
  1264. /**
  1265. * Enables CPU throttling to emulate slow CPUs.
  1266. */
  1267. setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest): Promise<void>;
  1268. /**
  1269. * Sets or clears an override of the default background color of the frame. This override is used
  1270. * if the content does not specify one.
  1271. */
  1272. setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest): Promise<void>;
  1273. /**
  1274. * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
  1275. * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
  1276. * query results).
  1277. */
  1278. setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest): Promise<void>;
  1279. setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest): Promise<void>;
  1280. setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest): Promise<void>;
  1281. setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest): Promise<void>;
  1282. /**
  1283. * Emulates the given media type or media feature for CSS media queries.
  1284. */
  1285. setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest): Promise<void>;
  1286. /**
  1287. * Emulates the given vision deficiency.
  1288. */
  1289. setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest): Promise<void>;
  1290. /**
  1291. * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
  1292. * unavailable.
  1293. */
  1294. setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest): Promise<void>;
  1295. /**
  1296. * Overrides the Idle state.
  1297. */
  1298. setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest): Promise<void>;
  1299. /**
  1300. * Clears Idle state overrides.
  1301. */
  1302. clearIdleOverride(): Promise<void>;
  1303. /**
  1304. * Overrides value returned by the javascript navigator object.
  1305. */
  1306. setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest): Promise<void>;
  1307. /**
  1308. * Sets a specified page scale factor.
  1309. */
  1310. setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest): Promise<void>;
  1311. /**
  1312. * Switches script execution in the page.
  1313. */
  1314. setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest): Promise<void>;
  1315. /**
  1316. * Enables touch on platforms which do not support them.
  1317. */
  1318. setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest): Promise<void>;
  1319. /**
  1320. * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
  1321. * the current virtual time policy. Note this supersedes any previous time budget.
  1322. */
  1323. setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest): Promise<Protocol.Emulation.SetVirtualTimePolicyResponse>;
  1324. /**
  1325. * Overrides default host system locale with the specified one.
  1326. */
  1327. setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest): Promise<void>;
  1328. /**
  1329. * Overrides default host system timezone with the specified one.
  1330. */
  1331. setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest): Promise<void>;
  1332. /**
  1333. * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
  1334. * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
  1335. * on Android.
  1336. */
  1337. setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest): Promise<void>;
  1338. /**
  1339. * Allows overriding user agent with the given string.
  1340. */
  1341. setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest): Promise<void>;
  1342. /**
  1343. * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
  1344. */
  1345. on(event: 'virtualTimeBudgetExpired', listener: () => void): void;
  1346. }
  1347. export interface HeadlessExperimentalApi {
  1348. /**
  1349. * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
  1350. * screenshot from the resulting frame. Requires that the target was created with enabled
  1351. * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
  1352. * https://goo.gl/3zHXhB for more background.
  1353. */
  1354. beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
  1355. /**
  1356. * Disables headless events for the target.
  1357. */
  1358. disable(): Promise<void>;
  1359. /**
  1360. * Enables headless events for the target.
  1361. */
  1362. enable(): Promise<void>;
  1363. /**
  1364. * Issued when the target starts or stops needing BeginFrames.
  1365. * Deprecated. Issue beginFrame unconditionally instead and use result from
  1366. * beginFrame to detect whether the frames were suppressed.
  1367. */
  1368. on(event: 'needsBeginFramesChanged', listener: (params: Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent) => void): void;
  1369. }
  1370. export interface IOApi {
  1371. /**
  1372. * Close the stream, discard any temporary backing storage.
  1373. */
  1374. close(params: Protocol.IO.CloseRequest): Promise<void>;
  1375. /**
  1376. * Read a chunk of the stream
  1377. */
  1378. read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
  1379. /**
  1380. * Return UUID of Blob object specified by a remote object id.
  1381. */
  1382. resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
  1383. }
  1384. export interface IndexedDBApi {
  1385. /**
  1386. * Clears all entries from an object store.
  1387. */
  1388. clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest): Promise<void>;
  1389. /**
  1390. * Deletes a database.
  1391. */
  1392. deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest): Promise<void>;
  1393. /**
  1394. * Delete a range of entries from an object store
  1395. */
  1396. deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest): Promise<void>;
  1397. /**
  1398. * Disables events from backend.
  1399. */
  1400. disable(): Promise<void>;
  1401. /**
  1402. * Enables events from backend.
  1403. */
  1404. enable(): Promise<void>;
  1405. /**
  1406. * Requests data from object store or index.
  1407. */
  1408. requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
  1409. /**
  1410. * Gets metadata of an object store
  1411. */
  1412. getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
  1413. /**
  1414. * Requests database with given name in given frame.
  1415. */
  1416. requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest): Promise<Protocol.IndexedDB.RequestDatabaseResponse>;
  1417. /**
  1418. * Requests database names for given security origin.
  1419. */
  1420. requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest): Promise<Protocol.IndexedDB.RequestDatabaseNamesResponse>;
  1421. }
  1422. export interface InputApi {
  1423. /**
  1424. * Dispatches a key event to the page.
  1425. */
  1426. dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest): Promise<void>;
  1427. /**
  1428. * This method emulates inserting text that doesn't come from a key press,
  1429. * for example an emoji keyboard or an IME.
  1430. */
  1431. insertText(params: Protocol.Input.InsertTextRequest): Promise<void>;
  1432. /**
  1433. * Dispatches a mouse event to the page.
  1434. */
  1435. dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest): Promise<void>;
  1436. /**
  1437. * Dispatches a touch event to the page.
  1438. */
  1439. dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest): Promise<void>;
  1440. /**
  1441. * Emulates touch event from the mouse event parameters.
  1442. */
  1443. emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest): Promise<void>;
  1444. /**
  1445. * Ignores input events (useful while auditing page).
  1446. */
  1447. setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest): Promise<void>;
  1448. /**
  1449. * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
  1450. */
  1451. synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest): Promise<void>;
  1452. /**
  1453. * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
  1454. */
  1455. synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest): Promise<void>;
  1456. /**
  1457. * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
  1458. */
  1459. synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest): Promise<void>;
  1460. }
  1461. export interface InspectorApi {
  1462. /**
  1463. * Disables inspector domain notifications.
  1464. */
  1465. disable(): Promise<void>;
  1466. /**
  1467. * Enables inspector domain notifications.
  1468. */
  1469. enable(): Promise<void>;
  1470. /**
  1471. * Fired when remote debugging connection is about to be terminated. Contains detach reason.
  1472. */
  1473. on(event: 'detached', listener: (params: Protocol.Inspector.DetachedEvent) => void): void;
  1474. /**
  1475. * Fired when debugging target has crashed
  1476. */
  1477. on(event: 'targetCrashed', listener: () => void): void;
  1478. /**
  1479. * Fired when debugging target has reloaded after crash
  1480. */
  1481. on(event: 'targetReloadedAfterCrash', listener: () => void): void;
  1482. }
  1483. export interface LayerTreeApi {
  1484. /**
  1485. * Provides the reasons why the given layer was composited.
  1486. */
  1487. compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest): Promise<Protocol.LayerTree.CompositingReasonsResponse>;
  1488. /**
  1489. * Disables compositing tree inspection.
  1490. */
  1491. disable(): Promise<void>;
  1492. /**
  1493. * Enables compositing tree inspection.
  1494. */
  1495. enable(): Promise<void>;
  1496. /**
  1497. * Returns the snapshot identifier.
  1498. */
  1499. loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest): Promise<Protocol.LayerTree.LoadSnapshotResponse>;
  1500. /**
  1501. * Returns the layer snapshot identifier.
  1502. */
  1503. makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest): Promise<Protocol.LayerTree.MakeSnapshotResponse>;
  1504. profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest): Promise<Protocol.LayerTree.ProfileSnapshotResponse>;
  1505. /**
  1506. * Releases layer snapshot captured by the back-end.
  1507. */
  1508. releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest): Promise<void>;
  1509. /**
  1510. * Replays the layer snapshot and returns the resulting bitmap.
  1511. */
  1512. replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest): Promise<Protocol.LayerTree.ReplaySnapshotResponse>;
  1513. /**
  1514. * Replays the layer snapshot and returns canvas log.
  1515. */
  1516. snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest): Promise<Protocol.LayerTree.SnapshotCommandLogResponse>;
  1517. on(event: 'layerPainted', listener: (params: Protocol.LayerTree.LayerPaintedEvent) => void): void;
  1518. on(event: 'layerTreeDidChange', listener: (params: Protocol.LayerTree.LayerTreeDidChangeEvent) => void): void;
  1519. }
  1520. export interface LogApi {
  1521. /**
  1522. * Clears the log.
  1523. */
  1524. clear(): Promise<void>;
  1525. /**
  1526. * Disables log domain, prevents further log entries from being reported to the client.
  1527. */
  1528. disable(): Promise<void>;
  1529. /**
  1530. * Enables log domain, sends the entries collected so far to the client by means of the
  1531. * `entryAdded` notification.
  1532. */
  1533. enable(): Promise<void>;
  1534. /**
  1535. * start violation reporting.
  1536. */
  1537. startViolationsReport(params: Protocol.Log.StartViolationsReportRequest): Promise<void>;
  1538. /**
  1539. * Stop violation reporting.
  1540. */
  1541. stopViolationsReport(): Promise<void>;
  1542. /**
  1543. * Issued when new message was logged.
  1544. */
  1545. on(event: 'entryAdded', listener: (params: Protocol.Log.EntryAddedEvent) => void): void;
  1546. }
  1547. export interface MemoryApi {
  1548. getDOMCounters(): Promise<Protocol.Memory.GetDOMCountersResponse>;
  1549. prepareForLeakDetection(): Promise<void>;
  1550. /**
  1551. * Simulate OomIntervention by purging V8 memory.
  1552. */
  1553. forciblyPurgeJavaScriptMemory(): Promise<void>;
  1554. /**
  1555. * Enable/disable suppressing memory pressure notifications in all processes.
  1556. */
  1557. setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest): Promise<void>;
  1558. /**
  1559. * Simulate a memory pressure notification in all processes.
  1560. */
  1561. simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest): Promise<void>;
  1562. /**
  1563. * Start collecting native memory profile.
  1564. */
  1565. startSampling(params: Protocol.Memory.StartSamplingRequest): Promise<void>;
  1566. /**
  1567. * Stop collecting native memory profile.
  1568. */
  1569. stopSampling(): Promise<void>;
  1570. /**
  1571. * Retrieve native memory allocations profile
  1572. * collected since renderer process startup.
  1573. */
  1574. getAllTimeSamplingProfile(): Promise<Protocol.Memory.GetAllTimeSamplingProfileResponse>;
  1575. /**
  1576. * Retrieve native memory allocations profile
  1577. * collected since browser process startup.
  1578. */
  1579. getBrowserSamplingProfile(): Promise<Protocol.Memory.GetBrowserSamplingProfileResponse>;
  1580. /**
  1581. * Retrieve native memory allocations profile collected since last
  1582. * `startSampling` call.
  1583. */
  1584. getSamplingProfile(): Promise<Protocol.Memory.GetSamplingProfileResponse>;
  1585. }
  1586. export interface NetworkApi {
  1587. /**
  1588. * Tells whether clearing browser cache is supported.
  1589. */
  1590. canClearBrowserCache(): Promise<Protocol.Network.CanClearBrowserCacheResponse>;
  1591. /**
  1592. * Tells whether clearing browser cookies is supported.
  1593. */
  1594. canClearBrowserCookies(): Promise<Protocol.Network.CanClearBrowserCookiesResponse>;
  1595. /**
  1596. * Tells whether emulation of network conditions is supported.
  1597. */
  1598. canEmulateNetworkConditions(): Promise<Protocol.Network.CanEmulateNetworkConditionsResponse>;
  1599. /**
  1600. * Clears browser cache.
  1601. */
  1602. clearBrowserCache(): Promise<void>;
  1603. /**
  1604. * Clears browser cookies.
  1605. */
  1606. clearBrowserCookies(): Promise<void>;
  1607. /**
  1608. * Response to Network.requestIntercepted which either modifies the request to continue with any
  1609. * modifications, or blocks it, or completes it with the provided response bytes. If a network
  1610. * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
  1611. * event will be sent with the same InterceptionId.
  1612. * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
  1613. */
  1614. continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest): Promise<void>;
  1615. /**
  1616. * Deletes browser cookies with matching name and url or domain/path pair.
  1617. */
  1618. deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise<void>;
  1619. /**
  1620. * Disables network tracking, prevents network events from being sent to the client.
  1621. */
  1622. disable(): Promise<void>;
  1623. /**
  1624. * Activates emulation of network conditions.
  1625. */
  1626. emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<void>;
  1627. /**
  1628. * Enables network tracking, network events will now be delivered to the client.
  1629. */
  1630. enable(params: Protocol.Network.EnableRequest): Promise<void>;
  1631. /**
  1632. * Returns all browser cookies. Depending on the backend support, will return detailed cookie
  1633. * information in the `cookies` field.
  1634. */
  1635. getAllCookies(): Promise<Protocol.Network.GetAllCookiesResponse>;
  1636. /**
  1637. * Returns the DER-encoded certificate.
  1638. */
  1639. getCertificate(params: Protocol.Network.GetCertificateRequest): Promise<Protocol.Network.GetCertificateResponse>;
  1640. /**
  1641. * Returns all browser cookies for the current URL. Depending on the backend support, will return
  1642. * detailed cookie information in the `cookies` field.
  1643. */
  1644. getCookies(params: Protocol.Network.GetCookiesRequest): Promise<Protocol.Network.GetCookiesResponse>;
  1645. /**
  1646. * Returns content served for the given request.
  1647. */
  1648. getResponseBody(params: Protocol.Network.GetResponseBodyRequest): Promise<Protocol.Network.GetResponseBodyResponse>;
  1649. /**
  1650. * Returns post data sent with the request. Returns an error when no data was sent with the request.
  1651. */
  1652. getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest): Promise<Protocol.Network.GetRequestPostDataResponse>;
  1653. /**
  1654. * Returns content served for the given currently intercepted request.
  1655. */
  1656. getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest): Promise<Protocol.Network.GetResponseBodyForInterceptionResponse>;
  1657. /**
  1658. * Returns a handle to the stream representing the response body. Note that after this command,
  1659. * the intercepted request can't be continued as is -- you either need to cancel it or to provide
  1660. * the response body. The stream only supports sequential read, IO.read will fail if the position
  1661. * is specified.
  1662. */
  1663. takeResponseBodyForInterceptionAsStream(params: Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest): Promise<Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse>;
  1664. /**
  1665. * This method sends a new XMLHttpRequest which is identical to the original one. The following
  1666. * parameters should be identical: method, url, async, request body, extra headers, withCredentials
  1667. * attribute, user, password.
  1668. */
  1669. replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise<void>;
  1670. /**
  1671. * Searches for given string in response content.
  1672. */
  1673. searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest): Promise<Protocol.Network.SearchInResponseBodyResponse>;
  1674. /**
  1675. * Blocks URLs from loading.
  1676. */
  1677. setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise<void>;
  1678. /**
  1679. * Toggles ignoring of service worker for each request.
  1680. */
  1681. setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest): Promise<void>;
  1682. /**
  1683. * Toggles ignoring cache for each request. If `true`, cache will not be used.
  1684. */
  1685. setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest): Promise<void>;
  1686. /**
  1687. * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
  1688. */
  1689. setCookie(params: Protocol.Network.SetCookieRequest): Promise<Protocol.Network.SetCookieResponse>;
  1690. /**
  1691. * Sets given cookies.
  1692. */
  1693. setCookies(params: Protocol.Network.SetCookiesRequest): Promise<void>;
  1694. /**
  1695. * For testing.
  1696. */
  1697. setDataSizeLimitsForTest(params: Protocol.Network.SetDataSizeLimitsForTestRequest): Promise<void>;
  1698. /**
  1699. * Specifies whether to always send extra HTTP headers with the requests from this page.
  1700. */
  1701. setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest): Promise<void>;
  1702. /**
  1703. * Specifies whether to sned a debug header to all outgoing requests.
  1704. */
  1705. setAttachDebugHeader(params: Protocol.Network.SetAttachDebugHeaderRequest): Promise<void>;
  1706. /**
  1707. * Sets the requests to intercept that match the provided patterns and optionally resource types.
  1708. * Deprecated, please use Fetch.enable instead.
  1709. */
  1710. setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest): Promise<void>;
  1711. /**
  1712. * Allows overriding user agent with the given string.
  1713. */
  1714. setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest): Promise<void>;
  1715. /**
  1716. * Returns information about the COEP/COOP isolation status.
  1717. */
  1718. getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest): Promise<Protocol.Network.GetSecurityIsolationStatusResponse>;
  1719. /**
  1720. * Fetches the resource and returns the content.
  1721. */
  1722. loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest): Promise<Protocol.Network.LoadNetworkResourceResponse>;
  1723. /**
  1724. * Fired when data chunk was received over the network.
  1725. */
  1726. on(event: 'dataReceived', listener: (params: Protocol.Network.DataReceivedEvent) => void): void;
  1727. /**
  1728. * Fired when EventSource message is received.
  1729. */
  1730. on(event: 'eventSourceMessageReceived', listener: (params: Protocol.Network.EventSourceMessageReceivedEvent) => void): void;
  1731. /**
  1732. * Fired when HTTP request has failed to load.
  1733. */
  1734. on(event: 'loadingFailed', listener: (params: Protocol.Network.LoadingFailedEvent) => void): void;
  1735. /**
  1736. * Fired when HTTP request has finished loading.
  1737. */
  1738. on(event: 'loadingFinished', listener: (params: Protocol.Network.LoadingFinishedEvent) => void): void;
  1739. /**
  1740. * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
  1741. * mocked.
  1742. * Deprecated, use Fetch.requestPaused instead.
  1743. */
  1744. on(event: 'requestIntercepted', listener: (params: Protocol.Network.RequestInterceptedEvent) => void): void;
  1745. /**
  1746. * Fired if request ended up loading from cache.
  1747. */
  1748. on(event: 'requestServedFromCache', listener: (params: Protocol.Network.RequestServedFromCacheEvent) => void): void;
  1749. /**
  1750. * Fired when page is about to send HTTP request.
  1751. */
  1752. on(event: 'requestWillBeSent', listener: (params: Protocol.Network.RequestWillBeSentEvent) => void): void;
  1753. /**
  1754. * Fired when resource loading priority is changed
  1755. */
  1756. on(event: 'resourceChangedPriority', listener: (params: Protocol.Network.ResourceChangedPriorityEvent) => void): void;
  1757. /**
  1758. * Fired when a signed exchange was received over the network
  1759. */
  1760. on(event: 'signedExchangeReceived', listener: (params: Protocol.Network.SignedExchangeReceivedEvent) => void): void;
  1761. /**
  1762. * Fired when HTTP response is available.
  1763. */
  1764. on(event: 'responseReceived', listener: (params: Protocol.Network.ResponseReceivedEvent) => void): void;
  1765. /**
  1766. * Fired when WebSocket is closed.
  1767. */
  1768. on(event: 'webSocketClosed', listener: (params: Protocol.Network.WebSocketClosedEvent) => void): void;
  1769. /**
  1770. * Fired upon WebSocket creation.
  1771. */
  1772. on(event: 'webSocketCreated', listener: (params: Protocol.Network.WebSocketCreatedEvent) => void): void;
  1773. /**
  1774. * Fired when WebSocket message error occurs.
  1775. */
  1776. on(event: 'webSocketFrameError', listener: (params: Protocol.Network.WebSocketFrameErrorEvent) => void): void;
  1777. /**
  1778. * Fired when WebSocket message is received.
  1779. */
  1780. on(event: 'webSocketFrameReceived', listener: (params: Protocol.Network.WebSocketFrameReceivedEvent) => void): void;
  1781. /**
  1782. * Fired when WebSocket message is sent.
  1783. */
  1784. on(event: 'webSocketFrameSent', listener: (params: Protocol.Network.WebSocketFrameSentEvent) => void): void;
  1785. /**
  1786. * Fired when WebSocket handshake response becomes available.
  1787. */
  1788. on(event: 'webSocketHandshakeResponseReceived', listener: (params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent) => void): void;
  1789. /**
  1790. * Fired when WebSocket is about to initiate handshake.
  1791. */
  1792. on(event: 'webSocketWillSendHandshakeRequest', listener: (params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent) => void): void;
  1793. /**
  1794. * Fired when additional information about a requestWillBeSent event is available from the
  1795. * network stack. Not every requestWillBeSent event will have an additional
  1796. * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
  1797. * or requestWillBeSentExtraInfo will be fired first for the same request.
  1798. */
  1799. on(event: 'requestWillBeSentExtraInfo', listener: (params: Protocol.Network.RequestWillBeSentExtraInfoEvent) => void): void;
  1800. /**
  1801. * Fired when additional information about a responseReceived event is available from the network
  1802. * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
  1803. * it, and responseReceivedExtraInfo may be fired before or after responseReceived.
  1804. */
  1805. on(event: 'responseReceivedExtraInfo', listener: (params: Protocol.Network.ResponseReceivedExtraInfoEvent) => void): void;
  1806. }
  1807. export interface OverlayApi {
  1808. /**
  1809. * Disables domain notifications.
  1810. */
  1811. disable(): Promise<void>;
  1812. /**
  1813. * Enables domain notifications.
  1814. */
  1815. enable(): Promise<void>;
  1816. /**
  1817. * For testing.
  1818. */
  1819. getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetHighlightObjectForTestResponse>;
  1820. /**
  1821. * For Persistent Grid testing.
  1822. */
  1823. getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest): Promise<Protocol.Overlay.GetGridHighlightObjectsForTestResponse>;
  1824. /**
  1825. * For Source Order Viewer testing.
  1826. */
  1827. getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse>;
  1828. /**
  1829. * Hides any highlight.
  1830. */
  1831. hideHighlight(): Promise<void>;
  1832. /**
  1833. * Highlights owner element of the frame with given id.
  1834. */
  1835. highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise<void>;
  1836. /**
  1837. * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
  1838. * objectId must be specified.
  1839. */
  1840. highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise<void>;
  1841. /**
  1842. * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
  1843. */
  1844. highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise<void>;
  1845. /**
  1846. * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
  1847. */
  1848. highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<void>;
  1849. /**
  1850. * Highlights the source order of the children of the DOM node with given id or with the given
  1851. * JavaScript object wrapper. Either nodeId or objectId must be specified.
  1852. */
  1853. highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest): Promise<void>;
  1854. /**
  1855. * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
  1856. * Backend then generates 'inspectNodeRequested' event upon element selection.
  1857. */
  1858. setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise<void>;
  1859. /**
  1860. * Highlights owner element of all frames detected to be ads.
  1861. */
  1862. setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest): Promise<void>;
  1863. setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest): Promise<void>;
  1864. /**
  1865. * Requests that backend shows debug borders on layers
  1866. */
  1867. setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest): Promise<void>;
  1868. /**
  1869. * Requests that backend shows the FPS counter
  1870. */
  1871. setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest): Promise<void>;
  1872. /**
  1873. * Highlight multiple elements with the CSS Grid overlay.
  1874. */
  1875. setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest): Promise<void>;
  1876. /**
  1877. * Requests that backend shows paint rectangles
  1878. */
  1879. setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest): Promise<void>;
  1880. /**
  1881. * Requests that backend shows layout shift regions
  1882. */
  1883. setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest): Promise<void>;
  1884. /**
  1885. * Requests that backend shows scroll bottleneck rects
  1886. */
  1887. setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest): Promise<void>;
  1888. /**
  1889. * Requests that backend shows hit-test borders on layers
  1890. */
  1891. setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest): Promise<void>;
  1892. /**
  1893. * Paints viewport size upon main frame resize.
  1894. */
  1895. setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest): Promise<void>;
  1896. /**
  1897. * Add a dual screen device hinge
  1898. */
  1899. setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise<void>;
  1900. /**
  1901. * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
  1902. * user manually inspects an element.
  1903. */
  1904. on(event: 'inspectNodeRequested', listener: (params: Protocol.Overlay.InspectNodeRequestedEvent) => void): void;
  1905. /**
  1906. * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
  1907. */
  1908. on(event: 'nodeHighlightRequested', listener: (params: Protocol.Overlay.NodeHighlightRequestedEvent) => void): void;
  1909. /**
  1910. * Fired when user asks to capture screenshot of some area on the page.
  1911. */
  1912. on(event: 'screenshotRequested', listener: (params: Protocol.Overlay.ScreenshotRequestedEvent) => void): void;
  1913. /**
  1914. * Fired when user cancels the inspect mode.
  1915. */
  1916. on(event: 'inspectModeCanceled', listener: () => void): void;
  1917. }
  1918. export interface PageApi {
  1919. /**
  1920. * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
  1921. */
  1922. addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest): Promise<Protocol.Page.AddScriptToEvaluateOnLoadResponse>;
  1923. /**
  1924. * Evaluates given script in every frame upon creation (before loading frame's scripts).
  1925. */
  1926. addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest): Promise<Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse>;
  1927. /**
  1928. * Brings page to front (activates tab).
  1929. */
  1930. bringToFront(): Promise<void>;
  1931. /**
  1932. * Capture page screenshot.
  1933. */
  1934. captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest): Promise<Protocol.Page.CaptureScreenshotResponse>;
  1935. /**
  1936. * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
  1937. * iframes, shadow DOM, external resources, and element-inline styles.
  1938. */
  1939. captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest): Promise<Protocol.Page.CaptureSnapshotResponse>;
  1940. /**
  1941. * Clears the overriden device metrics.
  1942. */
  1943. clearDeviceMetricsOverride(): Promise<void>;
  1944. /**
  1945. * Clears the overridden Device Orientation.
  1946. */
  1947. clearDeviceOrientationOverride(): Promise<void>;
  1948. /**
  1949. * Clears the overriden Geolocation Position and Error.
  1950. */
  1951. clearGeolocationOverride(): Promise<void>;
  1952. /**
  1953. * Creates an isolated world for the given frame.
  1954. */
  1955. createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest): Promise<Protocol.Page.CreateIsolatedWorldResponse>;
  1956. /**
  1957. * Deletes browser cookie with given name, domain and path.
  1958. */
  1959. deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise<void>;
  1960. /**
  1961. * Disables page domain notifications.
  1962. */
  1963. disable(): Promise<void>;
  1964. /**
  1965. * Enables page domain notifications.
  1966. */
  1967. enable(): Promise<void>;
  1968. getAppManifest(): Promise<Protocol.Page.GetAppManifestResponse>;
  1969. getInstallabilityErrors(): Promise<Protocol.Page.GetInstallabilityErrorsResponse>;
  1970. getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
  1971. /**
  1972. * Returns all browser cookies. Depending on the backend support, will return detailed cookie
  1973. * information in the `cookies` field.
  1974. */
  1975. getCookies(): Promise<Protocol.Page.GetCookiesResponse>;
  1976. /**
  1977. * Returns present frame tree structure.
  1978. */
  1979. getFrameTree(): Promise<Protocol.Page.GetFrameTreeResponse>;
  1980. /**
  1981. * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
  1982. */
  1983. getLayoutMetrics(): Promise<Protocol.Page.GetLayoutMetricsResponse>;
  1984. /**
  1985. * Returns navigation history for the current page.
  1986. */
  1987. getNavigationHistory(): Promise<Protocol.Page.GetNavigationHistoryResponse>;
  1988. /**
  1989. * Resets navigation history for the current page.
  1990. */
  1991. resetNavigationHistory(): Promise<void>;
  1992. /**
  1993. * Returns content of the given resource.
  1994. */
  1995. getResourceContent(params: Protocol.Page.GetResourceContentRequest): Promise<Protocol.Page.GetResourceContentResponse>;
  1996. /**
  1997. * Returns present frame / resource tree structure.
  1998. */
  1999. getResourceTree(): Promise<Protocol.Page.GetResourceTreeResponse>;
  2000. /**
  2001. * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
  2002. */
  2003. handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest): Promise<void>;
  2004. /**
  2005. * Navigates current page to the given URL.
  2006. */
  2007. navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;
  2008. /**
  2009. * Navigates current page to the given history entry.
  2010. */
  2011. navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest): Promise<void>;
  2012. /**
  2013. * Print page as PDF.
  2014. */
  2015. printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise<Protocol.Page.PrintToPDFResponse>;
  2016. /**
  2017. * Reloads given page optionally ignoring the cache.
  2018. */
  2019. reload(params: Protocol.Page.ReloadRequest): Promise<void>;
  2020. /**
  2021. * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
  2022. */
  2023. removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest): Promise<void>;
  2024. /**
  2025. * Removes given script from the list.
  2026. */
  2027. removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest): Promise<void>;
  2028. /**
  2029. * Acknowledges that a screencast frame has been received by the frontend.
  2030. */
  2031. screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest): Promise<void>;
  2032. /**
  2033. * Searches for given string in resource content.
  2034. */
  2035. searchInResource(params: Protocol.Page.SearchInResourceRequest): Promise<Protocol.Page.SearchInResourceResponse>;
  2036. /**
  2037. * Enable Chrome's experimental ad filter on all sites.
  2038. */
  2039. setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest): Promise<void>;
  2040. /**
  2041. * Enable page Content Security Policy by-passing.
  2042. */
  2043. setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise<void>;
  2044. /**
  2045. * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
  2046. * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
  2047. * query results).
  2048. */
  2049. setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest): Promise<void>;
  2050. /**
  2051. * Overrides the Device Orientation.
  2052. */
  2053. setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest): Promise<void>;
  2054. /**
  2055. * Set generic font families.
  2056. */
  2057. setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise<void>;
  2058. /**
  2059. * Set default font sizes.
  2060. */
  2061. setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise<void>;
  2062. /**
  2063. * Sets given markup as the document's HTML.
  2064. */
  2065. setDocumentContent(params: Protocol.Page.SetDocumentContentRequest): Promise<void>;
  2066. /**
  2067. * Set the behavior when downloading a file.
  2068. */
  2069. setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest): Promise<void>;
  2070. /**
  2071. * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
  2072. * unavailable.
  2073. */
  2074. setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest): Promise<void>;
  2075. /**
  2076. * Controls whether page will emit lifecycle events.
  2077. */
  2078. setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest): Promise<void>;
  2079. /**
  2080. * Toggles mouse event-based touch event emulation.
  2081. */
  2082. setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest): Promise<void>;
  2083. /**
  2084. * Starts sending each frame using the `screencastFrame` event.
  2085. */
  2086. startScreencast(params: Protocol.Page.StartScreencastRequest): Promise<void>;
  2087. /**
  2088. * Force the page stop all navigations and pending resource fetches.
  2089. */
  2090. stopLoading(): Promise<void>;
  2091. /**
  2092. * Crashes renderer on the IO thread, generates minidumps.
  2093. */
  2094. crash(): Promise<void>;
  2095. /**
  2096. * Tries to close page, running its beforeunload hooks, if any.
  2097. */
  2098. close(): Promise<void>;
  2099. /**
  2100. * Tries to update the web lifecycle state of the page.
  2101. * It will transition the page to the given state according to:
  2102. * https://github.com/WICG/web-lifecycle/
  2103. */
  2104. setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest): Promise<void>;
  2105. /**
  2106. * Stops sending each frame in the `screencastFrame`.
  2107. */
  2108. stopScreencast(): Promise<void>;
  2109. /**
  2110. * Forces compilation cache to be generated for every subresource script.
  2111. */
  2112. setProduceCompilationCache(params: Protocol.Page.SetProduceCompilationCacheRequest): Promise<void>;
  2113. /**
  2114. * Seeds compilation cache for given url. Compilation cache does not survive
  2115. * cross-process navigation.
  2116. */
  2117. addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest): Promise<void>;
  2118. /**
  2119. * Clears seeded compilation cache.
  2120. */
  2121. clearCompilationCache(): Promise<void>;
  2122. /**
  2123. * Generates a report for testing.
  2124. */
  2125. generateTestReport(params: Protocol.Page.GenerateTestReportRequest): Promise<void>;
  2126. /**
  2127. * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
  2128. */
  2129. waitForDebugger(): Promise<void>;
  2130. /**
  2131. * Intercept file chooser requests and transfer control to protocol clients.
  2132. * When file chooser interception is enabled, native file chooser dialog is not shown.
  2133. * Instead, a protocol event `Page.fileChooserOpened` is emitted.
  2134. */
  2135. setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest): Promise<void>;
  2136. on(event: 'domContentEventFired', listener: (params: Protocol.Page.DomContentEventFiredEvent) => void): void;
  2137. /**
  2138. * Emitted only when `page.interceptFileChooser` is enabled.
  2139. */
  2140. on(event: 'fileChooserOpened', listener: (params: Protocol.Page.FileChooserOpenedEvent) => void): void;
  2141. /**
  2142. * Fired when frame has been attached to its parent.
  2143. */
  2144. on(event: 'frameAttached', listener: (params: Protocol.Page.FrameAttachedEvent) => void): void;
  2145. /**
  2146. * Fired when frame no longer has a scheduled navigation.
  2147. */
  2148. on(event: 'frameClearedScheduledNavigation', listener: (params: Protocol.Page.FrameClearedScheduledNavigationEvent) => void): void;
  2149. /**
  2150. * Fired when frame has been detached from its parent.
  2151. */
  2152. on(event: 'frameDetached', listener: (params: Protocol.Page.FrameDetachedEvent) => void): void;
  2153. /**
  2154. * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
  2155. */
  2156. on(event: 'frameNavigated', listener: (params: Protocol.Page.FrameNavigatedEvent) => void): void;
  2157. on(event: 'frameResized', listener: () => void): void;
  2158. /**
  2159. * Fired when a renderer-initiated navigation is requested.
  2160. * Navigation may still be cancelled after the event is issued.
  2161. */
  2162. on(event: 'frameRequestedNavigation', listener: (params: Protocol.Page.FrameRequestedNavigationEvent) => void): void;
  2163. /**
  2164. * Fired when frame schedules a potential navigation.
  2165. */
  2166. on(event: 'frameScheduledNavigation', listener: (params: Protocol.Page.FrameScheduledNavigationEvent) => void): void;
  2167. /**
  2168. * Fired when frame has started loading.
  2169. */
  2170. on(event: 'frameStartedLoading', listener: (params: Protocol.Page.FrameStartedLoadingEvent) => void): void;
  2171. /**
  2172. * Fired when frame has stopped loading.
  2173. */
  2174. on(event: 'frameStoppedLoading', listener: (params: Protocol.Page.FrameStoppedLoadingEvent) => void): void;
  2175. /**
  2176. * Fired when page is about to start a download.
  2177. */
  2178. on(event: 'downloadWillBegin', listener: (params: Protocol.Page.DownloadWillBeginEvent) => void): void;
  2179. /**
  2180. * Fired when download makes progress. Last call has |done| == true.
  2181. */
  2182. on(event: 'downloadProgress', listener: (params: Protocol.Page.DownloadProgressEvent) => void): void;
  2183. /**
  2184. * Fired when interstitial page was hidden
  2185. */
  2186. on(event: 'interstitialHidden', listener: () => void): void;
  2187. /**
  2188. * Fired when interstitial page was shown
  2189. */
  2190. on(event: 'interstitialShown', listener: () => void): void;
  2191. /**
  2192. * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
  2193. * closed.
  2194. */
  2195. on(event: 'javascriptDialogClosed', listener: (params: Protocol.Page.JavascriptDialogClosedEvent) => void): void;
  2196. /**
  2197. * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
  2198. * open.
  2199. */
  2200. on(event: 'javascriptDialogOpening', listener: (params: Protocol.Page.JavascriptDialogOpeningEvent) => void): void;
  2201. /**
  2202. * Fired for top level page lifecycle events such as navigation, load, paint, etc.
  2203. */
  2204. on(event: 'lifecycleEvent', listener: (params: Protocol.Page.LifecycleEventEvent) => void): void;
  2205. on(event: 'loadEventFired', listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
  2206. /**
  2207. * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
  2208. */
  2209. on(event: 'navigatedWithinDocument', listener: (params: Protocol.Page.NavigatedWithinDocumentEvent) => void): void;
  2210. /**
  2211. * Compressed image data requested by the `startScreencast`.
  2212. */
  2213. on(event: 'screencastFrame', listener: (params: Protocol.Page.ScreencastFrameEvent) => void): void;
  2214. /**
  2215. * Fired when the page with currently enabled screencast was shown or hidden `.
  2216. */
  2217. on(event: 'screencastVisibilityChanged', listener: (params: Protocol.Page.ScreencastVisibilityChangedEvent) => void): void;
  2218. /**
  2219. * Fired when a new window is going to be opened, via window.open(), link click, form submission,
  2220. * etc.
  2221. */
  2222. on(event: 'windowOpen', listener: (params: Protocol.Page.WindowOpenEvent) => void): void;
  2223. /**
  2224. * Issued for every compilation cache generated. Is only available
  2225. * if Page.setGenerateCompilationCache is enabled.
  2226. */
  2227. on(event: 'compilationCacheProduced', listener: (params: Protocol.Page.CompilationCacheProducedEvent) => void): void;
  2228. }
  2229. export interface PerformanceApi {
  2230. /**
  2231. * Disable collecting and reporting metrics.
  2232. */
  2233. disable(): Promise<void>;
  2234. /**
  2235. * Enable collecting and reporting metrics.
  2236. */
  2237. enable(params: Protocol.Performance.EnableRequest): Promise<void>;
  2238. /**
  2239. * Sets time domain to use for collecting and reporting duration metrics.
  2240. * Note that this must be called before enabling metrics collection. Calling
  2241. * this method while metrics collection is enabled returns an error.
  2242. */
  2243. setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest): Promise<void>;
  2244. /**
  2245. * Retrieve current values of run-time metrics.
  2246. */
  2247. getMetrics(): Promise<Protocol.Performance.GetMetricsResponse>;
  2248. /**
  2249. * Current values of the metrics.
  2250. */
  2251. on(event: 'metrics', listener: (params: Protocol.Performance.MetricsEvent) => void): void;
  2252. }
  2253. export interface SecurityApi {
  2254. /**
  2255. * Disables tracking security state changes.
  2256. */
  2257. disable(): Promise<void>;
  2258. /**
  2259. * Enables tracking security state changes.
  2260. */
  2261. enable(): Promise<void>;
  2262. /**
  2263. * Enable/disable whether all certificate errors should be ignored.
  2264. */
  2265. setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest): Promise<void>;
  2266. /**
  2267. * Handles a certificate error that fired a certificateError event.
  2268. */
  2269. handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest): Promise<void>;
  2270. /**
  2271. * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
  2272. * be handled by the DevTools client and should be answered with `handleCertificateError` commands.
  2273. */
  2274. setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest): Promise<void>;
  2275. /**
  2276. * There is a certificate error. If overriding certificate errors is enabled, then it should be
  2277. * handled with the `handleCertificateError` command. Note: this event does not fire if the
  2278. * certificate error has been allowed internally. Only one client per target should override
  2279. * certificate errors at the same time.
  2280. */
  2281. on(event: 'certificateError', listener: (params: Protocol.Security.CertificateErrorEvent) => void): void;
  2282. /**
  2283. * The security state of the page changed.
  2284. */
  2285. on(event: 'visibleSecurityStateChanged', listener: (params: Protocol.Security.VisibleSecurityStateChangedEvent) => void): void;
  2286. /**
  2287. * The security state of the page changed.
  2288. */
  2289. on(event: 'securityStateChanged', listener: (params: Protocol.Security.SecurityStateChangedEvent) => void): void;
  2290. }
  2291. export interface ServiceWorkerApi {
  2292. deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest): Promise<void>;
  2293. disable(): Promise<void>;
  2294. dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest): Promise<void>;
  2295. dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest): Promise<void>;
  2296. enable(): Promise<void>;
  2297. inspectWorker(params: Protocol.ServiceWorker.InspectWorkerRequest): Promise<void>;
  2298. setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest): Promise<void>;
  2299. skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise<void>;
  2300. startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise<void>;
  2301. stopAllWorkers(): Promise<void>;
  2302. stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise<void>;
  2303. unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise<void>;
  2304. updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest): Promise<void>;
  2305. on(event: 'workerErrorReported', listener: (params: Protocol.ServiceWorker.WorkerErrorReportedEvent) => void): void;
  2306. on(event: 'workerRegistrationUpdated', listener: (params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent) => void): void;
  2307. on(event: 'workerVersionUpdated', listener: (params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent) => void): void;
  2308. }
  2309. export interface StorageApi {
  2310. /**
  2311. * Clears storage for origin.
  2312. */
  2313. clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest): Promise<void>;
  2314. /**
  2315. * Returns all browser cookies.
  2316. */
  2317. getCookies(params: Protocol.Storage.GetCookiesRequest): Promise<Protocol.Storage.GetCookiesResponse>;
  2318. /**
  2319. * Sets given cookies.
  2320. */
  2321. setCookies(params: Protocol.Storage.SetCookiesRequest): Promise<void>;
  2322. /**
  2323. * Clears cookies.
  2324. */
  2325. clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise<void>;
  2326. /**
  2327. * Returns usage and quota in bytes.
  2328. */
  2329. getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest): Promise<Protocol.Storage.GetUsageAndQuotaResponse>;
  2330. /**
  2331. * Override quota for the specified origin
  2332. */
  2333. overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest): Promise<void>;
  2334. /**
  2335. * Registers origin to be notified when an update occurs to its cache storage list.
  2336. */
  2337. trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest): Promise<void>;
  2338. /**
  2339. * Registers origin to be notified when an update occurs to its IndexedDB.
  2340. */
  2341. trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest): Promise<void>;
  2342. /**
  2343. * Unregisters origin from receiving notifications for cache storage.
  2344. */
  2345. untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest): Promise<void>;
  2346. /**
  2347. * Unregisters origin from receiving notifications for IndexedDB.
  2348. */
  2349. untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest): Promise<void>;
  2350. /**
  2351. * A cache's contents have been modified.
  2352. */
  2353. on(event: 'cacheStorageContentUpdated', listener: (params: Protocol.Storage.CacheStorageContentUpdatedEvent) => void): void;
  2354. /**
  2355. * A cache has been added/deleted.
  2356. */
  2357. on(event: 'cacheStorageListUpdated', listener: (params: Protocol.Storage.CacheStorageListUpdatedEvent) => void): void;
  2358. /**
  2359. * The origin's IndexedDB object store has been modified.
  2360. */
  2361. on(event: 'indexedDBContentUpdated', listener: (params: Protocol.Storage.IndexedDBContentUpdatedEvent) => void): void;
  2362. /**
  2363. * The origin's IndexedDB database list has been modified.
  2364. */
  2365. on(event: 'indexedDBListUpdated', listener: (params: Protocol.Storage.IndexedDBListUpdatedEvent) => void): void;
  2366. }
  2367. export interface SystemInfoApi {
  2368. /**
  2369. * Returns information about the system.
  2370. */
  2371. getInfo(): Promise<Protocol.SystemInfo.GetInfoResponse>;
  2372. /**
  2373. * Returns information about all running processes.
  2374. */
  2375. getProcessInfo(): Promise<Protocol.SystemInfo.GetProcessInfoResponse>;
  2376. }
  2377. export interface TargetApi {
  2378. /**
  2379. * Activates (focuses) the target.
  2380. */
  2381. activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise<void>;
  2382. /**
  2383. * Attaches to the target with given id.
  2384. */
  2385. attachToTarget(params: Protocol.Target.AttachToTargetRequest): Promise<Protocol.Target.AttachToTargetResponse>;
  2386. /**
  2387. * Attaches to the browser target, only uses flat sessionId mode.
  2388. */
  2389. attachToBrowserTarget(): Promise<Protocol.Target.AttachToBrowserTargetResponse>;
  2390. /**
  2391. * Closes the target. If the target is a page that gets closed too.
  2392. */
  2393. closeTarget(params: Protocol.Target.CloseTargetRequest): Promise<Protocol.Target.CloseTargetResponse>;
  2394. /**
  2395. * Inject object to the target's main frame that provides a communication
  2396. * channel with browser target.
  2397. *
  2398. * Injected object will be available as `window[bindingName]`.
  2399. *
  2400. * The object has the follwing API:
  2401. * - `binding.send(json)` - a method to send messages over the remote debugging protocol
  2402. * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
  2403. */
  2404. exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest): Promise<void>;
  2405. /**
  2406. * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
  2407. * one.
  2408. */
  2409. createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest): Promise<Protocol.Target.CreateBrowserContextResponse>;
  2410. /**
  2411. * Returns all browser contexts created with `Target.createBrowserContext` method.
  2412. */
  2413. getBrowserContexts(): Promise<Protocol.Target.GetBrowserContextsResponse>;
  2414. /**
  2415. * Creates a new page.
  2416. */
  2417. createTarget(params: Protocol.Target.CreateTargetRequest): Promise<Protocol.Target.CreateTargetResponse>;
  2418. /**
  2419. * Detaches session with given id.
  2420. */
  2421. detachFromTarget(params: Protocol.Target.DetachFromTargetRequest): Promise<void>;
  2422. /**
  2423. * Deletes a BrowserContext. All the belonging pages will be closed without calling their
  2424. * beforeunload hooks.
  2425. */
  2426. disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest): Promise<void>;
  2427. /**
  2428. * Returns information about a target.
  2429. */
  2430. getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise<Protocol.Target.GetTargetInfoResponse>;
  2431. /**
  2432. * Retrieves a list of available targets.
  2433. */
  2434. getTargets(): Promise<Protocol.Target.GetTargetsResponse>;
  2435. /**
  2436. * Sends protocol message over session with given id.
  2437. * Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
  2438. * and crbug.com/991325.
  2439. */
  2440. sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest): Promise<void>;
  2441. /**
  2442. * Controls whether to automatically attach to new targets which are considered to be related to
  2443. * this one. When turned on, attaches to all existing related targets as well. When turned off,
  2444. * automatically detaches from all currently attached targets.
  2445. */
  2446. setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise<void>;
  2447. /**
  2448. * Controls whether to discover available targets and notify via
  2449. * `targetCreated/targetInfoChanged/targetDestroyed` events.
  2450. */
  2451. setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest): Promise<void>;
  2452. /**
  2453. * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
  2454. * `true`.
  2455. */
  2456. setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest): Promise<void>;
  2457. /**
  2458. * Issued when attached to target because of auto-attach or `attachToTarget` command.
  2459. */
  2460. on(event: 'attachedToTarget', listener: (params: Protocol.Target.AttachedToTargetEvent) => void): void;
  2461. /**
  2462. * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
  2463. * issued multiple times per target if multiple sessions have been attached to it.
  2464. */
  2465. on(event: 'detachedFromTarget', listener: (params: Protocol.Target.DetachedFromTargetEvent) => void): void;
  2466. /**
  2467. * Notifies about a new protocol message received from the session (as reported in
  2468. * `attachedToTarget` event).
  2469. */
  2470. on(event: 'receivedMessageFromTarget', listener: (params: Protocol.Target.ReceivedMessageFromTargetEvent) => void): void;
  2471. /**
  2472. * Issued when a possible inspection target is created.
  2473. */
  2474. on(event: 'targetCreated', listener: (params: Protocol.Target.TargetCreatedEvent) => void): void;
  2475. /**
  2476. * Issued when a target is destroyed.
  2477. */
  2478. on(event: 'targetDestroyed', listener: (params: Protocol.Target.TargetDestroyedEvent) => void): void;
  2479. /**
  2480. * Issued when a target has crashed.
  2481. */
  2482. on(event: 'targetCrashed', listener: (params: Protocol.Target.TargetCrashedEvent) => void): void;
  2483. /**
  2484. * Issued when some information about a target has changed. This only happens between
  2485. * `targetCreated` and `targetDestroyed`.
  2486. */
  2487. on(event: 'targetInfoChanged', listener: (params: Protocol.Target.TargetInfoChangedEvent) => void): void;
  2488. }
  2489. export interface TetheringApi {
  2490. /**
  2491. * Request browser port binding.
  2492. */
  2493. bind(params: Protocol.Tethering.BindRequest): Promise<void>;
  2494. /**
  2495. * Request browser port unbinding.
  2496. */
  2497. unbind(params: Protocol.Tethering.UnbindRequest): Promise<void>;
  2498. /**
  2499. * Informs that port was successfully bound and got a specified connection id.
  2500. */
  2501. on(event: 'accepted', listener: (params: Protocol.Tethering.AcceptedEvent) => void): void;
  2502. }
  2503. export interface TracingApi {
  2504. /**
  2505. * Stop trace events collection.
  2506. */
  2507. end(): Promise<void>;
  2508. /**
  2509. * Gets supported tracing categories.
  2510. */
  2511. getCategories(): Promise<Protocol.Tracing.GetCategoriesResponse>;
  2512. /**
  2513. * Record a clock sync marker in the trace.
  2514. */
  2515. recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest): Promise<void>;
  2516. /**
  2517. * Request a global memory dump.
  2518. */
  2519. requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest): Promise<Protocol.Tracing.RequestMemoryDumpResponse>;
  2520. /**
  2521. * Start trace events collection.
  2522. */
  2523. start(params: Protocol.Tracing.StartRequest): Promise<void>;
  2524. on(event: 'bufferUsage', listener: (params: Protocol.Tracing.BufferUsageEvent) => void): void;
  2525. /**
  2526. * Contains an bucket of collected trace events. When tracing is stopped collected events will be
  2527. * send as a sequence of dataCollected events followed by tracingComplete event.
  2528. */
  2529. on(event: 'dataCollected', listener: (params: Protocol.Tracing.DataCollectedEvent) => void): void;
  2530. /**
  2531. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2532. * delivered via dataCollected events.
  2533. */
  2534. on(event: 'tracingComplete', listener: (params: Protocol.Tracing.TracingCompleteEvent) => void): void;
  2535. }
  2536. export interface FetchApi {
  2537. /**
  2538. * Disables the fetch domain.
  2539. */
  2540. disable(): Promise<void>;
  2541. /**
  2542. * Enables issuing of requestPaused events. A request will be paused until client
  2543. * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
  2544. */
  2545. enable(params: Protocol.Fetch.EnableRequest): Promise<void>;
  2546. /**
  2547. * Causes the request to fail with specified reason.
  2548. */
  2549. failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<void>;
  2550. /**
  2551. * Provides response to the request.
  2552. */
  2553. fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<void>;
  2554. /**
  2555. * Continues the request, optionally modifying some of its parameters.
  2556. */
  2557. continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<void>;
  2558. /**
  2559. * Continues a request supplying authChallengeResponse following authRequired event.
  2560. */
  2561. continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise<void>;
  2562. /**
  2563. * Causes the body of the response to be received from the server and
  2564. * returned as a single string. May only be issued for a request that
  2565. * is paused in the Response stage and is mutually exclusive with
  2566. * takeResponseBodyForInterceptionAsStream. Calling other methods that
  2567. * affect the request or disabling fetch domain before body is received
  2568. * results in an undefined behavior.
  2569. */
  2570. getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise<Protocol.Fetch.GetResponseBodyResponse>;
  2571. /**
  2572. * Returns a handle to the stream representing the response body.
  2573. * The request must be paused in the HeadersReceived stage.
  2574. * Note that after this command the request can't be continued
  2575. * as is -- client either needs to cancel it or to provide the
  2576. * response body.
  2577. * The stream only supports sequential read, IO.read will fail if the position
  2578. * is specified.
  2579. * This method is mutually exclusive with getResponseBody.
  2580. * Calling other methods that affect the request or disabling fetch
  2581. * domain before body is received results in an undefined behavior.
  2582. */
  2583. takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
  2584. /**
  2585. * Issued when the domain is enabled and the request URL matches the
  2586. * specified filter. The request is paused until the client responds
  2587. * with one of continueRequest, failRequest or fulfillRequest.
  2588. * The stage of the request can be determined by presence of responseErrorReason
  2589. * and responseStatusCode -- the request is at the response stage if either
  2590. * of these fields is present and in the request stage otherwise.
  2591. */
  2592. on(event: 'requestPaused', listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
  2593. /**
  2594. * Issued when the domain is enabled with handleAuthRequests set to true.
  2595. * The request is paused until client responds with continueWithAuth.
  2596. */
  2597. on(event: 'authRequired', listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
  2598. }
  2599. export interface WebAudioApi {
  2600. /**
  2601. * Enables the WebAudio domain and starts sending context lifetime events.
  2602. */
  2603. enable(): Promise<void>;
  2604. /**
  2605. * Disables the WebAudio domain.
  2606. */
  2607. disable(): Promise<void>;
  2608. /**
  2609. * Fetch the realtime data from the registered contexts.
  2610. */
  2611. getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest): Promise<Protocol.WebAudio.GetRealtimeDataResponse>;
  2612. /**
  2613. * Notifies that a new BaseAudioContext has been created.
  2614. */
  2615. on(event: 'contextCreated', listener: (params: Protocol.WebAudio.ContextCreatedEvent) => void): void;
  2616. /**
  2617. * Notifies that an existing BaseAudioContext will be destroyed.
  2618. */
  2619. on(event: 'contextWillBeDestroyed', listener: (params: Protocol.WebAudio.ContextWillBeDestroyedEvent) => void): void;
  2620. /**
  2621. * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
  2622. */
  2623. on(event: 'contextChanged', listener: (params: Protocol.WebAudio.ContextChangedEvent) => void): void;
  2624. /**
  2625. * Notifies that the construction of an AudioListener has finished.
  2626. */
  2627. on(event: 'audioListenerCreated', listener: (params: Protocol.WebAudio.AudioListenerCreatedEvent) => void): void;
  2628. /**
  2629. * Notifies that a new AudioListener has been created.
  2630. */
  2631. on(event: 'audioListenerWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent) => void): void;
  2632. /**
  2633. * Notifies that a new AudioNode has been created.
  2634. */
  2635. on(event: 'audioNodeCreated', listener: (params: Protocol.WebAudio.AudioNodeCreatedEvent) => void): void;
  2636. /**
  2637. * Notifies that an existing AudioNode has been destroyed.
  2638. */
  2639. on(event: 'audioNodeWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent) => void): void;
  2640. /**
  2641. * Notifies that a new AudioParam has been created.
  2642. */
  2643. on(event: 'audioParamCreated', listener: (params: Protocol.WebAudio.AudioParamCreatedEvent) => void): void;
  2644. /**
  2645. * Notifies that an existing AudioParam has been destroyed.
  2646. */
  2647. on(event: 'audioParamWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent) => void): void;
  2648. /**
  2649. * Notifies that two AudioNodes are connected.
  2650. */
  2651. on(event: 'nodesConnected', listener: (params: Protocol.WebAudio.NodesConnectedEvent) => void): void;
  2652. /**
  2653. * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
  2654. */
  2655. on(event: 'nodesDisconnected', listener: (params: Protocol.WebAudio.NodesDisconnectedEvent) => void): void;
  2656. /**
  2657. * Notifies that an AudioNode is connected to an AudioParam.
  2658. */
  2659. on(event: 'nodeParamConnected', listener: (params: Protocol.WebAudio.NodeParamConnectedEvent) => void): void;
  2660. /**
  2661. * Notifies that an AudioNode is disconnected to an AudioParam.
  2662. */
  2663. on(event: 'nodeParamDisconnected', listener: (params: Protocol.WebAudio.NodeParamDisconnectedEvent) => void): void;
  2664. }
  2665. export interface WebAuthnApi {
  2666. /**
  2667. * Enable the WebAuthn domain and start intercepting credential storage and
  2668. * retrieval with a virtual authenticator.
  2669. */
  2670. enable(): Promise<void>;
  2671. /**
  2672. * Disable the WebAuthn domain.
  2673. */
  2674. disable(): Promise<void>;
  2675. /**
  2676. * Creates and adds a virtual authenticator.
  2677. */
  2678. addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest): Promise<Protocol.WebAuthn.AddVirtualAuthenticatorResponse>;
  2679. /**
  2680. * Removes the given authenticator.
  2681. */
  2682. removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest): Promise<void>;
  2683. /**
  2684. * Adds the credential to the specified authenticator.
  2685. */
  2686. addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise<void>;
  2687. /**
  2688. * Returns a single credential stored in the given virtual authenticator that
  2689. * matches the credential ID.
  2690. */
  2691. getCredential(params: Protocol.WebAuthn.GetCredentialRequest): Promise<Protocol.WebAuthn.GetCredentialResponse>;
  2692. /**
  2693. * Returns all the credentials stored in the given virtual authenticator.
  2694. */
  2695. getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest): Promise<Protocol.WebAuthn.GetCredentialsResponse>;
  2696. /**
  2697. * Removes a credential from the authenticator.
  2698. */
  2699. removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest): Promise<void>;
  2700. /**
  2701. * Clears all the credentials from the specified device.
  2702. */
  2703. clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest): Promise<void>;
  2704. /**
  2705. * Sets whether User Verification succeeds or fails for an authenticator.
  2706. * The default is true.
  2707. */
  2708. setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest): Promise<void>;
  2709. /**
  2710. * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
  2711. * The default is true.
  2712. */
  2713. setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest): Promise<void>;
  2714. }
  2715. export interface MediaApi {
  2716. /**
  2717. * Enables the Media domain
  2718. */
  2719. enable(): Promise<void>;
  2720. /**
  2721. * Disables the Media domain.
  2722. */
  2723. disable(): Promise<void>;
  2724. /**
  2725. * This can be called multiple times, and can be used to set / override /
  2726. * remove player properties. A null propValue indicates removal.
  2727. */
  2728. on(event: 'playerPropertiesChanged', listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
  2729. /**
  2730. * Send events as a list, allowing them to be batched on the browser for less
  2731. * congestion. If batched, events must ALWAYS be in chronological order.
  2732. */
  2733. on(event: 'playerEventsAdded', listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
  2734. /**
  2735. * Send a list of any messages that need to be delivered.
  2736. */
  2737. on(event: 'playerMessagesLogged', listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
  2738. /**
  2739. * Send a list of any errors that need to be delivered.
  2740. */
  2741. on(event: 'playerErrorsRaised', listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
  2742. /**
  2743. * Called whenever a player is created, or when a new agent joins and recieves
  2744. * a list of active players. If an agent is restored, it will recieve the full
  2745. * list of player ids and all events again.
  2746. */
  2747. on(event: 'playersCreated', listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
  2748. }
  2749. }
  2750. export default ProtocolProxyApi;