1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496 |
- /**********************************************************************
- * Auto-generated by protocol-dts-generator.ts, do not edit manually. *
- **********************************************************************/
-
- import Protocol from './protocol'
-
- /**
- * API generated from Protocol commands and events.
- */
- export namespace ProtocolProxyApi {
-
- export interface ProtocolApi {
- Console: ConsoleApi;
-
- Debugger: DebuggerApi;
-
- HeapProfiler: HeapProfilerApi;
-
- Profiler: ProfilerApi;
-
- Runtime: RuntimeApi;
-
- Schema: SchemaApi;
-
- Accessibility: AccessibilityApi;
-
- Animation: AnimationApi;
-
- ApplicationCache: ApplicationCacheApi;
-
- Audits: AuditsApi;
-
- BackgroundService: BackgroundServiceApi;
-
- Browser: BrowserApi;
-
- CSS: CSSApi;
-
- CacheStorage: CacheStorageApi;
-
- Cast: CastApi;
-
- DOM: DOMApi;
-
- DOMDebugger: DOMDebuggerApi;
-
- DOMSnapshot: DOMSnapshotApi;
-
- DOMStorage: DOMStorageApi;
-
- Database: DatabaseApi;
-
- DeviceOrientation: DeviceOrientationApi;
-
- Emulation: EmulationApi;
-
- HeadlessExperimental: HeadlessExperimentalApi;
-
- IO: IOApi;
-
- IndexedDB: IndexedDBApi;
-
- Input: InputApi;
-
- Inspector: InspectorApi;
-
- LayerTree: LayerTreeApi;
-
- Log: LogApi;
-
- Memory: MemoryApi;
-
- Network: NetworkApi;
-
- Overlay: OverlayApi;
-
- Page: PageApi;
-
- Performance: PerformanceApi;
-
- Security: SecurityApi;
-
- ServiceWorker: ServiceWorkerApi;
-
- Storage: StorageApi;
-
- SystemInfo: SystemInfoApi;
-
- Target: TargetApi;
-
- Tethering: TetheringApi;
-
- Tracing: TracingApi;
-
- Fetch: FetchApi;
-
- WebAudio: WebAudioApi;
-
- WebAuthn: WebAuthnApi;
-
- Media: MediaApi;
-
- }
-
-
- export interface ConsoleApi {
- /**
- * Does nothing.
- */
- clearMessages(): Promise<void>;
-
- /**
- * Disables console domain, prevents further console messages from being reported to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Enables console domain, sends the messages collected so far to the client by means of the
- * `messageAdded` notification.
- */
- enable(): Promise<void>;
-
- /**
- * Issued when new console message is added.
- */
- on(event: 'messageAdded', listener: (params: Protocol.Console.MessageAddedEvent) => void): void;
-
- }
-
- export interface DebuggerApi {
- /**
- * Continues execution until specific location is reached.
- */
- continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<void>;
-
- /**
- * Disables debugger for given page.
- */
- disable(): Promise<void>;
-
- /**
- * Enables debugger for the given page. Clients should not assume that the debugging has been
- * enabled until the result for this command is received.
- */
- enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
-
- /**
- * Evaluates expression on a given call frame.
- */
- evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
-
- /**
- * Execute a Wasm Evaluator module on a given call frame.
- */
- executeWasmEvaluator(params: Protocol.Debugger.ExecuteWasmEvaluatorRequest): Promise<Protocol.Debugger.ExecuteWasmEvaluatorResponse>;
-
- /**
- * Returns possible locations for breakpoint. scriptId in start and end range locations should be
- * the same.
- */
- getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
-
- /**
- * Returns source for the script with given id.
- */
- getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<Protocol.Debugger.GetScriptSourceResponse>;
-
- /**
- * This command is deprecated. Use getScriptSource instead.
- */
- getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
-
- /**
- * Returns stack trace with given `stackTraceId`.
- */
- getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<Protocol.Debugger.GetStackTraceResponse>;
-
- /**
- * Stops on the next JavaScript statement.
- */
- pause(): Promise<void>;
-
- pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<void>;
-
- /**
- * Removes JavaScript breakpoint.
- */
- removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<void>;
-
- /**
- * Restarts particular call frame from the beginning.
- */
- restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
-
- /**
- * Resumes JavaScript execution.
- */
- resume(params: Protocol.Debugger.ResumeRequest): Promise<void>;
-
- /**
- * Searches for given string in script content.
- */
- searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<Protocol.Debugger.SearchInContentResponse>;
-
- /**
- * Enables or disables async call stacks tracking.
- */
- setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<void>;
-
- /**
- * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
- * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
- * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
- */
- setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<void>;
-
- /**
- * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
- * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
- * Positions array contains positions where blackbox state is changed. First interval isn't
- * blackboxed. Array should be sorted.
- */
- setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<void>;
-
- /**
- * Sets JavaScript breakpoint at a given location.
- */
- setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<Protocol.Debugger.SetBreakpointResponse>;
-
- /**
- * Sets instrumentation breakpoint.
- */
- setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
-
- /**
- * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
- * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
- * `locations` property. Further matching script parsing will result in subsequent
- * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
- */
- setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
-
- /**
- * Sets JavaScript breakpoint before each call to the given function.
- * If another function was created from the same source as a given one,
- * calling it will also trigger the breakpoint.
- */
- setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
-
- /**
- * Activates / deactivates all breakpoints on the page.
- */
- setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<void>;
-
- /**
- * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
- * no exceptions. Initial pause on exceptions state is `none`.
- */
- setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<void>;
-
- /**
- * Changes return value in top frame. Available only at return break position.
- */
- setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<void>;
-
- /**
- * Edits JavaScript source live.
- */
- setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<Protocol.Debugger.SetScriptSourceResponse>;
-
- /**
- * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
- */
- setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<void>;
-
- /**
- * Changes value of variable in a callframe. Object-based scopes are not supported and must be
- * mutated manually.
- */
- setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<void>;
-
- /**
- * Steps into the function call.
- */
- stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<void>;
-
- /**
- * Steps out of the function call.
- */
- stepOut(): Promise<void>;
-
- /**
- * Steps over the statement.
- */
- stepOver(params: Protocol.Debugger.StepOverRequest): Promise<void>;
-
- /**
- * Fired when breakpoint is resolved to an actual script and location.
- */
- on(event: 'breakpointResolved', listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void;
-
- /**
- * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
- */
- on(event: 'paused', listener: (params: Protocol.Debugger.PausedEvent) => void): void;
-
- /**
- * Fired when the virtual machine resumed execution.
- */
- on(event: 'resumed', listener: () => void): void;
-
- /**
- * Fired when virtual machine fails to parse the script.
- */
- on(event: 'scriptFailedToParse', listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void;
-
- /**
- * Fired when virtual machine parses script. This event is also fired for all known and uncollected
- * scripts upon enabling debugger.
- */
- on(event: 'scriptParsed', listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void;
-
- }
-
- export interface HeapProfilerApi {
- /**
- * Enables console to refer to the node with given id via $x (see Command Line API for more details
- * $x functions).
- */
- addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<void>;
-
- collectGarbage(): Promise<void>;
-
- disable(): Promise<void>;
-
- enable(): Promise<void>;
-
- getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
-
- getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
-
- getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
-
- startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<void>;
-
- startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<void>;
-
- stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
-
- stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<void>;
-
- takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<void>;
-
- on(event: 'addHeapSnapshotChunk', listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void;
-
- /**
- * If heap objects tracking has been started then backend may send update for one or more fragments
- */
- on(event: 'heapStatsUpdate', listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void;
-
- /**
- * If heap objects tracking has been started then backend regularly sends a current value for last
- * seen object id and corresponding timestamp. If the were changes in the heap since last event
- * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
- */
- on(event: 'lastSeenObjectId', listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void;
-
- on(event: 'reportHeapSnapshotProgress', listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void;
-
- on(event: 'resetProfiles', listener: () => void): void;
-
- }
-
- export interface ProfilerApi {
- disable(): Promise<void>;
-
- enable(): Promise<void>;
-
- /**
- * Collect coverage data for the current isolate. The coverage data may be incomplete due to
- * garbage collection.
- */
- getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
-
- /**
- * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
- */
- setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<void>;
-
- start(): Promise<void>;
-
- /**
- * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
- * coverage may be incomplete. Enabling prevents running optimized code and resets execution
- * counters.
- */
- startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
-
- /**
- * Enable type profile.
- */
- startTypeProfile(): Promise<void>;
-
- stop(): Promise<Protocol.Profiler.StopResponse>;
-
- /**
- * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
- * executing optimized code.
- */
- stopPreciseCoverage(): Promise<void>;
-
- /**
- * Disable type profile. Disabling releases type profile data collected so far.
- */
- stopTypeProfile(): Promise<void>;
-
- /**
- * Collect coverage data for the current isolate, and resets execution counters. Precise code
- * coverage needs to have started.
- */
- takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
-
- /**
- * Collect type profile.
- */
- takeTypeProfile(): Promise<Protocol.Profiler.TakeTypeProfileResponse>;
-
- /**
- * Enable counters collection.
- */
- enableCounters(): Promise<void>;
-
- /**
- * Disable counters collection.
- */
- disableCounters(): Promise<void>;
-
- /**
- * Retrieve counters.
- */
- getCounters(): Promise<Protocol.Profiler.GetCountersResponse>;
-
- /**
- * Enable run time call stats collection.
- */
- enableRuntimeCallStats(): Promise<void>;
-
- /**
- * Disable run time call stats collection.
- */
- disableRuntimeCallStats(): Promise<void>;
-
- /**
- * Retrieve run time call stats.
- */
- getRuntimeCallStats(): Promise<Protocol.Profiler.GetRuntimeCallStatsResponse>;
-
- on(event: 'consoleProfileFinished', listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void;
-
- /**
- * Sent when new profile recording is started using console.profile() call.
- */
- on(event: 'consoleProfileStarted', listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void;
-
- /**
- * Reports coverage delta since the last poll (either from an event like this, or from
- * `takePreciseCoverage` for the current isolate. May only be sent if precise code
- * coverage has been started. This event can be trigged by the embedder to, for example,
- * trigger collection of coverage data immediatelly at a certain point in time.
- */
- on(event: 'preciseCoverageDeltaUpdate', listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void;
-
- }
-
- export interface RuntimeApi {
- /**
- * Add handler to promise with given promise object id.
- */
- awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
-
- /**
- * Calls function with given declaration on the given object. Object group of the result is
- * inherited from the target object.
- */
- callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<Protocol.Runtime.CallFunctionOnResponse>;
-
- /**
- * Compiles expression.
- */
- compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<Protocol.Runtime.CompileScriptResponse>;
-
- /**
- * Disables reporting of execution contexts creation.
- */
- disable(): Promise<void>;
-
- /**
- * Discards collected exceptions and console API calls.
- */
- discardConsoleEntries(): Promise<void>;
-
- /**
- * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
- * When the reporting gets enabled the event will be sent immediately for each existing execution
- * context.
- */
- enable(): Promise<void>;
-
- /**
- * Evaluates expression on global object.
- */
- evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
-
- /**
- * Returns the isolate id.
- */
- getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
-
- /**
- * Returns the JavaScript heap usage.
- * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
- */
- getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
-
- /**
- * Returns properties of a given object. Object group of the result is inherited from the target
- * object.
- */
- getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<Protocol.Runtime.GetPropertiesResponse>;
-
- /**
- * Returns all let, const and class variables from global scope.
- */
- globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
-
- queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
-
- /**
- * Releases remote object with given id.
- */
- releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<void>;
-
- /**
- * Releases all remote objects that belong to a given group.
- */
- releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<void>;
-
- /**
- * Tells inspected instance to run if it was waiting for debugger to attach.
- */
- runIfWaitingForDebugger(): Promise<void>;
-
- /**
- * Runs script with given id in a given context.
- */
- runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
-
- /**
- * Enables or disables async call stacks tracking.
- */
- setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<void>;
-
- setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<void>;
-
- setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<void>;
-
- /**
- * Terminate current or next JavaScript execution.
- * Will cancel the termination when the outer-most script execution ends.
- */
- terminateExecution(): Promise<void>;
-
- /**
- * If executionContextId is empty, adds binding with the given name on the
- * global objects of all inspected contexts, including those created later,
- * bindings survive reloads.
- * If executionContextId is specified, adds binding only on global object of
- * given execution context.
- * Binding function takes exactly one argument, this argument should be string,
- * in case of any other input, function throws an exception.
- * Each binding function call produces Runtime.bindingCalled notification.
- */
- addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<void>;
-
- /**
- * This method does not remove binding function from global object but
- * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
- */
- removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<void>;
-
- /**
- * Notification is issued every time when binding is called.
- */
- on(event: 'bindingCalled', listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void;
-
- /**
- * Issued when console API was called.
- */
- on(event: 'consoleAPICalled', listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void;
-
- /**
- * Issued when unhandled exception was revoked.
- */
- on(event: 'exceptionRevoked', listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void;
-
- /**
- * Issued when exception was thrown and unhandled.
- */
- on(event: 'exceptionThrown', listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void;
-
- /**
- * Issued when new execution context is created.
- */
- on(event: 'executionContextCreated', listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void;
-
- /**
- * Issued when execution context is destroyed.
- */
- on(event: 'executionContextDestroyed', listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void;
-
- /**
- * Issued when all executionContexts were cleared in browser
- */
- on(event: 'executionContextsCleared', listener: () => void): void;
-
- /**
- * Issued when object should be inspected (for example, as a result of inspect() command line API
- * call).
- */
- on(event: 'inspectRequested', listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void;
-
- }
-
- export interface SchemaApi {
- /**
- * Returns supported domains.
- */
- getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
-
- }
-
- export interface AccessibilityApi {
- /**
- * Disables the accessibility domain.
- */
- disable(): Promise<void>;
-
- /**
- * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
- * This turns on accessibility for the page, which can impact performance until accessibility is disabled.
- */
- enable(): Promise<void>;
-
- /**
- * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
- */
- getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
-
- /**
- * Fetches the entire accessibility tree
- */
- getFullAXTree(): Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
-
- /**
- * Query a DOM node's accessibility subtree for accessible name and role.
- * This command computes the name and role for all nodes in the subtree, including those that are
- * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
- * node is specified, or the DOM node does not exist, the command returns an error. If neither
- * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
- */
- queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<Protocol.Accessibility.QueryAXTreeResponse>;
-
- }
-
- export interface AnimationApi {
- /**
- * Disables animation domain notifications.
- */
- disable(): Promise<void>;
-
- /**
- * Enables animation domain notifications.
- */
- enable(): Promise<void>;
-
- /**
- * Returns the current time of the an animation.
- */
- getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>;
-
- /**
- * Gets the playback rate of the document timeline.
- */
- getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
-
- /**
- * Releases a set of animations to no longer be manipulated.
- */
- releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<void>;
-
- /**
- * Gets the remote object of the Animation.
- */
- resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>;
-
- /**
- * Seek a set of animations to a particular time within each animation.
- */
- seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<void>;
-
- /**
- * Sets the paused state of a set of animations.
- */
- setPaused(params: Protocol.Animation.SetPausedRequest): Promise<void>;
-
- /**
- * Sets the playback rate of the document timeline.
- */
- setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<void>;
-
- /**
- * Sets the timing of an animation node.
- */
- setTiming(params: Protocol.Animation.SetTimingRequest): Promise<void>;
-
- /**
- * Event for when an animation has been cancelled.
- */
- on(event: 'animationCanceled', listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void;
-
- /**
- * Event for each animation that has been created.
- */
- on(event: 'animationCreated', listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void;
-
- /**
- * Event for animation that has been started.
- */
- on(event: 'animationStarted', listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void;
-
- }
-
- export interface ApplicationCacheApi {
- /**
- * Enables application cache domain notifications.
- */
- enable(): Promise<void>;
-
- /**
- * Returns relevant application cache data for the document in given frame.
- */
- getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest): Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
-
- /**
- * Returns array of frame identifiers with manifest urls for each frame containing a document
- * associated with some application cache.
- */
- getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
-
- /**
- * Returns manifest URL for document in the given frame.
- */
- getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest): Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
-
- on(event: 'applicationCacheStatusUpdated', listener: (params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent) => void): void;
-
- on(event: 'networkStateUpdated', listener: (params: Protocol.ApplicationCache.NetworkStateUpdatedEvent) => void): void;
-
- }
-
- export interface AuditsApi {
- /**
- * Returns the response body and size if it were re-encoded with the specified settings. Only
- * applies to images.
- */
- getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<Protocol.Audits.GetEncodedResponseResponse>;
-
- /**
- * Disables issues domain, prevents further issues from being reported to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Enables issues domain, sends the issues collected so far to the client by means of the
- * `issueAdded` event.
- */
- enable(): Promise<void>;
-
- on(event: 'issueAdded', listener: (params: Protocol.Audits.IssueAddedEvent) => void): void;
-
- }
-
- export interface BackgroundServiceApi {
- /**
- * Enables event updates for the service.
- */
- startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<void>;
-
- /**
- * Disables event updates for the service.
- */
- stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<void>;
-
- /**
- * Set the recording state for the service.
- */
- setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<void>;
-
- /**
- * Clears all stored data for the service.
- */
- clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<void>;
-
- /**
- * Called when the recording state for the service has been updated.
- */
- on(event: 'recordingStateChanged', listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void;
-
- /**
- * Called with all existing backgroundServiceEvents when enabled, and all new
- * events afterwards if enabled and recording.
- */
- on(event: 'backgroundServiceEventReceived', listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void;
-
- }
-
- export interface BrowserApi {
- /**
- * Set permission settings for given origin.
- */
- setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<void>;
-
- /**
- * Grant specific permissions to the given origin and reject all others.
- */
- grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<void>;
-
- /**
- * Reset all permission management for all origins.
- */
- resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<void>;
-
- /**
- * Set the behavior when downloading a file.
- */
- setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<void>;
-
- /**
- * Close browser gracefully.
- */
- close(): Promise<void>;
-
- /**
- * Crashes browser on the main thread.
- */
- crash(): Promise<void>;
-
- /**
- * Crashes GPU process.
- */
- crashGpuProcess(): Promise<void>;
-
- /**
- * Returns version information.
- */
- getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
-
- /**
- * Returns the command line switches for the browser process if, and only if
- * --enable-automation is on the commandline.
- */
- getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
-
- /**
- * Get Chrome histograms.
- */
- getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>;
-
- /**
- * Get a Chrome histogram by name.
- */
- getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
-
- /**
- * Get position and size of the browser window.
- */
- getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>;
-
- /**
- * Get the browser window that contains the devtools target.
- */
- getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>;
-
- /**
- * Set position and/or size of the browser window.
- */
- setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<void>;
-
- /**
- * Set dock tile details, platform-specific.
- */
- setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<void>;
-
- }
-
- export interface CSSApi {
- /**
- * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
- * position specified by `location`.
- */
- addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
-
- /**
- * Returns all class names from specified stylesheet.
- */
- collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>;
-
- /**
- * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
- */
- createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>;
-
- /**
- * Disables the CSS agent for the given page.
- */
- disable(): Promise<void>;
-
- /**
- * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
- * enabled until the result of this command is received.
- */
- enable(): Promise<void>;
-
- /**
- * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
- * the browser.
- */
- forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<void>;
-
- getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>;
-
- /**
- * Returns the computed style for a DOM node identified by `nodeId`.
- */
- getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
-
- /**
- * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
- * attributes) for a DOM node identified by `nodeId`.
- */
- getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
-
- /**
- * Returns requested styles for a DOM node identified by `nodeId`.
- */
- getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
-
- /**
- * Returns all media queries parsed by the rendering engine.
- */
- getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
-
- /**
- * Requests information about platform fonts which we used to render child TextNodes in the given
- * node.
- */
- getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
-
- /**
- * Returns the current textual content for a stylesheet.
- */
- getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>;
-
- /**
- * Starts tracking the given computed styles for updates. The specified array of properties
- * replaces the one previously specified. Pass empty array to disable tracking.
- * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
- * The changes to computed style properties are only tracked for nodes pushed to the front-end
- * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
- * to the front-end, no updates will be issued for the node.
- */
- trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest): Promise<void>;
-
- /**
- * Polls the next batch of computed style updates.
- */
- takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
-
- /**
- * Find a rule with the given active property for the given node and set the new value for this
- * property
- */
- setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest): Promise<void>;
-
- /**
- * Modifies the keyframe rule key text.
- */
- setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
-
- /**
- * Modifies the rule selector.
- */
- setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
-
- /**
- * Modifies the rule selector.
- */
- setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
-
- /**
- * Sets the new stylesheet text.
- */
- setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise<Protocol.CSS.SetStyleSheetTextResponse>;
-
- /**
- * Applies specified style edits one after another in the given order.
- */
- setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
-
- /**
- * Enables the selector recording.
- */
- startRuleUsageTracking(): Promise<void>;
-
- /**
- * Stop tracking rule usage and return the list of rules that were used since last call to
- * `takeCoverageDelta` (or since start of coverage instrumentation)
- */
- stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
-
- /**
- * Obtain list of rules that became used since last call to this method (or since start of coverage
- * instrumentation)
- */
- takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
-
- /**
- * Enables/disables rendering of local CSS fonts (enabled by default).
- */
- setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise<void>;
-
- /**
- * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
- * web font
- */
- on(event: 'fontsUpdated', listener: (params: Protocol.CSS.FontsUpdatedEvent) => void): void;
-
- /**
- * Fires whenever a MediaQuery result changes (for example, after a browser window has been
- * resized.) The current implementation considers only viewport-dependent media features.
- */
- on(event: 'mediaQueryResultChanged', listener: () => void): void;
-
- /**
- * Fired whenever an active document stylesheet is added.
- */
- on(event: 'styleSheetAdded', listener: (params: Protocol.CSS.StyleSheetAddedEvent) => void): void;
-
- /**
- * Fired whenever a stylesheet is changed as a result of the client operation.
- */
- on(event: 'styleSheetChanged', listener: (params: Protocol.CSS.StyleSheetChangedEvent) => void): void;
-
- /**
- * Fired whenever an active document stylesheet is removed.
- */
- on(event: 'styleSheetRemoved', listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;
-
- }
-
- export interface CacheStorageApi {
- /**
- * Deletes a cache.
- */
- deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<void>;
-
- /**
- * Deletes a cache entry.
- */
- deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<void>;
-
- /**
- * Requests cache names.
- */
- requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
-
- /**
- * Fetches cache entry.
- */
- requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
-
- /**
- * Requests data from cache.
- */
- requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise<Protocol.CacheStorage.RequestEntriesResponse>;
-
- }
-
- export interface CastApi {
- /**
- * Starts observing for sinks that can be used for tab mirroring, and if set,
- * sinks compatible with |presentationUrl| as well. When sinks are found, a
- * |sinksUpdated| event is fired.
- * Also starts observing for issue messages. When an issue is added or removed,
- * an |issueUpdated| event is fired.
- */
- enable(params: Protocol.Cast.EnableRequest): Promise<void>;
-
- /**
- * Stops observing for sinks and issues.
- */
- disable(): Promise<void>;
-
- /**
- * Sets a sink to be used when the web page requests the browser to choose a
- * sink via Presentation API, Remote Playback API, or Cast SDK.
- */
- setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<void>;
-
- /**
- * Starts mirroring the tab to the sink.
- */
- startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise<void>;
-
- /**
- * Stops the active Cast session on the sink.
- */
- stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<void>;
-
- /**
- * This is fired whenever the list of available sinks changes. A sink is a
- * device or a software surface that you can cast to.
- */
- on(event: 'sinksUpdated', listener: (params: Protocol.Cast.SinksUpdatedEvent) => void): void;
-
- /**
- * This is fired whenever the outstanding issue/error message changes.
- * |issueMessage| is empty if there is no issue.
- */
- on(event: 'issueUpdated', listener: (params: Protocol.Cast.IssueUpdatedEvent) => void): void;
-
- }
-
- export interface DOMApi {
- /**
- * Collects class names for the node with given id and all of it's child nodes.
- */
- collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest): Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
-
- /**
- * Creates a deep copy of the specified node and places it into the target container before the
- * given anchor.
- */
- copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
-
- /**
- * Describes node given its id, does not require domain to be enabled. Does not start tracking any
- * objects, can be used for automation.
- */
- describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
-
- /**
- * Scrolls the specified rect of the given node into view if not already visible.
- * Note: exactly one between nodeId, backendNodeId and objectId should be passed
- * to identify the node.
- */
- scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest): Promise<void>;
-
- /**
- * Disables DOM agent for the given page.
- */
- disable(): Promise<void>;
-
- /**
- * Discards search results from the session with the given id. `getSearchResults` should no longer
- * be called for that search.
- */
- discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest): Promise<void>;
-
- /**
- * Enables DOM agent for the given page.
- */
- enable(): Promise<void>;
-
- /**
- * Focuses the given element.
- */
- focus(params: Protocol.DOM.FocusRequest): Promise<void>;
-
- /**
- * Returns attributes for the specified node.
- */
- getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
-
- /**
- * Returns boxes for the given node.
- */
- getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
-
- /**
- * Returns quads that describe node position on the page. This method
- * might return multiple quads for inline nodes.
- */
- getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
-
- /**
- * Returns the root DOM node (and optionally the subtree) to the caller.
- */
- getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
-
- /**
- * Returns the root DOM node (and optionally the subtree) to the caller.
- * Deprecated, as it is not designed to work well with the rest of the DOM agent.
- * Use DOMSnapshot.captureSnapshot instead.
- */
- getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
-
- /**
- * Finds nodes with a given computed style in a subtree.
- */
- getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
-
- /**
- * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
- * either returned or not.
- */
- getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest): Promise<Protocol.DOM.GetNodeForLocationResponse>;
-
- /**
- * Returns node's HTML markup.
- */
- getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
-
- /**
- * Returns the id of the nearest ancestor that is a relayout boundary.
- */
- getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
-
- /**
- * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
- * identifier.
- */
- getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise<Protocol.DOM.GetSearchResultsResponse>;
-
- /**
- * Hides any highlight.
- */
- hideHighlight(): Promise<void>;
-
- /**
- * Highlights DOM node.
- */
- highlightNode(): Promise<void>;
-
- /**
- * Highlights given rectangle.
- */
- highlightRect(): Promise<void>;
-
- /**
- * Marks last undoable state.
- */
- markUndoableState(): Promise<void>;
-
- /**
- * Moves node into the new container, places it before the given anchor.
- */
- moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
-
- /**
- * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
- * `cancelSearch` to end this search session.
- */
- performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
-
- /**
- * Requests that the node is sent to the caller given its path. // FIXME, use XPath
- */
- pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
-
- /**
- * Requests that a batch of nodes is sent to the caller given their backend node ids.
- */
- pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
-
- /**
- * Executes `querySelector` on a given node.
- */
- querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
-
- /**
- * Executes `querySelectorAll` on a given node.
- */
- querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise<Protocol.DOM.QuerySelectorAllResponse>;
-
- /**
- * Re-does the last undone action.
- */
- redo(): Promise<void>;
-
- /**
- * Removes attribute with given name from an element with given id.
- */
- removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<void>;
-
- /**
- * Removes node with given id.
- */
- removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<void>;
-
- /**
- * Requests that children of the node with given id are returned to the caller in form of
- * `setChildNodes` events where not only immediate children are retrieved, but all children down to
- * the specified depth.
- */
- requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest): Promise<void>;
-
- /**
- * Requests that the node is sent to the caller given the JavaScript node object reference. All
- * nodes that form the path from the node to the root are also sent to the client as a series of
- * `setChildNodes` notifications.
- */
- requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
-
- /**
- * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
- */
- resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
-
- /**
- * Sets attribute for an element with given id.
- */
- setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise<void>;
-
- /**
- * Sets attributes on element with given id. This method is useful when user edits some existing
- * attribute value and types in several attribute name/value pairs.
- */
- setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest): Promise<void>;
-
- /**
- * Sets files for the given file input element.
- */
- setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise<void>;
-
- /**
- * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
- */
- setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise<void>;
-
- /**
- * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
- */
- getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest): Promise<Protocol.DOM.GetNodeStackTracesResponse>;
-
- /**
- * Returns file information for the given
- * File wrapper.
- */
- getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>;
-
- /**
- * Enables console to refer to the node with given id via $x (see Command Line API for more details
- * $x functions).
- */
- setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise<void>;
-
- /**
- * Sets node name for a node with given id.
- */
- setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>;
-
- /**
- * Sets node value for a node with given id.
- */
- setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<void>;
-
- /**
- * Sets node HTML markup, returns new node id.
- */
- setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<void>;
-
- /**
- * Undoes the last performed action.
- */
- undo(): Promise<void>;
-
- /**
- * Returns iframe node that owns iframe with the given domain.
- */
- getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>;
-
- /**
- * Fired when `Element`'s attribute is modified.
- */
- on(event: 'attributeModified', listener: (params: Protocol.DOM.AttributeModifiedEvent) => void): void;
-
- /**
- * Fired when `Element`'s attribute is removed.
- */
- on(event: 'attributeRemoved', listener: (params: Protocol.DOM.AttributeRemovedEvent) => void): void;
-
- /**
- * Mirrors `DOMCharacterDataModified` event.
- */
- on(event: 'characterDataModified', listener: (params: Protocol.DOM.CharacterDataModifiedEvent) => void): void;
-
- /**
- * Fired when `Container`'s child node count has changed.
- */
- on(event: 'childNodeCountUpdated', listener: (params: Protocol.DOM.ChildNodeCountUpdatedEvent) => void): void;
-
- /**
- * Mirrors `DOMNodeInserted` event.
- */
- on(event: 'childNodeInserted', listener: (params: Protocol.DOM.ChildNodeInsertedEvent) => void): void;
-
- /**
- * Mirrors `DOMNodeRemoved` event.
- */
- on(event: 'childNodeRemoved', listener: (params: Protocol.DOM.ChildNodeRemovedEvent) => void): void;
-
- /**
- * Called when distrubution is changed.
- */
- on(event: 'distributedNodesUpdated', listener: (params: Protocol.DOM.DistributedNodesUpdatedEvent) => void): void;
-
- /**
- * Fired when `Document` has been totally updated. Node ids are no longer valid.
- */
- on(event: 'documentUpdated', listener: () => void): void;
-
- /**
- * Fired when `Element`'s inline style is modified via a CSS property modification.
- */
- on(event: 'inlineStyleInvalidated', listener: (params: Protocol.DOM.InlineStyleInvalidatedEvent) => void): void;
-
- /**
- * Called when a pseudo element is added to an element.
- */
- on(event: 'pseudoElementAdded', listener: (params: Protocol.DOM.PseudoElementAddedEvent) => void): void;
-
- /**
- * Called when a pseudo element is removed from an element.
- */
- on(event: 'pseudoElementRemoved', listener: (params: Protocol.DOM.PseudoElementRemovedEvent) => void): void;
-
- /**
- * Fired when backend wants to provide client with the missing DOM structure. This happens upon
- * most of the calls requesting node ids.
- */
- on(event: 'setChildNodes', listener: (params: Protocol.DOM.SetChildNodesEvent) => void): void;
-
- /**
- * Called when shadow root is popped from the element.
- */
- on(event: 'shadowRootPopped', listener: (params: Protocol.DOM.ShadowRootPoppedEvent) => void): void;
-
- /**
- * Called when shadow root is pushed into the element.
- */
- on(event: 'shadowRootPushed', listener: (params: Protocol.DOM.ShadowRootPushedEvent) => void): void;
-
- }
-
- export interface DOMDebuggerApi {
- /**
- * Returns event listeners of the given object.
- */
- getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest): Promise<Protocol.DOMDebugger.GetEventListenersResponse>;
-
- /**
- * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
- */
- removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest): Promise<void>;
-
- /**
- * Removes breakpoint on particular DOM event.
- */
- removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest): Promise<void>;
-
- /**
- * Removes breakpoint on particular native event.
- */
- removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest): Promise<void>;
-
- /**
- * Removes breakpoint from XMLHttpRequest.
- */
- removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest): Promise<void>;
-
- /**
- * Sets breakpoint on particular operation with DOM.
- */
- setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest): Promise<void>;
-
- /**
- * Sets breakpoint on particular DOM event.
- */
- setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest): Promise<void>;
-
- /**
- * Sets breakpoint on particular native event.
- */
- setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest): Promise<void>;
-
- /**
- * Sets breakpoint on XMLHttpRequest.
- */
- setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest): Promise<void>;
-
- }
-
- export interface DOMSnapshotApi {
- /**
- * Disables DOM snapshot agent for the given page.
- */
- disable(): Promise<void>;
-
- /**
- * Enables DOM snapshot agent for the given page.
- */
- enable(): Promise<void>;
-
- /**
- * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
- * template contents, and imported documents) in a flattened array, as well as layout and
- * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
- * flattened.
- */
- getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest): Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
-
- /**
- * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
- * template contents, and imported documents) in a flattened array, as well as layout and
- * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
- * flattened.
- */
- captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest): Promise<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
-
- }
-
- export interface DOMStorageApi {
- clear(params: Protocol.DOMStorage.ClearRequest): Promise<void>;
-
- /**
- * Disables storage tracking, prevents storage events from being sent to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Enables storage tracking, storage events will now be delivered to the client.
- */
- enable(): Promise<void>;
-
- getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest): Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
-
- removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest): Promise<void>;
-
- setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest): Promise<void>;
-
- on(event: 'domStorageItemAdded', listener: (params: Protocol.DOMStorage.DomStorageItemAddedEvent) => void): void;
-
- on(event: 'domStorageItemRemoved', listener: (params: Protocol.DOMStorage.DomStorageItemRemovedEvent) => void): void;
-
- on(event: 'domStorageItemUpdated', listener: (params: Protocol.DOMStorage.DomStorageItemUpdatedEvent) => void): void;
-
- on(event: 'domStorageItemsCleared', listener: (params: Protocol.DOMStorage.DomStorageItemsClearedEvent) => void): void;
-
- }
-
- export interface DatabaseApi {
- /**
- * Disables database tracking, prevents database events from being sent to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Enables database tracking, database events will now be delivered to the client.
- */
- enable(): Promise<void>;
-
- executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
-
- getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest): Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
-
- on(event: 'addDatabase', listener: (params: Protocol.Database.AddDatabaseEvent) => void): void;
-
- }
-
- export interface DeviceOrientationApi {
- /**
- * Clears the overridden Device Orientation.
- */
- clearDeviceOrientationOverride(): Promise<void>;
-
- /**
- * Overrides the Device Orientation.
- */
- setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest): Promise<void>;
-
- }
-
- export interface EmulationApi {
- /**
- * Tells whether emulation is supported.
- */
- canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
-
- /**
- * Clears the overriden device metrics.
- */
- clearDeviceMetricsOverride(): Promise<void>;
-
- /**
- * Clears the overriden Geolocation Position and Error.
- */
- clearGeolocationOverride(): Promise<void>;
-
- /**
- * Requests that page scale factor is reset to initial values.
- */
- resetPageScaleFactor(): Promise<void>;
-
- /**
- * Enables or disables simulating a focused and active page.
- */
- setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest): Promise<void>;
-
- /**
- * Enables CPU throttling to emulate slow CPUs.
- */
- setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest): Promise<void>;
-
- /**
- * Sets or clears an override of the default background color of the frame. This override is used
- * if the content does not specify one.
- */
- setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest): Promise<void>;
-
- /**
- * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
- * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
- * query results).
- */
- setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest): Promise<void>;
-
- setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest): Promise<void>;
-
- setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest): Promise<void>;
-
- setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest): Promise<void>;
-
- /**
- * Emulates the given media type or media feature for CSS media queries.
- */
- setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest): Promise<void>;
-
- /**
- * Emulates the given vision deficiency.
- */
- setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest): Promise<void>;
-
- /**
- * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
- * unavailable.
- */
- setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest): Promise<void>;
-
- /**
- * Overrides the Idle state.
- */
- setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest): Promise<void>;
-
- /**
- * Clears Idle state overrides.
- */
- clearIdleOverride(): Promise<void>;
-
- /**
- * Overrides value returned by the javascript navigator object.
- */
- setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest): Promise<void>;
-
- /**
- * Sets a specified page scale factor.
- */
- setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest): Promise<void>;
-
- /**
- * Switches script execution in the page.
- */
- setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest): Promise<void>;
-
- /**
- * Enables touch on platforms which do not support them.
- */
- setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest): Promise<void>;
-
- /**
- * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
- * the current virtual time policy. Note this supersedes any previous time budget.
- */
- setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest): Promise<Protocol.Emulation.SetVirtualTimePolicyResponse>;
-
- /**
- * Overrides default host system locale with the specified one.
- */
- setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest): Promise<void>;
-
- /**
- * Overrides default host system timezone with the specified one.
- */
- setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest): Promise<void>;
-
- /**
- * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
- * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
- * on Android.
- */
- setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest): Promise<void>;
-
- /**
- * Allows overriding user agent with the given string.
- */
- setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest): Promise<void>;
-
- /**
- * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
- */
- on(event: 'virtualTimeBudgetExpired', listener: () => void): void;
-
- }
-
- export interface HeadlessExperimentalApi {
- /**
- * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
- * screenshot from the resulting frame. Requires that the target was created with enabled
- * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
- * https://goo.gl/3zHXhB for more background.
- */
- beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
-
- /**
- * Disables headless events for the target.
- */
- disable(): Promise<void>;
-
- /**
- * Enables headless events for the target.
- */
- enable(): Promise<void>;
-
- /**
- * Issued when the target starts or stops needing BeginFrames.
- * Deprecated. Issue beginFrame unconditionally instead and use result from
- * beginFrame to detect whether the frames were suppressed.
- */
- on(event: 'needsBeginFramesChanged', listener: (params: Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent) => void): void;
-
- }
-
- export interface IOApi {
- /**
- * Close the stream, discard any temporary backing storage.
- */
- close(params: Protocol.IO.CloseRequest): Promise<void>;
-
- /**
- * Read a chunk of the stream
- */
- read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
-
- /**
- * Return UUID of Blob object specified by a remote object id.
- */
- resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
-
- }
-
- export interface IndexedDBApi {
- /**
- * Clears all entries from an object store.
- */
- clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest): Promise<void>;
-
- /**
- * Deletes a database.
- */
- deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest): Promise<void>;
-
- /**
- * Delete a range of entries from an object store
- */
- deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest): Promise<void>;
-
- /**
- * Disables events from backend.
- */
- disable(): Promise<void>;
-
- /**
- * Enables events from backend.
- */
- enable(): Promise<void>;
-
- /**
- * Requests data from object store or index.
- */
- requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
-
- /**
- * Gets metadata of an object store
- */
- getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
-
- /**
- * Requests database with given name in given frame.
- */
- requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest): Promise<Protocol.IndexedDB.RequestDatabaseResponse>;
-
- /**
- * Requests database names for given security origin.
- */
- requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest): Promise<Protocol.IndexedDB.RequestDatabaseNamesResponse>;
-
- }
-
- export interface InputApi {
- /**
- * Dispatches a key event to the page.
- */
- dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest): Promise<void>;
-
- /**
- * This method emulates inserting text that doesn't come from a key press,
- * for example an emoji keyboard or an IME.
- */
- insertText(params: Protocol.Input.InsertTextRequest): Promise<void>;
-
- /**
- * Dispatches a mouse event to the page.
- */
- dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest): Promise<void>;
-
- /**
- * Dispatches a touch event to the page.
- */
- dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest): Promise<void>;
-
- /**
- * Emulates touch event from the mouse event parameters.
- */
- emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest): Promise<void>;
-
- /**
- * Ignores input events (useful while auditing page).
- */
- setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest): Promise<void>;
-
- /**
- * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
- */
- synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest): Promise<void>;
-
- /**
- * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
- */
- synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest): Promise<void>;
-
- /**
- * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
- */
- synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest): Promise<void>;
-
- }
-
- export interface InspectorApi {
- /**
- * Disables inspector domain notifications.
- */
- disable(): Promise<void>;
-
- /**
- * Enables inspector domain notifications.
- */
- enable(): Promise<void>;
-
- /**
- * Fired when remote debugging connection is about to be terminated. Contains detach reason.
- */
- on(event: 'detached', listener: (params: Protocol.Inspector.DetachedEvent) => void): void;
-
- /**
- * Fired when debugging target has crashed
- */
- on(event: 'targetCrashed', listener: () => void): void;
-
- /**
- * Fired when debugging target has reloaded after crash
- */
- on(event: 'targetReloadedAfterCrash', listener: () => void): void;
-
- }
-
- export interface LayerTreeApi {
- /**
- * Provides the reasons why the given layer was composited.
- */
- compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest): Promise<Protocol.LayerTree.CompositingReasonsResponse>;
-
- /**
- * Disables compositing tree inspection.
- */
- disable(): Promise<void>;
-
- /**
- * Enables compositing tree inspection.
- */
- enable(): Promise<void>;
-
- /**
- * Returns the snapshot identifier.
- */
- loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest): Promise<Protocol.LayerTree.LoadSnapshotResponse>;
-
- /**
- * Returns the layer snapshot identifier.
- */
- makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest): Promise<Protocol.LayerTree.MakeSnapshotResponse>;
-
- profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest): Promise<Protocol.LayerTree.ProfileSnapshotResponse>;
-
- /**
- * Releases layer snapshot captured by the back-end.
- */
- releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest): Promise<void>;
-
- /**
- * Replays the layer snapshot and returns the resulting bitmap.
- */
- replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest): Promise<Protocol.LayerTree.ReplaySnapshotResponse>;
-
- /**
- * Replays the layer snapshot and returns canvas log.
- */
- snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest): Promise<Protocol.LayerTree.SnapshotCommandLogResponse>;
-
- on(event: 'layerPainted', listener: (params: Protocol.LayerTree.LayerPaintedEvent) => void): void;
-
- on(event: 'layerTreeDidChange', listener: (params: Protocol.LayerTree.LayerTreeDidChangeEvent) => void): void;
-
- }
-
- export interface LogApi {
- /**
- * Clears the log.
- */
- clear(): Promise<void>;
-
- /**
- * Disables log domain, prevents further log entries from being reported to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Enables log domain, sends the entries collected so far to the client by means of the
- * `entryAdded` notification.
- */
- enable(): Promise<void>;
-
- /**
- * start violation reporting.
- */
- startViolationsReport(params: Protocol.Log.StartViolationsReportRequest): Promise<void>;
-
- /**
- * Stop violation reporting.
- */
- stopViolationsReport(): Promise<void>;
-
- /**
- * Issued when new message was logged.
- */
- on(event: 'entryAdded', listener: (params: Protocol.Log.EntryAddedEvent) => void): void;
-
- }
-
- export interface MemoryApi {
- getDOMCounters(): Promise<Protocol.Memory.GetDOMCountersResponse>;
-
- prepareForLeakDetection(): Promise<void>;
-
- /**
- * Simulate OomIntervention by purging V8 memory.
- */
- forciblyPurgeJavaScriptMemory(): Promise<void>;
-
- /**
- * Enable/disable suppressing memory pressure notifications in all processes.
- */
- setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest): Promise<void>;
-
- /**
- * Simulate a memory pressure notification in all processes.
- */
- simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest): Promise<void>;
-
- /**
- * Start collecting native memory profile.
- */
- startSampling(params: Protocol.Memory.StartSamplingRequest): Promise<void>;
-
- /**
- * Stop collecting native memory profile.
- */
- stopSampling(): Promise<void>;
-
- /**
- * Retrieve native memory allocations profile
- * collected since renderer process startup.
- */
- getAllTimeSamplingProfile(): Promise<Protocol.Memory.GetAllTimeSamplingProfileResponse>;
-
- /**
- * Retrieve native memory allocations profile
- * collected since browser process startup.
- */
- getBrowserSamplingProfile(): Promise<Protocol.Memory.GetBrowserSamplingProfileResponse>;
-
- /**
- * Retrieve native memory allocations profile collected since last
- * `startSampling` call.
- */
- getSamplingProfile(): Promise<Protocol.Memory.GetSamplingProfileResponse>;
-
- }
-
- export interface NetworkApi {
- /**
- * Tells whether clearing browser cache is supported.
- */
- canClearBrowserCache(): Promise<Protocol.Network.CanClearBrowserCacheResponse>;
-
- /**
- * Tells whether clearing browser cookies is supported.
- */
- canClearBrowserCookies(): Promise<Protocol.Network.CanClearBrowserCookiesResponse>;
-
- /**
- * Tells whether emulation of network conditions is supported.
- */
- canEmulateNetworkConditions(): Promise<Protocol.Network.CanEmulateNetworkConditionsResponse>;
-
- /**
- * Clears browser cache.
- */
- clearBrowserCache(): Promise<void>;
-
- /**
- * Clears browser cookies.
- */
- clearBrowserCookies(): Promise<void>;
-
- /**
- * Response to Network.requestIntercepted which either modifies the request to continue with any
- * modifications, or blocks it, or completes it with the provided response bytes. If a network
- * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
- * event will be sent with the same InterceptionId.
- * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
- */
- continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest): Promise<void>;
-
- /**
- * Deletes browser cookies with matching name and url or domain/path pair.
- */
- deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise<void>;
-
- /**
- * Disables network tracking, prevents network events from being sent to the client.
- */
- disable(): Promise<void>;
-
- /**
- * Activates emulation of network conditions.
- */
- emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<void>;
-
- /**
- * Enables network tracking, network events will now be delivered to the client.
- */
- enable(params: Protocol.Network.EnableRequest): Promise<void>;
-
- /**
- * Returns all browser cookies. Depending on the backend support, will return detailed cookie
- * information in the `cookies` field.
- */
- getAllCookies(): Promise<Protocol.Network.GetAllCookiesResponse>;
-
- /**
- * Returns the DER-encoded certificate.
- */
- getCertificate(params: Protocol.Network.GetCertificateRequest): Promise<Protocol.Network.GetCertificateResponse>;
-
- /**
- * Returns all browser cookies for the current URL. Depending on the backend support, will return
- * detailed cookie information in the `cookies` field.
- */
- getCookies(params: Protocol.Network.GetCookiesRequest): Promise<Protocol.Network.GetCookiesResponse>;
-
- /**
- * Returns content served for the given request.
- */
- getResponseBody(params: Protocol.Network.GetResponseBodyRequest): Promise<Protocol.Network.GetResponseBodyResponse>;
-
- /**
- * Returns post data sent with the request. Returns an error when no data was sent with the request.
- */
- getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest): Promise<Protocol.Network.GetRequestPostDataResponse>;
-
- /**
- * Returns content served for the given currently intercepted request.
- */
- getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest): Promise<Protocol.Network.GetResponseBodyForInterceptionResponse>;
-
- /**
- * Returns a handle to the stream representing the response body. Note that after this command,
- * the intercepted request can't be continued as is -- you either need to cancel it or to provide
- * the response body. The stream only supports sequential read, IO.read will fail if the position
- * is specified.
- */
- takeResponseBodyForInterceptionAsStream(params: Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest): Promise<Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse>;
-
- /**
- * This method sends a new XMLHttpRequest which is identical to the original one. The following
- * parameters should be identical: method, url, async, request body, extra headers, withCredentials
- * attribute, user, password.
- */
- replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise<void>;
-
- /**
- * Searches for given string in response content.
- */
- searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest): Promise<Protocol.Network.SearchInResponseBodyResponse>;
-
- /**
- * Blocks URLs from loading.
- */
- setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise<void>;
-
- /**
- * Toggles ignoring of service worker for each request.
- */
- setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest): Promise<void>;
-
- /**
- * Toggles ignoring cache for each request. If `true`, cache will not be used.
- */
- setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest): Promise<void>;
-
- /**
- * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
- */
- setCookie(params: Protocol.Network.SetCookieRequest): Promise<Protocol.Network.SetCookieResponse>;
-
- /**
- * Sets given cookies.
- */
- setCookies(params: Protocol.Network.SetCookiesRequest): Promise<void>;
-
- /**
- * For testing.
- */
- setDataSizeLimitsForTest(params: Protocol.Network.SetDataSizeLimitsForTestRequest): Promise<void>;
-
- /**
- * Specifies whether to always send extra HTTP headers with the requests from this page.
- */
- setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest): Promise<void>;
-
- /**
- * Specifies whether to sned a debug header to all outgoing requests.
- */
- setAttachDebugHeader(params: Protocol.Network.SetAttachDebugHeaderRequest): Promise<void>;
-
- /**
- * Sets the requests to intercept that match the provided patterns and optionally resource types.
- * Deprecated, please use Fetch.enable instead.
- */
- setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest): Promise<void>;
-
- /**
- * Allows overriding user agent with the given string.
- */
- setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest): Promise<void>;
-
- /**
- * Returns information about the COEP/COOP isolation status.
- */
- getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest): Promise<Protocol.Network.GetSecurityIsolationStatusResponse>;
-
- /**
- * Fetches the resource and returns the content.
- */
- loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest): Promise<Protocol.Network.LoadNetworkResourceResponse>;
-
- /**
- * Fired when data chunk was received over the network.
- */
- on(event: 'dataReceived', listener: (params: Protocol.Network.DataReceivedEvent) => void): void;
-
- /**
- * Fired when EventSource message is received.
- */
- on(event: 'eventSourceMessageReceived', listener: (params: Protocol.Network.EventSourceMessageReceivedEvent) => void): void;
-
- /**
- * Fired when HTTP request has failed to load.
- */
- on(event: 'loadingFailed', listener: (params: Protocol.Network.LoadingFailedEvent) => void): void;
-
- /**
- * Fired when HTTP request has finished loading.
- */
- on(event: 'loadingFinished', listener: (params: Protocol.Network.LoadingFinishedEvent) => void): void;
-
- /**
- * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
- * mocked.
- * Deprecated, use Fetch.requestPaused instead.
- */
- on(event: 'requestIntercepted', listener: (params: Protocol.Network.RequestInterceptedEvent) => void): void;
-
- /**
- * Fired if request ended up loading from cache.
- */
- on(event: 'requestServedFromCache', listener: (params: Protocol.Network.RequestServedFromCacheEvent) => void): void;
-
- /**
- * Fired when page is about to send HTTP request.
- */
- on(event: 'requestWillBeSent', listener: (params: Protocol.Network.RequestWillBeSentEvent) => void): void;
-
- /**
- * Fired when resource loading priority is changed
- */
- on(event: 'resourceChangedPriority', listener: (params: Protocol.Network.ResourceChangedPriorityEvent) => void): void;
-
- /**
- * Fired when a signed exchange was received over the network
- */
- on(event: 'signedExchangeReceived', listener: (params: Protocol.Network.SignedExchangeReceivedEvent) => void): void;
-
- /**
- * Fired when HTTP response is available.
- */
- on(event: 'responseReceived', listener: (params: Protocol.Network.ResponseReceivedEvent) => void): void;
-
- /**
- * Fired when WebSocket is closed.
- */
- on(event: 'webSocketClosed', listener: (params: Protocol.Network.WebSocketClosedEvent) => void): void;
-
- /**
- * Fired upon WebSocket creation.
- */
- on(event: 'webSocketCreated', listener: (params: Protocol.Network.WebSocketCreatedEvent) => void): void;
-
- /**
- * Fired when WebSocket message error occurs.
- */
- on(event: 'webSocketFrameError', listener: (params: Protocol.Network.WebSocketFrameErrorEvent) => void): void;
-
- /**
- * Fired when WebSocket message is received.
- */
- on(event: 'webSocketFrameReceived', listener: (params: Protocol.Network.WebSocketFrameReceivedEvent) => void): void;
-
- /**
- * Fired when WebSocket message is sent.
- */
- on(event: 'webSocketFrameSent', listener: (params: Protocol.Network.WebSocketFrameSentEvent) => void): void;
-
- /**
- * Fired when WebSocket handshake response becomes available.
- */
- on(event: 'webSocketHandshakeResponseReceived', listener: (params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent) => void): void;
-
- /**
- * Fired when WebSocket is about to initiate handshake.
- */
- on(event: 'webSocketWillSendHandshakeRequest', listener: (params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent) => void): void;
-
- /**
- * Fired when additional information about a requestWillBeSent event is available from the
- * network stack. Not every requestWillBeSent event will have an additional
- * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
- * or requestWillBeSentExtraInfo will be fired first for the same request.
- */
- on(event: 'requestWillBeSentExtraInfo', listener: (params: Protocol.Network.RequestWillBeSentExtraInfoEvent) => void): void;
-
- /**
- * Fired when additional information about a responseReceived event is available from the network
- * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
- * it, and responseReceivedExtraInfo may be fired before or after responseReceived.
- */
- on(event: 'responseReceivedExtraInfo', listener: (params: Protocol.Network.ResponseReceivedExtraInfoEvent) => void): void;
-
- }
-
- export interface OverlayApi {
- /**
- * Disables domain notifications.
- */
- disable(): Promise<void>;
-
- /**
- * Enables domain notifications.
- */
- enable(): Promise<void>;
-
- /**
- * For testing.
- */
- getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetHighlightObjectForTestResponse>;
-
- /**
- * For Persistent Grid testing.
- */
- getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest): Promise<Protocol.Overlay.GetGridHighlightObjectsForTestResponse>;
-
- /**
- * For Source Order Viewer testing.
- */
- getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse>;
-
- /**
- * Hides any highlight.
- */
- hideHighlight(): Promise<void>;
-
- /**
- * Highlights owner element of the frame with given id.
- */
- highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise<void>;
-
- /**
- * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
- * objectId must be specified.
- */
- highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise<void>;
-
- /**
- * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
- */
- highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise<void>;
-
- /**
- * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
- */
- highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<void>;
-
- /**
- * Highlights the source order of the children of the DOM node with given id or with the given
- * JavaScript object wrapper. Either nodeId or objectId must be specified.
- */
- highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest): Promise<void>;
-
- /**
- * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
- * Backend then generates 'inspectNodeRequested' event upon element selection.
- */
- setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise<void>;
-
- /**
- * Highlights owner element of all frames detected to be ads.
- */
- setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest): Promise<void>;
-
- setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest): Promise<void>;
-
- /**
- * Requests that backend shows debug borders on layers
- */
- setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest): Promise<void>;
-
- /**
- * Requests that backend shows the FPS counter
- */
- setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest): Promise<void>;
-
- /**
- * Highlight multiple elements with the CSS Grid overlay.
- */
- setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest): Promise<void>;
-
- /**
- * Requests that backend shows paint rectangles
- */
- setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest): Promise<void>;
-
- /**
- * Requests that backend shows layout shift regions
- */
- setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest): Promise<void>;
-
- /**
- * Requests that backend shows scroll bottleneck rects
- */
- setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest): Promise<void>;
-
- /**
- * Requests that backend shows hit-test borders on layers
- */
- setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest): Promise<void>;
-
- /**
- * Paints viewport size upon main frame resize.
- */
- setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest): Promise<void>;
-
- /**
- * Add a dual screen device hinge
- */
- setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise<void>;
-
- /**
- * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
- * user manually inspects an element.
- */
- on(event: 'inspectNodeRequested', listener: (params: Protocol.Overlay.InspectNodeRequestedEvent) => void): void;
-
- /**
- * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
- */
- on(event: 'nodeHighlightRequested', listener: (params: Protocol.Overlay.NodeHighlightRequestedEvent) => void): void;
-
- /**
- * Fired when user asks to capture screenshot of some area on the page.
- */
- on(event: 'screenshotRequested', listener: (params: Protocol.Overlay.ScreenshotRequestedEvent) => void): void;
-
- /**
- * Fired when user cancels the inspect mode.
- */
- on(event: 'inspectModeCanceled', listener: () => void): void;
-
- }
-
- export interface PageApi {
- /**
- * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
- */
- addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest): Promise<Protocol.Page.AddScriptToEvaluateOnLoadResponse>;
-
- /**
- * Evaluates given script in every frame upon creation (before loading frame's scripts).
- */
- addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest): Promise<Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse>;
-
- /**
- * Brings page to front (activates tab).
- */
- bringToFront(): Promise<void>;
-
- /**
- * Capture page screenshot.
- */
- captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest): Promise<Protocol.Page.CaptureScreenshotResponse>;
-
- /**
- * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
- * iframes, shadow DOM, external resources, and element-inline styles.
- */
- captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest): Promise<Protocol.Page.CaptureSnapshotResponse>;
-
- /**
- * Clears the overriden device metrics.
- */
- clearDeviceMetricsOverride(): Promise<void>;
-
- /**
- * Clears the overridden Device Orientation.
- */
- clearDeviceOrientationOverride(): Promise<void>;
-
- /**
- * Clears the overriden Geolocation Position and Error.
- */
- clearGeolocationOverride(): Promise<void>;
-
- /**
- * Creates an isolated world for the given frame.
- */
- createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest): Promise<Protocol.Page.CreateIsolatedWorldResponse>;
-
- /**
- * Deletes browser cookie with given name, domain and path.
- */
- deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise<void>;
-
- /**
- * Disables page domain notifications.
- */
- disable(): Promise<void>;
-
- /**
- * Enables page domain notifications.
- */
- enable(): Promise<void>;
-
- getAppManifest(): Promise<Protocol.Page.GetAppManifestResponse>;
-
- getInstallabilityErrors(): Promise<Protocol.Page.GetInstallabilityErrorsResponse>;
-
- getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
-
- /**
- * Returns all browser cookies. Depending on the backend support, will return detailed cookie
- * information in the `cookies` field.
- */
- getCookies(): Promise<Protocol.Page.GetCookiesResponse>;
-
- /**
- * Returns present frame tree structure.
- */
- getFrameTree(): Promise<Protocol.Page.GetFrameTreeResponse>;
-
- /**
- * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
- */
- getLayoutMetrics(): Promise<Protocol.Page.GetLayoutMetricsResponse>;
-
- /**
- * Returns navigation history for the current page.
- */
- getNavigationHistory(): Promise<Protocol.Page.GetNavigationHistoryResponse>;
-
- /**
- * Resets navigation history for the current page.
- */
- resetNavigationHistory(): Promise<void>;
-
- /**
- * Returns content of the given resource.
- */
- getResourceContent(params: Protocol.Page.GetResourceContentRequest): Promise<Protocol.Page.GetResourceContentResponse>;
-
- /**
- * Returns present frame / resource tree structure.
- */
- getResourceTree(): Promise<Protocol.Page.GetResourceTreeResponse>;
-
- /**
- * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
- */
- handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest): Promise<void>;
-
- /**
- * Navigates current page to the given URL.
- */
- navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;
-
- /**
- * Navigates current page to the given history entry.
- */
- navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest): Promise<void>;
-
- /**
- * Print page as PDF.
- */
- printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise<Protocol.Page.PrintToPDFResponse>;
-
- /**
- * Reloads given page optionally ignoring the cache.
- */
- reload(params: Protocol.Page.ReloadRequest): Promise<void>;
-
- /**
- * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
- */
- removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest): Promise<void>;
-
- /**
- * Removes given script from the list.
- */
- removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest): Promise<void>;
-
- /**
- * Acknowledges that a screencast frame has been received by the frontend.
- */
- screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest): Promise<void>;
-
- /**
- * Searches for given string in resource content.
- */
- searchInResource(params: Protocol.Page.SearchInResourceRequest): Promise<Protocol.Page.SearchInResourceResponse>;
-
- /**
- * Enable Chrome's experimental ad filter on all sites.
- */
- setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest): Promise<void>;
-
- /**
- * Enable page Content Security Policy by-passing.
- */
- setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise<void>;
-
- /**
- * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
- * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
- * query results).
- */
- setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest): Promise<void>;
-
- /**
- * Overrides the Device Orientation.
- */
- setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest): Promise<void>;
-
- /**
- * Set generic font families.
- */
- setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise<void>;
-
- /**
- * Set default font sizes.
- */
- setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise<void>;
-
- /**
- * Sets given markup as the document's HTML.
- */
- setDocumentContent(params: Protocol.Page.SetDocumentContentRequest): Promise<void>;
-
- /**
- * Set the behavior when downloading a file.
- */
- setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest): Promise<void>;
-
- /**
- * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
- * unavailable.
- */
- setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest): Promise<void>;
-
- /**
- * Controls whether page will emit lifecycle events.
- */
- setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest): Promise<void>;
-
- /**
- * Toggles mouse event-based touch event emulation.
- */
- setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest): Promise<void>;
-
- /**
- * Starts sending each frame using the `screencastFrame` event.
- */
- startScreencast(params: Protocol.Page.StartScreencastRequest): Promise<void>;
-
- /**
- * Force the page stop all navigations and pending resource fetches.
- */
- stopLoading(): Promise<void>;
-
- /**
- * Crashes renderer on the IO thread, generates minidumps.
- */
- crash(): Promise<void>;
-
- /**
- * Tries to close page, running its beforeunload hooks, if any.
- */
- close(): Promise<void>;
-
- /**
- * Tries to update the web lifecycle state of the page.
- * It will transition the page to the given state according to:
- * https://github.com/WICG/web-lifecycle/
- */
- setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest): Promise<void>;
-
- /**
- * Stops sending each frame in the `screencastFrame`.
- */
- stopScreencast(): Promise<void>;
-
- /**
- * Forces compilation cache to be generated for every subresource script.
- */
- setProduceCompilationCache(params: Protocol.Page.SetProduceCompilationCacheRequest): Promise<void>;
-
- /**
- * Seeds compilation cache for given url. Compilation cache does not survive
- * cross-process navigation.
- */
- addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest): Promise<void>;
-
- /**
- * Clears seeded compilation cache.
- */
- clearCompilationCache(): Promise<void>;
-
- /**
- * Generates a report for testing.
- */
- generateTestReport(params: Protocol.Page.GenerateTestReportRequest): Promise<void>;
-
- /**
- * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
- */
- waitForDebugger(): Promise<void>;
-
- /**
- * Intercept file chooser requests and transfer control to protocol clients.
- * When file chooser interception is enabled, native file chooser dialog is not shown.
- * Instead, a protocol event `Page.fileChooserOpened` is emitted.
- */
- setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest): Promise<void>;
-
- on(event: 'domContentEventFired', listener: (params: Protocol.Page.DomContentEventFiredEvent) => void): void;
-
- /**
- * Emitted only when `page.interceptFileChooser` is enabled.
- */
- on(event: 'fileChooserOpened', listener: (params: Protocol.Page.FileChooserOpenedEvent) => void): void;
-
- /**
- * Fired when frame has been attached to its parent.
- */
- on(event: 'frameAttached', listener: (params: Protocol.Page.FrameAttachedEvent) => void): void;
-
- /**
- * Fired when frame no longer has a scheduled navigation.
- */
- on(event: 'frameClearedScheduledNavigation', listener: (params: Protocol.Page.FrameClearedScheduledNavigationEvent) => void): void;
-
- /**
- * Fired when frame has been detached from its parent.
- */
- on(event: 'frameDetached', listener: (params: Protocol.Page.FrameDetachedEvent) => void): void;
-
- /**
- * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
- */
- on(event: 'frameNavigated', listener: (params: Protocol.Page.FrameNavigatedEvent) => void): void;
-
- on(event: 'frameResized', listener: () => void): void;
-
- /**
- * Fired when a renderer-initiated navigation is requested.
- * Navigation may still be cancelled after the event is issued.
- */
- on(event: 'frameRequestedNavigation', listener: (params: Protocol.Page.FrameRequestedNavigationEvent) => void): void;
-
- /**
- * Fired when frame schedules a potential navigation.
- */
- on(event: 'frameScheduledNavigation', listener: (params: Protocol.Page.FrameScheduledNavigationEvent) => void): void;
-
- /**
- * Fired when frame has started loading.
- */
- on(event: 'frameStartedLoading', listener: (params: Protocol.Page.FrameStartedLoadingEvent) => void): void;
-
- /**
- * Fired when frame has stopped loading.
- */
- on(event: 'frameStoppedLoading', listener: (params: Protocol.Page.FrameStoppedLoadingEvent) => void): void;
-
- /**
- * Fired when page is about to start a download.
- */
- on(event: 'downloadWillBegin', listener: (params: Protocol.Page.DownloadWillBeginEvent) => void): void;
-
- /**
- * Fired when download makes progress. Last call has |done| == true.
- */
- on(event: 'downloadProgress', listener: (params: Protocol.Page.DownloadProgressEvent) => void): void;
-
- /**
- * Fired when interstitial page was hidden
- */
- on(event: 'interstitialHidden', listener: () => void): void;
-
- /**
- * Fired when interstitial page was shown
- */
- on(event: 'interstitialShown', listener: () => void): void;
-
- /**
- * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
- * closed.
- */
- on(event: 'javascriptDialogClosed', listener: (params: Protocol.Page.JavascriptDialogClosedEvent) => void): void;
-
- /**
- * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
- * open.
- */
- on(event: 'javascriptDialogOpening', listener: (params: Protocol.Page.JavascriptDialogOpeningEvent) => void): void;
-
- /**
- * Fired for top level page lifecycle events such as navigation, load, paint, etc.
- */
- on(event: 'lifecycleEvent', listener: (params: Protocol.Page.LifecycleEventEvent) => void): void;
-
- on(event: 'loadEventFired', listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
-
- /**
- * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
- */
- on(event: 'navigatedWithinDocument', listener: (params: Protocol.Page.NavigatedWithinDocumentEvent) => void): void;
-
- /**
- * Compressed image data requested by the `startScreencast`.
- */
- on(event: 'screencastFrame', listener: (params: Protocol.Page.ScreencastFrameEvent) => void): void;
-
- /**
- * Fired when the page with currently enabled screencast was shown or hidden `.
- */
- on(event: 'screencastVisibilityChanged', listener: (params: Protocol.Page.ScreencastVisibilityChangedEvent) => void): void;
-
- /**
- * Fired when a new window is going to be opened, via window.open(), link click, form submission,
- * etc.
- */
- on(event: 'windowOpen', listener: (params: Protocol.Page.WindowOpenEvent) => void): void;
-
- /**
- * Issued for every compilation cache generated. Is only available
- * if Page.setGenerateCompilationCache is enabled.
- */
- on(event: 'compilationCacheProduced', listener: (params: Protocol.Page.CompilationCacheProducedEvent) => void): void;
-
- }
-
- export interface PerformanceApi {
- /**
- * Disable collecting and reporting metrics.
- */
- disable(): Promise<void>;
-
- /**
- * Enable collecting and reporting metrics.
- */
- enable(params: Protocol.Performance.EnableRequest): Promise<void>;
-
- /**
- * Sets time domain to use for collecting and reporting duration metrics.
- * Note that this must be called before enabling metrics collection. Calling
- * this method while metrics collection is enabled returns an error.
- */
- setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest): Promise<void>;
-
- /**
- * Retrieve current values of run-time metrics.
- */
- getMetrics(): Promise<Protocol.Performance.GetMetricsResponse>;
-
- /**
- * Current values of the metrics.
- */
- on(event: 'metrics', listener: (params: Protocol.Performance.MetricsEvent) => void): void;
-
- }
-
- export interface SecurityApi {
- /**
- * Disables tracking security state changes.
- */
- disable(): Promise<void>;
-
- /**
- * Enables tracking security state changes.
- */
- enable(): Promise<void>;
-
- /**
- * Enable/disable whether all certificate errors should be ignored.
- */
- setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest): Promise<void>;
-
- /**
- * Handles a certificate error that fired a certificateError event.
- */
- handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest): Promise<void>;
-
- /**
- * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
- * be handled by the DevTools client and should be answered with `handleCertificateError` commands.
- */
- setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest): Promise<void>;
-
- /**
- * There is a certificate error. If overriding certificate errors is enabled, then it should be
- * handled with the `handleCertificateError` command. Note: this event does not fire if the
- * certificate error has been allowed internally. Only one client per target should override
- * certificate errors at the same time.
- */
- on(event: 'certificateError', listener: (params: Protocol.Security.CertificateErrorEvent) => void): void;
-
- /**
- * The security state of the page changed.
- */
- on(event: 'visibleSecurityStateChanged', listener: (params: Protocol.Security.VisibleSecurityStateChangedEvent) => void): void;
-
- /**
- * The security state of the page changed.
- */
- on(event: 'securityStateChanged', listener: (params: Protocol.Security.SecurityStateChangedEvent) => void): void;
-
- }
-
- export interface ServiceWorkerApi {
- deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest): Promise<void>;
-
- disable(): Promise<void>;
-
- dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest): Promise<void>;
-
- dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest): Promise<void>;
-
- enable(): Promise<void>;
-
- inspectWorker(params: Protocol.ServiceWorker.InspectWorkerRequest): Promise<void>;
-
- setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest): Promise<void>;
-
- skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise<void>;
-
- startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise<void>;
-
- stopAllWorkers(): Promise<void>;
-
- stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise<void>;
-
- unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise<void>;
-
- updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest): Promise<void>;
-
- on(event: 'workerErrorReported', listener: (params: Protocol.ServiceWorker.WorkerErrorReportedEvent) => void): void;
-
- on(event: 'workerRegistrationUpdated', listener: (params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent) => void): void;
-
- on(event: 'workerVersionUpdated', listener: (params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent) => void): void;
-
- }
-
- export interface StorageApi {
- /**
- * Clears storage for origin.
- */
- clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest): Promise<void>;
-
- /**
- * Returns all browser cookies.
- */
- getCookies(params: Protocol.Storage.GetCookiesRequest): Promise<Protocol.Storage.GetCookiesResponse>;
-
- /**
- * Sets given cookies.
- */
- setCookies(params: Protocol.Storage.SetCookiesRequest): Promise<void>;
-
- /**
- * Clears cookies.
- */
- clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise<void>;
-
- /**
- * Returns usage and quota in bytes.
- */
- getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest): Promise<Protocol.Storage.GetUsageAndQuotaResponse>;
-
- /**
- * Override quota for the specified origin
- */
- overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest): Promise<void>;
-
- /**
- * Registers origin to be notified when an update occurs to its cache storage list.
- */
- trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest): Promise<void>;
-
- /**
- * Registers origin to be notified when an update occurs to its IndexedDB.
- */
- trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest): Promise<void>;
-
- /**
- * Unregisters origin from receiving notifications for cache storage.
- */
- untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest): Promise<void>;
-
- /**
- * Unregisters origin from receiving notifications for IndexedDB.
- */
- untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest): Promise<void>;
-
- /**
- * A cache's contents have been modified.
- */
- on(event: 'cacheStorageContentUpdated', listener: (params: Protocol.Storage.CacheStorageContentUpdatedEvent) => void): void;
-
- /**
- * A cache has been added/deleted.
- */
- on(event: 'cacheStorageListUpdated', listener: (params: Protocol.Storage.CacheStorageListUpdatedEvent) => void): void;
-
- /**
- * The origin's IndexedDB object store has been modified.
- */
- on(event: 'indexedDBContentUpdated', listener: (params: Protocol.Storage.IndexedDBContentUpdatedEvent) => void): void;
-
- /**
- * The origin's IndexedDB database list has been modified.
- */
- on(event: 'indexedDBListUpdated', listener: (params: Protocol.Storage.IndexedDBListUpdatedEvent) => void): void;
-
- }
-
- export interface SystemInfoApi {
- /**
- * Returns information about the system.
- */
- getInfo(): Promise<Protocol.SystemInfo.GetInfoResponse>;
-
- /**
- * Returns information about all running processes.
- */
- getProcessInfo(): Promise<Protocol.SystemInfo.GetProcessInfoResponse>;
-
- }
-
- export interface TargetApi {
- /**
- * Activates (focuses) the target.
- */
- activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise<void>;
-
- /**
- * Attaches to the target with given id.
- */
- attachToTarget(params: Protocol.Target.AttachToTargetRequest): Promise<Protocol.Target.AttachToTargetResponse>;
-
- /**
- * Attaches to the browser target, only uses flat sessionId mode.
- */
- attachToBrowserTarget(): Promise<Protocol.Target.AttachToBrowserTargetResponse>;
-
- /**
- * Closes the target. If the target is a page that gets closed too.
- */
- closeTarget(params: Protocol.Target.CloseTargetRequest): Promise<Protocol.Target.CloseTargetResponse>;
-
- /**
- * Inject object to the target's main frame that provides a communication
- * channel with browser target.
- *
- * Injected object will be available as `window[bindingName]`.
- *
- * The object has the follwing API:
- * - `binding.send(json)` - a method to send messages over the remote debugging protocol
- * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
- */
- exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest): Promise<void>;
-
- /**
- * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
- * one.
- */
- createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest): Promise<Protocol.Target.CreateBrowserContextResponse>;
-
- /**
- * Returns all browser contexts created with `Target.createBrowserContext` method.
- */
- getBrowserContexts(): Promise<Protocol.Target.GetBrowserContextsResponse>;
-
- /**
- * Creates a new page.
- */
- createTarget(params: Protocol.Target.CreateTargetRequest): Promise<Protocol.Target.CreateTargetResponse>;
-
- /**
- * Detaches session with given id.
- */
- detachFromTarget(params: Protocol.Target.DetachFromTargetRequest): Promise<void>;
-
- /**
- * Deletes a BrowserContext. All the belonging pages will be closed without calling their
- * beforeunload hooks.
- */
- disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest): Promise<void>;
-
- /**
- * Returns information about a target.
- */
- getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise<Protocol.Target.GetTargetInfoResponse>;
-
- /**
- * Retrieves a list of available targets.
- */
- getTargets(): Promise<Protocol.Target.GetTargetsResponse>;
-
- /**
- * Sends protocol message over session with given id.
- * Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
- * and crbug.com/991325.
- */
- sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest): Promise<void>;
-
- /**
- * Controls whether to automatically attach to new targets which are considered to be related to
- * this one. When turned on, attaches to all existing related targets as well. When turned off,
- * automatically detaches from all currently attached targets.
- */
- setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise<void>;
-
- /**
- * Controls whether to discover available targets and notify via
- * `targetCreated/targetInfoChanged/targetDestroyed` events.
- */
- setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest): Promise<void>;
-
- /**
- * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
- * `true`.
- */
- setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest): Promise<void>;
-
- /**
- * Issued when attached to target because of auto-attach or `attachToTarget` command.
- */
- on(event: 'attachedToTarget', listener: (params: Protocol.Target.AttachedToTargetEvent) => void): void;
-
- /**
- * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
- * issued multiple times per target if multiple sessions have been attached to it.
- */
- on(event: 'detachedFromTarget', listener: (params: Protocol.Target.DetachedFromTargetEvent) => void): void;
-
- /**
- * Notifies about a new protocol message received from the session (as reported in
- * `attachedToTarget` event).
- */
- on(event: 'receivedMessageFromTarget', listener: (params: Protocol.Target.ReceivedMessageFromTargetEvent) => void): void;
-
- /**
- * Issued when a possible inspection target is created.
- */
- on(event: 'targetCreated', listener: (params: Protocol.Target.TargetCreatedEvent) => void): void;
-
- /**
- * Issued when a target is destroyed.
- */
- on(event: 'targetDestroyed', listener: (params: Protocol.Target.TargetDestroyedEvent) => void): void;
-
- /**
- * Issued when a target has crashed.
- */
- on(event: 'targetCrashed', listener: (params: Protocol.Target.TargetCrashedEvent) => void): void;
-
- /**
- * Issued when some information about a target has changed. This only happens between
- * `targetCreated` and `targetDestroyed`.
- */
- on(event: 'targetInfoChanged', listener: (params: Protocol.Target.TargetInfoChangedEvent) => void): void;
-
- }
-
- export interface TetheringApi {
- /**
- * Request browser port binding.
- */
- bind(params: Protocol.Tethering.BindRequest): Promise<void>;
-
- /**
- * Request browser port unbinding.
- */
- unbind(params: Protocol.Tethering.UnbindRequest): Promise<void>;
-
- /**
- * Informs that port was successfully bound and got a specified connection id.
- */
- on(event: 'accepted', listener: (params: Protocol.Tethering.AcceptedEvent) => void): void;
-
- }
-
- export interface TracingApi {
- /**
- * Stop trace events collection.
- */
- end(): Promise<void>;
-
- /**
- * Gets supported tracing categories.
- */
- getCategories(): Promise<Protocol.Tracing.GetCategoriesResponse>;
-
- /**
- * Record a clock sync marker in the trace.
- */
- recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest): Promise<void>;
-
- /**
- * Request a global memory dump.
- */
- requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest): Promise<Protocol.Tracing.RequestMemoryDumpResponse>;
-
- /**
- * Start trace events collection.
- */
- start(params: Protocol.Tracing.StartRequest): Promise<void>;
-
- on(event: 'bufferUsage', listener: (params: Protocol.Tracing.BufferUsageEvent) => void): void;
-
- /**
- * Contains an bucket of collected trace events. When tracing is stopped collected events will be
- * send as a sequence of dataCollected events followed by tracingComplete event.
- */
- on(event: 'dataCollected', listener: (params: Protocol.Tracing.DataCollectedEvent) => void): void;
-
- /**
- * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
- * delivered via dataCollected events.
- */
- on(event: 'tracingComplete', listener: (params: Protocol.Tracing.TracingCompleteEvent) => void): void;
-
- }
-
- export interface FetchApi {
- /**
- * Disables the fetch domain.
- */
- disable(): Promise<void>;
-
- /**
- * Enables issuing of requestPaused events. A request will be paused until client
- * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
- */
- enable(params: Protocol.Fetch.EnableRequest): Promise<void>;
-
- /**
- * Causes the request to fail with specified reason.
- */
- failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<void>;
-
- /**
- * Provides response to the request.
- */
- fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<void>;
-
- /**
- * Continues the request, optionally modifying some of its parameters.
- */
- continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<void>;
-
- /**
- * Continues a request supplying authChallengeResponse following authRequired event.
- */
- continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise<void>;
-
- /**
- * Causes the body of the response to be received from the server and
- * returned as a single string. May only be issued for a request that
- * is paused in the Response stage and is mutually exclusive with
- * takeResponseBodyForInterceptionAsStream. Calling other methods that
- * affect the request or disabling fetch domain before body is received
- * results in an undefined behavior.
- */
- getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise<Protocol.Fetch.GetResponseBodyResponse>;
-
- /**
- * Returns a handle to the stream representing the response body.
- * The request must be paused in the HeadersReceived stage.
- * Note that after this command the request can't be continued
- * as is -- client either needs to cancel it or to provide the
- * response body.
- * The stream only supports sequential read, IO.read will fail if the position
- * is specified.
- * This method is mutually exclusive with getResponseBody.
- * Calling other methods that affect the request or disabling fetch
- * domain before body is received results in an undefined behavior.
- */
- takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
-
- /**
- * Issued when the domain is enabled and the request URL matches the
- * specified filter. The request is paused until the client responds
- * with one of continueRequest, failRequest or fulfillRequest.
- * The stage of the request can be determined by presence of responseErrorReason
- * and responseStatusCode -- the request is at the response stage if either
- * of these fields is present and in the request stage otherwise.
- */
- on(event: 'requestPaused', listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
-
- /**
- * Issued when the domain is enabled with handleAuthRequests set to true.
- * The request is paused until client responds with continueWithAuth.
- */
- on(event: 'authRequired', listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
-
- }
-
- export interface WebAudioApi {
- /**
- * Enables the WebAudio domain and starts sending context lifetime events.
- */
- enable(): Promise<void>;
-
- /**
- * Disables the WebAudio domain.
- */
- disable(): Promise<void>;
-
- /**
- * Fetch the realtime data from the registered contexts.
- */
- getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest): Promise<Protocol.WebAudio.GetRealtimeDataResponse>;
-
- /**
- * Notifies that a new BaseAudioContext has been created.
- */
- on(event: 'contextCreated', listener: (params: Protocol.WebAudio.ContextCreatedEvent) => void): void;
-
- /**
- * Notifies that an existing BaseAudioContext will be destroyed.
- */
- on(event: 'contextWillBeDestroyed', listener: (params: Protocol.WebAudio.ContextWillBeDestroyedEvent) => void): void;
-
- /**
- * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
- */
- on(event: 'contextChanged', listener: (params: Protocol.WebAudio.ContextChangedEvent) => void): void;
-
- /**
- * Notifies that the construction of an AudioListener has finished.
- */
- on(event: 'audioListenerCreated', listener: (params: Protocol.WebAudio.AudioListenerCreatedEvent) => void): void;
-
- /**
- * Notifies that a new AudioListener has been created.
- */
- on(event: 'audioListenerWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent) => void): void;
-
- /**
- * Notifies that a new AudioNode has been created.
- */
- on(event: 'audioNodeCreated', listener: (params: Protocol.WebAudio.AudioNodeCreatedEvent) => void): void;
-
- /**
- * Notifies that an existing AudioNode has been destroyed.
- */
- on(event: 'audioNodeWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent) => void): void;
-
- /**
- * Notifies that a new AudioParam has been created.
- */
- on(event: 'audioParamCreated', listener: (params: Protocol.WebAudio.AudioParamCreatedEvent) => void): void;
-
- /**
- * Notifies that an existing AudioParam has been destroyed.
- */
- on(event: 'audioParamWillBeDestroyed', listener: (params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent) => void): void;
-
- /**
- * Notifies that two AudioNodes are connected.
- */
- on(event: 'nodesConnected', listener: (params: Protocol.WebAudio.NodesConnectedEvent) => void): void;
-
- /**
- * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
- */
- on(event: 'nodesDisconnected', listener: (params: Protocol.WebAudio.NodesDisconnectedEvent) => void): void;
-
- /**
- * Notifies that an AudioNode is connected to an AudioParam.
- */
- on(event: 'nodeParamConnected', listener: (params: Protocol.WebAudio.NodeParamConnectedEvent) => void): void;
-
- /**
- * Notifies that an AudioNode is disconnected to an AudioParam.
- */
- on(event: 'nodeParamDisconnected', listener: (params: Protocol.WebAudio.NodeParamDisconnectedEvent) => void): void;
-
- }
-
- export interface WebAuthnApi {
- /**
- * Enable the WebAuthn domain and start intercepting credential storage and
- * retrieval with a virtual authenticator.
- */
- enable(): Promise<void>;
-
- /**
- * Disable the WebAuthn domain.
- */
- disable(): Promise<void>;
-
- /**
- * Creates and adds a virtual authenticator.
- */
- addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest): Promise<Protocol.WebAuthn.AddVirtualAuthenticatorResponse>;
-
- /**
- * Removes the given authenticator.
- */
- removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest): Promise<void>;
-
- /**
- * Adds the credential to the specified authenticator.
- */
- addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise<void>;
-
- /**
- * Returns a single credential stored in the given virtual authenticator that
- * matches the credential ID.
- */
- getCredential(params: Protocol.WebAuthn.GetCredentialRequest): Promise<Protocol.WebAuthn.GetCredentialResponse>;
-
- /**
- * Returns all the credentials stored in the given virtual authenticator.
- */
- getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest): Promise<Protocol.WebAuthn.GetCredentialsResponse>;
-
- /**
- * Removes a credential from the authenticator.
- */
- removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest): Promise<void>;
-
- /**
- * Clears all the credentials from the specified device.
- */
- clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest): Promise<void>;
-
- /**
- * Sets whether User Verification succeeds or fails for an authenticator.
- * The default is true.
- */
- setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest): Promise<void>;
-
- /**
- * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
- * The default is true.
- */
- setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest): Promise<void>;
-
- }
-
- export interface MediaApi {
- /**
- * Enables the Media domain
- */
- enable(): Promise<void>;
-
- /**
- * Disables the Media domain.
- */
- disable(): Promise<void>;
-
- /**
- * This can be called multiple times, and can be used to set / override /
- * remove player properties. A null propValue indicates removal.
- */
- on(event: 'playerPropertiesChanged', listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
-
- /**
- * Send events as a list, allowing them to be batched on the browser for less
- * congestion. If batched, events must ALWAYS be in chronological order.
- */
- on(event: 'playerEventsAdded', listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
-
- /**
- * Send a list of any messages that need to be delivered.
- */
- on(event: 'playerMessagesLogged', listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
-
- /**
- * Send a list of any errors that need to be delivered.
- */
- on(event: 'playerErrorsRaised', listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
-
- /**
- * Called whenever a player is created, or when a new agent joins and recieves
- * a list of active players. If an agent is restored, it will recieve the full
- * list of player ids and all events again.
- */
- on(event: 'playersCreated', listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
-
- }
- }
-
- export default ProtocolProxyApi;
|