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

protocol.d.ts 430KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266
  1. /**********************************************************************
  2. * Auto-generated by protocol-dts-generator.ts, do not edit manually. *
  3. **********************************************************************/
  4. /**
  5. * The Chrome DevTools Protocol.
  6. * @public
  7. */
  8. export namespace Protocol {
  9. export type integer = number
  10. /**
  11. * This domain is deprecated - use Runtime or Log instead.
  12. */
  13. export namespace Console {
  14. export const enum ConsoleMessageSource {
  15. XML = 'xml',
  16. Javascript = 'javascript',
  17. Network = 'network',
  18. ConsoleAPI = 'console-api',
  19. Storage = 'storage',
  20. Appcache = 'appcache',
  21. Rendering = 'rendering',
  22. Security = 'security',
  23. Other = 'other',
  24. Deprecation = 'deprecation',
  25. Worker = 'worker',
  26. }
  27. export const enum ConsoleMessageLevel {
  28. Log = 'log',
  29. Warning = 'warning',
  30. Error = 'error',
  31. Debug = 'debug',
  32. Info = 'info',
  33. }
  34. /**
  35. * Console message.
  36. */
  37. export interface ConsoleMessage {
  38. /**
  39. * Message source. (ConsoleMessageSource enum)
  40. */
  41. source: ('xml' | 'javascript' | 'network' | 'console-api' | 'storage' | 'appcache' | 'rendering' | 'security' | 'other' | 'deprecation' | 'worker');
  42. /**
  43. * Message severity. (ConsoleMessageLevel enum)
  44. */
  45. level: ('log' | 'warning' | 'error' | 'debug' | 'info');
  46. /**
  47. * Message text.
  48. */
  49. text: string;
  50. /**
  51. * URL of the message origin.
  52. */
  53. url?: string;
  54. /**
  55. * Line number in the resource that generated this message (1-based).
  56. */
  57. line?: integer;
  58. /**
  59. * Column number in the resource that generated this message (1-based).
  60. */
  61. column?: integer;
  62. }
  63. /**
  64. * Issued when new console message is added.
  65. */
  66. export interface MessageAddedEvent {
  67. /**
  68. * Console message that has been added.
  69. */
  70. message: ConsoleMessage;
  71. }
  72. }
  73. /**
  74. * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
  75. * breakpoints, stepping through execution, exploring stack traces, etc.
  76. */
  77. export namespace Debugger {
  78. /**
  79. * Breakpoint identifier.
  80. */
  81. export type BreakpointId = string;
  82. /**
  83. * Call frame identifier.
  84. */
  85. export type CallFrameId = string;
  86. /**
  87. * Location in the source code.
  88. */
  89. export interface Location {
  90. /**
  91. * Script identifier as reported in the `Debugger.scriptParsed`.
  92. */
  93. scriptId: Runtime.ScriptId;
  94. /**
  95. * Line number in the script (0-based).
  96. */
  97. lineNumber: integer;
  98. /**
  99. * Column number in the script (0-based).
  100. */
  101. columnNumber?: integer;
  102. }
  103. /**
  104. * Location in the source code.
  105. */
  106. export interface ScriptPosition {
  107. lineNumber: integer;
  108. columnNumber: integer;
  109. }
  110. /**
  111. * Location range within one script.
  112. */
  113. export interface LocationRange {
  114. scriptId: Runtime.ScriptId;
  115. start: ScriptPosition;
  116. end: ScriptPosition;
  117. }
  118. /**
  119. * JavaScript call frame. Array of call frames form the call stack.
  120. */
  121. export interface CallFrame {
  122. /**
  123. * Call frame identifier. This identifier is only valid while the virtual machine is paused.
  124. */
  125. callFrameId: CallFrameId;
  126. /**
  127. * Name of the JavaScript function called on this call frame.
  128. */
  129. functionName: string;
  130. /**
  131. * Location in the source code.
  132. */
  133. functionLocation?: Location;
  134. /**
  135. * Location in the source code.
  136. */
  137. location: Location;
  138. /**
  139. * JavaScript script name or url.
  140. */
  141. url: string;
  142. /**
  143. * Scope chain for this call frame.
  144. */
  145. scopeChain: Scope[];
  146. /**
  147. * `this` object for this call frame.
  148. */
  149. this: Runtime.RemoteObject;
  150. /**
  151. * The value being returned, if the function is at return point.
  152. */
  153. returnValue?: Runtime.RemoteObject;
  154. }
  155. export const enum ScopeType {
  156. Global = 'global',
  157. Local = 'local',
  158. With = 'with',
  159. Closure = 'closure',
  160. Catch = 'catch',
  161. Block = 'block',
  162. Script = 'script',
  163. Eval = 'eval',
  164. Module = 'module',
  165. WasmExpressionStack = 'wasm-expression-stack',
  166. }
  167. /**
  168. * Scope description.
  169. */
  170. export interface Scope {
  171. /**
  172. * Scope type. (ScopeType enum)
  173. */
  174. type: ('global' | 'local' | 'with' | 'closure' | 'catch' | 'block' | 'script' | 'eval' | 'module' | 'wasm-expression-stack');
  175. /**
  176. * Object representing the scope. For `global` and `with` scopes it represents the actual
  177. * object; for the rest of the scopes, it is artificial transient object enumerating scope
  178. * variables as its properties.
  179. */
  180. object: Runtime.RemoteObject;
  181. name?: string;
  182. /**
  183. * Location in the source code where scope starts
  184. */
  185. startLocation?: Location;
  186. /**
  187. * Location in the source code where scope ends
  188. */
  189. endLocation?: Location;
  190. }
  191. /**
  192. * Search match for resource.
  193. */
  194. export interface SearchMatch {
  195. /**
  196. * Line number in resource content.
  197. */
  198. lineNumber: number;
  199. /**
  200. * Line with match content.
  201. */
  202. lineContent: string;
  203. }
  204. export const enum BreakLocationType {
  205. DebuggerStatement = 'debuggerStatement',
  206. Call = 'call',
  207. Return = 'return',
  208. }
  209. export interface BreakLocation {
  210. /**
  211. * Script identifier as reported in the `Debugger.scriptParsed`.
  212. */
  213. scriptId: Runtime.ScriptId;
  214. /**
  215. * Line number in the script (0-based).
  216. */
  217. lineNumber: integer;
  218. /**
  219. * Column number in the script (0-based).
  220. */
  221. columnNumber?: integer;
  222. /**
  223. * (BreakLocationType enum)
  224. */
  225. type?: ('debuggerStatement' | 'call' | 'return');
  226. }
  227. /**
  228. * Enum of possible script languages.
  229. */
  230. export type ScriptLanguage = ('JavaScript' | 'WebAssembly');
  231. export const enum DebugSymbolsType {
  232. None = 'None',
  233. SourceMap = 'SourceMap',
  234. EmbeddedDWARF = 'EmbeddedDWARF',
  235. ExternalDWARF = 'ExternalDWARF',
  236. }
  237. /**
  238. * Debug symbols available for a wasm script.
  239. */
  240. export interface DebugSymbols {
  241. /**
  242. * Type of the debug symbols. (DebugSymbolsType enum)
  243. */
  244. type: ('None' | 'SourceMap' | 'EmbeddedDWARF' | 'ExternalDWARF');
  245. /**
  246. * URL of the external symbol source.
  247. */
  248. externalURL?: string;
  249. }
  250. export const enum ContinueToLocationRequestTargetCallFrames {
  251. Any = 'any',
  252. Current = 'current',
  253. }
  254. export interface ContinueToLocationRequest {
  255. /**
  256. * Location to continue to.
  257. */
  258. location: Location;
  259. /**
  260. * (ContinueToLocationRequestTargetCallFrames enum)
  261. */
  262. targetCallFrames?: ('any' | 'current');
  263. }
  264. export interface EnableRequest {
  265. /**
  266. * The maximum size in bytes of collected scripts (not referenced by other heap objects)
  267. * the debugger can hold. Puts no limit if paramter is omitted.
  268. */
  269. maxScriptsCacheSize?: number;
  270. }
  271. export interface EnableResponse {
  272. /**
  273. * Unique identifier of the debugger.
  274. */
  275. debuggerId: Runtime.UniqueDebuggerId;
  276. }
  277. export interface EvaluateOnCallFrameRequest {
  278. /**
  279. * Call frame identifier to evaluate on.
  280. */
  281. callFrameId: CallFrameId;
  282. /**
  283. * Expression to evaluate.
  284. */
  285. expression: string;
  286. /**
  287. * String object group name to put result into (allows rapid releasing resulting object handles
  288. * using `releaseObjectGroup`).
  289. */
  290. objectGroup?: string;
  291. /**
  292. * Specifies whether command line API should be available to the evaluated expression, defaults
  293. * to false.
  294. */
  295. includeCommandLineAPI?: boolean;
  296. /**
  297. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  298. * execution. Overrides `setPauseOnException` state.
  299. */
  300. silent?: boolean;
  301. /**
  302. * Whether the result is expected to be a JSON object that should be sent by value.
  303. */
  304. returnByValue?: boolean;
  305. /**
  306. * Whether preview should be generated for the result.
  307. */
  308. generatePreview?: boolean;
  309. /**
  310. * Whether to throw an exception if side effect cannot be ruled out during evaluation.
  311. */
  312. throwOnSideEffect?: boolean;
  313. /**
  314. * Terminate execution after timing out (number of milliseconds).
  315. */
  316. timeout?: Runtime.TimeDelta;
  317. }
  318. export interface EvaluateOnCallFrameResponse {
  319. /**
  320. * Object wrapper for the evaluation result.
  321. */
  322. result: Runtime.RemoteObject;
  323. /**
  324. * Exception details.
  325. */
  326. exceptionDetails?: Runtime.ExceptionDetails;
  327. }
  328. export interface ExecuteWasmEvaluatorRequest {
  329. /**
  330. * WebAssembly call frame identifier to evaluate on.
  331. */
  332. callFrameId: CallFrameId;
  333. /**
  334. * Code of the evaluator module.
  335. */
  336. evaluator: string;
  337. /**
  338. * Terminate execution after timing out (number of milliseconds).
  339. */
  340. timeout?: Runtime.TimeDelta;
  341. }
  342. export interface ExecuteWasmEvaluatorResponse {
  343. /**
  344. * Object wrapper for the evaluation result.
  345. */
  346. result: Runtime.RemoteObject;
  347. /**
  348. * Exception details.
  349. */
  350. exceptionDetails?: Runtime.ExceptionDetails;
  351. }
  352. export interface GetPossibleBreakpointsRequest {
  353. /**
  354. * Start of range to search possible breakpoint locations in.
  355. */
  356. start: Location;
  357. /**
  358. * End of range to search possible breakpoint locations in (excluding). When not specified, end
  359. * of scripts is used as end of range.
  360. */
  361. end?: Location;
  362. /**
  363. * Only consider locations which are in the same (non-nested) function as start.
  364. */
  365. restrictToFunction?: boolean;
  366. }
  367. export interface GetPossibleBreakpointsResponse {
  368. /**
  369. * List of the possible breakpoint locations.
  370. */
  371. locations: BreakLocation[];
  372. }
  373. export interface GetScriptSourceRequest {
  374. /**
  375. * Id of the script to get source for.
  376. */
  377. scriptId: Runtime.ScriptId;
  378. }
  379. export interface GetScriptSourceResponse {
  380. /**
  381. * Script source (empty in case of Wasm bytecode).
  382. */
  383. scriptSource: string;
  384. /**
  385. * Wasm bytecode.
  386. */
  387. bytecode?: string;
  388. }
  389. export interface GetWasmBytecodeRequest {
  390. /**
  391. * Id of the Wasm script to get source for.
  392. */
  393. scriptId: Runtime.ScriptId;
  394. }
  395. export interface GetWasmBytecodeResponse {
  396. /**
  397. * Script source.
  398. */
  399. bytecode: string;
  400. }
  401. export interface GetStackTraceRequest {
  402. stackTraceId: Runtime.StackTraceId;
  403. }
  404. export interface GetStackTraceResponse {
  405. stackTrace: Runtime.StackTrace;
  406. }
  407. export interface PauseOnAsyncCallRequest {
  408. /**
  409. * Debugger will pause when async call with given stack trace is started.
  410. */
  411. parentStackTraceId: Runtime.StackTraceId;
  412. }
  413. export interface RemoveBreakpointRequest {
  414. breakpointId: BreakpointId;
  415. }
  416. export interface RestartFrameRequest {
  417. /**
  418. * Call frame identifier to evaluate on.
  419. */
  420. callFrameId: CallFrameId;
  421. }
  422. export interface RestartFrameResponse {
  423. /**
  424. * New stack trace.
  425. */
  426. callFrames: CallFrame[];
  427. /**
  428. * Async stack trace, if any.
  429. */
  430. asyncStackTrace?: Runtime.StackTrace;
  431. /**
  432. * Async stack trace, if any.
  433. */
  434. asyncStackTraceId?: Runtime.StackTraceId;
  435. }
  436. export interface ResumeRequest {
  437. /**
  438. * Set to true to terminate execution upon resuming execution. In contrast
  439. * to Runtime.terminateExecution, this will allows to execute further
  440. * JavaScript (i.e. via evaluation) until execution of the paused code
  441. * is actually resumed, at which point termination is triggered.
  442. * If execution is currently not paused, this parameter has no effect.
  443. */
  444. terminateOnResume?: boolean;
  445. }
  446. export interface SearchInContentRequest {
  447. /**
  448. * Id of the script to search in.
  449. */
  450. scriptId: Runtime.ScriptId;
  451. /**
  452. * String to search for.
  453. */
  454. query: string;
  455. /**
  456. * If true, search is case sensitive.
  457. */
  458. caseSensitive?: boolean;
  459. /**
  460. * If true, treats string parameter as regex.
  461. */
  462. isRegex?: boolean;
  463. }
  464. export interface SearchInContentResponse {
  465. /**
  466. * List of search matches.
  467. */
  468. result: SearchMatch[];
  469. }
  470. export interface SetAsyncCallStackDepthRequest {
  471. /**
  472. * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  473. * call stacks (default).
  474. */
  475. maxDepth: integer;
  476. }
  477. export interface SetBlackboxPatternsRequest {
  478. /**
  479. * Array of regexps that will be used to check script url for blackbox state.
  480. */
  481. patterns: string[];
  482. }
  483. export interface SetBlackboxedRangesRequest {
  484. /**
  485. * Id of the script.
  486. */
  487. scriptId: Runtime.ScriptId;
  488. positions: ScriptPosition[];
  489. }
  490. export interface SetBreakpointRequest {
  491. /**
  492. * Location to set breakpoint in.
  493. */
  494. location: Location;
  495. /**
  496. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  497. * breakpoint if this expression evaluates to true.
  498. */
  499. condition?: string;
  500. }
  501. export interface SetBreakpointResponse {
  502. /**
  503. * Id of the created breakpoint for further reference.
  504. */
  505. breakpointId: BreakpointId;
  506. /**
  507. * Location this breakpoint resolved into.
  508. */
  509. actualLocation: Location;
  510. }
  511. export const enum SetInstrumentationBreakpointRequestInstrumentation {
  512. BeforeScriptExecution = 'beforeScriptExecution',
  513. BeforeScriptWithSourceMapExecution = 'beforeScriptWithSourceMapExecution',
  514. }
  515. export interface SetInstrumentationBreakpointRequest {
  516. /**
  517. * Instrumentation name. (SetInstrumentationBreakpointRequestInstrumentation enum)
  518. */
  519. instrumentation: ('beforeScriptExecution' | 'beforeScriptWithSourceMapExecution');
  520. }
  521. export interface SetInstrumentationBreakpointResponse {
  522. /**
  523. * Id of the created breakpoint for further reference.
  524. */
  525. breakpointId: BreakpointId;
  526. }
  527. export interface SetBreakpointByUrlRequest {
  528. /**
  529. * Line number to set breakpoint at.
  530. */
  531. lineNumber: integer;
  532. /**
  533. * URL of the resources to set breakpoint on.
  534. */
  535. url?: string;
  536. /**
  537. * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
  538. * `urlRegex` must be specified.
  539. */
  540. urlRegex?: string;
  541. /**
  542. * Script hash of the resources to set breakpoint on.
  543. */
  544. scriptHash?: string;
  545. /**
  546. * Offset in the line to set breakpoint at.
  547. */
  548. columnNumber?: integer;
  549. /**
  550. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  551. * breakpoint if this expression evaluates to true.
  552. */
  553. condition?: string;
  554. }
  555. export interface SetBreakpointByUrlResponse {
  556. /**
  557. * Id of the created breakpoint for further reference.
  558. */
  559. breakpointId: BreakpointId;
  560. /**
  561. * List of the locations this breakpoint resolved into upon addition.
  562. */
  563. locations: Location[];
  564. }
  565. export interface SetBreakpointOnFunctionCallRequest {
  566. /**
  567. * Function object id.
  568. */
  569. objectId: Runtime.RemoteObjectId;
  570. /**
  571. * Expression to use as a breakpoint condition. When specified, debugger will
  572. * stop on the breakpoint if this expression evaluates to true.
  573. */
  574. condition?: string;
  575. }
  576. export interface SetBreakpointOnFunctionCallResponse {
  577. /**
  578. * Id of the created breakpoint for further reference.
  579. */
  580. breakpointId: BreakpointId;
  581. }
  582. export interface SetBreakpointsActiveRequest {
  583. /**
  584. * New value for breakpoints active state.
  585. */
  586. active: boolean;
  587. }
  588. export const enum SetPauseOnExceptionsRequestState {
  589. None = 'none',
  590. Uncaught = 'uncaught',
  591. All = 'all',
  592. }
  593. export interface SetPauseOnExceptionsRequest {
  594. /**
  595. * Pause on exceptions mode. (SetPauseOnExceptionsRequestState enum)
  596. */
  597. state: ('none' | 'uncaught' | 'all');
  598. }
  599. export interface SetReturnValueRequest {
  600. /**
  601. * New return value.
  602. */
  603. newValue: Runtime.CallArgument;
  604. }
  605. export interface SetScriptSourceRequest {
  606. /**
  607. * Id of the script to edit.
  608. */
  609. scriptId: Runtime.ScriptId;
  610. /**
  611. * New content of the script.
  612. */
  613. scriptSource: string;
  614. /**
  615. * If true the change will not actually be applied. Dry run may be used to get result
  616. * description without actually modifying the code.
  617. */
  618. dryRun?: boolean;
  619. }
  620. export interface SetScriptSourceResponse {
  621. /**
  622. * New stack trace in case editing has happened while VM was stopped.
  623. */
  624. callFrames?: CallFrame[];
  625. /**
  626. * Whether current call stack was modified after applying the changes.
  627. */
  628. stackChanged?: boolean;
  629. /**
  630. * Async stack trace, if any.
  631. */
  632. asyncStackTrace?: Runtime.StackTrace;
  633. /**
  634. * Async stack trace, if any.
  635. */
  636. asyncStackTraceId?: Runtime.StackTraceId;
  637. /**
  638. * Exception details if any.
  639. */
  640. exceptionDetails?: Runtime.ExceptionDetails;
  641. }
  642. export interface SetSkipAllPausesRequest {
  643. /**
  644. * New value for skip pauses state.
  645. */
  646. skip: boolean;
  647. }
  648. export interface SetVariableValueRequest {
  649. /**
  650. * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
  651. * scope types are allowed. Other scopes could be manipulated manually.
  652. */
  653. scopeNumber: integer;
  654. /**
  655. * Variable name.
  656. */
  657. variableName: string;
  658. /**
  659. * New variable value.
  660. */
  661. newValue: Runtime.CallArgument;
  662. /**
  663. * Id of callframe that holds variable.
  664. */
  665. callFrameId: CallFrameId;
  666. }
  667. export interface StepIntoRequest {
  668. /**
  669. * Debugger will pause on the execution of the first async task which was scheduled
  670. * before next pause.
  671. */
  672. breakOnAsyncCall?: boolean;
  673. /**
  674. * The skipList specifies location ranges that should be skipped on step into.
  675. */
  676. skipList?: LocationRange[];
  677. }
  678. export interface StepOverRequest {
  679. /**
  680. * The skipList specifies location ranges that should be skipped on step over.
  681. */
  682. skipList?: LocationRange[];
  683. }
  684. /**
  685. * Fired when breakpoint is resolved to an actual script and location.
  686. */
  687. export interface BreakpointResolvedEvent {
  688. /**
  689. * Breakpoint unique identifier.
  690. */
  691. breakpointId: BreakpointId;
  692. /**
  693. * Actual breakpoint location.
  694. */
  695. location: Location;
  696. }
  697. export const enum PausedEventReason {
  698. Ambiguous = 'ambiguous',
  699. Assert = 'assert',
  700. DebugCommand = 'debugCommand',
  701. DOM = 'DOM',
  702. EventListener = 'EventListener',
  703. Exception = 'exception',
  704. Instrumentation = 'instrumentation',
  705. OOM = 'OOM',
  706. Other = 'other',
  707. PromiseRejection = 'promiseRejection',
  708. XHR = 'XHR',
  709. }
  710. /**
  711. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  712. */
  713. export interface PausedEvent {
  714. /**
  715. * Call stack the virtual machine stopped on.
  716. */
  717. callFrames: CallFrame[];
  718. /**
  719. * Pause reason. (PausedEventReason enum)
  720. */
  721. reason: ('ambiguous' | 'assert' | 'debugCommand' | 'DOM' | 'EventListener' | 'exception' | 'instrumentation' | 'OOM' | 'other' | 'promiseRejection' | 'XHR');
  722. /**
  723. * Object containing break-specific auxiliary properties.
  724. */
  725. data?: any;
  726. /**
  727. * Hit breakpoints IDs
  728. */
  729. hitBreakpoints?: string[];
  730. /**
  731. * Async stack trace, if any.
  732. */
  733. asyncStackTrace?: Runtime.StackTrace;
  734. /**
  735. * Async stack trace, if any.
  736. */
  737. asyncStackTraceId?: Runtime.StackTraceId;
  738. /**
  739. * Never present, will be removed.
  740. */
  741. asyncCallStackTraceId?: Runtime.StackTraceId;
  742. }
  743. /**
  744. * Fired when virtual machine fails to parse the script.
  745. */
  746. export interface ScriptFailedToParseEvent {
  747. /**
  748. * Identifier of the script parsed.
  749. */
  750. scriptId: Runtime.ScriptId;
  751. /**
  752. * URL or name of the script parsed (if any).
  753. */
  754. url: string;
  755. /**
  756. * Line offset of the script within the resource with given URL (for script tags).
  757. */
  758. startLine: integer;
  759. /**
  760. * Column offset of the script within the resource with given URL.
  761. */
  762. startColumn: integer;
  763. /**
  764. * Last line of the script.
  765. */
  766. endLine: integer;
  767. /**
  768. * Length of the last line of the script.
  769. */
  770. endColumn: integer;
  771. /**
  772. * Specifies script creation context.
  773. */
  774. executionContextId: Runtime.ExecutionContextId;
  775. /**
  776. * Content hash of the script.
  777. */
  778. hash: string;
  779. /**
  780. * Embedder-specific auxiliary data.
  781. */
  782. executionContextAuxData?: any;
  783. /**
  784. * URL of source map associated with script (if any).
  785. */
  786. sourceMapURL?: string;
  787. /**
  788. * True, if this script has sourceURL.
  789. */
  790. hasSourceURL?: boolean;
  791. /**
  792. * True, if this script is ES6 module.
  793. */
  794. isModule?: boolean;
  795. /**
  796. * This script length.
  797. */
  798. length?: integer;
  799. /**
  800. * JavaScript top stack frame of where the script parsed event was triggered if available.
  801. */
  802. stackTrace?: Runtime.StackTrace;
  803. /**
  804. * If the scriptLanguage is WebAssembly, the code section offset in the module.
  805. */
  806. codeOffset?: integer;
  807. /**
  808. * The language of the script.
  809. */
  810. scriptLanguage?: Debugger.ScriptLanguage;
  811. /**
  812. * The name the embedder supplied for this script.
  813. */
  814. embedderName?: string;
  815. }
  816. /**
  817. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  818. * scripts upon enabling debugger.
  819. */
  820. export interface ScriptParsedEvent {
  821. /**
  822. * Identifier of the script parsed.
  823. */
  824. scriptId: Runtime.ScriptId;
  825. /**
  826. * URL or name of the script parsed (if any).
  827. */
  828. url: string;
  829. /**
  830. * Line offset of the script within the resource with given URL (for script tags).
  831. */
  832. startLine: integer;
  833. /**
  834. * Column offset of the script within the resource with given URL.
  835. */
  836. startColumn: integer;
  837. /**
  838. * Last line of the script.
  839. */
  840. endLine: integer;
  841. /**
  842. * Length of the last line of the script.
  843. */
  844. endColumn: integer;
  845. /**
  846. * Specifies script creation context.
  847. */
  848. executionContextId: Runtime.ExecutionContextId;
  849. /**
  850. * Content hash of the script.
  851. */
  852. hash: string;
  853. /**
  854. * Embedder-specific auxiliary data.
  855. */
  856. executionContextAuxData?: any;
  857. /**
  858. * True, if this script is generated as a result of the live edit operation.
  859. */
  860. isLiveEdit?: boolean;
  861. /**
  862. * URL of source map associated with script (if any).
  863. */
  864. sourceMapURL?: string;
  865. /**
  866. * True, if this script has sourceURL.
  867. */
  868. hasSourceURL?: boolean;
  869. /**
  870. * True, if this script is ES6 module.
  871. */
  872. isModule?: boolean;
  873. /**
  874. * This script length.
  875. */
  876. length?: integer;
  877. /**
  878. * JavaScript top stack frame of where the script parsed event was triggered if available.
  879. */
  880. stackTrace?: Runtime.StackTrace;
  881. /**
  882. * If the scriptLanguage is WebAssembly, the code section offset in the module.
  883. */
  884. codeOffset?: integer;
  885. /**
  886. * The language of the script.
  887. */
  888. scriptLanguage?: Debugger.ScriptLanguage;
  889. /**
  890. * If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
  891. */
  892. debugSymbols?: Debugger.DebugSymbols;
  893. /**
  894. * The name the embedder supplied for this script.
  895. */
  896. embedderName?: string;
  897. }
  898. }
  899. export namespace HeapProfiler {
  900. /**
  901. * Heap snapshot object id.
  902. */
  903. export type HeapSnapshotObjectId = string;
  904. /**
  905. * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
  906. */
  907. export interface SamplingHeapProfileNode {
  908. /**
  909. * Function location.
  910. */
  911. callFrame: Runtime.CallFrame;
  912. /**
  913. * Allocations size in bytes for the node excluding children.
  914. */
  915. selfSize: number;
  916. /**
  917. * Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
  918. */
  919. id: integer;
  920. /**
  921. * Child nodes.
  922. */
  923. children: SamplingHeapProfileNode[];
  924. }
  925. /**
  926. * A single sample from a sampling profile.
  927. */
  928. export interface SamplingHeapProfileSample {
  929. /**
  930. * Allocation size in bytes attributed to the sample.
  931. */
  932. size: number;
  933. /**
  934. * Id of the corresponding profile tree node.
  935. */
  936. nodeId: integer;
  937. /**
  938. * Time-ordered sample ordinal number. It is unique across all profiles retrieved
  939. * between startSampling and stopSampling.
  940. */
  941. ordinal: number;
  942. }
  943. /**
  944. * Sampling profile.
  945. */
  946. export interface SamplingHeapProfile {
  947. head: SamplingHeapProfileNode;
  948. samples: SamplingHeapProfileSample[];
  949. }
  950. export interface AddInspectedHeapObjectRequest {
  951. /**
  952. * Heap snapshot object id to be accessible by means of $x command line API.
  953. */
  954. heapObjectId: HeapSnapshotObjectId;
  955. }
  956. export interface GetHeapObjectIdRequest {
  957. /**
  958. * Identifier of the object to get heap object id for.
  959. */
  960. objectId: Runtime.RemoteObjectId;
  961. }
  962. export interface GetHeapObjectIdResponse {
  963. /**
  964. * Id of the heap snapshot object corresponding to the passed remote object id.
  965. */
  966. heapSnapshotObjectId: HeapSnapshotObjectId;
  967. }
  968. export interface GetObjectByHeapObjectIdRequest {
  969. objectId: HeapSnapshotObjectId;
  970. /**
  971. * Symbolic group name that can be used to release multiple objects.
  972. */
  973. objectGroup?: string;
  974. }
  975. export interface GetObjectByHeapObjectIdResponse {
  976. /**
  977. * Evaluation result.
  978. */
  979. result: Runtime.RemoteObject;
  980. }
  981. export interface GetSamplingProfileResponse {
  982. /**
  983. * Return the sampling profile being collected.
  984. */
  985. profile: SamplingHeapProfile;
  986. }
  987. export interface StartSamplingRequest {
  988. /**
  989. * Average sample interval in bytes. Poisson distribution is used for the intervals. The
  990. * default value is 32768 bytes.
  991. */
  992. samplingInterval?: number;
  993. }
  994. export interface StartTrackingHeapObjectsRequest {
  995. trackAllocations?: boolean;
  996. }
  997. export interface StopSamplingResponse {
  998. /**
  999. * Recorded sampling heap profile.
  1000. */
  1001. profile: SamplingHeapProfile;
  1002. }
  1003. export interface StopTrackingHeapObjectsRequest {
  1004. /**
  1005. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
  1006. * when the tracking is stopped.
  1007. */
  1008. reportProgress?: boolean;
  1009. treatGlobalObjectsAsRoots?: boolean;
  1010. }
  1011. export interface TakeHeapSnapshotRequest {
  1012. /**
  1013. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
  1014. */
  1015. reportProgress?: boolean;
  1016. /**
  1017. * If true, a raw snapshot without artifical roots will be generated
  1018. */
  1019. treatGlobalObjectsAsRoots?: boolean;
  1020. }
  1021. export interface AddHeapSnapshotChunkEvent {
  1022. chunk: string;
  1023. }
  1024. /**
  1025. * If heap objects tracking has been started then backend may send update for one or more fragments
  1026. */
  1027. export interface HeapStatsUpdateEvent {
  1028. /**
  1029. * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
  1030. * index, the second integer is a total count of objects for the fragment, the third integer is
  1031. * a total size of the objects for the fragment.
  1032. */
  1033. statsUpdate: integer[];
  1034. }
  1035. /**
  1036. * If heap objects tracking has been started then backend regularly sends a current value for last
  1037. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  1038. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  1039. */
  1040. export interface LastSeenObjectIdEvent {
  1041. lastSeenObjectId: integer;
  1042. timestamp: number;
  1043. }
  1044. export interface ReportHeapSnapshotProgressEvent {
  1045. done: integer;
  1046. total: integer;
  1047. finished?: boolean;
  1048. }
  1049. }
  1050. export namespace Profiler {
  1051. /**
  1052. * Profile node. Holds callsite information, execution statistics and child nodes.
  1053. */
  1054. export interface ProfileNode {
  1055. /**
  1056. * Unique id of the node.
  1057. */
  1058. id: integer;
  1059. /**
  1060. * Function location.
  1061. */
  1062. callFrame: Runtime.CallFrame;
  1063. /**
  1064. * Number of samples where this node was on top of the call stack.
  1065. */
  1066. hitCount?: integer;
  1067. /**
  1068. * Child node ids.
  1069. */
  1070. children?: integer[];
  1071. /**
  1072. * The reason of being not optimized. The function may be deoptimized or marked as don't
  1073. * optimize.
  1074. */
  1075. deoptReason?: string;
  1076. /**
  1077. * An array of source position ticks.
  1078. */
  1079. positionTicks?: PositionTickInfo[];
  1080. }
  1081. /**
  1082. * Profile.
  1083. */
  1084. export interface Profile {
  1085. /**
  1086. * The list of profile nodes. First item is the root node.
  1087. */
  1088. nodes: ProfileNode[];
  1089. /**
  1090. * Profiling start timestamp in microseconds.
  1091. */
  1092. startTime: number;
  1093. /**
  1094. * Profiling end timestamp in microseconds.
  1095. */
  1096. endTime: number;
  1097. /**
  1098. * Ids of samples top nodes.
  1099. */
  1100. samples?: integer[];
  1101. /**
  1102. * Time intervals between adjacent samples in microseconds. The first delta is relative to the
  1103. * profile startTime.
  1104. */
  1105. timeDeltas?: integer[];
  1106. }
  1107. /**
  1108. * Specifies a number of samples attributed to a certain source position.
  1109. */
  1110. export interface PositionTickInfo {
  1111. /**
  1112. * Source line number (1-based).
  1113. */
  1114. line: integer;
  1115. /**
  1116. * Number of samples attributed to the source line.
  1117. */
  1118. ticks: integer;
  1119. }
  1120. /**
  1121. * Coverage data for a source range.
  1122. */
  1123. export interface CoverageRange {
  1124. /**
  1125. * JavaScript script source offset for the range start.
  1126. */
  1127. startOffset: integer;
  1128. /**
  1129. * JavaScript script source offset for the range end.
  1130. */
  1131. endOffset: integer;
  1132. /**
  1133. * Collected execution count of the source range.
  1134. */
  1135. count: integer;
  1136. }
  1137. /**
  1138. * Coverage data for a JavaScript function.
  1139. */
  1140. export interface FunctionCoverage {
  1141. /**
  1142. * JavaScript function name.
  1143. */
  1144. functionName: string;
  1145. /**
  1146. * Source ranges inside the function with coverage data.
  1147. */
  1148. ranges: CoverageRange[];
  1149. /**
  1150. * Whether coverage data for this function has block granularity.
  1151. */
  1152. isBlockCoverage: boolean;
  1153. }
  1154. /**
  1155. * Coverage data for a JavaScript script.
  1156. */
  1157. export interface ScriptCoverage {
  1158. /**
  1159. * JavaScript script id.
  1160. */
  1161. scriptId: Runtime.ScriptId;
  1162. /**
  1163. * JavaScript script name or url.
  1164. */
  1165. url: string;
  1166. /**
  1167. * Functions contained in the script that has coverage data.
  1168. */
  1169. functions: FunctionCoverage[];
  1170. }
  1171. /**
  1172. * Describes a type collected during runtime.
  1173. */
  1174. export interface TypeObject {
  1175. /**
  1176. * Name of a type collected with type profiling.
  1177. */
  1178. name: string;
  1179. }
  1180. /**
  1181. * Source offset and types for a parameter or return value.
  1182. */
  1183. export interface TypeProfileEntry {
  1184. /**
  1185. * Source offset of the parameter or end of function for return values.
  1186. */
  1187. offset: integer;
  1188. /**
  1189. * The types for this parameter or return value.
  1190. */
  1191. types: TypeObject[];
  1192. }
  1193. /**
  1194. * Type profile data collected during runtime for a JavaScript script.
  1195. */
  1196. export interface ScriptTypeProfile {
  1197. /**
  1198. * JavaScript script id.
  1199. */
  1200. scriptId: Runtime.ScriptId;
  1201. /**
  1202. * JavaScript script name or url.
  1203. */
  1204. url: string;
  1205. /**
  1206. * Type profile entries for parameters and return values of the functions in the script.
  1207. */
  1208. entries: TypeProfileEntry[];
  1209. }
  1210. /**
  1211. * Collected counter information.
  1212. */
  1213. export interface CounterInfo {
  1214. /**
  1215. * Counter name.
  1216. */
  1217. name: string;
  1218. /**
  1219. * Counter value.
  1220. */
  1221. value: integer;
  1222. }
  1223. /**
  1224. * Runtime call counter information.
  1225. */
  1226. export interface RuntimeCallCounterInfo {
  1227. /**
  1228. * Counter name.
  1229. */
  1230. name: string;
  1231. /**
  1232. * Counter value.
  1233. */
  1234. value: number;
  1235. /**
  1236. * Counter time in seconds.
  1237. */
  1238. time: number;
  1239. }
  1240. export interface GetBestEffortCoverageResponse {
  1241. /**
  1242. * Coverage data for the current isolate.
  1243. */
  1244. result: ScriptCoverage[];
  1245. }
  1246. export interface SetSamplingIntervalRequest {
  1247. /**
  1248. * New sampling interval in microseconds.
  1249. */
  1250. interval: integer;
  1251. }
  1252. export interface StartPreciseCoverageRequest {
  1253. /**
  1254. * Collect accurate call counts beyond simple 'covered' or 'not covered'.
  1255. */
  1256. callCount?: boolean;
  1257. /**
  1258. * Collect block-based coverage.
  1259. */
  1260. detailed?: boolean;
  1261. /**
  1262. * Allow the backend to send updates on its own initiative
  1263. */
  1264. allowTriggeredUpdates?: boolean;
  1265. }
  1266. export interface StartPreciseCoverageResponse {
  1267. /**
  1268. * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  1269. */
  1270. timestamp: number;
  1271. }
  1272. export interface StopResponse {
  1273. /**
  1274. * Recorded profile.
  1275. */
  1276. profile: Profile;
  1277. }
  1278. export interface TakePreciseCoverageResponse {
  1279. /**
  1280. * Coverage data for the current isolate.
  1281. */
  1282. result: ScriptCoverage[];
  1283. /**
  1284. * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  1285. */
  1286. timestamp: number;
  1287. }
  1288. export interface TakeTypeProfileResponse {
  1289. /**
  1290. * Type profile for all scripts since startTypeProfile() was turned on.
  1291. */
  1292. result: ScriptTypeProfile[];
  1293. }
  1294. export interface GetCountersResponse {
  1295. /**
  1296. * Collected counters information.
  1297. */
  1298. result: CounterInfo[];
  1299. }
  1300. export interface GetRuntimeCallStatsResponse {
  1301. /**
  1302. * Collected runtime call counter information.
  1303. */
  1304. result: RuntimeCallCounterInfo[];
  1305. }
  1306. export interface ConsoleProfileFinishedEvent {
  1307. id: string;
  1308. /**
  1309. * Location of console.profileEnd().
  1310. */
  1311. location: Debugger.Location;
  1312. profile: Profile;
  1313. /**
  1314. * Profile title passed as an argument to console.profile().
  1315. */
  1316. title?: string;
  1317. }
  1318. /**
  1319. * Sent when new profile recording is started using console.profile() call.
  1320. */
  1321. export interface ConsoleProfileStartedEvent {
  1322. id: string;
  1323. /**
  1324. * Location of console.profile().
  1325. */
  1326. location: Debugger.Location;
  1327. /**
  1328. * Profile title passed as an argument to console.profile().
  1329. */
  1330. title?: string;
  1331. }
  1332. /**
  1333. * Reports coverage delta since the last poll (either from an event like this, or from
  1334. * `takePreciseCoverage` for the current isolate. May only be sent if precise code
  1335. * coverage has been started. This event can be trigged by the embedder to, for example,
  1336. * trigger collection of coverage data immediatelly at a certain point in time.
  1337. */
  1338. export interface PreciseCoverageDeltaUpdateEvent {
  1339. /**
  1340. * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  1341. */
  1342. timestamp: number;
  1343. /**
  1344. * Identifier for distinguishing coverage events.
  1345. */
  1346. occassion: string;
  1347. /**
  1348. * Coverage data for the current isolate.
  1349. */
  1350. result: ScriptCoverage[];
  1351. }
  1352. }
  1353. /**
  1354. * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
  1355. * Evaluation results are returned as mirror object that expose object type, string representation
  1356. * and unique identifier that can be used for further object reference. Original objects are
  1357. * maintained in memory unless they are either explicitly released or are released along with the
  1358. * other objects in their object group.
  1359. */
  1360. export namespace Runtime {
  1361. /**
  1362. * Unique script identifier.
  1363. */
  1364. export type ScriptId = string;
  1365. /**
  1366. * Unique object identifier.
  1367. */
  1368. export type RemoteObjectId = string;
  1369. /**
  1370. * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
  1371. * `-Infinity`, and bigint literals.
  1372. */
  1373. export type UnserializableValue = string;
  1374. export const enum RemoteObjectType {
  1375. Object = 'object',
  1376. Function = 'function',
  1377. Undefined = 'undefined',
  1378. String = 'string',
  1379. Number = 'number',
  1380. Boolean = 'boolean',
  1381. Symbol = 'symbol',
  1382. Bigint = 'bigint',
  1383. Wasm = 'wasm',
  1384. }
  1385. export const enum RemoteObjectSubtype {
  1386. Array = 'array',
  1387. Null = 'null',
  1388. Node = 'node',
  1389. Regexp = 'regexp',
  1390. Date = 'date',
  1391. Map = 'map',
  1392. Set = 'set',
  1393. Weakmap = 'weakmap',
  1394. Weakset = 'weakset',
  1395. Iterator = 'iterator',
  1396. Generator = 'generator',
  1397. Error = 'error',
  1398. Proxy = 'proxy',
  1399. Promise = 'promise',
  1400. Typedarray = 'typedarray',
  1401. Arraybuffer = 'arraybuffer',
  1402. Dataview = 'dataview',
  1403. I32 = 'i32',
  1404. I64 = 'i64',
  1405. F32 = 'f32',
  1406. F64 = 'f64',
  1407. V128 = 'v128',
  1408. Externref = 'externref',
  1409. }
  1410. /**
  1411. * Mirror object referencing original JavaScript object.
  1412. */
  1413. export interface RemoteObject {
  1414. /**
  1415. * Object type. (RemoteObjectType enum)
  1416. */
  1417. type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint' | 'wasm');
  1418. /**
  1419. * Object subtype hint. Specified for `object` or `wasm` type values only. (RemoteObjectSubtype enum)
  1420. */
  1421. subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'dataview' | 'i32' | 'i64' | 'f32' | 'f64' | 'v128' | 'externref');
  1422. /**
  1423. * Object class (constructor) name. Specified for `object` type values only.
  1424. */
  1425. className?: string;
  1426. /**
  1427. * Remote object value in case of primitive values or JSON values (if it was requested).
  1428. */
  1429. value?: any;
  1430. /**
  1431. * Primitive value which can not be JSON-stringified does not have `value`, but gets this
  1432. * property.
  1433. */
  1434. unserializableValue?: UnserializableValue;
  1435. /**
  1436. * String representation of the object.
  1437. */
  1438. description?: string;
  1439. /**
  1440. * Unique object identifier (for non-primitive values).
  1441. */
  1442. objectId?: RemoteObjectId;
  1443. /**
  1444. * Preview containing abbreviated property values. Specified for `object` type values only.
  1445. */
  1446. preview?: ObjectPreview;
  1447. customPreview?: CustomPreview;
  1448. }
  1449. export interface CustomPreview {
  1450. /**
  1451. * The JSON-stringified result of formatter.header(object, config) call.
  1452. * It contains json ML array that represents RemoteObject.
  1453. */
  1454. header: string;
  1455. /**
  1456. * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
  1457. * contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
  1458. * The result value is json ML array.
  1459. */
  1460. bodyGetterId?: RemoteObjectId;
  1461. }
  1462. export const enum ObjectPreviewType {
  1463. Object = 'object',
  1464. Function = 'function',
  1465. Undefined = 'undefined',
  1466. String = 'string',
  1467. Number = 'number',
  1468. Boolean = 'boolean',
  1469. Symbol = 'symbol',
  1470. Bigint = 'bigint',
  1471. }
  1472. export const enum ObjectPreviewSubtype {
  1473. Array = 'array',
  1474. Null = 'null',
  1475. Node = 'node',
  1476. Regexp = 'regexp',
  1477. Date = 'date',
  1478. Map = 'map',
  1479. Set = 'set',
  1480. Weakmap = 'weakmap',
  1481. Weakset = 'weakset',
  1482. Iterator = 'iterator',
  1483. Generator = 'generator',
  1484. Error = 'error',
  1485. }
  1486. /**
  1487. * Object containing abbreviated remote object value.
  1488. */
  1489. export interface ObjectPreview {
  1490. /**
  1491. * Object type. (ObjectPreviewType enum)
  1492. */
  1493. type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint');
  1494. /**
  1495. * Object subtype hint. Specified for `object` type values only. (ObjectPreviewSubtype enum)
  1496. */
  1497. subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error');
  1498. /**
  1499. * String representation of the object.
  1500. */
  1501. description?: string;
  1502. /**
  1503. * True iff some of the properties or entries of the original object did not fit.
  1504. */
  1505. overflow: boolean;
  1506. /**
  1507. * List of the properties.
  1508. */
  1509. properties: PropertyPreview[];
  1510. /**
  1511. * List of the entries. Specified for `map` and `set` subtype values only.
  1512. */
  1513. entries?: EntryPreview[];
  1514. }
  1515. export const enum PropertyPreviewType {
  1516. Object = 'object',
  1517. Function = 'function',
  1518. Undefined = 'undefined',
  1519. String = 'string',
  1520. Number = 'number',
  1521. Boolean = 'boolean',
  1522. Symbol = 'symbol',
  1523. Accessor = 'accessor',
  1524. Bigint = 'bigint',
  1525. }
  1526. export const enum PropertyPreviewSubtype {
  1527. Array = 'array',
  1528. Null = 'null',
  1529. Node = 'node',
  1530. Regexp = 'regexp',
  1531. Date = 'date',
  1532. Map = 'map',
  1533. Set = 'set',
  1534. Weakmap = 'weakmap',
  1535. Weakset = 'weakset',
  1536. Iterator = 'iterator',
  1537. Generator = 'generator',
  1538. Error = 'error',
  1539. }
  1540. export interface PropertyPreview {
  1541. /**
  1542. * Property name.
  1543. */
  1544. name: string;
  1545. /**
  1546. * Object type. Accessor means that the property itself is an accessor property. (PropertyPreviewType enum)
  1547. */
  1548. type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'accessor' | 'bigint');
  1549. /**
  1550. * User-friendly property value string.
  1551. */
  1552. value?: string;
  1553. /**
  1554. * Nested value preview.
  1555. */
  1556. valuePreview?: ObjectPreview;
  1557. /**
  1558. * Object subtype hint. Specified for `object` type values only. (PropertyPreviewSubtype enum)
  1559. */
  1560. subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error');
  1561. }
  1562. export interface EntryPreview {
  1563. /**
  1564. * Preview of the key. Specified for map-like collection entries.
  1565. */
  1566. key?: ObjectPreview;
  1567. /**
  1568. * Preview of the value.
  1569. */
  1570. value: ObjectPreview;
  1571. }
  1572. /**
  1573. * Object property descriptor.
  1574. */
  1575. export interface PropertyDescriptor {
  1576. /**
  1577. * Property name or symbol description.
  1578. */
  1579. name: string;
  1580. /**
  1581. * The value associated with the property.
  1582. */
  1583. value?: RemoteObject;
  1584. /**
  1585. * True if the value associated with the property may be changed (data descriptors only).
  1586. */
  1587. writable?: boolean;
  1588. /**
  1589. * A function which serves as a getter for the property, or `undefined` if there is no getter
  1590. * (accessor descriptors only).
  1591. */
  1592. get?: RemoteObject;
  1593. /**
  1594. * A function which serves as a setter for the property, or `undefined` if there is no setter
  1595. * (accessor descriptors only).
  1596. */
  1597. set?: RemoteObject;
  1598. /**
  1599. * True if the type of this property descriptor may be changed and if the property may be
  1600. * deleted from the corresponding object.
  1601. */
  1602. configurable: boolean;
  1603. /**
  1604. * True if this property shows up during enumeration of the properties on the corresponding
  1605. * object.
  1606. */
  1607. enumerable: boolean;
  1608. /**
  1609. * True if the result was thrown during the evaluation.
  1610. */
  1611. wasThrown?: boolean;
  1612. /**
  1613. * True if the property is owned for the object.
  1614. */
  1615. isOwn?: boolean;
  1616. /**
  1617. * Property symbol object, if the property is of the `symbol` type.
  1618. */
  1619. symbol?: RemoteObject;
  1620. }
  1621. /**
  1622. * Object internal property descriptor. This property isn't normally visible in JavaScript code.
  1623. */
  1624. export interface InternalPropertyDescriptor {
  1625. /**
  1626. * Conventional property name.
  1627. */
  1628. name: string;
  1629. /**
  1630. * The value associated with the property.
  1631. */
  1632. value?: RemoteObject;
  1633. }
  1634. /**
  1635. * Object private field descriptor.
  1636. */
  1637. export interface PrivatePropertyDescriptor {
  1638. /**
  1639. * Private property name.
  1640. */
  1641. name: string;
  1642. /**
  1643. * The value associated with the private property.
  1644. */
  1645. value?: RemoteObject;
  1646. /**
  1647. * A function which serves as a getter for the private property,
  1648. * or `undefined` if there is no getter (accessor descriptors only).
  1649. */
  1650. get?: RemoteObject;
  1651. /**
  1652. * A function which serves as a setter for the private property,
  1653. * or `undefined` if there is no setter (accessor descriptors only).
  1654. */
  1655. set?: RemoteObject;
  1656. }
  1657. /**
  1658. * Represents function call argument. Either remote object id `objectId`, primitive `value`,
  1659. * unserializable primitive value or neither of (for undefined) them should be specified.
  1660. */
  1661. export interface CallArgument {
  1662. /**
  1663. * Primitive value or serializable javascript object.
  1664. */
  1665. value?: any;
  1666. /**
  1667. * Primitive value which can not be JSON-stringified.
  1668. */
  1669. unserializableValue?: UnserializableValue;
  1670. /**
  1671. * Remote object handle.
  1672. */
  1673. objectId?: RemoteObjectId;
  1674. }
  1675. /**
  1676. * Id of an execution context.
  1677. */
  1678. export type ExecutionContextId = integer;
  1679. /**
  1680. * Description of an isolated world.
  1681. */
  1682. export interface ExecutionContextDescription {
  1683. /**
  1684. * Unique id of the execution context. It can be used to specify in which execution context
  1685. * script evaluation should be performed.
  1686. */
  1687. id: ExecutionContextId;
  1688. /**
  1689. * Execution context origin.
  1690. */
  1691. origin: string;
  1692. /**
  1693. * Human readable name describing given context.
  1694. */
  1695. name: string;
  1696. /**
  1697. * Embedder-specific auxiliary data.
  1698. */
  1699. auxData?: any;
  1700. }
  1701. /**
  1702. * Detailed information about exception (or error) that was thrown during script compilation or
  1703. * execution.
  1704. */
  1705. export interface ExceptionDetails {
  1706. /**
  1707. * Exception id.
  1708. */
  1709. exceptionId: integer;
  1710. /**
  1711. * Exception text, which should be used together with exception object when available.
  1712. */
  1713. text: string;
  1714. /**
  1715. * Line number of the exception location (0-based).
  1716. */
  1717. lineNumber: integer;
  1718. /**
  1719. * Column number of the exception location (0-based).
  1720. */
  1721. columnNumber: integer;
  1722. /**
  1723. * Script ID of the exception location.
  1724. */
  1725. scriptId?: ScriptId;
  1726. /**
  1727. * URL of the exception location, to be used when the script was not reported.
  1728. */
  1729. url?: string;
  1730. /**
  1731. * JavaScript stack trace if available.
  1732. */
  1733. stackTrace?: StackTrace;
  1734. /**
  1735. * Exception object if available.
  1736. */
  1737. exception?: RemoteObject;
  1738. /**
  1739. * Identifier of the context where exception happened.
  1740. */
  1741. executionContextId?: ExecutionContextId;
  1742. }
  1743. /**
  1744. * Number of milliseconds since epoch.
  1745. */
  1746. export type Timestamp = number;
  1747. /**
  1748. * Number of milliseconds.
  1749. */
  1750. export type TimeDelta = number;
  1751. /**
  1752. * Stack entry for runtime errors and assertions.
  1753. */
  1754. export interface CallFrame {
  1755. /**
  1756. * JavaScript function name.
  1757. */
  1758. functionName: string;
  1759. /**
  1760. * JavaScript script id.
  1761. */
  1762. scriptId: ScriptId;
  1763. /**
  1764. * JavaScript script name or url.
  1765. */
  1766. url: string;
  1767. /**
  1768. * JavaScript script line number (0-based).
  1769. */
  1770. lineNumber: integer;
  1771. /**
  1772. * JavaScript script column number (0-based).
  1773. */
  1774. columnNumber: integer;
  1775. }
  1776. /**
  1777. * Call frames for assertions or error messages.
  1778. */
  1779. export interface StackTrace {
  1780. /**
  1781. * String label of this stack trace. For async traces this may be a name of the function that
  1782. * initiated the async call.
  1783. */
  1784. description?: string;
  1785. /**
  1786. * JavaScript function name.
  1787. */
  1788. callFrames: CallFrame[];
  1789. /**
  1790. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  1791. */
  1792. parent?: StackTrace;
  1793. /**
  1794. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  1795. */
  1796. parentId?: StackTraceId;
  1797. }
  1798. /**
  1799. * Unique identifier of current debugger.
  1800. */
  1801. export type UniqueDebuggerId = string;
  1802. /**
  1803. * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
  1804. * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
  1805. */
  1806. export interface StackTraceId {
  1807. id: string;
  1808. debuggerId?: UniqueDebuggerId;
  1809. }
  1810. export interface AwaitPromiseRequest {
  1811. /**
  1812. * Identifier of the promise.
  1813. */
  1814. promiseObjectId: RemoteObjectId;
  1815. /**
  1816. * Whether the result is expected to be a JSON object that should be sent by value.
  1817. */
  1818. returnByValue?: boolean;
  1819. /**
  1820. * Whether preview should be generated for the result.
  1821. */
  1822. generatePreview?: boolean;
  1823. }
  1824. export interface AwaitPromiseResponse {
  1825. /**
  1826. * Promise result. Will contain rejected value if promise was rejected.
  1827. */
  1828. result: RemoteObject;
  1829. /**
  1830. * Exception details if stack strace is available.
  1831. */
  1832. exceptionDetails?: ExceptionDetails;
  1833. }
  1834. export interface CallFunctionOnRequest {
  1835. /**
  1836. * Declaration of the function to call.
  1837. */
  1838. functionDeclaration: string;
  1839. /**
  1840. * Identifier of the object to call function on. Either objectId or executionContextId should
  1841. * be specified.
  1842. */
  1843. objectId?: RemoteObjectId;
  1844. /**
  1845. * Call arguments. All call arguments must belong to the same JavaScript world as the target
  1846. * object.
  1847. */
  1848. arguments?: CallArgument[];
  1849. /**
  1850. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  1851. * execution. Overrides `setPauseOnException` state.
  1852. */
  1853. silent?: boolean;
  1854. /**
  1855. * Whether the result is expected to be a JSON object which should be sent by value.
  1856. */
  1857. returnByValue?: boolean;
  1858. /**
  1859. * Whether preview should be generated for the result.
  1860. */
  1861. generatePreview?: boolean;
  1862. /**
  1863. * Whether execution should be treated as initiated by user in the UI.
  1864. */
  1865. userGesture?: boolean;
  1866. /**
  1867. * Whether execution should `await` for resulting value and return once awaited promise is
  1868. * resolved.
  1869. */
  1870. awaitPromise?: boolean;
  1871. /**
  1872. * Specifies execution context which global object will be used to call function on. Either
  1873. * executionContextId or objectId should be specified.
  1874. */
  1875. executionContextId?: ExecutionContextId;
  1876. /**
  1877. * Symbolic group name that can be used to release multiple objects. If objectGroup is not
  1878. * specified and objectId is, objectGroup will be inherited from object.
  1879. */
  1880. objectGroup?: string;
  1881. }
  1882. export interface CallFunctionOnResponse {
  1883. /**
  1884. * Call result.
  1885. */
  1886. result: RemoteObject;
  1887. /**
  1888. * Exception details.
  1889. */
  1890. exceptionDetails?: ExceptionDetails;
  1891. }
  1892. export interface CompileScriptRequest {
  1893. /**
  1894. * Expression to compile.
  1895. */
  1896. expression: string;
  1897. /**
  1898. * Source url to be set for the script.
  1899. */
  1900. sourceURL: string;
  1901. /**
  1902. * Specifies whether the compiled script should be persisted.
  1903. */
  1904. persistScript: boolean;
  1905. /**
  1906. * Specifies in which execution context to perform script run. If the parameter is omitted the
  1907. * evaluation will be performed in the context of the inspected page.
  1908. */
  1909. executionContextId?: ExecutionContextId;
  1910. }
  1911. export interface CompileScriptResponse {
  1912. /**
  1913. * Id of the script.
  1914. */
  1915. scriptId?: ScriptId;
  1916. /**
  1917. * Exception details.
  1918. */
  1919. exceptionDetails?: ExceptionDetails;
  1920. }
  1921. export interface EvaluateRequest {
  1922. /**
  1923. * Expression to evaluate.
  1924. */
  1925. expression: string;
  1926. /**
  1927. * Symbolic group name that can be used to release multiple objects.
  1928. */
  1929. objectGroup?: string;
  1930. /**
  1931. * Determines whether Command Line API should be available during the evaluation.
  1932. */
  1933. includeCommandLineAPI?: boolean;
  1934. /**
  1935. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  1936. * execution. Overrides `setPauseOnException` state.
  1937. */
  1938. silent?: boolean;
  1939. /**
  1940. * Specifies in which execution context to perform evaluation. If the parameter is omitted the
  1941. * evaluation will be performed in the context of the inspected page.
  1942. */
  1943. contextId?: ExecutionContextId;
  1944. /**
  1945. * Whether the result is expected to be a JSON object that should be sent by value.
  1946. */
  1947. returnByValue?: boolean;
  1948. /**
  1949. * Whether preview should be generated for the result.
  1950. */
  1951. generatePreview?: boolean;
  1952. /**
  1953. * Whether execution should be treated as initiated by user in the UI.
  1954. */
  1955. userGesture?: boolean;
  1956. /**
  1957. * Whether execution should `await` for resulting value and return once awaited promise is
  1958. * resolved.
  1959. */
  1960. awaitPromise?: boolean;
  1961. /**
  1962. * Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1963. * This implies `disableBreaks` below.
  1964. */
  1965. throwOnSideEffect?: boolean;
  1966. /**
  1967. * Terminate execution after timing out (number of milliseconds).
  1968. */
  1969. timeout?: TimeDelta;
  1970. /**
  1971. * Disable breakpoints during execution.
  1972. */
  1973. disableBreaks?: boolean;
  1974. /**
  1975. * Setting this flag to true enables `let` re-declaration and top-level `await`.
  1976. * Note that `let` variables can only be re-declared if they originate from
  1977. * `replMode` themselves.
  1978. */
  1979. replMode?: boolean;
  1980. /**
  1981. * The Content Security Policy (CSP) for the target might block 'unsafe-eval'
  1982. * which includes eval(), Function(), setTimeout() and setInterval()
  1983. * when called with non-callable arguments. This flag bypasses CSP for this
  1984. * evaluation and allows unsafe-eval. Defaults to true.
  1985. */
  1986. allowUnsafeEvalBlockedByCSP?: boolean;
  1987. }
  1988. export interface EvaluateResponse {
  1989. /**
  1990. * Evaluation result.
  1991. */
  1992. result: RemoteObject;
  1993. /**
  1994. * Exception details.
  1995. */
  1996. exceptionDetails?: ExceptionDetails;
  1997. }
  1998. export interface GetIsolateIdResponse {
  1999. /**
  2000. * The isolate id.
  2001. */
  2002. id: string;
  2003. }
  2004. export interface GetHeapUsageResponse {
  2005. /**
  2006. * Used heap size in bytes.
  2007. */
  2008. usedSize: number;
  2009. /**
  2010. * Allocated heap size in bytes.
  2011. */
  2012. totalSize: number;
  2013. }
  2014. export interface GetPropertiesRequest {
  2015. /**
  2016. * Identifier of the object to return properties for.
  2017. */
  2018. objectId: RemoteObjectId;
  2019. /**
  2020. * If true, returns properties belonging only to the element itself, not to its prototype
  2021. * chain.
  2022. */
  2023. ownProperties?: boolean;
  2024. /**
  2025. * If true, returns accessor properties (with getter/setter) only; internal properties are not
  2026. * returned either.
  2027. */
  2028. accessorPropertiesOnly?: boolean;
  2029. /**
  2030. * Whether preview should be generated for the results.
  2031. */
  2032. generatePreview?: boolean;
  2033. }
  2034. export interface GetPropertiesResponse {
  2035. /**
  2036. * Object properties.
  2037. */
  2038. result: PropertyDescriptor[];
  2039. /**
  2040. * Internal object properties (only of the element itself).
  2041. */
  2042. internalProperties?: InternalPropertyDescriptor[];
  2043. /**
  2044. * Object private properties.
  2045. */
  2046. privateProperties?: PrivatePropertyDescriptor[];
  2047. /**
  2048. * Exception details.
  2049. */
  2050. exceptionDetails?: ExceptionDetails;
  2051. }
  2052. export interface GlobalLexicalScopeNamesRequest {
  2053. /**
  2054. * Specifies in which execution context to lookup global scope variables.
  2055. */
  2056. executionContextId?: ExecutionContextId;
  2057. }
  2058. export interface GlobalLexicalScopeNamesResponse {
  2059. names: string[];
  2060. }
  2061. export interface QueryObjectsRequest {
  2062. /**
  2063. * Identifier of the prototype to return objects for.
  2064. */
  2065. prototypeObjectId: RemoteObjectId;
  2066. /**
  2067. * Symbolic group name that can be used to release the results.
  2068. */
  2069. objectGroup?: string;
  2070. }
  2071. export interface QueryObjectsResponse {
  2072. /**
  2073. * Array with objects.
  2074. */
  2075. objects: RemoteObject;
  2076. }
  2077. export interface ReleaseObjectRequest {
  2078. /**
  2079. * Identifier of the object to release.
  2080. */
  2081. objectId: RemoteObjectId;
  2082. }
  2083. export interface ReleaseObjectGroupRequest {
  2084. /**
  2085. * Symbolic object group name.
  2086. */
  2087. objectGroup: string;
  2088. }
  2089. export interface RunScriptRequest {
  2090. /**
  2091. * Id of the script to run.
  2092. */
  2093. scriptId: ScriptId;
  2094. /**
  2095. * Specifies in which execution context to perform script run. If the parameter is omitted the
  2096. * evaluation will be performed in the context of the inspected page.
  2097. */
  2098. executionContextId?: ExecutionContextId;
  2099. /**
  2100. * Symbolic group name that can be used to release multiple objects.
  2101. */
  2102. objectGroup?: string;
  2103. /**
  2104. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  2105. * execution. Overrides `setPauseOnException` state.
  2106. */
  2107. silent?: boolean;
  2108. /**
  2109. * Determines whether Command Line API should be available during the evaluation.
  2110. */
  2111. includeCommandLineAPI?: boolean;
  2112. /**
  2113. * Whether the result is expected to be a JSON object which should be sent by value.
  2114. */
  2115. returnByValue?: boolean;
  2116. /**
  2117. * Whether preview should be generated for the result.
  2118. */
  2119. generatePreview?: boolean;
  2120. /**
  2121. * Whether execution should `await` for resulting value and return once awaited promise is
  2122. * resolved.
  2123. */
  2124. awaitPromise?: boolean;
  2125. }
  2126. export interface RunScriptResponse {
  2127. /**
  2128. * Run result.
  2129. */
  2130. result: RemoteObject;
  2131. /**
  2132. * Exception details.
  2133. */
  2134. exceptionDetails?: ExceptionDetails;
  2135. }
  2136. export interface SetAsyncCallStackDepthRequest {
  2137. /**
  2138. * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  2139. * call stacks (default).
  2140. */
  2141. maxDepth: integer;
  2142. }
  2143. export interface SetCustomObjectFormatterEnabledRequest {
  2144. enabled: boolean;
  2145. }
  2146. export interface SetMaxCallStackSizeToCaptureRequest {
  2147. size: integer;
  2148. }
  2149. export interface AddBindingRequest {
  2150. name: string;
  2151. executionContextId?: ExecutionContextId;
  2152. }
  2153. export interface RemoveBindingRequest {
  2154. name: string;
  2155. }
  2156. /**
  2157. * Notification is issued every time when binding is called.
  2158. */
  2159. export interface BindingCalledEvent {
  2160. name: string;
  2161. payload: string;
  2162. /**
  2163. * Identifier of the context where the call was made.
  2164. */
  2165. executionContextId: ExecutionContextId;
  2166. }
  2167. export const enum ConsoleAPICalledEventType {
  2168. Log = 'log',
  2169. Debug = 'debug',
  2170. Info = 'info',
  2171. Error = 'error',
  2172. Warning = 'warning',
  2173. Dir = 'dir',
  2174. DirXML = 'dirxml',
  2175. Table = 'table',
  2176. Trace = 'trace',
  2177. Clear = 'clear',
  2178. StartGroup = 'startGroup',
  2179. StartGroupCollapsed = 'startGroupCollapsed',
  2180. EndGroup = 'endGroup',
  2181. Assert = 'assert',
  2182. Profile = 'profile',
  2183. ProfileEnd = 'profileEnd',
  2184. Count = 'count',
  2185. TimeEnd = 'timeEnd',
  2186. }
  2187. /**
  2188. * Issued when console API was called.
  2189. */
  2190. export interface ConsoleAPICalledEvent {
  2191. /**
  2192. * Type of the call. (ConsoleAPICalledEventType enum)
  2193. */
  2194. type: ('log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd');
  2195. /**
  2196. * Call arguments.
  2197. */
  2198. args: RemoteObject[];
  2199. /**
  2200. * Identifier of the context where the call was made.
  2201. */
  2202. executionContextId: ExecutionContextId;
  2203. /**
  2204. * Call timestamp.
  2205. */
  2206. timestamp: Timestamp;
  2207. /**
  2208. * Stack trace captured when the call was made. The async stack chain is automatically reported for
  2209. * the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
  2210. * chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
  2211. */
  2212. stackTrace?: StackTrace;
  2213. /**
  2214. * Console context descriptor for calls on non-default console context (not console.*):
  2215. * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
  2216. * on named context.
  2217. */
  2218. context?: string;
  2219. }
  2220. /**
  2221. * Issued when unhandled exception was revoked.
  2222. */
  2223. export interface ExceptionRevokedEvent {
  2224. /**
  2225. * Reason describing why exception was revoked.
  2226. */
  2227. reason: string;
  2228. /**
  2229. * The id of revoked exception, as reported in `exceptionThrown`.
  2230. */
  2231. exceptionId: integer;
  2232. }
  2233. /**
  2234. * Issued when exception was thrown and unhandled.
  2235. */
  2236. export interface ExceptionThrownEvent {
  2237. /**
  2238. * Timestamp of the exception.
  2239. */
  2240. timestamp: Timestamp;
  2241. exceptionDetails: ExceptionDetails;
  2242. }
  2243. /**
  2244. * Issued when new execution context is created.
  2245. */
  2246. export interface ExecutionContextCreatedEvent {
  2247. /**
  2248. * A newly created execution context.
  2249. */
  2250. context: ExecutionContextDescription;
  2251. }
  2252. /**
  2253. * Issued when execution context is destroyed.
  2254. */
  2255. export interface ExecutionContextDestroyedEvent {
  2256. /**
  2257. * Id of the destroyed context
  2258. */
  2259. executionContextId: ExecutionContextId;
  2260. }
  2261. /**
  2262. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2263. * call).
  2264. */
  2265. export interface InspectRequestedEvent {
  2266. object: RemoteObject;
  2267. hints: any;
  2268. }
  2269. }
  2270. /**
  2271. * This domain is deprecated.
  2272. */
  2273. export namespace Schema {
  2274. /**
  2275. * Description of the protocol domain.
  2276. */
  2277. export interface Domain {
  2278. /**
  2279. * Domain name.
  2280. */
  2281. name: string;
  2282. /**
  2283. * Domain version.
  2284. */
  2285. version: string;
  2286. }
  2287. export interface GetDomainsResponse {
  2288. /**
  2289. * List of supported domains.
  2290. */
  2291. domains: Domain[];
  2292. }
  2293. }
  2294. export namespace Accessibility {
  2295. /**
  2296. * Unique accessibility node identifier.
  2297. */
  2298. export type AXNodeId = string;
  2299. /**
  2300. * Enum of possible property types.
  2301. */
  2302. export type AXValueType = ('boolean' | 'tristate' | 'booleanOrUndefined' | 'idref' | 'idrefList' | 'integer' | 'node' | 'nodeList' | 'number' | 'string' | 'computedString' | 'token' | 'tokenList' | 'domRelation' | 'role' | 'internalRole' | 'valueUndefined');
  2303. /**
  2304. * Enum of possible property sources.
  2305. */
  2306. export type AXValueSourceType = ('attribute' | 'implicit' | 'style' | 'contents' | 'placeholder' | 'relatedElement');
  2307. /**
  2308. * Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
  2309. */
  2310. export type AXValueNativeSourceType = ('figcaption' | 'label' | 'labelfor' | 'labelwrapped' | 'legend' | 'tablecaption' | 'title' | 'other');
  2311. /**
  2312. * A single source for a computed AX property.
  2313. */
  2314. export interface AXValueSource {
  2315. /**
  2316. * What type of source this is.
  2317. */
  2318. type: AXValueSourceType;
  2319. /**
  2320. * The value of this property source.
  2321. */
  2322. value?: AXValue;
  2323. /**
  2324. * The name of the relevant attribute, if any.
  2325. */
  2326. attribute?: string;
  2327. /**
  2328. * The value of the relevant attribute, if any.
  2329. */
  2330. attributeValue?: AXValue;
  2331. /**
  2332. * Whether this source is superseded by a higher priority source.
  2333. */
  2334. superseded?: boolean;
  2335. /**
  2336. * The native markup source for this value, e.g. a <label> element.
  2337. */
  2338. nativeSource?: AXValueNativeSourceType;
  2339. /**
  2340. * The value, such as a node or node list, of the native source.
  2341. */
  2342. nativeSourceValue?: AXValue;
  2343. /**
  2344. * Whether the value for this property is invalid.
  2345. */
  2346. invalid?: boolean;
  2347. /**
  2348. * Reason for the value being invalid, if it is.
  2349. */
  2350. invalidReason?: string;
  2351. }
  2352. export interface AXRelatedNode {
  2353. /**
  2354. * The BackendNodeId of the related DOM node.
  2355. */
  2356. backendDOMNodeId: DOM.BackendNodeId;
  2357. /**
  2358. * The IDRef value provided, if any.
  2359. */
  2360. idref?: string;
  2361. /**
  2362. * The text alternative of this node in the current context.
  2363. */
  2364. text?: string;
  2365. }
  2366. export interface AXProperty {
  2367. /**
  2368. * The name of this property.
  2369. */
  2370. name: AXPropertyName;
  2371. /**
  2372. * The value of this property.
  2373. */
  2374. value: AXValue;
  2375. }
  2376. /**
  2377. * A single computed AX property.
  2378. */
  2379. export interface AXValue {
  2380. /**
  2381. * The type of this value.
  2382. */
  2383. type: AXValueType;
  2384. /**
  2385. * The computed value of this property.
  2386. */
  2387. value?: any;
  2388. /**
  2389. * One or more related nodes, if applicable.
  2390. */
  2391. relatedNodes?: AXRelatedNode[];
  2392. /**
  2393. * The sources which contributed to the computation of this property.
  2394. */
  2395. sources?: AXValueSource[];
  2396. }
  2397. /**
  2398. * Values of AXProperty name:
  2399. * - from 'busy' to 'roledescription': states which apply to every AX node
  2400. * - from 'live' to 'root': attributes which apply to nodes in live regions
  2401. * - from 'autocomplete' to 'valuetext': attributes which apply to widgets
  2402. * - from 'checked' to 'selected': states which apply to widgets
  2403. * - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
  2404. */
  2405. export type AXPropertyName = ('busy' | 'disabled' | 'editable' | 'focusable' | 'focused' | 'hidden' | 'hiddenRoot' | 'invalid' | 'keyshortcuts' | 'settable' | 'roledescription' | 'live' | 'atomic' | 'relevant' | 'root' | 'autocomplete' | 'hasPopup' | 'level' | 'multiselectable' | 'orientation' | 'multiline' | 'readonly' | 'required' | 'valuemin' | 'valuemax' | 'valuetext' | 'checked' | 'expanded' | 'modal' | 'pressed' | 'selected' | 'activedescendant' | 'controls' | 'describedby' | 'details' | 'errormessage' | 'flowto' | 'labelledby' | 'owns');
  2406. /**
  2407. * A node in the accessibility tree.
  2408. */
  2409. export interface AXNode {
  2410. /**
  2411. * Unique identifier for this node.
  2412. */
  2413. nodeId: AXNodeId;
  2414. /**
  2415. * Whether this node is ignored for accessibility
  2416. */
  2417. ignored: boolean;
  2418. /**
  2419. * Collection of reasons why this node is hidden.
  2420. */
  2421. ignoredReasons?: AXProperty[];
  2422. /**
  2423. * This `Node`'s role, whether explicit or implicit.
  2424. */
  2425. role?: AXValue;
  2426. /**
  2427. * The accessible name for this `Node`.
  2428. */
  2429. name?: AXValue;
  2430. /**
  2431. * The accessible description for this `Node`.
  2432. */
  2433. description?: AXValue;
  2434. /**
  2435. * The value for this `Node`.
  2436. */
  2437. value?: AXValue;
  2438. /**
  2439. * All other properties
  2440. */
  2441. properties?: AXProperty[];
  2442. /**
  2443. * IDs for each of this node's child nodes.
  2444. */
  2445. childIds?: AXNodeId[];
  2446. /**
  2447. * The backend ID for the associated DOM node, if any.
  2448. */
  2449. backendDOMNodeId?: DOM.BackendNodeId;
  2450. }
  2451. export interface GetPartialAXTreeRequest {
  2452. /**
  2453. * Identifier of the node to get the partial accessibility tree for.
  2454. */
  2455. nodeId?: DOM.NodeId;
  2456. /**
  2457. * Identifier of the backend node to get the partial accessibility tree for.
  2458. */
  2459. backendNodeId?: DOM.BackendNodeId;
  2460. /**
  2461. * JavaScript object id of the node wrapper to get the partial accessibility tree for.
  2462. */
  2463. objectId?: Runtime.RemoteObjectId;
  2464. /**
  2465. * Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
  2466. */
  2467. fetchRelatives?: boolean;
  2468. }
  2469. export interface GetPartialAXTreeResponse {
  2470. /**
  2471. * The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
  2472. * children, if requested.
  2473. */
  2474. nodes: AXNode[];
  2475. }
  2476. export interface GetFullAXTreeResponse {
  2477. nodes: AXNode[];
  2478. }
  2479. export interface QueryAXTreeRequest {
  2480. /**
  2481. * Identifier of the node for the root to query.
  2482. */
  2483. nodeId?: DOM.NodeId;
  2484. /**
  2485. * Identifier of the backend node for the root to query.
  2486. */
  2487. backendNodeId?: DOM.BackendNodeId;
  2488. /**
  2489. * JavaScript object id of the node wrapper for the root to query.
  2490. */
  2491. objectId?: Runtime.RemoteObjectId;
  2492. /**
  2493. * Find nodes with this computed name.
  2494. */
  2495. accessibleName?: string;
  2496. /**
  2497. * Find nodes with this computed role.
  2498. */
  2499. role?: string;
  2500. }
  2501. export interface QueryAXTreeResponse {
  2502. /**
  2503. * A list of `Accessibility.AXNode` matching the specified attributes,
  2504. * including nodes that are ignored for accessibility.
  2505. */
  2506. nodes: AXNode[];
  2507. }
  2508. }
  2509. export namespace Animation {
  2510. export const enum AnimationType {
  2511. CSSTransition = 'CSSTransition',
  2512. CSSAnimation = 'CSSAnimation',
  2513. WebAnimation = 'WebAnimation',
  2514. }
  2515. /**
  2516. * Animation instance.
  2517. */
  2518. export interface Animation {
  2519. /**
  2520. * `Animation`'s id.
  2521. */
  2522. id: string;
  2523. /**
  2524. * `Animation`'s name.
  2525. */
  2526. name: string;
  2527. /**
  2528. * `Animation`'s internal paused state.
  2529. */
  2530. pausedState: boolean;
  2531. /**
  2532. * `Animation`'s play state.
  2533. */
  2534. playState: string;
  2535. /**
  2536. * `Animation`'s playback rate.
  2537. */
  2538. playbackRate: number;
  2539. /**
  2540. * `Animation`'s start time.
  2541. */
  2542. startTime: number;
  2543. /**
  2544. * `Animation`'s current time.
  2545. */
  2546. currentTime: number;
  2547. /**
  2548. * Animation type of `Animation`. (AnimationType enum)
  2549. */
  2550. type: ('CSSTransition' | 'CSSAnimation' | 'WebAnimation');
  2551. /**
  2552. * `Animation`'s source animation node.
  2553. */
  2554. source?: AnimationEffect;
  2555. /**
  2556. * A unique ID for `Animation` representing the sources that triggered this CSS
  2557. * animation/transition.
  2558. */
  2559. cssId?: string;
  2560. }
  2561. /**
  2562. * AnimationEffect instance
  2563. */
  2564. export interface AnimationEffect {
  2565. /**
  2566. * `AnimationEffect`'s delay.
  2567. */
  2568. delay: number;
  2569. /**
  2570. * `AnimationEffect`'s end delay.
  2571. */
  2572. endDelay: number;
  2573. /**
  2574. * `AnimationEffect`'s iteration start.
  2575. */
  2576. iterationStart: number;
  2577. /**
  2578. * `AnimationEffect`'s iterations.
  2579. */
  2580. iterations: number;
  2581. /**
  2582. * `AnimationEffect`'s iteration duration.
  2583. */
  2584. duration: number;
  2585. /**
  2586. * `AnimationEffect`'s playback direction.
  2587. */
  2588. direction: string;
  2589. /**
  2590. * `AnimationEffect`'s fill mode.
  2591. */
  2592. fill: string;
  2593. /**
  2594. * `AnimationEffect`'s target node.
  2595. */
  2596. backendNodeId?: DOM.BackendNodeId;
  2597. /**
  2598. * `AnimationEffect`'s keyframes.
  2599. */
  2600. keyframesRule?: KeyframesRule;
  2601. /**
  2602. * `AnimationEffect`'s timing function.
  2603. */
  2604. easing: string;
  2605. }
  2606. /**
  2607. * Keyframes Rule
  2608. */
  2609. export interface KeyframesRule {
  2610. /**
  2611. * CSS keyframed animation's name.
  2612. */
  2613. name?: string;
  2614. /**
  2615. * List of animation keyframes.
  2616. */
  2617. keyframes: KeyframeStyle[];
  2618. }
  2619. /**
  2620. * Keyframe Style
  2621. */
  2622. export interface KeyframeStyle {
  2623. /**
  2624. * Keyframe's time offset.
  2625. */
  2626. offset: string;
  2627. /**
  2628. * `AnimationEffect`'s timing function.
  2629. */
  2630. easing: string;
  2631. }
  2632. export interface GetCurrentTimeRequest {
  2633. /**
  2634. * Id of animation.
  2635. */
  2636. id: string;
  2637. }
  2638. export interface GetCurrentTimeResponse {
  2639. /**
  2640. * Current time of the page.
  2641. */
  2642. currentTime: number;
  2643. }
  2644. export interface GetPlaybackRateResponse {
  2645. /**
  2646. * Playback rate for animations on page.
  2647. */
  2648. playbackRate: number;
  2649. }
  2650. export interface ReleaseAnimationsRequest {
  2651. /**
  2652. * List of animation ids to seek.
  2653. */
  2654. animations: string[];
  2655. }
  2656. export interface ResolveAnimationRequest {
  2657. /**
  2658. * Animation id.
  2659. */
  2660. animationId: string;
  2661. }
  2662. export interface ResolveAnimationResponse {
  2663. /**
  2664. * Corresponding remote object.
  2665. */
  2666. remoteObject: Runtime.RemoteObject;
  2667. }
  2668. export interface SeekAnimationsRequest {
  2669. /**
  2670. * List of animation ids to seek.
  2671. */
  2672. animations: string[];
  2673. /**
  2674. * Set the current time of each animation.
  2675. */
  2676. currentTime: number;
  2677. }
  2678. export interface SetPausedRequest {
  2679. /**
  2680. * Animations to set the pause state of.
  2681. */
  2682. animations: string[];
  2683. /**
  2684. * Paused state to set to.
  2685. */
  2686. paused: boolean;
  2687. }
  2688. export interface SetPlaybackRateRequest {
  2689. /**
  2690. * Playback rate for animations on page
  2691. */
  2692. playbackRate: number;
  2693. }
  2694. export interface SetTimingRequest {
  2695. /**
  2696. * Animation id.
  2697. */
  2698. animationId: string;
  2699. /**
  2700. * Duration of the animation.
  2701. */
  2702. duration: number;
  2703. /**
  2704. * Delay of the animation.
  2705. */
  2706. delay: number;
  2707. }
  2708. /**
  2709. * Event for when an animation has been cancelled.
  2710. */
  2711. export interface AnimationCanceledEvent {
  2712. /**
  2713. * Id of the animation that was cancelled.
  2714. */
  2715. id: string;
  2716. }
  2717. /**
  2718. * Event for each animation that has been created.
  2719. */
  2720. export interface AnimationCreatedEvent {
  2721. /**
  2722. * Id of the animation that was created.
  2723. */
  2724. id: string;
  2725. }
  2726. /**
  2727. * Event for animation that has been started.
  2728. */
  2729. export interface AnimationStartedEvent {
  2730. /**
  2731. * Animation that was started.
  2732. */
  2733. animation: Animation;
  2734. }
  2735. }
  2736. export namespace ApplicationCache {
  2737. /**
  2738. * Detailed application cache resource information.
  2739. */
  2740. export interface ApplicationCacheResource {
  2741. /**
  2742. * Resource url.
  2743. */
  2744. url: string;
  2745. /**
  2746. * Resource size.
  2747. */
  2748. size: integer;
  2749. /**
  2750. * Resource type.
  2751. */
  2752. type: string;
  2753. }
  2754. /**
  2755. * Detailed application cache information.
  2756. */
  2757. export interface ApplicationCache {
  2758. /**
  2759. * Manifest URL.
  2760. */
  2761. manifestURL: string;
  2762. /**
  2763. * Application cache size.
  2764. */
  2765. size: number;
  2766. /**
  2767. * Application cache creation time.
  2768. */
  2769. creationTime: number;
  2770. /**
  2771. * Application cache update time.
  2772. */
  2773. updateTime: number;
  2774. /**
  2775. * Application cache resources.
  2776. */
  2777. resources: ApplicationCacheResource[];
  2778. }
  2779. /**
  2780. * Frame identifier - manifest URL pair.
  2781. */
  2782. export interface FrameWithManifest {
  2783. /**
  2784. * Frame identifier.
  2785. */
  2786. frameId: Page.FrameId;
  2787. /**
  2788. * Manifest URL.
  2789. */
  2790. manifestURL: string;
  2791. /**
  2792. * Application cache status.
  2793. */
  2794. status: integer;
  2795. }
  2796. export interface GetApplicationCacheForFrameRequest {
  2797. /**
  2798. * Identifier of the frame containing document whose application cache is retrieved.
  2799. */
  2800. frameId: Page.FrameId;
  2801. }
  2802. export interface GetApplicationCacheForFrameResponse {
  2803. /**
  2804. * Relevant application cache data for the document in given frame.
  2805. */
  2806. applicationCache: ApplicationCache;
  2807. }
  2808. export interface GetFramesWithManifestsResponse {
  2809. /**
  2810. * Array of frame identifiers with manifest urls for each frame containing a document
  2811. * associated with some application cache.
  2812. */
  2813. frameIds: FrameWithManifest[];
  2814. }
  2815. export interface GetManifestForFrameRequest {
  2816. /**
  2817. * Identifier of the frame containing document whose manifest is retrieved.
  2818. */
  2819. frameId: Page.FrameId;
  2820. }
  2821. export interface GetManifestForFrameResponse {
  2822. /**
  2823. * Manifest URL for document in the given frame.
  2824. */
  2825. manifestURL: string;
  2826. }
  2827. export interface ApplicationCacheStatusUpdatedEvent {
  2828. /**
  2829. * Identifier of the frame containing document whose application cache updated status.
  2830. */
  2831. frameId: Page.FrameId;
  2832. /**
  2833. * Manifest URL.
  2834. */
  2835. manifestURL: string;
  2836. /**
  2837. * Updated application cache status.
  2838. */
  2839. status: integer;
  2840. }
  2841. export interface NetworkStateUpdatedEvent {
  2842. isNowOnline: boolean;
  2843. }
  2844. }
  2845. /**
  2846. * Audits domain allows investigation of page violations and possible improvements.
  2847. */
  2848. export namespace Audits {
  2849. /**
  2850. * Information about a cookie that is affected by an inspector issue.
  2851. */
  2852. export interface AffectedCookie {
  2853. /**
  2854. * The following three properties uniquely identify a cookie
  2855. */
  2856. name: string;
  2857. path: string;
  2858. domain: string;
  2859. }
  2860. /**
  2861. * Information about a request that is affected by an inspector issue.
  2862. */
  2863. export interface AffectedRequest {
  2864. /**
  2865. * The unique request id.
  2866. */
  2867. requestId: Network.RequestId;
  2868. url?: string;
  2869. }
  2870. /**
  2871. * Information about the frame affected by an inspector issue.
  2872. */
  2873. export interface AffectedFrame {
  2874. frameId: Page.FrameId;
  2875. }
  2876. export type SameSiteCookieExclusionReason = ('ExcludeSameSiteUnspecifiedTreatedAsLax' | 'ExcludeSameSiteNoneInsecure' | 'ExcludeSameSiteLax' | 'ExcludeSameSiteStrict');
  2877. export type SameSiteCookieWarningReason = ('WarnSameSiteUnspecifiedCrossSiteContext' | 'WarnSameSiteNoneInsecure' | 'WarnSameSiteUnspecifiedLaxAllowUnsafe' | 'WarnSameSiteStrictLaxDowngradeStrict' | 'WarnSameSiteStrictCrossDowngradeStrict' | 'WarnSameSiteStrictCrossDowngradeLax' | 'WarnSameSiteLaxCrossDowngradeStrict' | 'WarnSameSiteLaxCrossDowngradeLax');
  2878. export type SameSiteCookieOperation = ('SetCookie' | 'ReadCookie');
  2879. /**
  2880. * This information is currently necessary, as the front-end has a difficult
  2881. * time finding a specific cookie. With this, we can convey specific error
  2882. * information without the cookie.
  2883. */
  2884. export interface SameSiteCookieIssueDetails {
  2885. cookie: AffectedCookie;
  2886. cookieWarningReasons: SameSiteCookieWarningReason[];
  2887. cookieExclusionReasons: SameSiteCookieExclusionReason[];
  2888. /**
  2889. * Optionally identifies the site-for-cookies and the cookie url, which
  2890. * may be used by the front-end as additional context.
  2891. */
  2892. operation: SameSiteCookieOperation;
  2893. siteForCookies?: string;
  2894. cookieUrl?: string;
  2895. request?: AffectedRequest;
  2896. }
  2897. export type MixedContentResolutionStatus = ('MixedContentBlocked' | 'MixedContentAutomaticallyUpgraded' | 'MixedContentWarning');
  2898. export type MixedContentResourceType = ('Audio' | 'Beacon' | 'CSPReport' | 'Download' | 'EventSource' | 'Favicon' | 'Font' | 'Form' | 'Frame' | 'Image' | 'Import' | 'Manifest' | 'Ping' | 'PluginData' | 'PluginResource' | 'Prefetch' | 'Resource' | 'Script' | 'ServiceWorker' | 'SharedWorker' | 'Stylesheet' | 'Track' | 'Video' | 'Worker' | 'XMLHttpRequest' | 'XSLT');
  2899. export interface MixedContentIssueDetails {
  2900. /**
  2901. * The type of resource causing the mixed content issue (css, js, iframe,
  2902. * form,...). Marked as optional because it is mapped to from
  2903. * blink::mojom::RequestContextType, which will be replaced
  2904. * by network::mojom::RequestDestination
  2905. */
  2906. resourceType?: MixedContentResourceType;
  2907. /**
  2908. * The way the mixed content issue is being resolved.
  2909. */
  2910. resolutionStatus: MixedContentResolutionStatus;
  2911. /**
  2912. * The unsafe http url causing the mixed content issue.
  2913. */
  2914. insecureURL: string;
  2915. /**
  2916. * The url responsible for the call to an unsafe url.
  2917. */
  2918. mainResourceURL: string;
  2919. /**
  2920. * The mixed content request.
  2921. * Does not always exist (e.g. for unsafe form submission urls).
  2922. */
  2923. request?: AffectedRequest;
  2924. /**
  2925. * Optional because not every mixed content issue is necessarily linked to a frame.
  2926. */
  2927. frame?: AffectedFrame;
  2928. }
  2929. /**
  2930. * Enum indicating the reason a response has been blocked. These reasons are
  2931. * refinements of the net error BLOCKED_BY_RESPONSE.
  2932. */
  2933. export type BlockedByResponseReason = ('CoepFrameResourceNeedsCoepHeader' | 'CoopSandboxedIFrameCannotNavigateToCoopPage' | 'CorpNotSameOrigin' | 'CorpNotSameOriginAfterDefaultedToSameOriginByCoep' | 'CorpNotSameSite');
  2934. /**
  2935. * Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
  2936. * code. Currently only used for COEP/COOP, but may be extended to include
  2937. * some CSP errors in the future.
  2938. */
  2939. export interface BlockedByResponseIssueDetails {
  2940. request: AffectedRequest;
  2941. parentFrame?: AffectedFrame;
  2942. blockedFrame?: AffectedFrame;
  2943. reason: BlockedByResponseReason;
  2944. }
  2945. export type HeavyAdResolutionStatus = ('HeavyAdBlocked' | 'HeavyAdWarning');
  2946. export type HeavyAdReason = ('NetworkTotalLimit' | 'CpuTotalLimit' | 'CpuPeakLimit');
  2947. export interface HeavyAdIssueDetails {
  2948. /**
  2949. * The resolution status, either blocking the content or warning.
  2950. */
  2951. resolution: HeavyAdResolutionStatus;
  2952. /**
  2953. * The reason the ad was blocked, total network or cpu or peak cpu.
  2954. */
  2955. reason: HeavyAdReason;
  2956. /**
  2957. * The frame that was blocked.
  2958. */
  2959. frame: AffectedFrame;
  2960. }
  2961. export type ContentSecurityPolicyViolationType = ('kInlineViolation' | 'kEvalViolation' | 'kURLViolation' | 'kTrustedTypesSinkViolation' | 'kTrustedTypesPolicyViolation');
  2962. export interface SourceCodeLocation {
  2963. url: string;
  2964. lineNumber: integer;
  2965. columnNumber: integer;
  2966. }
  2967. export interface ContentSecurityPolicyIssueDetails {
  2968. /**
  2969. * The url not included in allowed sources.
  2970. */
  2971. blockedURL?: string;
  2972. /**
  2973. * Specific directive that is violated, causing the CSP issue.
  2974. */
  2975. violatedDirective: string;
  2976. isReportOnly: boolean;
  2977. contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType;
  2978. frameAncestor?: AffectedFrame;
  2979. sourceCodeLocation?: SourceCodeLocation;
  2980. violatingNodeId?: DOM.BackendNodeId;
  2981. }
  2982. /**
  2983. * A unique identifier for the type of issue. Each type may use one of the
  2984. * optional fields in InspectorIssueDetails to convey more specific
  2985. * information about the kind of issue.
  2986. */
  2987. export type InspectorIssueCode = ('SameSiteCookieIssue' | 'MixedContentIssue' | 'BlockedByResponseIssue' | 'HeavyAdIssue' | 'ContentSecurityPolicyIssue');
  2988. /**
  2989. * This struct holds a list of optional fields with additional information
  2990. * specific to the kind of issue. When adding a new issue code, please also
  2991. * add a new optional field to this type.
  2992. */
  2993. export interface InspectorIssueDetails {
  2994. sameSiteCookieIssueDetails?: SameSiteCookieIssueDetails;
  2995. mixedContentIssueDetails?: MixedContentIssueDetails;
  2996. blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
  2997. heavyAdIssueDetails?: HeavyAdIssueDetails;
  2998. contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
  2999. }
  3000. /**
  3001. * An inspector issue reported from the back-end.
  3002. */
  3003. export interface InspectorIssue {
  3004. code: InspectorIssueCode;
  3005. details: InspectorIssueDetails;
  3006. }
  3007. export const enum GetEncodedResponseRequestEncoding {
  3008. Webp = 'webp',
  3009. Jpeg = 'jpeg',
  3010. Png = 'png',
  3011. }
  3012. export interface GetEncodedResponseRequest {
  3013. /**
  3014. * Identifier of the network request to get content for.
  3015. */
  3016. requestId: Network.RequestId;
  3017. /**
  3018. * The encoding to use. (GetEncodedResponseRequestEncoding enum)
  3019. */
  3020. encoding: ('webp' | 'jpeg' | 'png');
  3021. /**
  3022. * The quality of the encoding (0-1). (defaults to 1)
  3023. */
  3024. quality?: number;
  3025. /**
  3026. * Whether to only return the size information (defaults to false).
  3027. */
  3028. sizeOnly?: boolean;
  3029. }
  3030. export interface GetEncodedResponseResponse {
  3031. /**
  3032. * The encoded body as a base64 string. Omitted if sizeOnly is true.
  3033. */
  3034. body?: string;
  3035. /**
  3036. * Size before re-encoding.
  3037. */
  3038. originalSize: integer;
  3039. /**
  3040. * Size after re-encoding.
  3041. */
  3042. encodedSize: integer;
  3043. }
  3044. export interface IssueAddedEvent {
  3045. issue: InspectorIssue;
  3046. }
  3047. }
  3048. /**
  3049. * Defines events for background web platform features.
  3050. */
  3051. export namespace BackgroundService {
  3052. /**
  3053. * The Background Service that will be associated with the commands/events.
  3054. * Every Background Service operates independently, but they share the same
  3055. * API.
  3056. */
  3057. export type ServiceName = ('backgroundFetch' | 'backgroundSync' | 'pushMessaging' | 'notifications' | 'paymentHandler' | 'periodicBackgroundSync');
  3058. /**
  3059. * A key-value pair for additional event information to pass along.
  3060. */
  3061. export interface EventMetadata {
  3062. key: string;
  3063. value: string;
  3064. }
  3065. export interface BackgroundServiceEvent {
  3066. /**
  3067. * Timestamp of the event (in seconds).
  3068. */
  3069. timestamp: Network.TimeSinceEpoch;
  3070. /**
  3071. * The origin this event belongs to.
  3072. */
  3073. origin: string;
  3074. /**
  3075. * The Service Worker ID that initiated the event.
  3076. */
  3077. serviceWorkerRegistrationId: ServiceWorker.RegistrationID;
  3078. /**
  3079. * The Background Service this event belongs to.
  3080. */
  3081. service: ServiceName;
  3082. /**
  3083. * A description of the event.
  3084. */
  3085. eventName: string;
  3086. /**
  3087. * An identifier that groups related events together.
  3088. */
  3089. instanceId: string;
  3090. /**
  3091. * A list of event-specific information.
  3092. */
  3093. eventMetadata: EventMetadata[];
  3094. }
  3095. export interface StartObservingRequest {
  3096. service: ServiceName;
  3097. }
  3098. export interface StopObservingRequest {
  3099. service: ServiceName;
  3100. }
  3101. export interface SetRecordingRequest {
  3102. shouldRecord: boolean;
  3103. service: ServiceName;
  3104. }
  3105. export interface ClearEventsRequest {
  3106. service: ServiceName;
  3107. }
  3108. /**
  3109. * Called when the recording state for the service has been updated.
  3110. */
  3111. export interface RecordingStateChangedEvent {
  3112. isRecording: boolean;
  3113. service: ServiceName;
  3114. }
  3115. /**
  3116. * Called with all existing backgroundServiceEvents when enabled, and all new
  3117. * events afterwards if enabled and recording.
  3118. */
  3119. export interface BackgroundServiceEventReceivedEvent {
  3120. backgroundServiceEvent: BackgroundServiceEvent;
  3121. }
  3122. }
  3123. /**
  3124. * The Browser domain defines methods and events for browser managing.
  3125. */
  3126. export namespace Browser {
  3127. export type BrowserContextID = string;
  3128. export type WindowID = integer;
  3129. /**
  3130. * The state of the browser window.
  3131. */
  3132. export type WindowState = ('normal' | 'minimized' | 'maximized' | 'fullscreen');
  3133. /**
  3134. * Browser window bounds information
  3135. */
  3136. export interface Bounds {
  3137. /**
  3138. * The offset from the left edge of the screen to the window in pixels.
  3139. */
  3140. left?: integer;
  3141. /**
  3142. * The offset from the top edge of the screen to the window in pixels.
  3143. */
  3144. top?: integer;
  3145. /**
  3146. * The window width in pixels.
  3147. */
  3148. width?: integer;
  3149. /**
  3150. * The window height in pixels.
  3151. */
  3152. height?: integer;
  3153. /**
  3154. * The window state. Default to normal.
  3155. */
  3156. windowState?: WindowState;
  3157. }
  3158. export type PermissionType = ('accessibilityEvents' | 'audioCapture' | 'backgroundSync' | 'backgroundFetch' | 'clipboardReadWrite' | 'clipboardSanitizedWrite' | 'durableStorage' | 'flash' | 'geolocation' | 'midi' | 'midiSysex' | 'nfc' | 'notifications' | 'paymentHandler' | 'periodicBackgroundSync' | 'protectedMediaIdentifier' | 'sensors' | 'videoCapture' | 'videoCapturePanTiltZoom' | 'idleDetection' | 'wakeLockScreen' | 'wakeLockSystem');
  3159. export type PermissionSetting = ('granted' | 'denied' | 'prompt');
  3160. /**
  3161. * Definition of PermissionDescriptor defined in the Permissions API:
  3162. * https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
  3163. */
  3164. export interface PermissionDescriptor {
  3165. /**
  3166. * Name of permission.
  3167. * See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
  3168. */
  3169. name: string;
  3170. /**
  3171. * For "midi" permission, may also specify sysex control.
  3172. */
  3173. sysex?: boolean;
  3174. /**
  3175. * For "push" permission, may specify userVisibleOnly.
  3176. * Note that userVisibleOnly = true is the only currently supported type.
  3177. */
  3178. userVisibleOnly?: boolean;
  3179. /**
  3180. * For "clipboard" permission, may specify allowWithoutSanitization.
  3181. */
  3182. allowWithoutSanitization?: boolean;
  3183. /**
  3184. * For "camera" permission, may specify panTiltZoom.
  3185. */
  3186. panTiltZoom?: boolean;
  3187. }
  3188. /**
  3189. * Chrome histogram bucket.
  3190. */
  3191. export interface Bucket {
  3192. /**
  3193. * Minimum value (inclusive).
  3194. */
  3195. low: integer;
  3196. /**
  3197. * Maximum value (exclusive).
  3198. */
  3199. high: integer;
  3200. /**
  3201. * Number of samples.
  3202. */
  3203. count: integer;
  3204. }
  3205. /**
  3206. * Chrome histogram.
  3207. */
  3208. export interface Histogram {
  3209. /**
  3210. * Name.
  3211. */
  3212. name: string;
  3213. /**
  3214. * Sum of sample values.
  3215. */
  3216. sum: integer;
  3217. /**
  3218. * Total number of samples.
  3219. */
  3220. count: integer;
  3221. /**
  3222. * Buckets.
  3223. */
  3224. buckets: Bucket[];
  3225. }
  3226. export interface SetPermissionRequest {
  3227. /**
  3228. * Descriptor of permission to override.
  3229. */
  3230. permission: PermissionDescriptor;
  3231. /**
  3232. * Setting of the permission.
  3233. */
  3234. setting: PermissionSetting;
  3235. /**
  3236. * Origin the permission applies to, all origins if not specified.
  3237. */
  3238. origin?: string;
  3239. /**
  3240. * Context to override. When omitted, default browser context is used.
  3241. */
  3242. browserContextId?: BrowserContextID;
  3243. }
  3244. export interface GrantPermissionsRequest {
  3245. permissions: PermissionType[];
  3246. /**
  3247. * Origin the permission applies to, all origins if not specified.
  3248. */
  3249. origin?: string;
  3250. /**
  3251. * BrowserContext to override permissions. When omitted, default browser context is used.
  3252. */
  3253. browserContextId?: BrowserContextID;
  3254. }
  3255. export interface ResetPermissionsRequest {
  3256. /**
  3257. * BrowserContext to reset permissions. When omitted, default browser context is used.
  3258. */
  3259. browserContextId?: BrowserContextID;
  3260. }
  3261. export const enum SetDownloadBehaviorRequestBehavior {
  3262. Deny = 'deny',
  3263. Allow = 'allow',
  3264. AllowAndName = 'allowAndName',
  3265. Default = 'default',
  3266. }
  3267. export interface SetDownloadBehaviorRequest {
  3268. /**
  3269. * Whether to allow all or deny all download requests, or use default Chrome behavior if
  3270. * available (otherwise deny). |allowAndName| allows download and names files according to
  3271. * their dowmload guids. (SetDownloadBehaviorRequestBehavior enum)
  3272. */
  3273. behavior: ('deny' | 'allow' | 'allowAndName' | 'default');
  3274. /**
  3275. * BrowserContext to set download behavior. When omitted, default browser context is used.
  3276. */
  3277. browserContextId?: BrowserContextID;
  3278. /**
  3279. * The default path to save downloaded files to. This is requred if behavior is set to 'allow'
  3280. * or 'allowAndName'.
  3281. */
  3282. downloadPath?: string;
  3283. }
  3284. export interface GetVersionResponse {
  3285. /**
  3286. * Protocol version.
  3287. */
  3288. protocolVersion: string;
  3289. /**
  3290. * Product name.
  3291. */
  3292. product: string;
  3293. /**
  3294. * Product revision.
  3295. */
  3296. revision: string;
  3297. /**
  3298. * User-Agent.
  3299. */
  3300. userAgent: string;
  3301. /**
  3302. * V8 version.
  3303. */
  3304. jsVersion: string;
  3305. }
  3306. export interface GetBrowserCommandLineResponse {
  3307. /**
  3308. * Commandline parameters
  3309. */
  3310. arguments: string[];
  3311. }
  3312. export interface GetHistogramsRequest {
  3313. /**
  3314. * Requested substring in name. Only histograms which have query as a
  3315. * substring in their name are extracted. An empty or absent query returns
  3316. * all histograms.
  3317. */
  3318. query?: string;
  3319. /**
  3320. * If true, retrieve delta since last call.
  3321. */
  3322. delta?: boolean;
  3323. }
  3324. export interface GetHistogramsResponse {
  3325. /**
  3326. * Histograms.
  3327. */
  3328. histograms: Histogram[];
  3329. }
  3330. export interface GetHistogramRequest {
  3331. /**
  3332. * Requested histogram name.
  3333. */
  3334. name: string;
  3335. /**
  3336. * If true, retrieve delta since last call.
  3337. */
  3338. delta?: boolean;
  3339. }
  3340. export interface GetHistogramResponse {
  3341. /**
  3342. * Histogram.
  3343. */
  3344. histogram: Histogram;
  3345. }
  3346. export interface GetWindowBoundsRequest {
  3347. /**
  3348. * Browser window id.
  3349. */
  3350. windowId: WindowID;
  3351. }
  3352. export interface GetWindowBoundsResponse {
  3353. /**
  3354. * Bounds information of the window. When window state is 'minimized', the restored window
  3355. * position and size are returned.
  3356. */
  3357. bounds: Bounds;
  3358. }
  3359. export interface GetWindowForTargetRequest {
  3360. /**
  3361. * Devtools agent host id. If called as a part of the session, associated targetId is used.
  3362. */
  3363. targetId?: Target.TargetID;
  3364. }
  3365. export interface GetWindowForTargetResponse {
  3366. /**
  3367. * Browser window id.
  3368. */
  3369. windowId: WindowID;
  3370. /**
  3371. * Bounds information of the window. When window state is 'minimized', the restored window
  3372. * position and size are returned.
  3373. */
  3374. bounds: Bounds;
  3375. }
  3376. export interface SetWindowBoundsRequest {
  3377. /**
  3378. * Browser window id.
  3379. */
  3380. windowId: WindowID;
  3381. /**
  3382. * New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
  3383. * with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
  3384. */
  3385. bounds: Bounds;
  3386. }
  3387. export interface SetDockTileRequest {
  3388. badgeLabel?: string;
  3389. /**
  3390. * Png encoded image.
  3391. */
  3392. image?: string;
  3393. }
  3394. }
  3395. /**
  3396. * This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
  3397. * have an associated `id` used in subsequent operations on the related object. Each object type has
  3398. * a specific `id` structure, and those are not interchangeable between objects of different kinds.
  3399. * CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
  3400. * can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
  3401. * subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
  3402. */
  3403. export namespace CSS {
  3404. export type StyleSheetId = string;
  3405. /**
  3406. * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
  3407. * stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
  3408. * inspector" rules), "regular" for regular stylesheets.
  3409. */
  3410. export type StyleSheetOrigin = ('injected' | 'user-agent' | 'inspector' | 'regular');
  3411. /**
  3412. * CSS rule collection for a single pseudo style.
  3413. */
  3414. export interface PseudoElementMatches {
  3415. /**
  3416. * Pseudo element type.
  3417. */
  3418. pseudoType: DOM.PseudoType;
  3419. /**
  3420. * Matches of CSS rules applicable to the pseudo style.
  3421. */
  3422. matches: RuleMatch[];
  3423. }
  3424. /**
  3425. * Inherited CSS rule collection from ancestor node.
  3426. */
  3427. export interface InheritedStyleEntry {
  3428. /**
  3429. * The ancestor node's inline style, if any, in the style inheritance chain.
  3430. */
  3431. inlineStyle?: CSSStyle;
  3432. /**
  3433. * Matches of CSS rules matching the ancestor node in the style inheritance chain.
  3434. */
  3435. matchedCSSRules: RuleMatch[];
  3436. }
  3437. /**
  3438. * Match data for a CSS rule.
  3439. */
  3440. export interface RuleMatch {
  3441. /**
  3442. * CSS rule in the match.
  3443. */
  3444. rule: CSSRule;
  3445. /**
  3446. * Matching selector indices in the rule's selectorList selectors (0-based).
  3447. */
  3448. matchingSelectors: integer[];
  3449. }
  3450. /**
  3451. * Data for a simple selector (these are delimited by commas in a selector list).
  3452. */
  3453. export interface Value {
  3454. /**
  3455. * Value text.
  3456. */
  3457. text: string;
  3458. /**
  3459. * Value range in the underlying resource (if available).
  3460. */
  3461. range?: SourceRange;
  3462. }
  3463. /**
  3464. * Selector list data.
  3465. */
  3466. export interface SelectorList {
  3467. /**
  3468. * Selectors in the list.
  3469. */
  3470. selectors: Value[];
  3471. /**
  3472. * Rule selector text.
  3473. */
  3474. text: string;
  3475. }
  3476. /**
  3477. * CSS stylesheet metainformation.
  3478. */
  3479. export interface CSSStyleSheetHeader {
  3480. /**
  3481. * The stylesheet identifier.
  3482. */
  3483. styleSheetId: StyleSheetId;
  3484. /**
  3485. * Owner frame identifier.
  3486. */
  3487. frameId: Page.FrameId;
  3488. /**
  3489. * Stylesheet resource URL.
  3490. */
  3491. sourceURL: string;
  3492. /**
  3493. * URL of source map associated with the stylesheet (if any).
  3494. */
  3495. sourceMapURL?: string;
  3496. /**
  3497. * Stylesheet origin.
  3498. */
  3499. origin: StyleSheetOrigin;
  3500. /**
  3501. * Stylesheet title.
  3502. */
  3503. title: string;
  3504. /**
  3505. * The backend id for the owner node of the stylesheet.
  3506. */
  3507. ownerNode?: DOM.BackendNodeId;
  3508. /**
  3509. * Denotes whether the stylesheet is disabled.
  3510. */
  3511. disabled: boolean;
  3512. /**
  3513. * Whether the sourceURL field value comes from the sourceURL comment.
  3514. */
  3515. hasSourceURL?: boolean;
  3516. /**
  3517. * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for
  3518. * document.written STYLE tags.
  3519. */
  3520. isInline: boolean;
  3521. /**
  3522. * Whether this stylesheet is mutable. Inline stylesheets become mutable
  3523. * after they have been modified via CSSOM API.
  3524. * <link> element's stylesheets become mutable only if DevTools modifies them.
  3525. * Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
  3526. */
  3527. isMutable: boolean;
  3528. /**
  3529. * Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()).
  3530. */
  3531. isConstructed: boolean;
  3532. /**
  3533. * Line offset of the stylesheet within the resource (zero based).
  3534. */
  3535. startLine: number;
  3536. /**
  3537. * Column offset of the stylesheet within the resource (zero based).
  3538. */
  3539. startColumn: number;
  3540. /**
  3541. * Size of the content (in characters).
  3542. */
  3543. length: number;
  3544. /**
  3545. * Line offset of the end of the stylesheet within the resource (zero based).
  3546. */
  3547. endLine: number;
  3548. /**
  3549. * Column offset of the end of the stylesheet within the resource (zero based).
  3550. */
  3551. endColumn: number;
  3552. }
  3553. /**
  3554. * CSS rule representation.
  3555. */
  3556. export interface CSSRule {
  3557. /**
  3558. * The css style sheet identifier (absent for user agent stylesheet and user-specified
  3559. * stylesheet rules) this rule came from.
  3560. */
  3561. styleSheetId?: StyleSheetId;
  3562. /**
  3563. * Rule selector data.
  3564. */
  3565. selectorList: SelectorList;
  3566. /**
  3567. * Parent stylesheet's origin.
  3568. */
  3569. origin: StyleSheetOrigin;
  3570. /**
  3571. * Associated style declaration.
  3572. */
  3573. style: CSSStyle;
  3574. /**
  3575. * Media list array (for rules involving media queries). The array enumerates media queries
  3576. * starting with the innermost one, going outwards.
  3577. */
  3578. media?: CSSMedia[];
  3579. }
  3580. /**
  3581. * CSS coverage information.
  3582. */
  3583. export interface RuleUsage {
  3584. /**
  3585. * The css style sheet identifier (absent for user agent stylesheet and user-specified
  3586. * stylesheet rules) this rule came from.
  3587. */
  3588. styleSheetId: StyleSheetId;
  3589. /**
  3590. * Offset of the start of the rule (including selector) from the beginning of the stylesheet.
  3591. */
  3592. startOffset: number;
  3593. /**
  3594. * Offset of the end of the rule body from the beginning of the stylesheet.
  3595. */
  3596. endOffset: number;
  3597. /**
  3598. * Indicates whether the rule was actually used by some element in the page.
  3599. */
  3600. used: boolean;
  3601. }
  3602. /**
  3603. * Text range within a resource. All numbers are zero-based.
  3604. */
  3605. export interface SourceRange {
  3606. /**
  3607. * Start line of range.
  3608. */
  3609. startLine: integer;
  3610. /**
  3611. * Start column of range (inclusive).
  3612. */
  3613. startColumn: integer;
  3614. /**
  3615. * End line of range
  3616. */
  3617. endLine: integer;
  3618. /**
  3619. * End column of range (exclusive).
  3620. */
  3621. endColumn: integer;
  3622. }
  3623. export interface ShorthandEntry {
  3624. /**
  3625. * Shorthand name.
  3626. */
  3627. name: string;
  3628. /**
  3629. * Shorthand value.
  3630. */
  3631. value: string;
  3632. /**
  3633. * Whether the property has "!important" annotation (implies `false` if absent).
  3634. */
  3635. important?: boolean;
  3636. }
  3637. export interface CSSComputedStyleProperty {
  3638. /**
  3639. * Computed style property name.
  3640. */
  3641. name: string;
  3642. /**
  3643. * Computed style property value.
  3644. */
  3645. value: string;
  3646. }
  3647. /**
  3648. * CSS style representation.
  3649. */
  3650. export interface CSSStyle {
  3651. /**
  3652. * The css style sheet identifier (absent for user agent stylesheet and user-specified
  3653. * stylesheet rules) this rule came from.
  3654. */
  3655. styleSheetId?: StyleSheetId;
  3656. /**
  3657. * CSS properties in the style.
  3658. */
  3659. cssProperties: CSSProperty[];
  3660. /**
  3661. * Computed values for all shorthands found in the style.
  3662. */
  3663. shorthandEntries: ShorthandEntry[];
  3664. /**
  3665. * Style declaration text (if available).
  3666. */
  3667. cssText?: string;
  3668. /**
  3669. * Style declaration range in the enclosing stylesheet (if available).
  3670. */
  3671. range?: SourceRange;
  3672. }
  3673. /**
  3674. * CSS property declaration data.
  3675. */
  3676. export interface CSSProperty {
  3677. /**
  3678. * The property name.
  3679. */
  3680. name: string;
  3681. /**
  3682. * The property value.
  3683. */
  3684. value: string;
  3685. /**
  3686. * Whether the property has "!important" annotation (implies `false` if absent).
  3687. */
  3688. important?: boolean;
  3689. /**
  3690. * Whether the property is implicit (implies `false` if absent).
  3691. */
  3692. implicit?: boolean;
  3693. /**
  3694. * The full property text as specified in the style.
  3695. */
  3696. text?: string;
  3697. /**
  3698. * Whether the property is understood by the browser (implies `true` if absent).
  3699. */
  3700. parsedOk?: boolean;
  3701. /**
  3702. * Whether the property is disabled by the user (present for source-based properties only).
  3703. */
  3704. disabled?: boolean;
  3705. /**
  3706. * The entire property range in the enclosing style declaration (if available).
  3707. */
  3708. range?: SourceRange;
  3709. }
  3710. export const enum CSSMediaSource {
  3711. MediaRule = 'mediaRule',
  3712. ImportRule = 'importRule',
  3713. LinkedSheet = 'linkedSheet',
  3714. InlineSheet = 'inlineSheet',
  3715. }
  3716. /**
  3717. * CSS media rule descriptor.
  3718. */
  3719. export interface CSSMedia {
  3720. /**
  3721. * Media query text.
  3722. */
  3723. text: string;
  3724. /**
  3725. * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if
  3726. * specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked
  3727. * stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline
  3728. * stylesheet's STYLE tag. (CSSMediaSource enum)
  3729. */
  3730. source: ('mediaRule' | 'importRule' | 'linkedSheet' | 'inlineSheet');
  3731. /**
  3732. * URL of the document containing the media query description.
  3733. */
  3734. sourceURL?: string;
  3735. /**
  3736. * The associated rule (@media or @import) header range in the enclosing stylesheet (if
  3737. * available).
  3738. */
  3739. range?: SourceRange;
  3740. /**
  3741. * Identifier of the stylesheet containing this object (if exists).
  3742. */
  3743. styleSheetId?: StyleSheetId;
  3744. /**
  3745. * Array of media queries.
  3746. */
  3747. mediaList?: MediaQuery[];
  3748. }
  3749. /**
  3750. * Media query descriptor.
  3751. */
  3752. export interface MediaQuery {
  3753. /**
  3754. * Array of media query expressions.
  3755. */
  3756. expressions: MediaQueryExpression[];
  3757. /**
  3758. * Whether the media query condition is satisfied.
  3759. */
  3760. active: boolean;
  3761. }
  3762. /**
  3763. * Media query expression descriptor.
  3764. */
  3765. export interface MediaQueryExpression {
  3766. /**
  3767. * Media query expression value.
  3768. */
  3769. value: number;
  3770. /**
  3771. * Media query expression units.
  3772. */
  3773. unit: string;
  3774. /**
  3775. * Media query expression feature.
  3776. */
  3777. feature: string;
  3778. /**
  3779. * The associated range of the value text in the enclosing stylesheet (if available).
  3780. */
  3781. valueRange?: SourceRange;
  3782. /**
  3783. * Computed length of media query expression (if applicable).
  3784. */
  3785. computedLength?: number;
  3786. }
  3787. /**
  3788. * Information about amount of glyphs that were rendered with given font.
  3789. */
  3790. export interface PlatformFontUsage {
  3791. /**
  3792. * Font's family name reported by platform.
  3793. */
  3794. familyName: string;
  3795. /**
  3796. * Indicates if the font was downloaded or resolved locally.
  3797. */
  3798. isCustomFont: boolean;
  3799. /**
  3800. * Amount of glyphs that were rendered with this font.
  3801. */
  3802. glyphCount: number;
  3803. }
  3804. /**
  3805. * Information about font variation axes for variable fonts
  3806. */
  3807. export interface FontVariationAxis {
  3808. /**
  3809. * The font-variation-setting tag (a.k.a. "axis tag").
  3810. */
  3811. tag: string;
  3812. /**
  3813. * Human-readable variation name in the default language (normally, "en").
  3814. */
  3815. name: string;
  3816. /**
  3817. * The minimum value (inclusive) the font supports for this tag.
  3818. */
  3819. minValue: number;
  3820. /**
  3821. * The maximum value (inclusive) the font supports for this tag.
  3822. */
  3823. maxValue: number;
  3824. /**
  3825. * The default value.
  3826. */
  3827. defaultValue: number;
  3828. }
  3829. /**
  3830. * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
  3831. * and additional information such as platformFontFamily and fontVariationAxes.
  3832. */
  3833. export interface FontFace {
  3834. /**
  3835. * The font-family.
  3836. */
  3837. fontFamily: string;
  3838. /**
  3839. * The font-style.
  3840. */
  3841. fontStyle: string;
  3842. /**
  3843. * The font-variant.
  3844. */
  3845. fontVariant: string;
  3846. /**
  3847. * The font-weight.
  3848. */
  3849. fontWeight: string;
  3850. /**
  3851. * The font-stretch.
  3852. */
  3853. fontStretch: string;
  3854. /**
  3855. * The unicode-range.
  3856. */
  3857. unicodeRange: string;
  3858. /**
  3859. * The src.
  3860. */
  3861. src: string;
  3862. /**
  3863. * The resolved platform font family
  3864. */
  3865. platformFontFamily: string;
  3866. /**
  3867. * Available variation settings (a.k.a. "axes").
  3868. */
  3869. fontVariationAxes?: FontVariationAxis[];
  3870. }
  3871. /**
  3872. * CSS keyframes rule representation.
  3873. */
  3874. export interface CSSKeyframesRule {
  3875. /**
  3876. * Animation name.
  3877. */
  3878. animationName: Value;
  3879. /**
  3880. * List of keyframes.
  3881. */
  3882. keyframes: CSSKeyframeRule[];
  3883. }
  3884. /**
  3885. * CSS keyframe rule representation.
  3886. */
  3887. export interface CSSKeyframeRule {
  3888. /**
  3889. * The css style sheet identifier (absent for user agent stylesheet and user-specified
  3890. * stylesheet rules) this rule came from.
  3891. */
  3892. styleSheetId?: StyleSheetId;
  3893. /**
  3894. * Parent stylesheet's origin.
  3895. */
  3896. origin: StyleSheetOrigin;
  3897. /**
  3898. * Associated key text.
  3899. */
  3900. keyText: Value;
  3901. /**
  3902. * Associated style declaration.
  3903. */
  3904. style: CSSStyle;
  3905. }
  3906. /**
  3907. * A descriptor of operation to mutate style declaration text.
  3908. */
  3909. export interface StyleDeclarationEdit {
  3910. /**
  3911. * The css style sheet identifier.
  3912. */
  3913. styleSheetId: StyleSheetId;
  3914. /**
  3915. * The range of the style text in the enclosing stylesheet.
  3916. */
  3917. range: SourceRange;
  3918. /**
  3919. * New style text.
  3920. */
  3921. text: string;
  3922. }
  3923. export interface AddRuleRequest {
  3924. /**
  3925. * The css style sheet identifier where a new rule should be inserted.
  3926. */
  3927. styleSheetId: StyleSheetId;
  3928. /**
  3929. * The text of a new rule.
  3930. */
  3931. ruleText: string;
  3932. /**
  3933. * Text position of a new rule in the target style sheet.
  3934. */
  3935. location: SourceRange;
  3936. }
  3937. export interface AddRuleResponse {
  3938. /**
  3939. * The newly created rule.
  3940. */
  3941. rule: CSSRule;
  3942. }
  3943. export interface CollectClassNamesRequest {
  3944. styleSheetId: StyleSheetId;
  3945. }
  3946. export interface CollectClassNamesResponse {
  3947. /**
  3948. * Class name list.
  3949. */
  3950. classNames: string[];
  3951. }
  3952. export interface CreateStyleSheetRequest {
  3953. /**
  3954. * Identifier of the frame where "via-inspector" stylesheet should be created.
  3955. */
  3956. frameId: Page.FrameId;
  3957. }
  3958. export interface CreateStyleSheetResponse {
  3959. /**
  3960. * Identifier of the created "via-inspector" stylesheet.
  3961. */
  3962. styleSheetId: StyleSheetId;
  3963. }
  3964. export interface ForcePseudoStateRequest {
  3965. /**
  3966. * The element id for which to force the pseudo state.
  3967. */
  3968. nodeId: DOM.NodeId;
  3969. /**
  3970. * Element pseudo classes to force when computing the element's style.
  3971. */
  3972. forcedPseudoClasses: string[];
  3973. }
  3974. export interface GetBackgroundColorsRequest {
  3975. /**
  3976. * Id of the node to get background colors for.
  3977. */
  3978. nodeId: DOM.NodeId;
  3979. }
  3980. export interface GetBackgroundColorsResponse {
  3981. /**
  3982. * The range of background colors behind this element, if it contains any visible text. If no
  3983. * visible text is present, this will be undefined. In the case of a flat background color,
  3984. * this will consist of simply that color. In the case of a gradient, this will consist of each
  3985. * of the color stops. For anything more complicated, this will be an empty array. Images will
  3986. * be ignored (as if the image had failed to load).
  3987. */
  3988. backgroundColors?: string[];
  3989. /**
  3990. * The computed font size for this node, as a CSS computed value string (e.g. '12px').
  3991. */
  3992. computedFontSize?: string;
  3993. /**
  3994. * The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or
  3995. * '100').
  3996. */
  3997. computedFontWeight?: string;
  3998. }
  3999. export interface GetComputedStyleForNodeRequest {
  4000. nodeId: DOM.NodeId;
  4001. }
  4002. export interface GetComputedStyleForNodeResponse {
  4003. /**
  4004. * Computed style for the specified DOM node.
  4005. */
  4006. computedStyle: CSSComputedStyleProperty[];
  4007. }
  4008. export interface GetInlineStylesForNodeRequest {
  4009. nodeId: DOM.NodeId;
  4010. }
  4011. export interface GetInlineStylesForNodeResponse {
  4012. /**
  4013. * Inline style for the specified DOM node.
  4014. */
  4015. inlineStyle?: CSSStyle;
  4016. /**
  4017. * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
  4018. */
  4019. attributesStyle?: CSSStyle;
  4020. }
  4021. export interface GetMatchedStylesForNodeRequest {
  4022. nodeId: DOM.NodeId;
  4023. }
  4024. export interface GetMatchedStylesForNodeResponse {
  4025. /**
  4026. * Inline style for the specified DOM node.
  4027. */
  4028. inlineStyle?: CSSStyle;
  4029. /**
  4030. * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
  4031. */
  4032. attributesStyle?: CSSStyle;
  4033. /**
  4034. * CSS rules matching this node, from all applicable stylesheets.
  4035. */
  4036. matchedCSSRules?: RuleMatch[];
  4037. /**
  4038. * Pseudo style matches for this node.
  4039. */
  4040. pseudoElements?: PseudoElementMatches[];
  4041. /**
  4042. * A chain of inherited styles (from the immediate node parent up to the DOM tree root).
  4043. */
  4044. inherited?: InheritedStyleEntry[];
  4045. /**
  4046. * A list of CSS keyframed animations matching this node.
  4047. */
  4048. cssKeyframesRules?: CSSKeyframesRule[];
  4049. }
  4050. export interface GetMediaQueriesResponse {
  4051. medias: CSSMedia[];
  4052. }
  4053. export interface GetPlatformFontsForNodeRequest {
  4054. nodeId: DOM.NodeId;
  4055. }
  4056. export interface GetPlatformFontsForNodeResponse {
  4057. /**
  4058. * Usage statistics for every employed platform font.
  4059. */
  4060. fonts: PlatformFontUsage[];
  4061. }
  4062. export interface GetStyleSheetTextRequest {
  4063. styleSheetId: StyleSheetId;
  4064. }
  4065. export interface GetStyleSheetTextResponse {
  4066. /**
  4067. * The stylesheet text.
  4068. */
  4069. text: string;
  4070. }
  4071. export interface TrackComputedStyleUpdatesRequest {
  4072. propertiesToTrack: CSSComputedStyleProperty[];
  4073. }
  4074. export interface TakeComputedStyleUpdatesResponse {
  4075. /**
  4076. * The list of node Ids that have their tracked computed styles updated
  4077. */
  4078. nodeIds: DOM.NodeId[];
  4079. }
  4080. export interface SetEffectivePropertyValueForNodeRequest {
  4081. /**
  4082. * The element id for which to set property.
  4083. */
  4084. nodeId: DOM.NodeId;
  4085. propertyName: string;
  4086. value: string;
  4087. }
  4088. export interface SetKeyframeKeyRequest {
  4089. styleSheetId: StyleSheetId;
  4090. range: SourceRange;
  4091. keyText: string;
  4092. }
  4093. export interface SetKeyframeKeyResponse {
  4094. /**
  4095. * The resulting key text after modification.
  4096. */
  4097. keyText: Value;
  4098. }
  4099. export interface SetMediaTextRequest {
  4100. styleSheetId: StyleSheetId;
  4101. range: SourceRange;
  4102. text: string;
  4103. }
  4104. export interface SetMediaTextResponse {
  4105. /**
  4106. * The resulting CSS media rule after modification.
  4107. */
  4108. media: CSSMedia;
  4109. }
  4110. export interface SetRuleSelectorRequest {
  4111. styleSheetId: StyleSheetId;
  4112. range: SourceRange;
  4113. selector: string;
  4114. }
  4115. export interface SetRuleSelectorResponse {
  4116. /**
  4117. * The resulting selector list after modification.
  4118. */
  4119. selectorList: SelectorList;
  4120. }
  4121. export interface SetStyleSheetTextRequest {
  4122. styleSheetId: StyleSheetId;
  4123. text: string;
  4124. }
  4125. export interface SetStyleSheetTextResponse {
  4126. /**
  4127. * URL of source map associated with script (if any).
  4128. */
  4129. sourceMapURL?: string;
  4130. }
  4131. export interface SetStyleTextsRequest {
  4132. edits: StyleDeclarationEdit[];
  4133. }
  4134. export interface SetStyleTextsResponse {
  4135. /**
  4136. * The resulting styles after modification.
  4137. */
  4138. styles: CSSStyle[];
  4139. }
  4140. export interface StopRuleUsageTrackingResponse {
  4141. ruleUsage: RuleUsage[];
  4142. }
  4143. export interface TakeCoverageDeltaResponse {
  4144. coverage: RuleUsage[];
  4145. /**
  4146. * Monotonically increasing time, in seconds.
  4147. */
  4148. timestamp: number;
  4149. }
  4150. export interface SetLocalFontsEnabledRequest {
  4151. /**
  4152. * Whether rendering of local fonts is enabled.
  4153. */
  4154. enabled: boolean;
  4155. }
  4156. /**
  4157. * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
  4158. * web font
  4159. */
  4160. export interface FontsUpdatedEvent {
  4161. /**
  4162. * The web font that has loaded.
  4163. */
  4164. font?: FontFace;
  4165. }
  4166. /**
  4167. * Fired whenever an active document stylesheet is added.
  4168. */
  4169. export interface StyleSheetAddedEvent {
  4170. /**
  4171. * Added stylesheet metainfo.
  4172. */
  4173. header: CSSStyleSheetHeader;
  4174. }
  4175. /**
  4176. * Fired whenever a stylesheet is changed as a result of the client operation.
  4177. */
  4178. export interface StyleSheetChangedEvent {
  4179. styleSheetId: StyleSheetId;
  4180. }
  4181. /**
  4182. * Fired whenever an active document stylesheet is removed.
  4183. */
  4184. export interface StyleSheetRemovedEvent {
  4185. /**
  4186. * Identifier of the removed stylesheet.
  4187. */
  4188. styleSheetId: StyleSheetId;
  4189. }
  4190. }
  4191. export namespace CacheStorage {
  4192. /**
  4193. * Unique identifier of the Cache object.
  4194. */
  4195. export type CacheId = string;
  4196. /**
  4197. * type of HTTP response cached
  4198. */
  4199. export type CachedResponseType = ('basic' | 'cors' | 'default' | 'error' | 'opaqueResponse' | 'opaqueRedirect');
  4200. /**
  4201. * Data entry.
  4202. */
  4203. export interface DataEntry {
  4204. /**
  4205. * Request URL.
  4206. */
  4207. requestURL: string;
  4208. /**
  4209. * Request method.
  4210. */
  4211. requestMethod: string;
  4212. /**
  4213. * Request headers
  4214. */
  4215. requestHeaders: Header[];
  4216. /**
  4217. * Number of seconds since epoch.
  4218. */
  4219. responseTime: number;
  4220. /**
  4221. * HTTP response status code.
  4222. */
  4223. responseStatus: integer;
  4224. /**
  4225. * HTTP response status text.
  4226. */
  4227. responseStatusText: string;
  4228. /**
  4229. * HTTP response type
  4230. */
  4231. responseType: CachedResponseType;
  4232. /**
  4233. * Response headers
  4234. */
  4235. responseHeaders: Header[];
  4236. }
  4237. /**
  4238. * Cache identifier.
  4239. */
  4240. export interface Cache {
  4241. /**
  4242. * An opaque unique id of the cache.
  4243. */
  4244. cacheId: CacheId;
  4245. /**
  4246. * Security origin of the cache.
  4247. */
  4248. securityOrigin: string;
  4249. /**
  4250. * The name of the cache.
  4251. */
  4252. cacheName: string;
  4253. }
  4254. export interface Header {
  4255. name: string;
  4256. value: string;
  4257. }
  4258. /**
  4259. * Cached response
  4260. */
  4261. export interface CachedResponse {
  4262. /**
  4263. * Entry content, base64-encoded.
  4264. */
  4265. body: string;
  4266. }
  4267. export interface DeleteCacheRequest {
  4268. /**
  4269. * Id of cache for deletion.
  4270. */
  4271. cacheId: CacheId;
  4272. }
  4273. export interface DeleteEntryRequest {
  4274. /**
  4275. * Id of cache where the entry will be deleted.
  4276. */
  4277. cacheId: CacheId;
  4278. /**
  4279. * URL spec of the request.
  4280. */
  4281. request: string;
  4282. }
  4283. export interface RequestCacheNamesRequest {
  4284. /**
  4285. * Security origin.
  4286. */
  4287. securityOrigin: string;
  4288. }
  4289. export interface RequestCacheNamesResponse {
  4290. /**
  4291. * Caches for the security origin.
  4292. */
  4293. caches: Cache[];
  4294. }
  4295. export interface RequestCachedResponseRequest {
  4296. /**
  4297. * Id of cache that contains the entry.
  4298. */
  4299. cacheId: CacheId;
  4300. /**
  4301. * URL spec of the request.
  4302. */
  4303. requestURL: string;
  4304. /**
  4305. * headers of the request.
  4306. */
  4307. requestHeaders: Header[];
  4308. }
  4309. export interface RequestCachedResponseResponse {
  4310. /**
  4311. * Response read from the cache.
  4312. */
  4313. response: CachedResponse;
  4314. }
  4315. export interface RequestEntriesRequest {
  4316. /**
  4317. * ID of cache to get entries from.
  4318. */
  4319. cacheId: CacheId;
  4320. /**
  4321. * Number of records to skip.
  4322. */
  4323. skipCount?: integer;
  4324. /**
  4325. * Number of records to fetch.
  4326. */
  4327. pageSize?: integer;
  4328. /**
  4329. * If present, only return the entries containing this substring in the path
  4330. */
  4331. pathFilter?: string;
  4332. }
  4333. export interface RequestEntriesResponse {
  4334. /**
  4335. * Array of object store data entries.
  4336. */
  4337. cacheDataEntries: DataEntry[];
  4338. /**
  4339. * Count of returned entries from this storage. If pathFilter is empty, it
  4340. * is the count of all entries from this storage.
  4341. */
  4342. returnCount: number;
  4343. }
  4344. }
  4345. /**
  4346. * A domain for interacting with Cast, Presentation API, and Remote Playback API
  4347. * functionalities.
  4348. */
  4349. export namespace Cast {
  4350. export interface Sink {
  4351. name: string;
  4352. id: string;
  4353. /**
  4354. * Text describing the current session. Present only if there is an active
  4355. * session on the sink.
  4356. */
  4357. session?: string;
  4358. }
  4359. export interface EnableRequest {
  4360. presentationUrl?: string;
  4361. }
  4362. export interface SetSinkToUseRequest {
  4363. sinkName: string;
  4364. }
  4365. export interface StartTabMirroringRequest {
  4366. sinkName: string;
  4367. }
  4368. export interface StopCastingRequest {
  4369. sinkName: string;
  4370. }
  4371. /**
  4372. * This is fired whenever the list of available sinks changes. A sink is a
  4373. * device or a software surface that you can cast to.
  4374. */
  4375. export interface SinksUpdatedEvent {
  4376. sinks: Sink[];
  4377. }
  4378. /**
  4379. * This is fired whenever the outstanding issue/error message changes.
  4380. * |issueMessage| is empty if there is no issue.
  4381. */
  4382. export interface IssueUpdatedEvent {
  4383. issueMessage: string;
  4384. }
  4385. }
  4386. /**
  4387. * This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
  4388. * that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
  4389. * the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
  4390. * nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
  4391. * and never sends the same node twice. It is client's responsibility to collect information about
  4392. * the nodes that were sent to the client.<p>Note that `iframe` owner elements will return
  4393. * corresponding document elements as their child nodes.</p>
  4394. */
  4395. export namespace DOM {
  4396. /**
  4397. * Unique DOM node identifier.
  4398. */
  4399. export type NodeId = integer;
  4400. /**
  4401. * Unique DOM node identifier used to reference a node that may not have been pushed to the
  4402. * front-end.
  4403. */
  4404. export type BackendNodeId = integer;
  4405. /**
  4406. * Backend node with a friendly name.
  4407. */
  4408. export interface BackendNode {
  4409. /**
  4410. * `Node`'s nodeType.
  4411. */
  4412. nodeType: integer;
  4413. /**
  4414. * `Node`'s nodeName.
  4415. */
  4416. nodeName: string;
  4417. backendNodeId: BackendNodeId;
  4418. }
  4419. /**
  4420. * Pseudo element type.
  4421. */
  4422. export type PseudoType = ('first-line' | 'first-letter' | 'before' | 'after' | 'marker' | 'backdrop' | 'selection' | 'first-line-inherited' | 'scrollbar' | 'scrollbar-thumb' | 'scrollbar-button' | 'scrollbar-track' | 'scrollbar-track-piece' | 'scrollbar-corner' | 'resizer' | 'input-list-button');
  4423. /**
  4424. * Shadow root type.
  4425. */
  4426. export type ShadowRootType = ('user-agent' | 'open' | 'closed');
  4427. /**
  4428. * DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
  4429. * DOMNode is a base node mirror type.
  4430. */
  4431. export interface Node {
  4432. /**
  4433. * Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend
  4434. * will only push node with given `id` once. It is aware of all requested nodes and will only
  4435. * fire DOM events for nodes known to the client.
  4436. */
  4437. nodeId: NodeId;
  4438. /**
  4439. * The id of the parent node if any.
  4440. */
  4441. parentId?: NodeId;
  4442. /**
  4443. * The BackendNodeId for this node.
  4444. */
  4445. backendNodeId: BackendNodeId;
  4446. /**
  4447. * `Node`'s nodeType.
  4448. */
  4449. nodeType: integer;
  4450. /**
  4451. * `Node`'s nodeName.
  4452. */
  4453. nodeName: string;
  4454. /**
  4455. * `Node`'s localName.
  4456. */
  4457. localName: string;
  4458. /**
  4459. * `Node`'s nodeValue.
  4460. */
  4461. nodeValue: string;
  4462. /**
  4463. * Child count for `Container` nodes.
  4464. */
  4465. childNodeCount?: integer;
  4466. /**
  4467. * Child nodes of this node when requested with children.
  4468. */
  4469. children?: Node[];
  4470. /**
  4471. * Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
  4472. */
  4473. attributes?: string[];
  4474. /**
  4475. * Document URL that `Document` or `FrameOwner` node points to.
  4476. */
  4477. documentURL?: string;
  4478. /**
  4479. * Base URL that `Document` or `FrameOwner` node uses for URL completion.
  4480. */
  4481. baseURL?: string;
  4482. /**
  4483. * `DocumentType`'s publicId.
  4484. */
  4485. publicId?: string;
  4486. /**
  4487. * `DocumentType`'s systemId.
  4488. */
  4489. systemId?: string;
  4490. /**
  4491. * `DocumentType`'s internalSubset.
  4492. */
  4493. internalSubset?: string;
  4494. /**
  4495. * `Document`'s XML version in case of XML documents.
  4496. */
  4497. xmlVersion?: string;
  4498. /**
  4499. * `Attr`'s name.
  4500. */
  4501. name?: string;
  4502. /**
  4503. * `Attr`'s value.
  4504. */
  4505. value?: string;
  4506. /**
  4507. * Pseudo element type for this node.
  4508. */
  4509. pseudoType?: PseudoType;
  4510. /**
  4511. * Shadow root type.
  4512. */
  4513. shadowRootType?: ShadowRootType;
  4514. /**
  4515. * Frame ID for frame owner elements.
  4516. */
  4517. frameId?: Page.FrameId;
  4518. /**
  4519. * Content document for frame owner elements.
  4520. */
  4521. contentDocument?: Node;
  4522. /**
  4523. * Shadow root list for given element host.
  4524. */
  4525. shadowRoots?: Node[];
  4526. /**
  4527. * Content document fragment for template elements.
  4528. */
  4529. templateContent?: Node;
  4530. /**
  4531. * Pseudo elements associated with this node.
  4532. */
  4533. pseudoElements?: Node[];
  4534. /**
  4535. * Import document for the HTMLImport links.
  4536. */
  4537. importedDocument?: Node;
  4538. /**
  4539. * Distributed nodes for given insertion point.
  4540. */
  4541. distributedNodes?: BackendNode[];
  4542. /**
  4543. * Whether the node is SVG.
  4544. */
  4545. isSVG?: boolean;
  4546. }
  4547. /**
  4548. * A structure holding an RGBA color.
  4549. */
  4550. export interface RGBA {
  4551. /**
  4552. * The red component, in the [0-255] range.
  4553. */
  4554. r: integer;
  4555. /**
  4556. * The green component, in the [0-255] range.
  4557. */
  4558. g: integer;
  4559. /**
  4560. * The blue component, in the [0-255] range.
  4561. */
  4562. b: integer;
  4563. /**
  4564. * The alpha component, in the [0-1] range (default: 1).
  4565. */
  4566. a?: number;
  4567. }
  4568. /**
  4569. * An array of quad vertices, x immediately followed by y for each point, points clock-wise.
  4570. */
  4571. export type Quad = number[];
  4572. /**
  4573. * Box model.
  4574. */
  4575. export interface BoxModel {
  4576. /**
  4577. * Content box
  4578. */
  4579. content: Quad;
  4580. /**
  4581. * Padding box
  4582. */
  4583. padding: Quad;
  4584. /**
  4585. * Border box
  4586. */
  4587. border: Quad;
  4588. /**
  4589. * Margin box
  4590. */
  4591. margin: Quad;
  4592. /**
  4593. * Node width
  4594. */
  4595. width: integer;
  4596. /**
  4597. * Node height
  4598. */
  4599. height: integer;
  4600. /**
  4601. * Shape outside coordinates
  4602. */
  4603. shapeOutside?: ShapeOutsideInfo;
  4604. }
  4605. /**
  4606. * CSS Shape Outside details.
  4607. */
  4608. export interface ShapeOutsideInfo {
  4609. /**
  4610. * Shape bounds
  4611. */
  4612. bounds: Quad;
  4613. /**
  4614. * Shape coordinate details
  4615. */
  4616. shape: any[];
  4617. /**
  4618. * Margin shape bounds
  4619. */
  4620. marginShape: any[];
  4621. }
  4622. /**
  4623. * Rectangle.
  4624. */
  4625. export interface Rect {
  4626. /**
  4627. * X coordinate
  4628. */
  4629. x: number;
  4630. /**
  4631. * Y coordinate
  4632. */
  4633. y: number;
  4634. /**
  4635. * Rectangle width
  4636. */
  4637. width: number;
  4638. /**
  4639. * Rectangle height
  4640. */
  4641. height: number;
  4642. }
  4643. export interface CSSComputedStyleProperty {
  4644. /**
  4645. * Computed style property name.
  4646. */
  4647. name: string;
  4648. /**
  4649. * Computed style property value.
  4650. */
  4651. value: string;
  4652. }
  4653. export interface CollectClassNamesFromSubtreeRequest {
  4654. /**
  4655. * Id of the node to collect class names.
  4656. */
  4657. nodeId: NodeId;
  4658. }
  4659. export interface CollectClassNamesFromSubtreeResponse {
  4660. /**
  4661. * Class name list.
  4662. */
  4663. classNames: string[];
  4664. }
  4665. export interface CopyToRequest {
  4666. /**
  4667. * Id of the node to copy.
  4668. */
  4669. nodeId: NodeId;
  4670. /**
  4671. * Id of the element to drop the copy into.
  4672. */
  4673. targetNodeId: NodeId;
  4674. /**
  4675. * Drop the copy before this node (if absent, the copy becomes the last child of
  4676. * `targetNodeId`).
  4677. */
  4678. insertBeforeNodeId?: NodeId;
  4679. }
  4680. export interface CopyToResponse {
  4681. /**
  4682. * Id of the node clone.
  4683. */
  4684. nodeId: NodeId;
  4685. }
  4686. export interface DescribeNodeRequest {
  4687. /**
  4688. * Identifier of the node.
  4689. */
  4690. nodeId?: NodeId;
  4691. /**
  4692. * Identifier of the backend node.
  4693. */
  4694. backendNodeId?: BackendNodeId;
  4695. /**
  4696. * JavaScript object id of the node wrapper.
  4697. */
  4698. objectId?: Runtime.RemoteObjectId;
  4699. /**
  4700. * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
  4701. * entire subtree or provide an integer larger than 0.
  4702. */
  4703. depth?: integer;
  4704. /**
  4705. * Whether or not iframes and shadow roots should be traversed when returning the subtree
  4706. * (default is false).
  4707. */
  4708. pierce?: boolean;
  4709. }
  4710. export interface DescribeNodeResponse {
  4711. /**
  4712. * Node description.
  4713. */
  4714. node: Node;
  4715. }
  4716. export interface ScrollIntoViewIfNeededRequest {
  4717. /**
  4718. * Identifier of the node.
  4719. */
  4720. nodeId?: NodeId;
  4721. /**
  4722. * Identifier of the backend node.
  4723. */
  4724. backendNodeId?: BackendNodeId;
  4725. /**
  4726. * JavaScript object id of the node wrapper.
  4727. */
  4728. objectId?: Runtime.RemoteObjectId;
  4729. /**
  4730. * The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
  4731. * When omitted, center of the node will be used, similar to Element.scrollIntoView.
  4732. */
  4733. rect?: Rect;
  4734. }
  4735. export interface DiscardSearchResultsRequest {
  4736. /**
  4737. * Unique search session identifier.
  4738. */
  4739. searchId: string;
  4740. }
  4741. export interface FocusRequest {
  4742. /**
  4743. * Identifier of the node.
  4744. */
  4745. nodeId?: NodeId;
  4746. /**
  4747. * Identifier of the backend node.
  4748. */
  4749. backendNodeId?: BackendNodeId;
  4750. /**
  4751. * JavaScript object id of the node wrapper.
  4752. */
  4753. objectId?: Runtime.RemoteObjectId;
  4754. }
  4755. export interface GetAttributesRequest {
  4756. /**
  4757. * Id of the node to retrieve attibutes for.
  4758. */
  4759. nodeId: NodeId;
  4760. }
  4761. export interface GetAttributesResponse {
  4762. /**
  4763. * An interleaved array of node attribute names and values.
  4764. */
  4765. attributes: string[];
  4766. }
  4767. export interface GetBoxModelRequest {
  4768. /**
  4769. * Identifier of the node.
  4770. */
  4771. nodeId?: NodeId;
  4772. /**
  4773. * Identifier of the backend node.
  4774. */
  4775. backendNodeId?: BackendNodeId;
  4776. /**
  4777. * JavaScript object id of the node wrapper.
  4778. */
  4779. objectId?: Runtime.RemoteObjectId;
  4780. }
  4781. export interface GetBoxModelResponse {
  4782. /**
  4783. * Box model for the node.
  4784. */
  4785. model: BoxModel;
  4786. }
  4787. export interface GetContentQuadsRequest {
  4788. /**
  4789. * Identifier of the node.
  4790. */
  4791. nodeId?: NodeId;
  4792. /**
  4793. * Identifier of the backend node.
  4794. */
  4795. backendNodeId?: BackendNodeId;
  4796. /**
  4797. * JavaScript object id of the node wrapper.
  4798. */
  4799. objectId?: Runtime.RemoteObjectId;
  4800. }
  4801. export interface GetContentQuadsResponse {
  4802. /**
  4803. * Quads that describe node layout relative to viewport.
  4804. */
  4805. quads: Quad[];
  4806. }
  4807. export interface GetDocumentRequest {
  4808. /**
  4809. * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
  4810. * entire subtree or provide an integer larger than 0.
  4811. */
  4812. depth?: integer;
  4813. /**
  4814. * Whether or not iframes and shadow roots should be traversed when returning the subtree
  4815. * (default is false).
  4816. */
  4817. pierce?: boolean;
  4818. }
  4819. export interface GetDocumentResponse {
  4820. /**
  4821. * Resulting node.
  4822. */
  4823. root: Node;
  4824. }
  4825. export interface GetFlattenedDocumentRequest {
  4826. /**
  4827. * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
  4828. * entire subtree or provide an integer larger than 0.
  4829. */
  4830. depth?: integer;
  4831. /**
  4832. * Whether or not iframes and shadow roots should be traversed when returning the subtree
  4833. * (default is false).
  4834. */
  4835. pierce?: boolean;
  4836. }
  4837. export interface GetFlattenedDocumentResponse {
  4838. /**
  4839. * Resulting node.
  4840. */
  4841. nodes: Node[];
  4842. }
  4843. export interface GetNodesForSubtreeByStyleRequest {
  4844. /**
  4845. * Node ID pointing to the root of a subtree.
  4846. */
  4847. nodeId: NodeId;
  4848. /**
  4849. * The style to filter nodes by (includes nodes if any of properties matches).
  4850. */
  4851. computedStyles: CSSComputedStyleProperty[];
  4852. /**
  4853. * Whether or not iframes and shadow roots in the same target should be traversed when returning the
  4854. * results (default is false).
  4855. */
  4856. pierce?: boolean;
  4857. }
  4858. export interface GetNodesForSubtreeByStyleResponse {
  4859. /**
  4860. * Resulting nodes.
  4861. */
  4862. nodeIds: NodeId[];
  4863. }
  4864. export interface GetNodeForLocationRequest {
  4865. /**
  4866. * X coordinate.
  4867. */
  4868. x: integer;
  4869. /**
  4870. * Y coordinate.
  4871. */
  4872. y: integer;
  4873. /**
  4874. * False to skip to the nearest non-UA shadow root ancestor (default: false).
  4875. */
  4876. includeUserAgentShadowDOM?: boolean;
  4877. /**
  4878. * Whether to ignore pointer-events: none on elements and hit test them.
  4879. */
  4880. ignorePointerEventsNone?: boolean;
  4881. }
  4882. export interface GetNodeForLocationResponse {
  4883. /**
  4884. * Resulting node.
  4885. */
  4886. backendNodeId: BackendNodeId;
  4887. /**
  4888. * Frame this node belongs to.
  4889. */
  4890. frameId: Page.FrameId;
  4891. /**
  4892. * Id of the node at given coordinates, only when enabled and requested document.
  4893. */
  4894. nodeId?: NodeId;
  4895. }
  4896. export interface GetOuterHTMLRequest {
  4897. /**
  4898. * Identifier of the node.
  4899. */
  4900. nodeId?: NodeId;
  4901. /**
  4902. * Identifier of the backend node.
  4903. */
  4904. backendNodeId?: BackendNodeId;
  4905. /**
  4906. * JavaScript object id of the node wrapper.
  4907. */
  4908. objectId?: Runtime.RemoteObjectId;
  4909. }
  4910. export interface GetOuterHTMLResponse {
  4911. /**
  4912. * Outer HTML markup.
  4913. */
  4914. outerHTML: string;
  4915. }
  4916. export interface GetRelayoutBoundaryRequest {
  4917. /**
  4918. * Id of the node.
  4919. */
  4920. nodeId: NodeId;
  4921. }
  4922. export interface GetRelayoutBoundaryResponse {
  4923. /**
  4924. * Relayout boundary node id for the given node.
  4925. */
  4926. nodeId: NodeId;
  4927. }
  4928. export interface GetSearchResultsRequest {
  4929. /**
  4930. * Unique search session identifier.
  4931. */
  4932. searchId: string;
  4933. /**
  4934. * Start index of the search result to be returned.
  4935. */
  4936. fromIndex: integer;
  4937. /**
  4938. * End index of the search result to be returned.
  4939. */
  4940. toIndex: integer;
  4941. }
  4942. export interface GetSearchResultsResponse {
  4943. /**
  4944. * Ids of the search result nodes.
  4945. */
  4946. nodeIds: NodeId[];
  4947. }
  4948. export interface MoveToRequest {
  4949. /**
  4950. * Id of the node to move.
  4951. */
  4952. nodeId: NodeId;
  4953. /**
  4954. * Id of the element to drop the moved node into.
  4955. */
  4956. targetNodeId: NodeId;
  4957. /**
  4958. * Drop node before this one (if absent, the moved node becomes the last child of
  4959. * `targetNodeId`).
  4960. */
  4961. insertBeforeNodeId?: NodeId;
  4962. }
  4963. export interface MoveToResponse {
  4964. /**
  4965. * New id of the moved node.
  4966. */
  4967. nodeId: NodeId;
  4968. }
  4969. export interface PerformSearchRequest {
  4970. /**
  4971. * Plain text or query selector or XPath search query.
  4972. */
  4973. query: string;
  4974. /**
  4975. * True to search in user agent shadow DOM.
  4976. */
  4977. includeUserAgentShadowDOM?: boolean;
  4978. }
  4979. export interface PerformSearchResponse {
  4980. /**
  4981. * Unique search session identifier.
  4982. */
  4983. searchId: string;
  4984. /**
  4985. * Number of search results.
  4986. */
  4987. resultCount: integer;
  4988. }
  4989. export interface PushNodeByPathToFrontendRequest {
  4990. /**
  4991. * Path to node in the proprietary format.
  4992. */
  4993. path: string;
  4994. }
  4995. export interface PushNodeByPathToFrontendResponse {
  4996. /**
  4997. * Id of the node for given path.
  4998. */
  4999. nodeId: NodeId;
  5000. }
  5001. export interface PushNodesByBackendIdsToFrontendRequest {
  5002. /**
  5003. * The array of backend node ids.
  5004. */
  5005. backendNodeIds: BackendNodeId[];
  5006. }
  5007. export interface PushNodesByBackendIdsToFrontendResponse {
  5008. /**
  5009. * The array of ids of pushed nodes that correspond to the backend ids specified in
  5010. * backendNodeIds.
  5011. */
  5012. nodeIds: NodeId[];
  5013. }
  5014. export interface QuerySelectorRequest {
  5015. /**
  5016. * Id of the node to query upon.
  5017. */
  5018. nodeId: NodeId;
  5019. /**
  5020. * Selector string.
  5021. */
  5022. selector: string;
  5023. }
  5024. export interface QuerySelectorResponse {
  5025. /**
  5026. * Query selector result.
  5027. */
  5028. nodeId: NodeId;
  5029. }
  5030. export interface QuerySelectorAllRequest {
  5031. /**
  5032. * Id of the node to query upon.
  5033. */
  5034. nodeId: NodeId;
  5035. /**
  5036. * Selector string.
  5037. */
  5038. selector: string;
  5039. }
  5040. export interface QuerySelectorAllResponse {
  5041. /**
  5042. * Query selector result.
  5043. */
  5044. nodeIds: NodeId[];
  5045. }
  5046. export interface RemoveAttributeRequest {
  5047. /**
  5048. * Id of the element to remove attribute from.
  5049. */
  5050. nodeId: NodeId;
  5051. /**
  5052. * Name of the attribute to remove.
  5053. */
  5054. name: string;
  5055. }
  5056. export interface RemoveNodeRequest {
  5057. /**
  5058. * Id of the node to remove.
  5059. */
  5060. nodeId: NodeId;
  5061. }
  5062. export interface RequestChildNodesRequest {
  5063. /**
  5064. * Id of the node to get children for.
  5065. */
  5066. nodeId: NodeId;
  5067. /**
  5068. * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
  5069. * entire subtree or provide an integer larger than 0.
  5070. */
  5071. depth?: integer;
  5072. /**
  5073. * Whether or not iframes and shadow roots should be traversed when returning the sub-tree
  5074. * (default is false).
  5075. */
  5076. pierce?: boolean;
  5077. }
  5078. export interface RequestNodeRequest {
  5079. /**
  5080. * JavaScript object id to convert into node.
  5081. */
  5082. objectId: Runtime.RemoteObjectId;
  5083. }
  5084. export interface RequestNodeResponse {
  5085. /**
  5086. * Node id for given object.
  5087. */
  5088. nodeId: NodeId;
  5089. }
  5090. export interface ResolveNodeRequest {
  5091. /**
  5092. * Id of the node to resolve.
  5093. */
  5094. nodeId?: NodeId;
  5095. /**
  5096. * Backend identifier of the node to resolve.
  5097. */
  5098. backendNodeId?: DOM.BackendNodeId;
  5099. /**
  5100. * Symbolic group name that can be used to release multiple objects.
  5101. */
  5102. objectGroup?: string;
  5103. /**
  5104. * Execution context in which to resolve the node.
  5105. */
  5106. executionContextId?: Runtime.ExecutionContextId;
  5107. }
  5108. export interface ResolveNodeResponse {
  5109. /**
  5110. * JavaScript object wrapper for given node.
  5111. */
  5112. object: Runtime.RemoteObject;
  5113. }
  5114. export interface SetAttributeValueRequest {
  5115. /**
  5116. * Id of the element to set attribute for.
  5117. */
  5118. nodeId: NodeId;
  5119. /**
  5120. * Attribute name.
  5121. */
  5122. name: string;
  5123. /**
  5124. * Attribute value.
  5125. */
  5126. value: string;
  5127. }
  5128. export interface SetAttributesAsTextRequest {
  5129. /**
  5130. * Id of the element to set attributes for.
  5131. */
  5132. nodeId: NodeId;
  5133. /**
  5134. * Text with a number of attributes. Will parse this text using HTML parser.
  5135. */
  5136. text: string;
  5137. /**
  5138. * Attribute name to replace with new attributes derived from text in case text parsed
  5139. * successfully.
  5140. */
  5141. name?: string;
  5142. }
  5143. export interface SetFileInputFilesRequest {
  5144. /**
  5145. * Array of file paths to set.
  5146. */
  5147. files: string[];
  5148. /**
  5149. * Identifier of the node.
  5150. */
  5151. nodeId?: NodeId;
  5152. /**
  5153. * Identifier of the backend node.
  5154. */
  5155. backendNodeId?: BackendNodeId;
  5156. /**
  5157. * JavaScript object id of the node wrapper.
  5158. */
  5159. objectId?: Runtime.RemoteObjectId;
  5160. }
  5161. export interface SetNodeStackTracesEnabledRequest {
  5162. /**
  5163. * Enable or disable.
  5164. */
  5165. enable: boolean;
  5166. }
  5167. export interface GetNodeStackTracesRequest {
  5168. /**
  5169. * Id of the node to get stack traces for.
  5170. */
  5171. nodeId: NodeId;
  5172. }
  5173. export interface GetNodeStackTracesResponse {
  5174. /**
  5175. * Creation stack trace, if available.
  5176. */
  5177. creation?: Runtime.StackTrace;
  5178. }
  5179. export interface GetFileInfoRequest {
  5180. /**
  5181. * JavaScript object id of the node wrapper.
  5182. */
  5183. objectId: Runtime.RemoteObjectId;
  5184. }
  5185. export interface GetFileInfoResponse {
  5186. path: string;
  5187. }
  5188. export interface SetInspectedNodeRequest {
  5189. /**
  5190. * DOM node id to be accessible by means of $x command line API.
  5191. */
  5192. nodeId: NodeId;
  5193. }
  5194. export interface SetNodeNameRequest {
  5195. /**
  5196. * Id of the node to set name for.
  5197. */
  5198. nodeId: NodeId;
  5199. /**
  5200. * New node's name.
  5201. */
  5202. name: string;
  5203. }
  5204. export interface SetNodeNameResponse {
  5205. /**
  5206. * New node's id.
  5207. */
  5208. nodeId: NodeId;
  5209. }
  5210. export interface SetNodeValueRequest {
  5211. /**
  5212. * Id of the node to set value for.
  5213. */
  5214. nodeId: NodeId;
  5215. /**
  5216. * New node's value.
  5217. */
  5218. value: string;
  5219. }
  5220. export interface SetOuterHTMLRequest {
  5221. /**
  5222. * Id of the node to set markup for.
  5223. */
  5224. nodeId: NodeId;
  5225. /**
  5226. * Outer HTML markup to set.
  5227. */
  5228. outerHTML: string;
  5229. }
  5230. export interface GetFrameOwnerRequest {
  5231. frameId: Page.FrameId;
  5232. }
  5233. export interface GetFrameOwnerResponse {
  5234. /**
  5235. * Resulting node.
  5236. */
  5237. backendNodeId: BackendNodeId;
  5238. /**
  5239. * Id of the node at given coordinates, only when enabled and requested document.
  5240. */
  5241. nodeId?: NodeId;
  5242. }
  5243. /**
  5244. * Fired when `Element`'s attribute is modified.
  5245. */
  5246. export interface AttributeModifiedEvent {
  5247. /**
  5248. * Id of the node that has changed.
  5249. */
  5250. nodeId: NodeId;
  5251. /**
  5252. * Attribute name.
  5253. */
  5254. name: string;
  5255. /**
  5256. * Attribute value.
  5257. */
  5258. value: string;
  5259. }
  5260. /**
  5261. * Fired when `Element`'s attribute is removed.
  5262. */
  5263. export interface AttributeRemovedEvent {
  5264. /**
  5265. * Id of the node that has changed.
  5266. */
  5267. nodeId: NodeId;
  5268. /**
  5269. * A ttribute name.
  5270. */
  5271. name: string;
  5272. }
  5273. /**
  5274. * Mirrors `DOMCharacterDataModified` event.
  5275. */
  5276. export interface CharacterDataModifiedEvent {
  5277. /**
  5278. * Id of the node that has changed.
  5279. */
  5280. nodeId: NodeId;
  5281. /**
  5282. * New text value.
  5283. */
  5284. characterData: string;
  5285. }
  5286. /**
  5287. * Fired when `Container`'s child node count has changed.
  5288. */
  5289. export interface ChildNodeCountUpdatedEvent {
  5290. /**
  5291. * Id of the node that has changed.
  5292. */
  5293. nodeId: NodeId;
  5294. /**
  5295. * New node count.
  5296. */
  5297. childNodeCount: integer;
  5298. }
  5299. /**
  5300. * Mirrors `DOMNodeInserted` event.
  5301. */
  5302. export interface ChildNodeInsertedEvent {
  5303. /**
  5304. * Id of the node that has changed.
  5305. */
  5306. parentNodeId: NodeId;
  5307. /**
  5308. * If of the previous siblint.
  5309. */
  5310. previousNodeId: NodeId;
  5311. /**
  5312. * Inserted node data.
  5313. */
  5314. node: Node;
  5315. }
  5316. /**
  5317. * Mirrors `DOMNodeRemoved` event.
  5318. */
  5319. export interface ChildNodeRemovedEvent {
  5320. /**
  5321. * Parent id.
  5322. */
  5323. parentNodeId: NodeId;
  5324. /**
  5325. * Id of the node that has been removed.
  5326. */
  5327. nodeId: NodeId;
  5328. }
  5329. /**
  5330. * Called when distrubution is changed.
  5331. */
  5332. export interface DistributedNodesUpdatedEvent {
  5333. /**
  5334. * Insertion point where distrubuted nodes were updated.
  5335. */
  5336. insertionPointId: NodeId;
  5337. /**
  5338. * Distributed nodes for given insertion point.
  5339. */
  5340. distributedNodes: BackendNode[];
  5341. }
  5342. /**
  5343. * Fired when `Element`'s inline style is modified via a CSS property modification.
  5344. */
  5345. export interface InlineStyleInvalidatedEvent {
  5346. /**
  5347. * Ids of the nodes for which the inline styles have been invalidated.
  5348. */
  5349. nodeIds: NodeId[];
  5350. }
  5351. /**
  5352. * Called when a pseudo element is added to an element.
  5353. */
  5354. export interface PseudoElementAddedEvent {
  5355. /**
  5356. * Pseudo element's parent element id.
  5357. */
  5358. parentId: NodeId;
  5359. /**
  5360. * The added pseudo element.
  5361. */
  5362. pseudoElement: Node;
  5363. }
  5364. /**
  5365. * Called when a pseudo element is removed from an element.
  5366. */
  5367. export interface PseudoElementRemovedEvent {
  5368. /**
  5369. * Pseudo element's parent element id.
  5370. */
  5371. parentId: NodeId;
  5372. /**
  5373. * The removed pseudo element id.
  5374. */
  5375. pseudoElementId: NodeId;
  5376. }
  5377. /**
  5378. * Fired when backend wants to provide client with the missing DOM structure. This happens upon
  5379. * most of the calls requesting node ids.
  5380. */
  5381. export interface SetChildNodesEvent {
  5382. /**
  5383. * Parent node id to populate with children.
  5384. */
  5385. parentId: NodeId;
  5386. /**
  5387. * Child nodes array.
  5388. */
  5389. nodes: Node[];
  5390. }
  5391. /**
  5392. * Called when shadow root is popped from the element.
  5393. */
  5394. export interface ShadowRootPoppedEvent {
  5395. /**
  5396. * Host element id.
  5397. */
  5398. hostId: NodeId;
  5399. /**
  5400. * Shadow root id.
  5401. */
  5402. rootId: NodeId;
  5403. }
  5404. /**
  5405. * Called when shadow root is pushed into the element.
  5406. */
  5407. export interface ShadowRootPushedEvent {
  5408. /**
  5409. * Host element id.
  5410. */
  5411. hostId: NodeId;
  5412. /**
  5413. * Shadow root.
  5414. */
  5415. root: Node;
  5416. }
  5417. }
  5418. /**
  5419. * DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript
  5420. * execution will stop on these operations as if there was a regular breakpoint set.
  5421. */
  5422. export namespace DOMDebugger {
  5423. /**
  5424. * DOM breakpoint type.
  5425. */
  5426. export type DOMBreakpointType = ('subtree-modified' | 'attribute-modified' | 'node-removed');
  5427. /**
  5428. * Object event listener.
  5429. */
  5430. export interface EventListener {
  5431. /**
  5432. * `EventListener`'s type.
  5433. */
  5434. type: string;
  5435. /**
  5436. * `EventListener`'s useCapture.
  5437. */
  5438. useCapture: boolean;
  5439. /**
  5440. * `EventListener`'s passive flag.
  5441. */
  5442. passive: boolean;
  5443. /**
  5444. * `EventListener`'s once flag.
  5445. */
  5446. once: boolean;
  5447. /**
  5448. * Script id of the handler code.
  5449. */
  5450. scriptId: Runtime.ScriptId;
  5451. /**
  5452. * Line number in the script (0-based).
  5453. */
  5454. lineNumber: integer;
  5455. /**
  5456. * Column number in the script (0-based).
  5457. */
  5458. columnNumber: integer;
  5459. /**
  5460. * Event handler function value.
  5461. */
  5462. handler?: Runtime.RemoteObject;
  5463. /**
  5464. * Event original handler function value.
  5465. */
  5466. originalHandler?: Runtime.RemoteObject;
  5467. /**
  5468. * Node the listener is added to (if any).
  5469. */
  5470. backendNodeId?: DOM.BackendNodeId;
  5471. }
  5472. export interface GetEventListenersRequest {
  5473. /**
  5474. * Identifier of the object to return listeners for.
  5475. */
  5476. objectId: Runtime.RemoteObjectId;
  5477. /**
  5478. * The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
  5479. * entire subtree or provide an integer larger than 0.
  5480. */
  5481. depth?: integer;
  5482. /**
  5483. * Whether or not iframes and shadow roots should be traversed when returning the subtree
  5484. * (default is false). Reports listeners for all contexts if pierce is enabled.
  5485. */
  5486. pierce?: boolean;
  5487. }
  5488. export interface GetEventListenersResponse {
  5489. /**
  5490. * Array of relevant listeners.
  5491. */
  5492. listeners: EventListener[];
  5493. }
  5494. export interface RemoveDOMBreakpointRequest {
  5495. /**
  5496. * Identifier of the node to remove breakpoint from.
  5497. */
  5498. nodeId: DOM.NodeId;
  5499. /**
  5500. * Type of the breakpoint to remove.
  5501. */
  5502. type: DOMBreakpointType;
  5503. }
  5504. export interface RemoveEventListenerBreakpointRequest {
  5505. /**
  5506. * Event name.
  5507. */
  5508. eventName: string;
  5509. /**
  5510. * EventTarget interface name.
  5511. */
  5512. targetName?: string;
  5513. }
  5514. export interface RemoveInstrumentationBreakpointRequest {
  5515. /**
  5516. * Instrumentation name to stop on.
  5517. */
  5518. eventName: string;
  5519. }
  5520. export interface RemoveXHRBreakpointRequest {
  5521. /**
  5522. * Resource URL substring.
  5523. */
  5524. url: string;
  5525. }
  5526. export interface SetDOMBreakpointRequest {
  5527. /**
  5528. * Identifier of the node to set breakpoint on.
  5529. */
  5530. nodeId: DOM.NodeId;
  5531. /**
  5532. * Type of the operation to stop upon.
  5533. */
  5534. type: DOMBreakpointType;
  5535. }
  5536. export interface SetEventListenerBreakpointRequest {
  5537. /**
  5538. * DOM Event name to stop on (any DOM event will do).
  5539. */
  5540. eventName: string;
  5541. /**
  5542. * EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any
  5543. * EventTarget.
  5544. */
  5545. targetName?: string;
  5546. }
  5547. export interface SetInstrumentationBreakpointRequest {
  5548. /**
  5549. * Instrumentation name to stop on.
  5550. */
  5551. eventName: string;
  5552. }
  5553. export interface SetXHRBreakpointRequest {
  5554. /**
  5555. * Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
  5556. */
  5557. url: string;
  5558. }
  5559. }
  5560. /**
  5561. * This domain facilitates obtaining document snapshots with DOM, layout, and style information.
  5562. */
  5563. export namespace DOMSnapshot {
  5564. /**
  5565. * A Node in the DOM tree.
  5566. */
  5567. export interface DOMNode {
  5568. /**
  5569. * `Node`'s nodeType.
  5570. */
  5571. nodeType: integer;
  5572. /**
  5573. * `Node`'s nodeName.
  5574. */
  5575. nodeName: string;
  5576. /**
  5577. * `Node`'s nodeValue.
  5578. */
  5579. nodeValue: string;
  5580. /**
  5581. * Only set for textarea elements, contains the text value.
  5582. */
  5583. textValue?: string;
  5584. /**
  5585. * Only set for input elements, contains the input's associated text value.
  5586. */
  5587. inputValue?: string;
  5588. /**
  5589. * Only set for radio and checkbox input elements, indicates if the element has been checked
  5590. */
  5591. inputChecked?: boolean;
  5592. /**
  5593. * Only set for option elements, indicates if the element has been selected
  5594. */
  5595. optionSelected?: boolean;
  5596. /**
  5597. * `Node`'s id, corresponds to DOM.Node.backendNodeId.
  5598. */
  5599. backendNodeId: DOM.BackendNodeId;
  5600. /**
  5601. * The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if
  5602. * any.
  5603. */
  5604. childNodeIndexes?: integer[];
  5605. /**
  5606. * Attributes of an `Element` node.
  5607. */
  5608. attributes?: NameValue[];
  5609. /**
  5610. * Indexes of pseudo elements associated with this node in the `domNodes` array returned by
  5611. * `getSnapshot`, if any.
  5612. */
  5613. pseudoElementIndexes?: integer[];
  5614. /**
  5615. * The index of the node's related layout tree node in the `layoutTreeNodes` array returned by
  5616. * `getSnapshot`, if any.
  5617. */
  5618. layoutNodeIndex?: integer;
  5619. /**
  5620. * Document URL that `Document` or `FrameOwner` node points to.
  5621. */
  5622. documentURL?: string;
  5623. /**
  5624. * Base URL that `Document` or `FrameOwner` node uses for URL completion.
  5625. */
  5626. baseURL?: string;
  5627. /**
  5628. * Only set for documents, contains the document's content language.
  5629. */
  5630. contentLanguage?: string;
  5631. /**
  5632. * Only set for documents, contains the document's character set encoding.
  5633. */
  5634. documentEncoding?: string;
  5635. /**
  5636. * `DocumentType` node's publicId.
  5637. */
  5638. publicId?: string;
  5639. /**
  5640. * `DocumentType` node's systemId.
  5641. */
  5642. systemId?: string;
  5643. /**
  5644. * Frame ID for frame owner elements and also for the document node.
  5645. */
  5646. frameId?: Page.FrameId;
  5647. /**
  5648. * The index of a frame owner element's content document in the `domNodes` array returned by
  5649. * `getSnapshot`, if any.
  5650. */
  5651. contentDocumentIndex?: integer;
  5652. /**
  5653. * Type of a pseudo element node.
  5654. */
  5655. pseudoType?: DOM.PseudoType;
  5656. /**
  5657. * Shadow root type.
  5658. */
  5659. shadowRootType?: DOM.ShadowRootType;
  5660. /**
  5661. * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
  5662. * event listeners attached via JavaScript as well as anchor tags that naturally navigate when
  5663. * clicked.
  5664. */
  5665. isClickable?: boolean;
  5666. /**
  5667. * Details of the node's event listeners, if any.
  5668. */
  5669. eventListeners?: DOMDebugger.EventListener[];
  5670. /**
  5671. * The selected url for nodes with a srcset attribute.
  5672. */
  5673. currentSourceURL?: string;
  5674. /**
  5675. * The url of the script (if any) that generates this node.
  5676. */
  5677. originURL?: string;
  5678. /**
  5679. * Scroll offsets, set when this node is a Document.
  5680. */
  5681. scrollOffsetX?: number;
  5682. scrollOffsetY?: number;
  5683. }
  5684. /**
  5685. * Details of post layout rendered text positions. The exact layout should not be regarded as
  5686. * stable and may change between versions.
  5687. */
  5688. export interface InlineTextBox {
  5689. /**
  5690. * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
  5691. */
  5692. boundingBox: DOM.Rect;
  5693. /**
  5694. * The starting index in characters, for this post layout textbox substring. Characters that
  5695. * would be represented as a surrogate pair in UTF-16 have length 2.
  5696. */
  5697. startCharacterIndex: integer;
  5698. /**
  5699. * The number of characters in this post layout textbox substring. Characters that would be
  5700. * represented as a surrogate pair in UTF-16 have length 2.
  5701. */
  5702. numCharacters: integer;
  5703. }
  5704. /**
  5705. * Details of an element in the DOM tree with a LayoutObject.
  5706. */
  5707. export interface LayoutTreeNode {
  5708. /**
  5709. * The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
  5710. */
  5711. domNodeIndex: integer;
  5712. /**
  5713. * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
  5714. */
  5715. boundingBox: DOM.Rect;
  5716. /**
  5717. * Contents of the LayoutText, if any.
  5718. */
  5719. layoutText?: string;
  5720. /**
  5721. * The post-layout inline text nodes, if any.
  5722. */
  5723. inlineTextNodes?: InlineTextBox[];
  5724. /**
  5725. * Index into the `computedStyles` array returned by `getSnapshot`.
  5726. */
  5727. styleIndex?: integer;
  5728. /**
  5729. * Global paint order index, which is determined by the stacking order of the nodes. Nodes
  5730. * that are painted together will have the same index. Only provided if includePaintOrder in
  5731. * getSnapshot was true.
  5732. */
  5733. paintOrder?: integer;
  5734. /**
  5735. * Set to true to indicate the element begins a new stacking context.
  5736. */
  5737. isStackingContext?: boolean;
  5738. }
  5739. /**
  5740. * A subset of the full ComputedStyle as defined by the request whitelist.
  5741. */
  5742. export interface ComputedStyle {
  5743. /**
  5744. * Name/value pairs of computed style properties.
  5745. */
  5746. properties: NameValue[];
  5747. }
  5748. /**
  5749. * A name/value pair.
  5750. */
  5751. export interface NameValue {
  5752. /**
  5753. * Attribute/property name.
  5754. */
  5755. name: string;
  5756. /**
  5757. * Attribute/property value.
  5758. */
  5759. value: string;
  5760. }
  5761. /**
  5762. * Index of the string in the strings table.
  5763. */
  5764. export type StringIndex = integer;
  5765. /**
  5766. * Index of the string in the strings table.
  5767. */
  5768. export type ArrayOfStrings = StringIndex[];
  5769. /**
  5770. * Data that is only present on rare nodes.
  5771. */
  5772. export interface RareStringData {
  5773. index: integer[];
  5774. value: StringIndex[];
  5775. }
  5776. export interface RareBooleanData {
  5777. index: integer[];
  5778. }
  5779. export interface RareIntegerData {
  5780. index: integer[];
  5781. value: integer[];
  5782. }
  5783. export type Rectangle = number[];
  5784. /**
  5785. * Document snapshot.
  5786. */
  5787. export interface DocumentSnapshot {
  5788. /**
  5789. * Document URL that `Document` or `FrameOwner` node points to.
  5790. */
  5791. documentURL: StringIndex;
  5792. /**
  5793. * Document title.
  5794. */
  5795. title: StringIndex;
  5796. /**
  5797. * Base URL that `Document` or `FrameOwner` node uses for URL completion.
  5798. */
  5799. baseURL: StringIndex;
  5800. /**
  5801. * Contains the document's content language.
  5802. */
  5803. contentLanguage: StringIndex;
  5804. /**
  5805. * Contains the document's character set encoding.
  5806. */
  5807. encodingName: StringIndex;
  5808. /**
  5809. * `DocumentType` node's publicId.
  5810. */
  5811. publicId: StringIndex;
  5812. /**
  5813. * `DocumentType` node's systemId.
  5814. */
  5815. systemId: StringIndex;
  5816. /**
  5817. * Frame ID for frame owner elements and also for the document node.
  5818. */
  5819. frameId: StringIndex;
  5820. /**
  5821. * A table with dom nodes.
  5822. */
  5823. nodes: NodeTreeSnapshot;
  5824. /**
  5825. * The nodes in the layout tree.
  5826. */
  5827. layout: LayoutTreeSnapshot;
  5828. /**
  5829. * The post-layout inline text nodes.
  5830. */
  5831. textBoxes: TextBoxSnapshot;
  5832. /**
  5833. * Horizontal scroll offset.
  5834. */
  5835. scrollOffsetX?: number;
  5836. /**
  5837. * Vertical scroll offset.
  5838. */
  5839. scrollOffsetY?: number;
  5840. /**
  5841. * Document content width.
  5842. */
  5843. contentWidth?: number;
  5844. /**
  5845. * Document content height.
  5846. */
  5847. contentHeight?: number;
  5848. }
  5849. /**
  5850. * Table containing nodes.
  5851. */
  5852. export interface NodeTreeSnapshot {
  5853. /**
  5854. * Parent node index.
  5855. */
  5856. parentIndex?: integer[];
  5857. /**
  5858. * `Node`'s nodeType.
  5859. */
  5860. nodeType?: integer[];
  5861. /**
  5862. * `Node`'s nodeName.
  5863. */
  5864. nodeName?: StringIndex[];
  5865. /**
  5866. * `Node`'s nodeValue.
  5867. */
  5868. nodeValue?: StringIndex[];
  5869. /**
  5870. * `Node`'s id, corresponds to DOM.Node.backendNodeId.
  5871. */
  5872. backendNodeId?: DOM.BackendNodeId[];
  5873. /**
  5874. * Attributes of an `Element` node. Flatten name, value pairs.
  5875. */
  5876. attributes?: ArrayOfStrings[];
  5877. /**
  5878. * Only set for textarea elements, contains the text value.
  5879. */
  5880. textValue?: RareStringData;
  5881. /**
  5882. * Only set for input elements, contains the input's associated text value.
  5883. */
  5884. inputValue?: RareStringData;
  5885. /**
  5886. * Only set for radio and checkbox input elements, indicates if the element has been checked
  5887. */
  5888. inputChecked?: RareBooleanData;
  5889. /**
  5890. * Only set for option elements, indicates if the element has been selected
  5891. */
  5892. optionSelected?: RareBooleanData;
  5893. /**
  5894. * The index of the document in the list of the snapshot documents.
  5895. */
  5896. contentDocumentIndex?: RareIntegerData;
  5897. /**
  5898. * Type of a pseudo element node.
  5899. */
  5900. pseudoType?: RareStringData;
  5901. /**
  5902. * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
  5903. * event listeners attached via JavaScript as well as anchor tags that naturally navigate when
  5904. * clicked.
  5905. */
  5906. isClickable?: RareBooleanData;
  5907. /**
  5908. * The selected url for nodes with a srcset attribute.
  5909. */
  5910. currentSourceURL?: RareStringData;
  5911. /**
  5912. * The url of the script (if any) that generates this node.
  5913. */
  5914. originURL?: RareStringData;
  5915. }
  5916. /**
  5917. * Table of details of an element in the DOM tree with a LayoutObject.
  5918. */
  5919. export interface LayoutTreeSnapshot {
  5920. /**
  5921. * Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
  5922. */
  5923. nodeIndex: integer[];
  5924. /**
  5925. * Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
  5926. */
  5927. styles: ArrayOfStrings[];
  5928. /**
  5929. * The absolute position bounding box.
  5930. */
  5931. bounds: Rectangle[];
  5932. /**
  5933. * Contents of the LayoutText, if any.
  5934. */
  5935. text: StringIndex[];
  5936. /**
  5937. * Stacking context information.
  5938. */
  5939. stackingContexts: RareBooleanData;
  5940. /**
  5941. * Global paint order index, which is determined by the stacking order of the nodes. Nodes
  5942. * that are painted together will have the same index. Only provided if includePaintOrder in
  5943. * captureSnapshot was true.
  5944. */
  5945. paintOrders?: integer[];
  5946. /**
  5947. * The offset rect of nodes. Only available when includeDOMRects is set to true
  5948. */
  5949. offsetRects?: Rectangle[];
  5950. /**
  5951. * The scroll rect of nodes. Only available when includeDOMRects is set to true
  5952. */
  5953. scrollRects?: Rectangle[];
  5954. /**
  5955. * The client rect of nodes. Only available when includeDOMRects is set to true
  5956. */
  5957. clientRects?: Rectangle[];
  5958. }
  5959. /**
  5960. * Table of details of the post layout rendered text positions. The exact layout should not be regarded as
  5961. * stable and may change between versions.
  5962. */
  5963. export interface TextBoxSnapshot {
  5964. /**
  5965. * Index of the layout tree node that owns this box collection.
  5966. */
  5967. layoutIndex: integer[];
  5968. /**
  5969. * The absolute position bounding box.
  5970. */
  5971. bounds: Rectangle[];
  5972. /**
  5973. * The starting index in characters, for this post layout textbox substring. Characters that
  5974. * would be represented as a surrogate pair in UTF-16 have length 2.
  5975. */
  5976. start: integer[];
  5977. /**
  5978. * The number of characters in this post layout textbox substring. Characters that would be
  5979. * represented as a surrogate pair in UTF-16 have length 2.
  5980. */
  5981. length: integer[];
  5982. }
  5983. export interface GetSnapshotRequest {
  5984. /**
  5985. * Whitelist of computed styles to return.
  5986. */
  5987. computedStyleWhitelist: string[];
  5988. /**
  5989. * Whether or not to retrieve details of DOM listeners (default false).
  5990. */
  5991. includeEventListeners?: boolean;
  5992. /**
  5993. * Whether to determine and include the paint order index of LayoutTreeNodes (default false).
  5994. */
  5995. includePaintOrder?: boolean;
  5996. /**
  5997. * Whether to include UA shadow tree in the snapshot (default false).
  5998. */
  5999. includeUserAgentShadowTree?: boolean;
  6000. }
  6001. export interface GetSnapshotResponse {
  6002. /**
  6003. * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
  6004. */
  6005. domNodes: DOMNode[];
  6006. /**
  6007. * The nodes in the layout tree.
  6008. */
  6009. layoutTreeNodes: LayoutTreeNode[];
  6010. /**
  6011. * Whitelisted ComputedStyle properties for each node in the layout tree.
  6012. */
  6013. computedStyles: ComputedStyle[];
  6014. }
  6015. export interface CaptureSnapshotRequest {
  6016. /**
  6017. * Whitelist of computed styles to return.
  6018. */
  6019. computedStyles: string[];
  6020. /**
  6021. * Whether to include layout object paint orders into the snapshot.
  6022. */
  6023. includePaintOrder?: boolean;
  6024. /**
  6025. * Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
  6026. */
  6027. includeDOMRects?: boolean;
  6028. }
  6029. export interface CaptureSnapshotResponse {
  6030. /**
  6031. * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
  6032. */
  6033. documents: DocumentSnapshot[];
  6034. /**
  6035. * Shared string table that all string properties refer to with indexes.
  6036. */
  6037. strings: string[];
  6038. }
  6039. }
  6040. /**
  6041. * Query and modify DOM storage.
  6042. */
  6043. export namespace DOMStorage {
  6044. /**
  6045. * DOM Storage identifier.
  6046. */
  6047. export interface StorageId {
  6048. /**
  6049. * Security origin for the storage.
  6050. */
  6051. securityOrigin: string;
  6052. /**
  6053. * Whether the storage is local storage (not session storage).
  6054. */
  6055. isLocalStorage: boolean;
  6056. }
  6057. /**
  6058. * DOM Storage item.
  6059. */
  6060. export type Item = string[];
  6061. export interface ClearRequest {
  6062. storageId: StorageId;
  6063. }
  6064. export interface GetDOMStorageItemsRequest {
  6065. storageId: StorageId;
  6066. }
  6067. export interface GetDOMStorageItemsResponse {
  6068. entries: Item[];
  6069. }
  6070. export interface RemoveDOMStorageItemRequest {
  6071. storageId: StorageId;
  6072. key: string;
  6073. }
  6074. export interface SetDOMStorageItemRequest {
  6075. storageId: StorageId;
  6076. key: string;
  6077. value: string;
  6078. }
  6079. export interface DomStorageItemAddedEvent {
  6080. storageId: StorageId;
  6081. key: string;
  6082. newValue: string;
  6083. }
  6084. export interface DomStorageItemRemovedEvent {
  6085. storageId: StorageId;
  6086. key: string;
  6087. }
  6088. export interface DomStorageItemUpdatedEvent {
  6089. storageId: StorageId;
  6090. key: string;
  6091. oldValue: string;
  6092. newValue: string;
  6093. }
  6094. export interface DomStorageItemsClearedEvent {
  6095. storageId: StorageId;
  6096. }
  6097. }
  6098. export namespace Database {
  6099. /**
  6100. * Unique identifier of Database object.
  6101. */
  6102. export type DatabaseId = string;
  6103. /**
  6104. * Database object.
  6105. */
  6106. export interface Database {
  6107. /**
  6108. * Database ID.
  6109. */
  6110. id: DatabaseId;
  6111. /**
  6112. * Database domain.
  6113. */
  6114. domain: string;
  6115. /**
  6116. * Database name.
  6117. */
  6118. name: string;
  6119. /**
  6120. * Database version.
  6121. */
  6122. version: string;
  6123. }
  6124. /**
  6125. * Database error.
  6126. */
  6127. export interface Error {
  6128. /**
  6129. * Error message.
  6130. */
  6131. message: string;
  6132. /**
  6133. * Error code.
  6134. */
  6135. code: integer;
  6136. }
  6137. export interface ExecuteSQLRequest {
  6138. databaseId: DatabaseId;
  6139. query: string;
  6140. }
  6141. export interface ExecuteSQLResponse {
  6142. columnNames?: string[];
  6143. values?: any[];
  6144. sqlError?: Error;
  6145. }
  6146. export interface GetDatabaseTableNamesRequest {
  6147. databaseId: DatabaseId;
  6148. }
  6149. export interface GetDatabaseTableNamesResponse {
  6150. tableNames: string[];
  6151. }
  6152. export interface AddDatabaseEvent {
  6153. database: Database;
  6154. }
  6155. }
  6156. export namespace DeviceOrientation {
  6157. export interface SetDeviceOrientationOverrideRequest {
  6158. /**
  6159. * Mock alpha
  6160. */
  6161. alpha: number;
  6162. /**
  6163. * Mock beta
  6164. */
  6165. beta: number;
  6166. /**
  6167. * Mock gamma
  6168. */
  6169. gamma: number;
  6170. }
  6171. }
  6172. /**
  6173. * This domain emulates different environments for the page.
  6174. */
  6175. export namespace Emulation {
  6176. export const enum ScreenOrientationType {
  6177. PortraitPrimary = 'portraitPrimary',
  6178. PortraitSecondary = 'portraitSecondary',
  6179. LandscapePrimary = 'landscapePrimary',
  6180. LandscapeSecondary = 'landscapeSecondary',
  6181. }
  6182. /**
  6183. * Screen orientation.
  6184. */
  6185. export interface ScreenOrientation {
  6186. /**
  6187. * Orientation type. (ScreenOrientationType enum)
  6188. */
  6189. type: ('portraitPrimary' | 'portraitSecondary' | 'landscapePrimary' | 'landscapeSecondary');
  6190. /**
  6191. * Orientation angle.
  6192. */
  6193. angle: integer;
  6194. }
  6195. export const enum DisplayFeatureOrientation {
  6196. Vertical = 'vertical',
  6197. Horizontal = 'horizontal',
  6198. }
  6199. export interface DisplayFeature {
  6200. /**
  6201. * Orientation of a display feature in relation to screen (DisplayFeatureOrientation enum)
  6202. */
  6203. orientation: ('vertical' | 'horizontal');
  6204. /**
  6205. * The offset from the screen origin in either the x (for vertical
  6206. * orientation) or y (for horizontal orientation) direction.
  6207. */
  6208. offset: integer;
  6209. /**
  6210. * A display feature may mask content such that it is not physically
  6211. * displayed - this length along with the offset describes this area.
  6212. * A display feature that only splits content will have a 0 mask_length.
  6213. */
  6214. maskLength: integer;
  6215. }
  6216. export interface MediaFeature {
  6217. name: string;
  6218. value: string;
  6219. }
  6220. /**
  6221. * advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
  6222. * allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
  6223. * pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
  6224. * resource fetches.
  6225. */
  6226. export type VirtualTimePolicy = ('advance' | 'pause' | 'pauseIfNetworkFetchesPending');
  6227. /**
  6228. * Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints
  6229. */
  6230. export interface UserAgentBrandVersion {
  6231. brand: string;
  6232. version: string;
  6233. }
  6234. /**
  6235. * Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints
  6236. */
  6237. export interface UserAgentMetadata {
  6238. brands: UserAgentBrandVersion[];
  6239. fullVersion: string;
  6240. platform: string;
  6241. platformVersion: string;
  6242. architecture: string;
  6243. model: string;
  6244. mobile: boolean;
  6245. }
  6246. export interface CanEmulateResponse {
  6247. /**
  6248. * True if emulation is supported.
  6249. */
  6250. result: boolean;
  6251. }
  6252. export interface SetFocusEmulationEnabledRequest {
  6253. /**
  6254. * Whether to enable to disable focus emulation.
  6255. */
  6256. enabled: boolean;
  6257. }
  6258. export interface SetCPUThrottlingRateRequest {
  6259. /**
  6260. * Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
  6261. */
  6262. rate: number;
  6263. }
  6264. export interface SetDefaultBackgroundColorOverrideRequest {
  6265. /**
  6266. * RGBA of the default background color. If not specified, any existing override will be
  6267. * cleared.
  6268. */
  6269. color?: DOM.RGBA;
  6270. }
  6271. export interface SetDeviceMetricsOverrideRequest {
  6272. /**
  6273. * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
  6274. */
  6275. width: integer;
  6276. /**
  6277. * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
  6278. */
  6279. height: integer;
  6280. /**
  6281. * Overriding device scale factor value. 0 disables the override.
  6282. */
  6283. deviceScaleFactor: number;
  6284. /**
  6285. * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
  6286. * autosizing and more.
  6287. */
  6288. mobile: boolean;
  6289. /**
  6290. * Scale to apply to resulting view image.
  6291. */
  6292. scale?: number;
  6293. /**
  6294. * Overriding screen width value in pixels (minimum 0, maximum 10000000).
  6295. */
  6296. screenWidth?: integer;
  6297. /**
  6298. * Overriding screen height value in pixels (minimum 0, maximum 10000000).
  6299. */
  6300. screenHeight?: integer;
  6301. /**
  6302. * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
  6303. */
  6304. positionX?: integer;
  6305. /**
  6306. * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
  6307. */
  6308. positionY?: integer;
  6309. /**
  6310. * Do not set visible view size, rely upon explicit setVisibleSize call.
  6311. */
  6312. dontSetVisibleSize?: boolean;
  6313. /**
  6314. * Screen orientation override.
  6315. */
  6316. screenOrientation?: ScreenOrientation;
  6317. /**
  6318. * If set, the visible area of the page will be overridden to this viewport. This viewport
  6319. * change is not observed by the page, e.g. viewport-relative elements do not change positions.
  6320. */
  6321. viewport?: Page.Viewport;
  6322. /**
  6323. * If set, the display feature of a multi-segment screen. If not set, multi-segment support
  6324. * is turned-off.
  6325. */
  6326. displayFeature?: DisplayFeature;
  6327. }
  6328. export interface SetScrollbarsHiddenRequest {
  6329. /**
  6330. * Whether scrollbars should be always hidden.
  6331. */
  6332. hidden: boolean;
  6333. }
  6334. export interface SetDocumentCookieDisabledRequest {
  6335. /**
  6336. * Whether document.coookie API should be disabled.
  6337. */
  6338. disabled: boolean;
  6339. }
  6340. export const enum SetEmitTouchEventsForMouseRequestConfiguration {
  6341. Mobile = 'mobile',
  6342. Desktop = 'desktop',
  6343. }
  6344. export interface SetEmitTouchEventsForMouseRequest {
  6345. /**
  6346. * Whether touch emulation based on mouse input should be enabled.
  6347. */
  6348. enabled: boolean;
  6349. /**
  6350. * Touch/gesture events configuration. Default: current platform. (SetEmitTouchEventsForMouseRequestConfiguration enum)
  6351. */
  6352. configuration?: ('mobile' | 'desktop');
  6353. }
  6354. export interface SetEmulatedMediaRequest {
  6355. /**
  6356. * Media type to emulate. Empty string disables the override.
  6357. */
  6358. media?: string;
  6359. /**
  6360. * Media features to emulate.
  6361. */
  6362. features?: MediaFeature[];
  6363. }
  6364. export const enum SetEmulatedVisionDeficiencyRequestType {
  6365. None = 'none',
  6366. Achromatopsia = 'achromatopsia',
  6367. BlurredVision = 'blurredVision',
  6368. Deuteranopia = 'deuteranopia',
  6369. Protanopia = 'protanopia',
  6370. Tritanopia = 'tritanopia',
  6371. }
  6372. export interface SetEmulatedVisionDeficiencyRequest {
  6373. /**
  6374. * Vision deficiency to emulate. (SetEmulatedVisionDeficiencyRequestType enum)
  6375. */
  6376. type: ('none' | 'achromatopsia' | 'blurredVision' | 'deuteranopia' | 'protanopia' | 'tritanopia');
  6377. }
  6378. export interface SetGeolocationOverrideRequest {
  6379. /**
  6380. * Mock latitude
  6381. */
  6382. latitude?: number;
  6383. /**
  6384. * Mock longitude
  6385. */
  6386. longitude?: number;
  6387. /**
  6388. * Mock accuracy
  6389. */
  6390. accuracy?: number;
  6391. }
  6392. export interface SetIdleOverrideRequest {
  6393. /**
  6394. * Mock isUserActive
  6395. */
  6396. isUserActive: boolean;
  6397. /**
  6398. * Mock isScreenUnlocked
  6399. */
  6400. isScreenUnlocked: boolean;
  6401. }
  6402. export interface SetNavigatorOverridesRequest {
  6403. /**
  6404. * The platform navigator.platform should return.
  6405. */
  6406. platform: string;
  6407. }
  6408. export interface SetPageScaleFactorRequest {
  6409. /**
  6410. * Page scale factor.
  6411. */
  6412. pageScaleFactor: number;
  6413. }
  6414. export interface SetScriptExecutionDisabledRequest {
  6415. /**
  6416. * Whether script execution should be disabled in the page.
  6417. */
  6418. value: boolean;
  6419. }
  6420. export interface SetTouchEmulationEnabledRequest {
  6421. /**
  6422. * Whether the touch event emulation should be enabled.
  6423. */
  6424. enabled: boolean;
  6425. /**
  6426. * Maximum touch points supported. Defaults to one.
  6427. */
  6428. maxTouchPoints?: integer;
  6429. }
  6430. export interface SetVirtualTimePolicyRequest {
  6431. policy: VirtualTimePolicy;
  6432. /**
  6433. * If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
  6434. * virtualTimeBudgetExpired event is sent.
  6435. */
  6436. budget?: number;
  6437. /**
  6438. * If set this specifies the maximum number of tasks that can be run before virtual is forced
  6439. * forwards to prevent deadlock.
  6440. */
  6441. maxVirtualTimeTaskStarvationCount?: integer;
  6442. /**
  6443. * If set the virtual time policy change should be deferred until any frame starts navigating.
  6444. * Note any previous deferred policy change is superseded.
  6445. */
  6446. waitForNavigation?: boolean;
  6447. /**
  6448. * If set, base::Time::Now will be overriden to initially return this value.
  6449. */
  6450. initialVirtualTime?: Network.TimeSinceEpoch;
  6451. }
  6452. export interface SetVirtualTimePolicyResponse {
  6453. /**
  6454. * Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
  6455. */
  6456. virtualTimeTicksBase: number;
  6457. }
  6458. export interface SetLocaleOverrideRequest {
  6459. /**
  6460. * ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
  6461. * restores default host system locale.
  6462. */
  6463. locale?: string;
  6464. }
  6465. export interface SetTimezoneOverrideRequest {
  6466. /**
  6467. * The timezone identifier. If empty, disables the override and
  6468. * restores default host system timezone.
  6469. */
  6470. timezoneId: string;
  6471. }
  6472. export interface SetVisibleSizeRequest {
  6473. /**
  6474. * Frame width (DIP).
  6475. */
  6476. width: integer;
  6477. /**
  6478. * Frame height (DIP).
  6479. */
  6480. height: integer;
  6481. }
  6482. export interface SetUserAgentOverrideRequest {
  6483. /**
  6484. * User agent to use.
  6485. */
  6486. userAgent: string;
  6487. /**
  6488. * Browser langugage to emulate.
  6489. */
  6490. acceptLanguage?: string;
  6491. /**
  6492. * The platform navigator.platform should return.
  6493. */
  6494. platform?: string;
  6495. /**
  6496. * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
  6497. */
  6498. userAgentMetadata?: UserAgentMetadata;
  6499. }
  6500. }
  6501. /**
  6502. * This domain provides experimental commands only supported in headless mode.
  6503. */
  6504. export namespace HeadlessExperimental {
  6505. export const enum ScreenshotParamsFormat {
  6506. Jpeg = 'jpeg',
  6507. Png = 'png',
  6508. }
  6509. /**
  6510. * Encoding options for a screenshot.
  6511. */
  6512. export interface ScreenshotParams {
  6513. /**
  6514. * Image compression format (defaults to png). (ScreenshotParamsFormat enum)
  6515. */
  6516. format?: ('jpeg' | 'png');
  6517. /**
  6518. * Compression quality from range [0..100] (jpeg only).
  6519. */
  6520. quality?: integer;
  6521. }
  6522. export interface BeginFrameRequest {
  6523. /**
  6524. * Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,
  6525. * the current time will be used.
  6526. */
  6527. frameTimeTicks?: number;
  6528. /**
  6529. * The interval between BeginFrames that is reported to the compositor, in milliseconds.
  6530. * Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
  6531. */
  6532. interval?: number;
  6533. /**
  6534. * Whether updates should not be committed and drawn onto the display. False by default. If
  6535. * true, only side effects of the BeginFrame will be run, such as layout and animations, but
  6536. * any visual updates may not be visible on the display or in screenshots.
  6537. */
  6538. noDisplayUpdates?: boolean;
  6539. /**
  6540. * If set, a screenshot of the frame will be captured and returned in the response. Otherwise,
  6541. * no screenshot will be captured. Note that capturing a screenshot can fail, for example,
  6542. * during renderer initialization. In such a case, no screenshot data will be returned.
  6543. */
  6544. screenshot?: ScreenshotParams;
  6545. }
  6546. export interface BeginFrameResponse {
  6547. /**
  6548. * Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the
  6549. * display. Reported for diagnostic uses, may be removed in the future.
  6550. */
  6551. hasDamage: boolean;
  6552. /**
  6553. * Base64-encoded image data of the screenshot, if one was requested and successfully taken.
  6554. */
  6555. screenshotData?: string;
  6556. }
  6557. /**
  6558. * Issued when the target starts or stops needing BeginFrames.
  6559. * Deprecated. Issue beginFrame unconditionally instead and use result from
  6560. * beginFrame to detect whether the frames were suppressed.
  6561. */
  6562. export interface NeedsBeginFramesChangedEvent {
  6563. /**
  6564. * True if BeginFrames are needed, false otherwise.
  6565. */
  6566. needsBeginFrames: boolean;
  6567. }
  6568. }
  6569. /**
  6570. * Input/Output operations for streams produced by DevTools.
  6571. */
  6572. export namespace IO {
  6573. /**
  6574. * This is either obtained from another method or specifed as `blob:&lt;uuid&gt;` where
  6575. * `&lt;uuid&gt` is an UUID of a Blob.
  6576. */
  6577. export type StreamHandle = string;
  6578. export interface CloseRequest {
  6579. /**
  6580. * Handle of the stream to close.
  6581. */
  6582. handle: StreamHandle;
  6583. }
  6584. export interface ReadRequest {
  6585. /**
  6586. * Handle of the stream to read.
  6587. */
  6588. handle: StreamHandle;
  6589. /**
  6590. * Seek to the specified offset before reading (if not specificed, proceed with offset
  6591. * following the last read). Some types of streams may only support sequential reads.
  6592. */
  6593. offset?: integer;
  6594. /**
  6595. * Maximum number of bytes to read (left upon the agent discretion if not specified).
  6596. */
  6597. size?: integer;
  6598. }
  6599. export interface ReadResponse {
  6600. /**
  6601. * Set if the data is base64-encoded
  6602. */
  6603. base64Encoded?: boolean;
  6604. /**
  6605. * Data that were read.
  6606. */
  6607. data: string;
  6608. /**
  6609. * Set if the end-of-file condition occured while reading.
  6610. */
  6611. eof: boolean;
  6612. }
  6613. export interface ResolveBlobRequest {
  6614. /**
  6615. * Object id of a Blob object wrapper.
  6616. */
  6617. objectId: Runtime.RemoteObjectId;
  6618. }
  6619. export interface ResolveBlobResponse {
  6620. /**
  6621. * UUID of the specified Blob.
  6622. */
  6623. uuid: string;
  6624. }
  6625. }
  6626. export namespace IndexedDB {
  6627. /**
  6628. * Database with an array of object stores.
  6629. */
  6630. export interface DatabaseWithObjectStores {
  6631. /**
  6632. * Database name.
  6633. */
  6634. name: string;
  6635. /**
  6636. * Database version (type is not 'integer', as the standard
  6637. * requires the version number to be 'unsigned long long')
  6638. */
  6639. version: number;
  6640. /**
  6641. * Object stores in this database.
  6642. */
  6643. objectStores: ObjectStore[];
  6644. }
  6645. /**
  6646. * Object store.
  6647. */
  6648. export interface ObjectStore {
  6649. /**
  6650. * Object store name.
  6651. */
  6652. name: string;
  6653. /**
  6654. * Object store key path.
  6655. */
  6656. keyPath: KeyPath;
  6657. /**
  6658. * If true, object store has auto increment flag set.
  6659. */
  6660. autoIncrement: boolean;
  6661. /**
  6662. * Indexes in this object store.
  6663. */
  6664. indexes: ObjectStoreIndex[];
  6665. }
  6666. /**
  6667. * Object store index.
  6668. */
  6669. export interface ObjectStoreIndex {
  6670. /**
  6671. * Index name.
  6672. */
  6673. name: string;
  6674. /**
  6675. * Index key path.
  6676. */
  6677. keyPath: KeyPath;
  6678. /**
  6679. * If true, index is unique.
  6680. */
  6681. unique: boolean;
  6682. /**
  6683. * If true, index allows multiple entries for a key.
  6684. */
  6685. multiEntry: boolean;
  6686. }
  6687. export const enum KeyType {
  6688. Number = 'number',
  6689. String = 'string',
  6690. Date = 'date',
  6691. Array = 'array',
  6692. }
  6693. /**
  6694. * Key.
  6695. */
  6696. export interface Key {
  6697. /**
  6698. * Key type. (KeyType enum)
  6699. */
  6700. type: ('number' | 'string' | 'date' | 'array');
  6701. /**
  6702. * Number value.
  6703. */
  6704. number?: number;
  6705. /**
  6706. * String value.
  6707. */
  6708. string?: string;
  6709. /**
  6710. * Date value.
  6711. */
  6712. date?: number;
  6713. /**
  6714. * Array value.
  6715. */
  6716. array?: Key[];
  6717. }
  6718. /**
  6719. * Key range.
  6720. */
  6721. export interface KeyRange {
  6722. /**
  6723. * Lower bound.
  6724. */
  6725. lower?: Key;
  6726. /**
  6727. * Upper bound.
  6728. */
  6729. upper?: Key;
  6730. /**
  6731. * If true lower bound is open.
  6732. */
  6733. lowerOpen: boolean;
  6734. /**
  6735. * If true upper bound is open.
  6736. */
  6737. upperOpen: boolean;
  6738. }
  6739. /**
  6740. * Data entry.
  6741. */
  6742. export interface DataEntry {
  6743. /**
  6744. * Key object.
  6745. */
  6746. key: Runtime.RemoteObject;
  6747. /**
  6748. * Primary key object.
  6749. */
  6750. primaryKey: Runtime.RemoteObject;
  6751. /**
  6752. * Value object.
  6753. */
  6754. value: Runtime.RemoteObject;
  6755. }
  6756. export const enum KeyPathType {
  6757. Null = 'null',
  6758. String = 'string',
  6759. Array = 'array',
  6760. }
  6761. /**
  6762. * Key path.
  6763. */
  6764. export interface KeyPath {
  6765. /**
  6766. * Key path type. (KeyPathType enum)
  6767. */
  6768. type: ('null' | 'string' | 'array');
  6769. /**
  6770. * String value.
  6771. */
  6772. string?: string;
  6773. /**
  6774. * Array value.
  6775. */
  6776. array?: string[];
  6777. }
  6778. export interface ClearObjectStoreRequest {
  6779. /**
  6780. * Security origin.
  6781. */
  6782. securityOrigin: string;
  6783. /**
  6784. * Database name.
  6785. */
  6786. databaseName: string;
  6787. /**
  6788. * Object store name.
  6789. */
  6790. objectStoreName: string;
  6791. }
  6792. export interface DeleteDatabaseRequest {
  6793. /**
  6794. * Security origin.
  6795. */
  6796. securityOrigin: string;
  6797. /**
  6798. * Database name.
  6799. */
  6800. databaseName: string;
  6801. }
  6802. export interface DeleteObjectStoreEntriesRequest {
  6803. securityOrigin: string;
  6804. databaseName: string;
  6805. objectStoreName: string;
  6806. /**
  6807. * Range of entry keys to delete
  6808. */
  6809. keyRange: KeyRange;
  6810. }
  6811. export interface RequestDataRequest {
  6812. /**
  6813. * Security origin.
  6814. */
  6815. securityOrigin: string;
  6816. /**
  6817. * Database name.
  6818. */
  6819. databaseName: string;
  6820. /**
  6821. * Object store name.
  6822. */
  6823. objectStoreName: string;
  6824. /**
  6825. * Index name, empty string for object store data requests.
  6826. */
  6827. indexName: string;
  6828. /**
  6829. * Number of records to skip.
  6830. */
  6831. skipCount: integer;
  6832. /**
  6833. * Number of records to fetch.
  6834. */
  6835. pageSize: integer;
  6836. /**
  6837. * Key range.
  6838. */
  6839. keyRange?: KeyRange;
  6840. }
  6841. export interface RequestDataResponse {
  6842. /**
  6843. * Array of object store data entries.
  6844. */
  6845. objectStoreDataEntries: DataEntry[];
  6846. /**
  6847. * If true, there are more entries to fetch in the given range.
  6848. */
  6849. hasMore: boolean;
  6850. }
  6851. export interface GetMetadataRequest {
  6852. /**
  6853. * Security origin.
  6854. */
  6855. securityOrigin: string;
  6856. /**
  6857. * Database name.
  6858. */
  6859. databaseName: string;
  6860. /**
  6861. * Object store name.
  6862. */
  6863. objectStoreName: string;
  6864. }
  6865. export interface GetMetadataResponse {
  6866. /**
  6867. * the entries count
  6868. */
  6869. entriesCount: number;
  6870. /**
  6871. * the current value of key generator, to become the next inserted
  6872. * key into the object store. Valid if objectStore.autoIncrement
  6873. * is true.
  6874. */
  6875. keyGeneratorValue: number;
  6876. }
  6877. export interface RequestDatabaseRequest {
  6878. /**
  6879. * Security origin.
  6880. */
  6881. securityOrigin: string;
  6882. /**
  6883. * Database name.
  6884. */
  6885. databaseName: string;
  6886. }
  6887. export interface RequestDatabaseResponse {
  6888. /**
  6889. * Database with an array of object stores.
  6890. */
  6891. databaseWithObjectStores: DatabaseWithObjectStores;
  6892. }
  6893. export interface RequestDatabaseNamesRequest {
  6894. /**
  6895. * Security origin.
  6896. */
  6897. securityOrigin: string;
  6898. }
  6899. export interface RequestDatabaseNamesResponse {
  6900. /**
  6901. * Database names for origin.
  6902. */
  6903. databaseNames: string[];
  6904. }
  6905. }
  6906. export namespace Input {
  6907. export interface TouchPoint {
  6908. /**
  6909. * X coordinate of the event relative to the main frame's viewport in CSS pixels.
  6910. */
  6911. x: number;
  6912. /**
  6913. * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
  6914. * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
  6915. */
  6916. y: number;
  6917. /**
  6918. * X radius of the touch area (default: 1.0).
  6919. */
  6920. radiusX?: number;
  6921. /**
  6922. * Y radius of the touch area (default: 1.0).
  6923. */
  6924. radiusY?: number;
  6925. /**
  6926. * Rotation angle (default: 0.0).
  6927. */
  6928. rotationAngle?: number;
  6929. /**
  6930. * Force (default: 1.0).
  6931. */
  6932. force?: number;
  6933. /**
  6934. * Identifier used to track touch sources between events, must be unique within an event.
  6935. */
  6936. id?: number;
  6937. }
  6938. export type GestureSourceType = ('default' | 'touch' | 'mouse');
  6939. export type MouseButton = ('none' | 'left' | 'middle' | 'right' | 'back' | 'forward');
  6940. /**
  6941. * UTC time in seconds, counted from January 1, 1970.
  6942. */
  6943. export type TimeSinceEpoch = number;
  6944. export const enum DispatchKeyEventRequestType {
  6945. KeyDown = 'keyDown',
  6946. KeyUp = 'keyUp',
  6947. RawKeyDown = 'rawKeyDown',
  6948. Char = 'char',
  6949. }
  6950. export interface DispatchKeyEventRequest {
  6951. /**
  6952. * Type of the key event. (DispatchKeyEventRequestType enum)
  6953. */
  6954. type: ('keyDown' | 'keyUp' | 'rawKeyDown' | 'char');
  6955. /**
  6956. * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
  6957. * (default: 0).
  6958. */
  6959. modifiers?: integer;
  6960. /**
  6961. * Time at which the event occurred.
  6962. */
  6963. timestamp?: TimeSinceEpoch;
  6964. /**
  6965. * Text as generated by processing a virtual key code with a keyboard layout. Not needed for
  6966. * for `keyUp` and `rawKeyDown` events (default: "")
  6967. */
  6968. text?: string;
  6969. /**
  6970. * Text that would have been generated by the keyboard if no modifiers were pressed (except for
  6971. * shift). Useful for shortcut (accelerator) key handling (default: "").
  6972. */
  6973. unmodifiedText?: string;
  6974. /**
  6975. * Unique key identifier (e.g., 'U+0041') (default: "").
  6976. */
  6977. keyIdentifier?: string;
  6978. /**
  6979. * Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
  6980. */
  6981. code?: string;
  6982. /**
  6983. * Unique DOM defined string value describing the meaning of the key in the context of active
  6984. * modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
  6985. */
  6986. key?: string;
  6987. /**
  6988. * Windows virtual key code (default: 0).
  6989. */
  6990. windowsVirtualKeyCode?: integer;
  6991. /**
  6992. * Native virtual key code (default: 0).
  6993. */
  6994. nativeVirtualKeyCode?: integer;
  6995. /**
  6996. * Whether the event was generated from auto repeat (default: false).
  6997. */
  6998. autoRepeat?: boolean;
  6999. /**
  7000. * Whether the event was generated from the keypad (default: false).
  7001. */
  7002. isKeypad?: boolean;
  7003. /**
  7004. * Whether the event was a system key event (default: false).
  7005. */
  7006. isSystemKey?: boolean;
  7007. /**
  7008. * Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:
  7009. * 0).
  7010. */
  7011. location?: integer;
  7012. /**
  7013. * Editing commands to send with the key event (e.g., 'selectAll') (default: []).
  7014. * These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
  7015. * See https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
  7016. */
  7017. commands?: string[];
  7018. }
  7019. export interface InsertTextRequest {
  7020. /**
  7021. * The text to insert.
  7022. */
  7023. text: string;
  7024. }
  7025. export const enum DispatchMouseEventRequestType {
  7026. MousePressed = 'mousePressed',
  7027. MouseReleased = 'mouseReleased',
  7028. MouseMoved = 'mouseMoved',
  7029. MouseWheel = 'mouseWheel',
  7030. }
  7031. export const enum DispatchMouseEventRequestPointerType {
  7032. Mouse = 'mouse',
  7033. Pen = 'pen',
  7034. }
  7035. export interface DispatchMouseEventRequest {
  7036. /**
  7037. * Type of the mouse event. (DispatchMouseEventRequestType enum)
  7038. */
  7039. type: ('mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel');
  7040. /**
  7041. * X coordinate of the event relative to the main frame's viewport in CSS pixels.
  7042. */
  7043. x: number;
  7044. /**
  7045. * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
  7046. * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
  7047. */
  7048. y: number;
  7049. /**
  7050. * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
  7051. * (default: 0).
  7052. */
  7053. modifiers?: integer;
  7054. /**
  7055. * Time at which the event occurred.
  7056. */
  7057. timestamp?: TimeSinceEpoch;
  7058. /**
  7059. * Mouse button (default: "none").
  7060. */
  7061. button?: MouseButton;
  7062. /**
  7063. * A number indicating which buttons are pressed on the mouse when a mouse event is triggered.
  7064. * Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
  7065. */
  7066. buttons?: integer;
  7067. /**
  7068. * Number of times the mouse button was clicked (default: 0).
  7069. */
  7070. clickCount?: integer;
  7071. /**
  7072. * X delta in CSS pixels for mouse wheel event (default: 0).
  7073. */
  7074. deltaX?: number;
  7075. /**
  7076. * Y delta in CSS pixels for mouse wheel event (default: 0).
  7077. */
  7078. deltaY?: number;
  7079. /**
  7080. * Pointer type (default: "mouse"). (DispatchMouseEventRequestPointerType enum)
  7081. */
  7082. pointerType?: ('mouse' | 'pen');
  7083. }
  7084. export const enum DispatchTouchEventRequestType {
  7085. TouchStart = 'touchStart',
  7086. TouchEnd = 'touchEnd',
  7087. TouchMove = 'touchMove',
  7088. TouchCancel = 'touchCancel',
  7089. }
  7090. export interface DispatchTouchEventRequest {
  7091. /**
  7092. * Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while
  7093. * TouchStart and TouchMove must contains at least one. (DispatchTouchEventRequestType enum)
  7094. */
  7095. type: ('touchStart' | 'touchEnd' | 'touchMove' | 'touchCancel');
  7096. /**
  7097. * Active touch points on the touch device. One event per any changed point (compared to
  7098. * previous touch event in a sequence) is generated, emulating pressing/moving/releasing points
  7099. * one by one.
  7100. */
  7101. touchPoints: TouchPoint[];
  7102. /**
  7103. * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
  7104. * (default: 0).
  7105. */
  7106. modifiers?: integer;
  7107. /**
  7108. * Time at which the event occurred.
  7109. */
  7110. timestamp?: TimeSinceEpoch;
  7111. }
  7112. export const enum EmulateTouchFromMouseEventRequestType {
  7113. MousePressed = 'mousePressed',
  7114. MouseReleased = 'mouseReleased',
  7115. MouseMoved = 'mouseMoved',
  7116. MouseWheel = 'mouseWheel',
  7117. }
  7118. export interface EmulateTouchFromMouseEventRequest {
  7119. /**
  7120. * Type of the mouse event. (EmulateTouchFromMouseEventRequestType enum)
  7121. */
  7122. type: ('mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel');
  7123. /**
  7124. * X coordinate of the mouse pointer in DIP.
  7125. */
  7126. x: integer;
  7127. /**
  7128. * Y coordinate of the mouse pointer in DIP.
  7129. */
  7130. y: integer;
  7131. /**
  7132. * Mouse button. Only "none", "left", "right" are supported.
  7133. */
  7134. button: MouseButton;
  7135. /**
  7136. * Time at which the event occurred (default: current time).
  7137. */
  7138. timestamp?: TimeSinceEpoch;
  7139. /**
  7140. * X delta in DIP for mouse wheel event (default: 0).
  7141. */
  7142. deltaX?: number;
  7143. /**
  7144. * Y delta in DIP for mouse wheel event (default: 0).
  7145. */
  7146. deltaY?: number;
  7147. /**
  7148. * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
  7149. * (default: 0).
  7150. */
  7151. modifiers?: integer;
  7152. /**
  7153. * Number of times the mouse button was clicked (default: 0).
  7154. */
  7155. clickCount?: integer;
  7156. }
  7157. export interface SetIgnoreInputEventsRequest {
  7158. /**
  7159. * Ignores input events processing when set to true.
  7160. */
  7161. ignore: boolean;
  7162. }
  7163. export interface SynthesizePinchGestureRequest {
  7164. /**
  7165. * X coordinate of the start of the gesture in CSS pixels.
  7166. */
  7167. x: number;
  7168. /**
  7169. * Y coordinate of the start of the gesture in CSS pixels.
  7170. */
  7171. y: number;
  7172. /**
  7173. * Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
  7174. */
  7175. scaleFactor: number;
  7176. /**
  7177. * Relative pointer speed in pixels per second (default: 800).
  7178. */
  7179. relativeSpeed?: integer;
  7180. /**
  7181. * Which type of input events to be generated (default: 'default', which queries the platform
  7182. * for the preferred input type).
  7183. */
  7184. gestureSourceType?: GestureSourceType;
  7185. }
  7186. export interface SynthesizeScrollGestureRequest {
  7187. /**
  7188. * X coordinate of the start of the gesture in CSS pixels.
  7189. */
  7190. x: number;
  7191. /**
  7192. * Y coordinate of the start of the gesture in CSS pixels.
  7193. */
  7194. y: number;
  7195. /**
  7196. * The distance to scroll along the X axis (positive to scroll left).
  7197. */
  7198. xDistance?: number;
  7199. /**
  7200. * The distance to scroll along the Y axis (positive to scroll up).
  7201. */
  7202. yDistance?: number;
  7203. /**
  7204. * The number of additional pixels to scroll back along the X axis, in addition to the given
  7205. * distance.
  7206. */
  7207. xOverscroll?: number;
  7208. /**
  7209. * The number of additional pixels to scroll back along the Y axis, in addition to the given
  7210. * distance.
  7211. */
  7212. yOverscroll?: number;
  7213. /**
  7214. * Prevent fling (default: true).
  7215. */
  7216. preventFling?: boolean;
  7217. /**
  7218. * Swipe speed in pixels per second (default: 800).
  7219. */
  7220. speed?: integer;
  7221. /**
  7222. * Which type of input events to be generated (default: 'default', which queries the platform
  7223. * for the preferred input type).
  7224. */
  7225. gestureSourceType?: GestureSourceType;
  7226. /**
  7227. * The number of times to repeat the gesture (default: 0).
  7228. */
  7229. repeatCount?: integer;
  7230. /**
  7231. * The number of milliseconds delay between each repeat. (default: 250).
  7232. */
  7233. repeatDelayMs?: integer;
  7234. /**
  7235. * The name of the interaction markers to generate, if not empty (default: "").
  7236. */
  7237. interactionMarkerName?: string;
  7238. }
  7239. export interface SynthesizeTapGestureRequest {
  7240. /**
  7241. * X coordinate of the start of the gesture in CSS pixels.
  7242. */
  7243. x: number;
  7244. /**
  7245. * Y coordinate of the start of the gesture in CSS pixels.
  7246. */
  7247. y: number;
  7248. /**
  7249. * Duration between touchdown and touchup events in ms (default: 50).
  7250. */
  7251. duration?: integer;
  7252. /**
  7253. * Number of times to perform the tap (e.g. 2 for double tap, default: 1).
  7254. */
  7255. tapCount?: integer;
  7256. /**
  7257. * Which type of input events to be generated (default: 'default', which queries the platform
  7258. * for the preferred input type).
  7259. */
  7260. gestureSourceType?: GestureSourceType;
  7261. }
  7262. }
  7263. export namespace Inspector {
  7264. /**
  7265. * Fired when remote debugging connection is about to be terminated. Contains detach reason.
  7266. */
  7267. export interface DetachedEvent {
  7268. /**
  7269. * The reason why connection has been terminated.
  7270. */
  7271. reason: string;
  7272. }
  7273. }
  7274. export namespace LayerTree {
  7275. /**
  7276. * Unique Layer identifier.
  7277. */
  7278. export type LayerId = string;
  7279. /**
  7280. * Unique snapshot identifier.
  7281. */
  7282. export type SnapshotId = string;
  7283. export const enum ScrollRectType {
  7284. RepaintsOnScroll = 'RepaintsOnScroll',
  7285. TouchEventHandler = 'TouchEventHandler',
  7286. WheelEventHandler = 'WheelEventHandler',
  7287. }
  7288. /**
  7289. * Rectangle where scrolling happens on the main thread.
  7290. */
  7291. export interface ScrollRect {
  7292. /**
  7293. * Rectangle itself.
  7294. */
  7295. rect: DOM.Rect;
  7296. /**
  7297. * Reason for rectangle to force scrolling on the main thread (ScrollRectType enum)
  7298. */
  7299. type: ('RepaintsOnScroll' | 'TouchEventHandler' | 'WheelEventHandler');
  7300. }
  7301. /**
  7302. * Sticky position constraints.
  7303. */
  7304. export interface StickyPositionConstraint {
  7305. /**
  7306. * Layout rectangle of the sticky element before being shifted
  7307. */
  7308. stickyBoxRect: DOM.Rect;
  7309. /**
  7310. * Layout rectangle of the containing block of the sticky element
  7311. */
  7312. containingBlockRect: DOM.Rect;
  7313. /**
  7314. * The nearest sticky layer that shifts the sticky box
  7315. */
  7316. nearestLayerShiftingStickyBox?: LayerId;
  7317. /**
  7318. * The nearest sticky layer that shifts the containing block
  7319. */
  7320. nearestLayerShiftingContainingBlock?: LayerId;
  7321. }
  7322. /**
  7323. * Serialized fragment of layer picture along with its offset within the layer.
  7324. */
  7325. export interface PictureTile {
  7326. /**
  7327. * Offset from owning layer left boundary
  7328. */
  7329. x: number;
  7330. /**
  7331. * Offset from owning layer top boundary
  7332. */
  7333. y: number;
  7334. /**
  7335. * Base64-encoded snapshot data.
  7336. */
  7337. picture: string;
  7338. }
  7339. /**
  7340. * Information about a compositing layer.
  7341. */
  7342. export interface Layer {
  7343. /**
  7344. * The unique id for this layer.
  7345. */
  7346. layerId: LayerId;
  7347. /**
  7348. * The id of parent (not present for root).
  7349. */
  7350. parentLayerId?: LayerId;
  7351. /**
  7352. * The backend id for the node associated with this layer.
  7353. */
  7354. backendNodeId?: DOM.BackendNodeId;
  7355. /**
  7356. * Offset from parent layer, X coordinate.
  7357. */
  7358. offsetX: number;
  7359. /**
  7360. * Offset from parent layer, Y coordinate.
  7361. */
  7362. offsetY: number;
  7363. /**
  7364. * Layer width.
  7365. */
  7366. width: number;
  7367. /**
  7368. * Layer height.
  7369. */
  7370. height: number;
  7371. /**
  7372. * Transformation matrix for layer, default is identity matrix
  7373. */
  7374. transform?: number[];
  7375. /**
  7376. * Transform anchor point X, absent if no transform specified
  7377. */
  7378. anchorX?: number;
  7379. /**
  7380. * Transform anchor point Y, absent if no transform specified
  7381. */
  7382. anchorY?: number;
  7383. /**
  7384. * Transform anchor point Z, absent if no transform specified
  7385. */
  7386. anchorZ?: number;
  7387. /**
  7388. * Indicates how many time this layer has painted.
  7389. */
  7390. paintCount: integer;
  7391. /**
  7392. * Indicates whether this layer hosts any content, rather than being used for
  7393. * transform/scrolling purposes only.
  7394. */
  7395. drawsContent: boolean;
  7396. /**
  7397. * Set if layer is not visible.
  7398. */
  7399. invisible?: boolean;
  7400. /**
  7401. * Rectangles scrolling on main thread only.
  7402. */
  7403. scrollRects?: ScrollRect[];
  7404. /**
  7405. * Sticky position constraint information
  7406. */
  7407. stickyPositionConstraint?: StickyPositionConstraint;
  7408. }
  7409. /**
  7410. * Array of timings, one per paint step.
  7411. */
  7412. export type PaintProfile = number[];
  7413. export interface CompositingReasonsRequest {
  7414. /**
  7415. * The id of the layer for which we want to get the reasons it was composited.
  7416. */
  7417. layerId: LayerId;
  7418. }
  7419. export interface CompositingReasonsResponse {
  7420. /**
  7421. * A list of strings specifying reasons for the given layer to become composited.
  7422. */
  7423. compositingReasons: string[];
  7424. /**
  7425. * A list of strings specifying reason IDs for the given layer to become composited.
  7426. */
  7427. compositingReasonIds: string[];
  7428. }
  7429. export interface LoadSnapshotRequest {
  7430. /**
  7431. * An array of tiles composing the snapshot.
  7432. */
  7433. tiles: PictureTile[];
  7434. }
  7435. export interface LoadSnapshotResponse {
  7436. /**
  7437. * The id of the snapshot.
  7438. */
  7439. snapshotId: SnapshotId;
  7440. }
  7441. export interface MakeSnapshotRequest {
  7442. /**
  7443. * The id of the layer.
  7444. */
  7445. layerId: LayerId;
  7446. }
  7447. export interface MakeSnapshotResponse {
  7448. /**
  7449. * The id of the layer snapshot.
  7450. */
  7451. snapshotId: SnapshotId;
  7452. }
  7453. export interface ProfileSnapshotRequest {
  7454. /**
  7455. * The id of the layer snapshot.
  7456. */
  7457. snapshotId: SnapshotId;
  7458. /**
  7459. * The maximum number of times to replay the snapshot (1, if not specified).
  7460. */
  7461. minRepeatCount?: integer;
  7462. /**
  7463. * The minimum duration (in seconds) to replay the snapshot.
  7464. */
  7465. minDuration?: number;
  7466. /**
  7467. * The clip rectangle to apply when replaying the snapshot.
  7468. */
  7469. clipRect?: DOM.Rect;
  7470. }
  7471. export interface ProfileSnapshotResponse {
  7472. /**
  7473. * The array of paint profiles, one per run.
  7474. */
  7475. timings: PaintProfile[];
  7476. }
  7477. export interface ReleaseSnapshotRequest {
  7478. /**
  7479. * The id of the layer snapshot.
  7480. */
  7481. snapshotId: SnapshotId;
  7482. }
  7483. export interface ReplaySnapshotRequest {
  7484. /**
  7485. * The id of the layer snapshot.
  7486. */
  7487. snapshotId: SnapshotId;
  7488. /**
  7489. * The first step to replay from (replay from the very start if not specified).
  7490. */
  7491. fromStep?: integer;
  7492. /**
  7493. * The last step to replay to (replay till the end if not specified).
  7494. */
  7495. toStep?: integer;
  7496. /**
  7497. * The scale to apply while replaying (defaults to 1).
  7498. */
  7499. scale?: number;
  7500. }
  7501. export interface ReplaySnapshotResponse {
  7502. /**
  7503. * A data: URL for resulting image.
  7504. */
  7505. dataURL: string;
  7506. }
  7507. export interface SnapshotCommandLogRequest {
  7508. /**
  7509. * The id of the layer snapshot.
  7510. */
  7511. snapshotId: SnapshotId;
  7512. }
  7513. export interface SnapshotCommandLogResponse {
  7514. /**
  7515. * The array of canvas function calls.
  7516. */
  7517. commandLog: any[];
  7518. }
  7519. export interface LayerPaintedEvent {
  7520. /**
  7521. * The id of the painted layer.
  7522. */
  7523. layerId: LayerId;
  7524. /**
  7525. * Clip rectangle.
  7526. */
  7527. clip: DOM.Rect;
  7528. }
  7529. export interface LayerTreeDidChangeEvent {
  7530. /**
  7531. * Layer tree, absent if not in the comspositing mode.
  7532. */
  7533. layers?: Layer[];
  7534. }
  7535. }
  7536. /**
  7537. * Provides access to log entries.
  7538. */
  7539. export namespace Log {
  7540. export const enum LogEntrySource {
  7541. XML = 'xml',
  7542. Javascript = 'javascript',
  7543. Network = 'network',
  7544. Storage = 'storage',
  7545. Appcache = 'appcache',
  7546. Rendering = 'rendering',
  7547. Security = 'security',
  7548. Deprecation = 'deprecation',
  7549. Worker = 'worker',
  7550. Violation = 'violation',
  7551. Intervention = 'intervention',
  7552. Recommendation = 'recommendation',
  7553. Other = 'other',
  7554. }
  7555. export const enum LogEntryLevel {
  7556. Verbose = 'verbose',
  7557. Info = 'info',
  7558. Warning = 'warning',
  7559. Error = 'error',
  7560. }
  7561. /**
  7562. * Log entry.
  7563. */
  7564. export interface LogEntry {
  7565. /**
  7566. * Log entry source. (LogEntrySource enum)
  7567. */
  7568. source: ('xml' | 'javascript' | 'network' | 'storage' | 'appcache' | 'rendering' | 'security' | 'deprecation' | 'worker' | 'violation' | 'intervention' | 'recommendation' | 'other');
  7569. /**
  7570. * Log entry severity. (LogEntryLevel enum)
  7571. */
  7572. level: ('verbose' | 'info' | 'warning' | 'error');
  7573. /**
  7574. * Logged text.
  7575. */
  7576. text: string;
  7577. /**
  7578. * Timestamp when this entry was added.
  7579. */
  7580. timestamp: Runtime.Timestamp;
  7581. /**
  7582. * URL of the resource if known.
  7583. */
  7584. url?: string;
  7585. /**
  7586. * Line number in the resource.
  7587. */
  7588. lineNumber?: integer;
  7589. /**
  7590. * JavaScript stack trace.
  7591. */
  7592. stackTrace?: Runtime.StackTrace;
  7593. /**
  7594. * Identifier of the network request associated with this entry.
  7595. */
  7596. networkRequestId?: Network.RequestId;
  7597. /**
  7598. * Identifier of the worker associated with this entry.
  7599. */
  7600. workerId?: string;
  7601. /**
  7602. * Call arguments.
  7603. */
  7604. args?: Runtime.RemoteObject[];
  7605. }
  7606. export const enum ViolationSettingName {
  7607. LongTask = 'longTask',
  7608. LongLayout = 'longLayout',
  7609. BlockedEvent = 'blockedEvent',
  7610. BlockedParser = 'blockedParser',
  7611. DiscouragedAPIUse = 'discouragedAPIUse',
  7612. Handler = 'handler',
  7613. RecurringHandler = 'recurringHandler',
  7614. }
  7615. /**
  7616. * Violation configuration setting.
  7617. */
  7618. export interface ViolationSetting {
  7619. /**
  7620. * Violation type. (ViolationSettingName enum)
  7621. */
  7622. name: ('longTask' | 'longLayout' | 'blockedEvent' | 'blockedParser' | 'discouragedAPIUse' | 'handler' | 'recurringHandler');
  7623. /**
  7624. * Time threshold to trigger upon.
  7625. */
  7626. threshold: number;
  7627. }
  7628. export interface StartViolationsReportRequest {
  7629. /**
  7630. * Configuration for violations.
  7631. */
  7632. config: ViolationSetting[];
  7633. }
  7634. /**
  7635. * Issued when new message was logged.
  7636. */
  7637. export interface EntryAddedEvent {
  7638. /**
  7639. * The entry.
  7640. */
  7641. entry: LogEntry;
  7642. }
  7643. }
  7644. export namespace Memory {
  7645. /**
  7646. * Memory pressure level.
  7647. */
  7648. export type PressureLevel = ('moderate' | 'critical');
  7649. /**
  7650. * Heap profile sample.
  7651. */
  7652. export interface SamplingProfileNode {
  7653. /**
  7654. * Size of the sampled allocation.
  7655. */
  7656. size: number;
  7657. /**
  7658. * Total bytes attributed to this sample.
  7659. */
  7660. total: number;
  7661. /**
  7662. * Execution stack at the point of allocation.
  7663. */
  7664. stack: string[];
  7665. }
  7666. /**
  7667. * Array of heap profile samples.
  7668. */
  7669. export interface SamplingProfile {
  7670. samples: SamplingProfileNode[];
  7671. modules: Module[];
  7672. }
  7673. /**
  7674. * Executable module information
  7675. */
  7676. export interface Module {
  7677. /**
  7678. * Name of the module.
  7679. */
  7680. name: string;
  7681. /**
  7682. * UUID of the module.
  7683. */
  7684. uuid: string;
  7685. /**
  7686. * Base address where the module is loaded into memory. Encoded as a decimal
  7687. * or hexadecimal (0x prefixed) string.
  7688. */
  7689. baseAddress: string;
  7690. /**
  7691. * Size of the module in bytes.
  7692. */
  7693. size: number;
  7694. }
  7695. export interface GetDOMCountersResponse {
  7696. documents: integer;
  7697. nodes: integer;
  7698. jsEventListeners: integer;
  7699. }
  7700. export interface SetPressureNotificationsSuppressedRequest {
  7701. /**
  7702. * If true, memory pressure notifications will be suppressed.
  7703. */
  7704. suppressed: boolean;
  7705. }
  7706. export interface SimulatePressureNotificationRequest {
  7707. /**
  7708. * Memory pressure level of the notification.
  7709. */
  7710. level: PressureLevel;
  7711. }
  7712. export interface StartSamplingRequest {
  7713. /**
  7714. * Average number of bytes between samples.
  7715. */
  7716. samplingInterval?: integer;
  7717. /**
  7718. * Do not randomize intervals between samples.
  7719. */
  7720. suppressRandomness?: boolean;
  7721. }
  7722. export interface GetAllTimeSamplingProfileResponse {
  7723. profile: SamplingProfile;
  7724. }
  7725. export interface GetBrowserSamplingProfileResponse {
  7726. profile: SamplingProfile;
  7727. }
  7728. export interface GetSamplingProfileResponse {
  7729. profile: SamplingProfile;
  7730. }
  7731. }
  7732. /**
  7733. * Network domain allows tracking network activities of the page. It exposes information about http,
  7734. * file, data and other requests and responses, their headers, bodies, timing, etc.
  7735. */
  7736. export namespace Network {
  7737. /**
  7738. * Resource type as it was perceived by the rendering engine.
  7739. */
  7740. export type ResourceType = ('Document' | 'Stylesheet' | 'Image' | 'Media' | 'Font' | 'Script' | 'TextTrack' | 'XHR' | 'Fetch' | 'EventSource' | 'WebSocket' | 'Manifest' | 'SignedExchange' | 'Ping' | 'CSPViolationReport' | 'Other');
  7741. /**
  7742. * Unique loader identifier.
  7743. */
  7744. export type LoaderId = string;
  7745. /**
  7746. * Unique request identifier.
  7747. */
  7748. export type RequestId = string;
  7749. /**
  7750. * Unique intercepted request identifier.
  7751. */
  7752. export type InterceptionId = string;
  7753. /**
  7754. * Network level fetch failure reason.
  7755. */
  7756. export type ErrorReason = ('Failed' | 'Aborted' | 'TimedOut' | 'AccessDenied' | 'ConnectionClosed' | 'ConnectionReset' | 'ConnectionRefused' | 'ConnectionAborted' | 'ConnectionFailed' | 'NameNotResolved' | 'InternetDisconnected' | 'AddressUnreachable' | 'BlockedByClient' | 'BlockedByResponse');
  7757. /**
  7758. * UTC time in seconds, counted from January 1, 1970.
  7759. */
  7760. export type TimeSinceEpoch = number;
  7761. /**
  7762. * Monotonically increasing time in seconds since an arbitrary point in the past.
  7763. */
  7764. export type MonotonicTime = number;
  7765. /**
  7766. * Request / response headers as keys / values of JSON object.
  7767. */
  7768. export interface Headers {
  7769. [key: string]: string;
  7770. }
  7771. /**
  7772. * The underlying connection technology that the browser is supposedly using.
  7773. */
  7774. export type ConnectionType = ('none' | 'cellular2g' | 'cellular3g' | 'cellular4g' | 'bluetooth' | 'ethernet' | 'wifi' | 'wimax' | 'other');
  7775. /**
  7776. * Represents the cookie's 'SameSite' status:
  7777. * https://tools.ietf.org/html/draft-west-first-party-cookies
  7778. */
  7779. export type CookieSameSite = ('Strict' | 'Lax' | 'None');
  7780. /**
  7781. * Represents the cookie's 'Priority' status:
  7782. * https://tools.ietf.org/html/draft-west-cookie-priority-00
  7783. */
  7784. export type CookiePriority = ('Low' | 'Medium' | 'High');
  7785. /**
  7786. * Timing information for the request.
  7787. */
  7788. export interface ResourceTiming {
  7789. /**
  7790. * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
  7791. * milliseconds relatively to this requestTime.
  7792. */
  7793. requestTime: number;
  7794. /**
  7795. * Started resolving proxy.
  7796. */
  7797. proxyStart: number;
  7798. /**
  7799. * Finished resolving proxy.
  7800. */
  7801. proxyEnd: number;
  7802. /**
  7803. * Started DNS address resolve.
  7804. */
  7805. dnsStart: number;
  7806. /**
  7807. * Finished DNS address resolve.
  7808. */
  7809. dnsEnd: number;
  7810. /**
  7811. * Started connecting to the remote host.
  7812. */
  7813. connectStart: number;
  7814. /**
  7815. * Connected to the remote host.
  7816. */
  7817. connectEnd: number;
  7818. /**
  7819. * Started SSL handshake.
  7820. */
  7821. sslStart: number;
  7822. /**
  7823. * Finished SSL handshake.
  7824. */
  7825. sslEnd: number;
  7826. /**
  7827. * Started running ServiceWorker.
  7828. */
  7829. workerStart: number;
  7830. /**
  7831. * Finished Starting ServiceWorker.
  7832. */
  7833. workerReady: number;
  7834. /**
  7835. * Started fetch event.
  7836. */
  7837. workerFetchStart: number;
  7838. /**
  7839. * Settled fetch event respondWith promise.
  7840. */
  7841. workerRespondWithSettled: number;
  7842. /**
  7843. * Started sending request.
  7844. */
  7845. sendStart: number;
  7846. /**
  7847. * Finished sending request.
  7848. */
  7849. sendEnd: number;
  7850. /**
  7851. * Time the server started pushing request.
  7852. */
  7853. pushStart: number;
  7854. /**
  7855. * Time the server finished pushing request.
  7856. */
  7857. pushEnd: number;
  7858. /**
  7859. * Finished receiving response headers.
  7860. */
  7861. receiveHeadersEnd: number;
  7862. }
  7863. /**
  7864. * Loading priority of a resource request.
  7865. */
  7866. export type ResourcePriority = ('VeryLow' | 'Low' | 'Medium' | 'High' | 'VeryHigh');
  7867. /**
  7868. * Post data entry for HTTP request
  7869. */
  7870. export interface PostDataEntry {
  7871. bytes?: string;
  7872. }
  7873. export const enum RequestReferrerPolicy {
  7874. UnsafeUrl = 'unsafe-url',
  7875. NoReferrerWhenDowngrade = 'no-referrer-when-downgrade',
  7876. NoReferrer = 'no-referrer',
  7877. Origin = 'origin',
  7878. OriginWhenCrossOrigin = 'origin-when-cross-origin',
  7879. SameOrigin = 'same-origin',
  7880. StrictOrigin = 'strict-origin',
  7881. StrictOriginWhenCrossOrigin = 'strict-origin-when-cross-origin',
  7882. }
  7883. /**
  7884. * HTTP request data.
  7885. */
  7886. export interface Request {
  7887. /**
  7888. * Request URL (without fragment).
  7889. */
  7890. url: string;
  7891. /**
  7892. * Fragment of the requested URL starting with hash, if present.
  7893. */
  7894. urlFragment?: string;
  7895. /**
  7896. * HTTP request method.
  7897. */
  7898. method: string;
  7899. /**
  7900. * HTTP request headers.
  7901. */
  7902. headers: Headers;
  7903. /**
  7904. * HTTP POST request data.
  7905. */
  7906. postData?: string;
  7907. /**
  7908. * True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
  7909. */
  7910. hasPostData?: boolean;
  7911. /**
  7912. * Request body elements. This will be converted from base64 to binary
  7913. */
  7914. postDataEntries?: PostDataEntry[];
  7915. /**
  7916. * The mixed content type of the request.
  7917. */
  7918. mixedContentType?: Security.MixedContentType;
  7919. /**
  7920. * Priority of the resource request at the time request is sent.
  7921. */
  7922. initialPriority: ResourcePriority;
  7923. /**
  7924. * The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ (RequestReferrerPolicy enum)
  7925. */
  7926. referrerPolicy: ('unsafe-url' | 'no-referrer-when-downgrade' | 'no-referrer' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin');
  7927. /**
  7928. * Whether is loaded via link preload.
  7929. */
  7930. isLinkPreload?: boolean;
  7931. /**
  7932. * Set for requests when the TrustToken API is used. Contains the parameters
  7933. * passed by the developer (e.g. via "fetch") as understood by the backend.
  7934. */
  7935. trustTokenParams?: TrustTokenParams;
  7936. }
  7937. /**
  7938. * Details of a signed certificate timestamp (SCT).
  7939. */
  7940. export interface SignedCertificateTimestamp {
  7941. /**
  7942. * Validation status.
  7943. */
  7944. status: string;
  7945. /**
  7946. * Origin.
  7947. */
  7948. origin: string;
  7949. /**
  7950. * Log name / description.
  7951. */
  7952. logDescription: string;
  7953. /**
  7954. * Log ID.
  7955. */
  7956. logId: string;
  7957. /**
  7958. * Issuance date.
  7959. */
  7960. timestamp: TimeSinceEpoch;
  7961. /**
  7962. * Hash algorithm.
  7963. */
  7964. hashAlgorithm: string;
  7965. /**
  7966. * Signature algorithm.
  7967. */
  7968. signatureAlgorithm: string;
  7969. /**
  7970. * Signature data.
  7971. */
  7972. signatureData: string;
  7973. }
  7974. /**
  7975. * Security details about a request.
  7976. */
  7977. export interface SecurityDetails {
  7978. /**
  7979. * Protocol name (e.g. "TLS 1.2" or "QUIC").
  7980. */
  7981. protocol: string;
  7982. /**
  7983. * Key Exchange used by the connection, or the empty string if not applicable.
  7984. */
  7985. keyExchange: string;
  7986. /**
  7987. * (EC)DH group used by the connection, if applicable.
  7988. */
  7989. keyExchangeGroup?: string;
  7990. /**
  7991. * Cipher name.
  7992. */
  7993. cipher: string;
  7994. /**
  7995. * TLS MAC. Note that AEAD ciphers do not have separate MACs.
  7996. */
  7997. mac?: string;
  7998. /**
  7999. * Certificate ID value.
  8000. */
  8001. certificateId: Security.CertificateId;
  8002. /**
  8003. * Certificate subject name.
  8004. */
  8005. subjectName: string;
  8006. /**
  8007. * Subject Alternative Name (SAN) DNS names and IP addresses.
  8008. */
  8009. sanList: string[];
  8010. /**
  8011. * Name of the issuing CA.
  8012. */
  8013. issuer: string;
  8014. /**
  8015. * Certificate valid from date.
  8016. */
  8017. validFrom: TimeSinceEpoch;
  8018. /**
  8019. * Certificate valid to (expiration) date
  8020. */
  8021. validTo: TimeSinceEpoch;
  8022. /**
  8023. * List of signed certificate timestamps (SCTs).
  8024. */
  8025. signedCertificateTimestampList: SignedCertificateTimestamp[];
  8026. /**
  8027. * Whether the request complied with Certificate Transparency policy
  8028. */
  8029. certificateTransparencyCompliance: CertificateTransparencyCompliance;
  8030. }
  8031. /**
  8032. * Whether the request complied with Certificate Transparency policy.
  8033. */
  8034. export type CertificateTransparencyCompliance = ('unknown' | 'not-compliant' | 'compliant');
  8035. /**
  8036. * The reason why request was blocked.
  8037. */
  8038. export type BlockedReason = ('other' | 'csp' | 'mixed-content' | 'origin' | 'inspector' | 'subresource-filter' | 'content-type' | 'collapsed-by-client' | 'coep-frame-resource-needs-coep-header' | 'coop-sandboxed-iframe-cannot-navigate-to-coop-page' | 'corp-not-same-origin' | 'corp-not-same-origin-after-defaulted-to-same-origin-by-coep' | 'corp-not-same-site');
  8039. /**
  8040. * Source of serviceworker response.
  8041. */
  8042. export type ServiceWorkerResponseSource = ('cache-storage' | 'http-cache' | 'fallback-code' | 'network');
  8043. export const enum TrustTokenParamsRefreshPolicy {
  8044. UseCached = 'UseCached',
  8045. Refresh = 'Refresh',
  8046. }
  8047. /**
  8048. * Determines what type of Trust Token operation is executed and
  8049. * depending on the type, some additional parameters.
  8050. */
  8051. export interface TrustTokenParams {
  8052. type: TrustTokenOperationType;
  8053. /**
  8054. * Only set for "srr-token-redemption" type and determine whether
  8055. * to request a fresh SRR or use a still valid cached SRR. (TrustTokenParamsRefreshPolicy enum)
  8056. */
  8057. refreshPolicy: ('UseCached' | 'Refresh');
  8058. /**
  8059. * Origins of issuers from whom to request tokens or redemption
  8060. * records.
  8061. */
  8062. issuers?: string[];
  8063. }
  8064. export type TrustTokenOperationType = ('Issuance' | 'Redemption' | 'Signing');
  8065. /**
  8066. * HTTP response data.
  8067. */
  8068. export interface Response {
  8069. /**
  8070. * Response URL. This URL can be different from CachedResource.url in case of redirect.
  8071. */
  8072. url: string;
  8073. /**
  8074. * HTTP response status code.
  8075. */
  8076. status: integer;
  8077. /**
  8078. * HTTP response status text.
  8079. */
  8080. statusText: string;
  8081. /**
  8082. * HTTP response headers.
  8083. */
  8084. headers: Headers;
  8085. /**
  8086. * HTTP response headers text.
  8087. */
  8088. headersText?: string;
  8089. /**
  8090. * Resource mimeType as determined by the browser.
  8091. */
  8092. mimeType: string;
  8093. /**
  8094. * Refined HTTP request headers that were actually transmitted over the network.
  8095. */
  8096. requestHeaders?: Headers;
  8097. /**
  8098. * HTTP request headers text.
  8099. */
  8100. requestHeadersText?: string;
  8101. /**
  8102. * Specifies whether physical connection was actually reused for this request.
  8103. */
  8104. connectionReused: boolean;
  8105. /**
  8106. * Physical connection id that was actually used for this request.
  8107. */
  8108. connectionId: number;
  8109. /**
  8110. * Remote IP address.
  8111. */
  8112. remoteIPAddress?: string;
  8113. /**
  8114. * Remote port.
  8115. */
  8116. remotePort?: integer;
  8117. /**
  8118. * Specifies that the request was served from the disk cache.
  8119. */
  8120. fromDiskCache?: boolean;
  8121. /**
  8122. * Specifies that the request was served from the ServiceWorker.
  8123. */
  8124. fromServiceWorker?: boolean;
  8125. /**
  8126. * Specifies that the request was served from the prefetch cache.
  8127. */
  8128. fromPrefetchCache?: boolean;
  8129. /**
  8130. * Total number of bytes received for this request so far.
  8131. */
  8132. encodedDataLength: number;
  8133. /**
  8134. * Timing information for the given request.
  8135. */
  8136. timing?: ResourceTiming;
  8137. /**
  8138. * Response source of response from ServiceWorker.
  8139. */
  8140. serviceWorkerResponseSource?: ServiceWorkerResponseSource;
  8141. /**
  8142. * The time at which the returned response was generated.
  8143. */
  8144. responseTime?: TimeSinceEpoch;
  8145. /**
  8146. * Cache Storage Cache Name.
  8147. */
  8148. cacheStorageCacheName?: string;
  8149. /**
  8150. * Protocol used to fetch this request.
  8151. */
  8152. protocol?: string;
  8153. /**
  8154. * Security state of the request resource.
  8155. */
  8156. securityState: Security.SecurityState;
  8157. /**
  8158. * Security details for the request.
  8159. */
  8160. securityDetails?: SecurityDetails;
  8161. }
  8162. /**
  8163. * WebSocket request data.
  8164. */
  8165. export interface WebSocketRequest {
  8166. /**
  8167. * HTTP request headers.
  8168. */
  8169. headers: Headers;
  8170. }
  8171. /**
  8172. * WebSocket response data.
  8173. */
  8174. export interface WebSocketResponse {
  8175. /**
  8176. * HTTP response status code.
  8177. */
  8178. status: integer;
  8179. /**
  8180. * HTTP response status text.
  8181. */
  8182. statusText: string;
  8183. /**
  8184. * HTTP response headers.
  8185. */
  8186. headers: Headers;
  8187. /**
  8188. * HTTP response headers text.
  8189. */
  8190. headersText?: string;
  8191. /**
  8192. * HTTP request headers.
  8193. */
  8194. requestHeaders?: Headers;
  8195. /**
  8196. * HTTP request headers text.
  8197. */
  8198. requestHeadersText?: string;
  8199. }
  8200. /**
  8201. * WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
  8202. */
  8203. export interface WebSocketFrame {
  8204. /**
  8205. * WebSocket message opcode.
  8206. */
  8207. opcode: number;
  8208. /**
  8209. * WebSocket message mask.
  8210. */
  8211. mask: boolean;
  8212. /**
  8213. * WebSocket message payload data.
  8214. * If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
  8215. * If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
  8216. */
  8217. payloadData: string;
  8218. }
  8219. /**
  8220. * Information about the cached resource.
  8221. */
  8222. export interface CachedResource {
  8223. /**
  8224. * Resource URL. This is the url of the original network request.
  8225. */
  8226. url: string;
  8227. /**
  8228. * Type of this resource.
  8229. */
  8230. type: ResourceType;
  8231. /**
  8232. * Cached response data.
  8233. */
  8234. response?: Response;
  8235. /**
  8236. * Cached response body size.
  8237. */
  8238. bodySize: number;
  8239. }
  8240. export const enum InitiatorType {
  8241. Parser = 'parser',
  8242. Script = 'script',
  8243. Preload = 'preload',
  8244. SignedExchange = 'SignedExchange',
  8245. Other = 'other',
  8246. }
  8247. /**
  8248. * Information about the request initiator.
  8249. */
  8250. export interface Initiator {
  8251. /**
  8252. * Type of this initiator. (InitiatorType enum)
  8253. */
  8254. type: ('parser' | 'script' | 'preload' | 'SignedExchange' | 'other');
  8255. /**
  8256. * Initiator JavaScript stack trace, set for Script only.
  8257. */
  8258. stack?: Runtime.StackTrace;
  8259. /**
  8260. * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
  8261. */
  8262. url?: string;
  8263. /**
  8264. * Initiator line number, set for Parser type or for Script type (when script is importing
  8265. * module) (0-based).
  8266. */
  8267. lineNumber?: number;
  8268. /**
  8269. * Initiator column number, set for Parser type or for Script type (when script is importing
  8270. * module) (0-based).
  8271. */
  8272. columnNumber?: number;
  8273. }
  8274. /**
  8275. * Cookie object
  8276. */
  8277. export interface Cookie {
  8278. /**
  8279. * Cookie name.
  8280. */
  8281. name: string;
  8282. /**
  8283. * Cookie value.
  8284. */
  8285. value: string;
  8286. /**
  8287. * Cookie domain.
  8288. */
  8289. domain: string;
  8290. /**
  8291. * Cookie path.
  8292. */
  8293. path: string;
  8294. /**
  8295. * Cookie expiration date as the number of seconds since the UNIX epoch.
  8296. */
  8297. expires: number;
  8298. /**
  8299. * Cookie size.
  8300. */
  8301. size: integer;
  8302. /**
  8303. * True if cookie is http-only.
  8304. */
  8305. httpOnly: boolean;
  8306. /**
  8307. * True if cookie is secure.
  8308. */
  8309. secure: boolean;
  8310. /**
  8311. * True in case of session cookie.
  8312. */
  8313. session: boolean;
  8314. /**
  8315. * Cookie SameSite type.
  8316. */
  8317. sameSite?: CookieSameSite;
  8318. /**
  8319. * Cookie Priority
  8320. */
  8321. priority: CookiePriority;
  8322. }
  8323. /**
  8324. * Types of reasons why a cookie may not be stored from a response.
  8325. */
  8326. export type SetCookieBlockedReason = ('SecureOnly' | 'SameSiteStrict' | 'SameSiteLax' | 'SameSiteUnspecifiedTreatedAsLax' | 'SameSiteNoneInsecure' | 'UserPreferences' | 'SyntaxError' | 'SchemeNotSupported' | 'OverwriteSecure' | 'InvalidDomain' | 'InvalidPrefix' | 'UnknownError' | 'SchemefulSameSiteStrict' | 'SchemefulSameSiteLax' | 'SchemefulSameSiteUnspecifiedTreatedAsLax');
  8327. /**
  8328. * Types of reasons why a cookie may not be sent with a request.
  8329. */
  8330. export type CookieBlockedReason = ('SecureOnly' | 'NotOnPath' | 'DomainMismatch' | 'SameSiteStrict' | 'SameSiteLax' | 'SameSiteUnspecifiedTreatedAsLax' | 'SameSiteNoneInsecure' | 'UserPreferences' | 'UnknownError' | 'SchemefulSameSiteStrict' | 'SchemefulSameSiteLax' | 'SchemefulSameSiteUnspecifiedTreatedAsLax');
  8331. /**
  8332. * A cookie which was not stored from a response with the corresponding reason.
  8333. */
  8334. export interface BlockedSetCookieWithReason {
  8335. /**
  8336. * The reason(s) this cookie was blocked.
  8337. */
  8338. blockedReasons: SetCookieBlockedReason[];
  8339. /**
  8340. * The string representing this individual cookie as it would appear in the header.
  8341. * This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
  8342. */
  8343. cookieLine: string;
  8344. /**
  8345. * The cookie object which represents the cookie which was not stored. It is optional because
  8346. * sometimes complete cookie information is not available, such as in the case of parsing
  8347. * errors.
  8348. */
  8349. cookie?: Cookie;
  8350. }
  8351. /**
  8352. * A cookie with was not sent with a request with the corresponding reason.
  8353. */
  8354. export interface BlockedCookieWithReason {
  8355. /**
  8356. * The reason(s) the cookie was blocked.
  8357. */
  8358. blockedReasons: CookieBlockedReason[];
  8359. /**
  8360. * The cookie object representing the cookie which was not sent.
  8361. */
  8362. cookie: Cookie;
  8363. }
  8364. /**
  8365. * Cookie parameter object
  8366. */
  8367. export interface CookieParam {
  8368. /**
  8369. * Cookie name.
  8370. */
  8371. name: string;
  8372. /**
  8373. * Cookie value.
  8374. */
  8375. value: string;
  8376. /**
  8377. * The request-URI to associate with the setting of the cookie. This value can affect the
  8378. * default domain and path values of the created cookie.
  8379. */
  8380. url?: string;
  8381. /**
  8382. * Cookie domain.
  8383. */
  8384. domain?: string;
  8385. /**
  8386. * Cookie path.
  8387. */
  8388. path?: string;
  8389. /**
  8390. * True if cookie is secure.
  8391. */
  8392. secure?: boolean;
  8393. /**
  8394. * True if cookie is http-only.
  8395. */
  8396. httpOnly?: boolean;
  8397. /**
  8398. * Cookie SameSite type.
  8399. */
  8400. sameSite?: CookieSameSite;
  8401. /**
  8402. * Cookie expiration date, session cookie if not set
  8403. */
  8404. expires?: TimeSinceEpoch;
  8405. /**
  8406. * Cookie Priority.
  8407. */
  8408. priority?: CookiePriority;
  8409. }
  8410. export const enum AuthChallengeSource {
  8411. Server = 'Server',
  8412. Proxy = 'Proxy',
  8413. }
  8414. /**
  8415. * Authorization challenge for HTTP status code 401 or 407.
  8416. */
  8417. export interface AuthChallenge {
  8418. /**
  8419. * Source of the authentication challenge. (AuthChallengeSource enum)
  8420. */
  8421. source?: ('Server' | 'Proxy');
  8422. /**
  8423. * Origin of the challenger.
  8424. */
  8425. origin: string;
  8426. /**
  8427. * The authentication scheme used, such as basic or digest
  8428. */
  8429. scheme: string;
  8430. /**
  8431. * The realm of the challenge. May be empty.
  8432. */
  8433. realm: string;
  8434. }
  8435. export const enum AuthChallengeResponseResponse {
  8436. Default = 'Default',
  8437. CancelAuth = 'CancelAuth',
  8438. ProvideCredentials = 'ProvideCredentials',
  8439. }
  8440. /**
  8441. * Response to an AuthChallenge.
  8442. */
  8443. export interface AuthChallengeResponse {
  8444. /**
  8445. * The decision on what to do in response to the authorization challenge. Default means
  8446. * deferring to the default behavior of the net stack, which will likely either the Cancel
  8447. * authentication or display a popup dialog box. (AuthChallengeResponseResponse enum)
  8448. */
  8449. response: ('Default' | 'CancelAuth' | 'ProvideCredentials');
  8450. /**
  8451. * The username to provide, possibly empty. Should only be set if response is
  8452. * ProvideCredentials.
  8453. */
  8454. username?: string;
  8455. /**
  8456. * The password to provide, possibly empty. Should only be set if response is
  8457. * ProvideCredentials.
  8458. */
  8459. password?: string;
  8460. }
  8461. /**
  8462. * Stages of the interception to begin intercepting. Request will intercept before the request is
  8463. * sent. Response will intercept after the response is received.
  8464. */
  8465. export type InterceptionStage = ('Request' | 'HeadersReceived');
  8466. /**
  8467. * Request pattern for interception.
  8468. */
  8469. export interface RequestPattern {
  8470. /**
  8471. * Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is
  8472. * backslash. Omitting is equivalent to "*".
  8473. */
  8474. urlPattern?: string;
  8475. /**
  8476. * If set, only requests for matching resource types will be intercepted.
  8477. */
  8478. resourceType?: ResourceType;
  8479. /**
  8480. * Stage at wich to begin intercepting requests. Default is Request.
  8481. */
  8482. interceptionStage?: InterceptionStage;
  8483. }
  8484. /**
  8485. * Information about a signed exchange signature.
  8486. * https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
  8487. */
  8488. export interface SignedExchangeSignature {
  8489. /**
  8490. * Signed exchange signature label.
  8491. */
  8492. label: string;
  8493. /**
  8494. * The hex string of signed exchange signature.
  8495. */
  8496. signature: string;
  8497. /**
  8498. * Signed exchange signature integrity.
  8499. */
  8500. integrity: string;
  8501. /**
  8502. * Signed exchange signature cert Url.
  8503. */
  8504. certUrl?: string;
  8505. /**
  8506. * The hex string of signed exchange signature cert sha256.
  8507. */
  8508. certSha256?: string;
  8509. /**
  8510. * Signed exchange signature validity Url.
  8511. */
  8512. validityUrl: string;
  8513. /**
  8514. * Signed exchange signature date.
  8515. */
  8516. date: integer;
  8517. /**
  8518. * Signed exchange signature expires.
  8519. */
  8520. expires: integer;
  8521. /**
  8522. * The encoded certificates.
  8523. */
  8524. certificates?: string[];
  8525. }
  8526. /**
  8527. * Information about a signed exchange header.
  8528. * https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
  8529. */
  8530. export interface SignedExchangeHeader {
  8531. /**
  8532. * Signed exchange request URL.
  8533. */
  8534. requestUrl: string;
  8535. /**
  8536. * Signed exchange response code.
  8537. */
  8538. responseCode: integer;
  8539. /**
  8540. * Signed exchange response headers.
  8541. */
  8542. responseHeaders: Headers;
  8543. /**
  8544. * Signed exchange response signature.
  8545. */
  8546. signatures: SignedExchangeSignature[];
  8547. /**
  8548. * Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>".
  8549. */
  8550. headerIntegrity: string;
  8551. }
  8552. /**
  8553. * Field type for a signed exchange related error.
  8554. */
  8555. export type SignedExchangeErrorField = ('signatureSig' | 'signatureIntegrity' | 'signatureCertUrl' | 'signatureCertSha256' | 'signatureValidityUrl' | 'signatureTimestamps');
  8556. /**
  8557. * Information about a signed exchange response.
  8558. */
  8559. export interface SignedExchangeError {
  8560. /**
  8561. * Error message.
  8562. */
  8563. message: string;
  8564. /**
  8565. * The index of the signature which caused the error.
  8566. */
  8567. signatureIndex?: integer;
  8568. /**
  8569. * The field which caused the error.
  8570. */
  8571. errorField?: SignedExchangeErrorField;
  8572. }
  8573. /**
  8574. * Information about a signed exchange response.
  8575. */
  8576. export interface SignedExchangeInfo {
  8577. /**
  8578. * The outer response of signed HTTP exchange which was received from network.
  8579. */
  8580. outerResponse: Response;
  8581. /**
  8582. * Information about the signed exchange header.
  8583. */
  8584. header?: SignedExchangeHeader;
  8585. /**
  8586. * Security details for the signed exchange header.
  8587. */
  8588. securityDetails?: SecurityDetails;
  8589. /**
  8590. * Errors occurred while handling the signed exchagne.
  8591. */
  8592. errors?: SignedExchangeError[];
  8593. }
  8594. export type CrossOriginOpenerPolicyValue = ('SameOrigin' | 'SameOriginAllowPopups' | 'UnsafeNone' | 'SameOriginPlusCoep');
  8595. export interface CrossOriginOpenerPolicyStatus {
  8596. value: CrossOriginOpenerPolicyValue;
  8597. reportOnlyValue: CrossOriginOpenerPolicyValue;
  8598. reportingEndpoint?: string;
  8599. reportOnlyReportingEndpoint?: string;
  8600. }
  8601. export type CrossOriginEmbedderPolicyValue = ('None' | 'RequireCorp');
  8602. export interface CrossOriginEmbedderPolicyStatus {
  8603. value: CrossOriginEmbedderPolicyValue;
  8604. reportOnlyValue: CrossOriginEmbedderPolicyValue;
  8605. reportingEndpoint?: string;
  8606. reportOnlyReportingEndpoint?: string;
  8607. }
  8608. export interface SecurityIsolationStatus {
  8609. coop: CrossOriginOpenerPolicyStatus;
  8610. coep: CrossOriginEmbedderPolicyStatus;
  8611. }
  8612. /**
  8613. * An object providing the result of a network resource load.
  8614. */
  8615. export interface LoadNetworkResourcePageResult {
  8616. success: boolean;
  8617. /**
  8618. * Optional values used for error reporting.
  8619. */
  8620. netError?: number;
  8621. netErrorName?: string;
  8622. httpStatusCode?: number;
  8623. /**
  8624. * If successful, one of the following two fields holds the result.
  8625. */
  8626. stream?: IO.StreamHandle;
  8627. /**
  8628. * Response headers.
  8629. */
  8630. headers?: Network.Headers;
  8631. }
  8632. /**
  8633. * An options object that may be extended later to better support CORS,
  8634. * CORB and streaming.
  8635. */
  8636. export interface LoadNetworkResourceOptions {
  8637. disableCache: boolean;
  8638. includeCredentials: boolean;
  8639. }
  8640. export interface CanClearBrowserCacheResponse {
  8641. /**
  8642. * True if browser cache can be cleared.
  8643. */
  8644. result: boolean;
  8645. }
  8646. export interface CanClearBrowserCookiesResponse {
  8647. /**
  8648. * True if browser cookies can be cleared.
  8649. */
  8650. result: boolean;
  8651. }
  8652. export interface CanEmulateNetworkConditionsResponse {
  8653. /**
  8654. * True if emulation of network conditions is supported.
  8655. */
  8656. result: boolean;
  8657. }
  8658. export interface ContinueInterceptedRequestRequest {
  8659. interceptionId: InterceptionId;
  8660. /**
  8661. * If set this causes the request to fail with the given reason. Passing `Aborted` for requests
  8662. * marked with `isNavigationRequest` also cancels the navigation. Must not be set in response
  8663. * to an authChallenge.
  8664. */
  8665. errorReason?: ErrorReason;
  8666. /**
  8667. * If set the requests completes using with the provided base64 encoded raw response, including
  8668. * HTTP status line and headers etc... Must not be set in response to an authChallenge.
  8669. */
  8670. rawResponse?: string;
  8671. /**
  8672. * If set the request url will be modified in a way that's not observable by page. Must not be
  8673. * set in response to an authChallenge.
  8674. */
  8675. url?: string;
  8676. /**
  8677. * If set this allows the request method to be overridden. Must not be set in response to an
  8678. * authChallenge.
  8679. */
  8680. method?: string;
  8681. /**
  8682. * If set this allows postData to be set. Must not be set in response to an authChallenge.
  8683. */
  8684. postData?: string;
  8685. /**
  8686. * If set this allows the request headers to be changed. Must not be set in response to an
  8687. * authChallenge.
  8688. */
  8689. headers?: Headers;
  8690. /**
  8691. * Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
  8692. */
  8693. authChallengeResponse?: AuthChallengeResponse;
  8694. }
  8695. export interface DeleteCookiesRequest {
  8696. /**
  8697. * Name of the cookies to remove.
  8698. */
  8699. name: string;
  8700. /**
  8701. * If specified, deletes all the cookies with the given name where domain and path match
  8702. * provided URL.
  8703. */
  8704. url?: string;
  8705. /**
  8706. * If specified, deletes only cookies with the exact domain.
  8707. */
  8708. domain?: string;
  8709. /**
  8710. * If specified, deletes only cookies with the exact path.
  8711. */
  8712. path?: string;
  8713. }
  8714. export interface EmulateNetworkConditionsRequest {
  8715. /**
  8716. * True to emulate internet disconnection.
  8717. */
  8718. offline: boolean;
  8719. /**
  8720. * Minimum latency from request sent to response headers received (ms).
  8721. */
  8722. latency: number;
  8723. /**
  8724. * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
  8725. */
  8726. downloadThroughput: number;
  8727. /**
  8728. * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
  8729. */
  8730. uploadThroughput: number;
  8731. /**
  8732. * Connection type if known.
  8733. */
  8734. connectionType?: ConnectionType;
  8735. }
  8736. export interface EnableRequest {
  8737. /**
  8738. * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
  8739. */
  8740. maxTotalBufferSize?: integer;
  8741. /**
  8742. * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
  8743. */
  8744. maxResourceBufferSize?: integer;
  8745. /**
  8746. * Longest post body size (in bytes) that would be included in requestWillBeSent notification
  8747. */
  8748. maxPostDataSize?: integer;
  8749. }
  8750. export interface GetAllCookiesResponse {
  8751. /**
  8752. * Array of cookie objects.
  8753. */
  8754. cookies: Cookie[];
  8755. }
  8756. export interface GetCertificateRequest {
  8757. /**
  8758. * Origin to get certificate for.
  8759. */
  8760. origin: string;
  8761. }
  8762. export interface GetCertificateResponse {
  8763. tableNames: string[];
  8764. }
  8765. export interface GetCookiesRequest {
  8766. /**
  8767. * The list of URLs for which applicable cookies will be fetched.
  8768. * If not specified, it's assumed to be set to the list containing
  8769. * the URLs of the page and all of its subframes.
  8770. */
  8771. urls?: string[];
  8772. }
  8773. export interface GetCookiesResponse {
  8774. /**
  8775. * Array of cookie objects.
  8776. */
  8777. cookies: Cookie[];
  8778. }
  8779. export interface GetResponseBodyRequest {
  8780. /**
  8781. * Identifier of the network request to get content for.
  8782. */
  8783. requestId: RequestId;
  8784. }
  8785. export interface GetResponseBodyResponse {
  8786. /**
  8787. * Response body.
  8788. */
  8789. body: string;
  8790. /**
  8791. * True, if content was sent as base64.
  8792. */
  8793. base64Encoded: boolean;
  8794. }
  8795. export interface GetRequestPostDataRequest {
  8796. /**
  8797. * Identifier of the network request to get content for.
  8798. */
  8799. requestId: RequestId;
  8800. }
  8801. export interface GetRequestPostDataResponse {
  8802. /**
  8803. * Request body string, omitting files from multipart requests
  8804. */
  8805. postData: string;
  8806. }
  8807. export interface GetResponseBodyForInterceptionRequest {
  8808. /**
  8809. * Identifier for the intercepted request to get body for.
  8810. */
  8811. interceptionId: InterceptionId;
  8812. }
  8813. export interface GetResponseBodyForInterceptionResponse {
  8814. /**
  8815. * Response body.
  8816. */
  8817. body: string;
  8818. /**
  8819. * True, if content was sent as base64.
  8820. */
  8821. base64Encoded: boolean;
  8822. }
  8823. export interface TakeResponseBodyForInterceptionAsStreamRequest {
  8824. interceptionId: InterceptionId;
  8825. }
  8826. export interface TakeResponseBodyForInterceptionAsStreamResponse {
  8827. stream: IO.StreamHandle;
  8828. }
  8829. export interface ReplayXHRRequest {
  8830. /**
  8831. * Identifier of XHR to replay.
  8832. */
  8833. requestId: RequestId;
  8834. }
  8835. export interface SearchInResponseBodyRequest {
  8836. /**
  8837. * Identifier of the network response to search.
  8838. */
  8839. requestId: RequestId;
  8840. /**
  8841. * String to search for.
  8842. */
  8843. query: string;
  8844. /**
  8845. * If true, search is case sensitive.
  8846. */
  8847. caseSensitive?: boolean;
  8848. /**
  8849. * If true, treats string parameter as regex.
  8850. */
  8851. isRegex?: boolean;
  8852. }
  8853. export interface SearchInResponseBodyResponse {
  8854. /**
  8855. * List of search matches.
  8856. */
  8857. result: Debugger.SearchMatch[];
  8858. }
  8859. export interface SetBlockedURLsRequest {
  8860. /**
  8861. * URL patterns to block. Wildcards ('*') are allowed.
  8862. */
  8863. urls: string[];
  8864. }
  8865. export interface SetBypassServiceWorkerRequest {
  8866. /**
  8867. * Bypass service worker and load from network.
  8868. */
  8869. bypass: boolean;
  8870. }
  8871. export interface SetCacheDisabledRequest {
  8872. /**
  8873. * Cache disabled state.
  8874. */
  8875. cacheDisabled: boolean;
  8876. }
  8877. export interface SetCookieRequest {
  8878. /**
  8879. * Cookie name.
  8880. */
  8881. name: string;
  8882. /**
  8883. * Cookie value.
  8884. */
  8885. value: string;
  8886. /**
  8887. * The request-URI to associate with the setting of the cookie. This value can affect the
  8888. * default domain and path values of the created cookie.
  8889. */
  8890. url?: string;
  8891. /**
  8892. * Cookie domain.
  8893. */
  8894. domain?: string;
  8895. /**
  8896. * Cookie path.
  8897. */
  8898. path?: string;
  8899. /**
  8900. * True if cookie is secure.
  8901. */
  8902. secure?: boolean;
  8903. /**
  8904. * True if cookie is http-only.
  8905. */
  8906. httpOnly?: boolean;
  8907. /**
  8908. * Cookie SameSite type.
  8909. */
  8910. sameSite?: CookieSameSite;
  8911. /**
  8912. * Cookie expiration date, session cookie if not set
  8913. */
  8914. expires?: TimeSinceEpoch;
  8915. /**
  8916. * Cookie Priority type.
  8917. */
  8918. priority?: CookiePriority;
  8919. }
  8920. export interface SetCookieResponse {
  8921. /**
  8922. * Always set to true. If an error occurs, the response indicates protocol error.
  8923. */
  8924. success: boolean;
  8925. }
  8926. export interface SetCookiesRequest {
  8927. /**
  8928. * Cookies to be set.
  8929. */
  8930. cookies: CookieParam[];
  8931. }
  8932. export interface SetDataSizeLimitsForTestRequest {
  8933. /**
  8934. * Maximum total buffer size.
  8935. */
  8936. maxTotalSize: integer;
  8937. /**
  8938. * Maximum per-resource size.
  8939. */
  8940. maxResourceSize: integer;
  8941. }
  8942. export interface SetExtraHTTPHeadersRequest {
  8943. /**
  8944. * Map with extra HTTP headers.
  8945. */
  8946. headers: Headers;
  8947. }
  8948. export interface SetAttachDebugHeaderRequest {
  8949. /**
  8950. * Whether to send a debug header.
  8951. */
  8952. enabled: boolean;
  8953. }
  8954. export interface SetRequestInterceptionRequest {
  8955. /**
  8956. * Requests matching any of these patterns will be forwarded and wait for the corresponding
  8957. * continueInterceptedRequest call.
  8958. */
  8959. patterns: RequestPattern[];
  8960. }
  8961. export interface SetUserAgentOverrideRequest {
  8962. /**
  8963. * User agent to use.
  8964. */
  8965. userAgent: string;
  8966. /**
  8967. * Browser langugage to emulate.
  8968. */
  8969. acceptLanguage?: string;
  8970. /**
  8971. * The platform navigator.platform should return.
  8972. */
  8973. platform?: string;
  8974. /**
  8975. * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
  8976. */
  8977. userAgentMetadata?: Emulation.UserAgentMetadata;
  8978. }
  8979. export interface GetSecurityIsolationStatusRequest {
  8980. /**
  8981. * If no frameId is provided, the status of the target is provided.
  8982. */
  8983. frameId?: Page.FrameId;
  8984. }
  8985. export interface GetSecurityIsolationStatusResponse {
  8986. status: SecurityIsolationStatus;
  8987. }
  8988. export interface LoadNetworkResourceRequest {
  8989. /**
  8990. * Frame id to get the resource for.
  8991. */
  8992. frameId: Page.FrameId;
  8993. /**
  8994. * URL of the resource to get content for.
  8995. */
  8996. url: string;
  8997. /**
  8998. * Options for the request.
  8999. */
  9000. options: LoadNetworkResourceOptions;
  9001. }
  9002. export interface LoadNetworkResourceResponse {
  9003. resource: LoadNetworkResourcePageResult;
  9004. }
  9005. /**
  9006. * Fired when data chunk was received over the network.
  9007. */
  9008. export interface DataReceivedEvent {
  9009. /**
  9010. * Request identifier.
  9011. */
  9012. requestId: RequestId;
  9013. /**
  9014. * Timestamp.
  9015. */
  9016. timestamp: MonotonicTime;
  9017. /**
  9018. * Data chunk length.
  9019. */
  9020. dataLength: integer;
  9021. /**
  9022. * Actual bytes received (might be less than dataLength for compressed encodings).
  9023. */
  9024. encodedDataLength: integer;
  9025. }
  9026. /**
  9027. * Fired when EventSource message is received.
  9028. */
  9029. export interface EventSourceMessageReceivedEvent {
  9030. /**
  9031. * Request identifier.
  9032. */
  9033. requestId: RequestId;
  9034. /**
  9035. * Timestamp.
  9036. */
  9037. timestamp: MonotonicTime;
  9038. /**
  9039. * Message type.
  9040. */
  9041. eventName: string;
  9042. /**
  9043. * Message identifier.
  9044. */
  9045. eventId: string;
  9046. /**
  9047. * Message content.
  9048. */
  9049. data: string;
  9050. }
  9051. /**
  9052. * Fired when HTTP request has failed to load.
  9053. */
  9054. export interface LoadingFailedEvent {
  9055. /**
  9056. * Request identifier.
  9057. */
  9058. requestId: RequestId;
  9059. /**
  9060. * Timestamp.
  9061. */
  9062. timestamp: MonotonicTime;
  9063. /**
  9064. * Resource type.
  9065. */
  9066. type: ResourceType;
  9067. /**
  9068. * User friendly error message.
  9069. */
  9070. errorText: string;
  9071. /**
  9072. * True if loading was canceled.
  9073. */
  9074. canceled?: boolean;
  9075. /**
  9076. * The reason why loading was blocked, if any.
  9077. */
  9078. blockedReason?: BlockedReason;
  9079. }
  9080. /**
  9081. * Fired when HTTP request has finished loading.
  9082. */
  9083. export interface LoadingFinishedEvent {
  9084. /**
  9085. * Request identifier.
  9086. */
  9087. requestId: RequestId;
  9088. /**
  9089. * Timestamp.
  9090. */
  9091. timestamp: MonotonicTime;
  9092. /**
  9093. * Total number of bytes received for this request.
  9094. */
  9095. encodedDataLength: number;
  9096. /**
  9097. * Set when 1) response was blocked by Cross-Origin Read Blocking and also
  9098. * 2) this needs to be reported to the DevTools console.
  9099. */
  9100. shouldReportCorbBlocking?: boolean;
  9101. }
  9102. /**
  9103. * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
  9104. * mocked.
  9105. * Deprecated, use Fetch.requestPaused instead.
  9106. */
  9107. export interface RequestInterceptedEvent {
  9108. /**
  9109. * Each request the page makes will have a unique id, however if any redirects are encountered
  9110. * while processing that fetch, they will be reported with the same id as the original fetch.
  9111. * Likewise if HTTP authentication is needed then the same fetch id will be used.
  9112. */
  9113. interceptionId: InterceptionId;
  9114. request: Request;
  9115. /**
  9116. * The id of the frame that initiated the request.
  9117. */
  9118. frameId: Page.FrameId;
  9119. /**
  9120. * How the requested resource will be used.
  9121. */
  9122. resourceType: ResourceType;
  9123. /**
  9124. * Whether this is a navigation request, which can abort the navigation completely.
  9125. */
  9126. isNavigationRequest: boolean;
  9127. /**
  9128. * Set if the request is a navigation that will result in a download.
  9129. * Only present after response is received from the server (i.e. HeadersReceived stage).
  9130. */
  9131. isDownload?: boolean;
  9132. /**
  9133. * Redirect location, only sent if a redirect was intercepted.
  9134. */
  9135. redirectUrl?: string;
  9136. /**
  9137. * Details of the Authorization Challenge encountered. If this is set then
  9138. * continueInterceptedRequest must contain an authChallengeResponse.
  9139. */
  9140. authChallenge?: AuthChallenge;
  9141. /**
  9142. * Response error if intercepted at response stage or if redirect occurred while intercepting
  9143. * request.
  9144. */
  9145. responseErrorReason?: ErrorReason;
  9146. /**
  9147. * Response code if intercepted at response stage or if redirect occurred while intercepting
  9148. * request or auth retry occurred.
  9149. */
  9150. responseStatusCode?: integer;
  9151. /**
  9152. * Response headers if intercepted at the response stage or if redirect occurred while
  9153. * intercepting request or auth retry occurred.
  9154. */
  9155. responseHeaders?: Headers;
  9156. /**
  9157. * If the intercepted request had a corresponding requestWillBeSent event fired for it, then
  9158. * this requestId will be the same as the requestId present in the requestWillBeSent event.
  9159. */
  9160. requestId?: RequestId;
  9161. }
  9162. /**
  9163. * Fired if request ended up loading from cache.
  9164. */
  9165. export interface RequestServedFromCacheEvent {
  9166. /**
  9167. * Request identifier.
  9168. */
  9169. requestId: RequestId;
  9170. }
  9171. /**
  9172. * Fired when page is about to send HTTP request.
  9173. */
  9174. export interface RequestWillBeSentEvent {
  9175. /**
  9176. * Request identifier.
  9177. */
  9178. requestId: RequestId;
  9179. /**
  9180. * Loader identifier. Empty string if the request is fetched from worker.
  9181. */
  9182. loaderId: LoaderId;
  9183. /**
  9184. * URL of the document this request is loaded for.
  9185. */
  9186. documentURL: string;
  9187. /**
  9188. * Request data.
  9189. */
  9190. request: Request;
  9191. /**
  9192. * Timestamp.
  9193. */
  9194. timestamp: MonotonicTime;
  9195. /**
  9196. * Timestamp.
  9197. */
  9198. wallTime: TimeSinceEpoch;
  9199. /**
  9200. * Request initiator.
  9201. */
  9202. initiator: Initiator;
  9203. /**
  9204. * Redirect response data.
  9205. */
  9206. redirectResponse?: Response;
  9207. /**
  9208. * Type of this resource.
  9209. */
  9210. type?: ResourceType;
  9211. /**
  9212. * Frame identifier.
  9213. */
  9214. frameId?: Page.FrameId;
  9215. /**
  9216. * Whether the request is initiated by a user gesture. Defaults to false.
  9217. */
  9218. hasUserGesture?: boolean;
  9219. }
  9220. /**
  9221. * Fired when resource loading priority is changed
  9222. */
  9223. export interface ResourceChangedPriorityEvent {
  9224. /**
  9225. * Request identifier.
  9226. */
  9227. requestId: RequestId;
  9228. /**
  9229. * New priority
  9230. */
  9231. newPriority: ResourcePriority;
  9232. /**
  9233. * Timestamp.
  9234. */
  9235. timestamp: MonotonicTime;
  9236. }
  9237. /**
  9238. * Fired when a signed exchange was received over the network
  9239. */
  9240. export interface SignedExchangeReceivedEvent {
  9241. /**
  9242. * Request identifier.
  9243. */
  9244. requestId: RequestId;
  9245. /**
  9246. * Information about the signed exchange response.
  9247. */
  9248. info: SignedExchangeInfo;
  9249. }
  9250. /**
  9251. * Fired when HTTP response is available.
  9252. */
  9253. export interface ResponseReceivedEvent {
  9254. /**
  9255. * Request identifier.
  9256. */
  9257. requestId: RequestId;
  9258. /**
  9259. * Loader identifier. Empty string if the request is fetched from worker.
  9260. */
  9261. loaderId: LoaderId;
  9262. /**
  9263. * Timestamp.
  9264. */
  9265. timestamp: MonotonicTime;
  9266. /**
  9267. * Resource type.
  9268. */
  9269. type: ResourceType;
  9270. /**
  9271. * Response data.
  9272. */
  9273. response: Response;
  9274. /**
  9275. * Frame identifier.
  9276. */
  9277. frameId?: Page.FrameId;
  9278. }
  9279. /**
  9280. * Fired when WebSocket is closed.
  9281. */
  9282. export interface WebSocketClosedEvent {
  9283. /**
  9284. * Request identifier.
  9285. */
  9286. requestId: RequestId;
  9287. /**
  9288. * Timestamp.
  9289. */
  9290. timestamp: MonotonicTime;
  9291. }
  9292. /**
  9293. * Fired upon WebSocket creation.
  9294. */
  9295. export interface WebSocketCreatedEvent {
  9296. /**
  9297. * Request identifier.
  9298. */
  9299. requestId: RequestId;
  9300. /**
  9301. * WebSocket request URL.
  9302. */
  9303. url: string;
  9304. /**
  9305. * Request initiator.
  9306. */
  9307. initiator?: Initiator;
  9308. }
  9309. /**
  9310. * Fired when WebSocket message error occurs.
  9311. */
  9312. export interface WebSocketFrameErrorEvent {
  9313. /**
  9314. * Request identifier.
  9315. */
  9316. requestId: RequestId;
  9317. /**
  9318. * Timestamp.
  9319. */
  9320. timestamp: MonotonicTime;
  9321. /**
  9322. * WebSocket error message.
  9323. */
  9324. errorMessage: string;
  9325. }
  9326. /**
  9327. * Fired when WebSocket message is received.
  9328. */
  9329. export interface WebSocketFrameReceivedEvent {
  9330. /**
  9331. * Request identifier.
  9332. */
  9333. requestId: RequestId;
  9334. /**
  9335. * Timestamp.
  9336. */
  9337. timestamp: MonotonicTime;
  9338. /**
  9339. * WebSocket response data.
  9340. */
  9341. response: WebSocketFrame;
  9342. }
  9343. /**
  9344. * Fired when WebSocket message is sent.
  9345. */
  9346. export interface WebSocketFrameSentEvent {
  9347. /**
  9348. * Request identifier.
  9349. */
  9350. requestId: RequestId;
  9351. /**
  9352. * Timestamp.
  9353. */
  9354. timestamp: MonotonicTime;
  9355. /**
  9356. * WebSocket response data.
  9357. */
  9358. response: WebSocketFrame;
  9359. }
  9360. /**
  9361. * Fired when WebSocket handshake response becomes available.
  9362. */
  9363. export interface WebSocketHandshakeResponseReceivedEvent {
  9364. /**
  9365. * Request identifier.
  9366. */
  9367. requestId: RequestId;
  9368. /**
  9369. * Timestamp.
  9370. */
  9371. timestamp: MonotonicTime;
  9372. /**
  9373. * WebSocket response data.
  9374. */
  9375. response: WebSocketResponse;
  9376. }
  9377. /**
  9378. * Fired when WebSocket is about to initiate handshake.
  9379. */
  9380. export interface WebSocketWillSendHandshakeRequestEvent {
  9381. /**
  9382. * Request identifier.
  9383. */
  9384. requestId: RequestId;
  9385. /**
  9386. * Timestamp.
  9387. */
  9388. timestamp: MonotonicTime;
  9389. /**
  9390. * UTC Timestamp.
  9391. */
  9392. wallTime: TimeSinceEpoch;
  9393. /**
  9394. * WebSocket request data.
  9395. */
  9396. request: WebSocketRequest;
  9397. }
  9398. /**
  9399. * Fired when additional information about a requestWillBeSent event is available from the
  9400. * network stack. Not every requestWillBeSent event will have an additional
  9401. * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
  9402. * or requestWillBeSentExtraInfo will be fired first for the same request.
  9403. */
  9404. export interface RequestWillBeSentExtraInfoEvent {
  9405. /**
  9406. * Request identifier. Used to match this information to an existing requestWillBeSent event.
  9407. */
  9408. requestId: RequestId;
  9409. /**
  9410. * A list of cookies potentially associated to the requested URL. This includes both cookies sent with
  9411. * the request and the ones not sent; the latter are distinguished by having blockedReason field set.
  9412. */
  9413. associatedCookies: BlockedCookieWithReason[];
  9414. /**
  9415. * Raw request headers as they will be sent over the wire.
  9416. */
  9417. headers: Headers;
  9418. }
  9419. /**
  9420. * Fired when additional information about a responseReceived event is available from the network
  9421. * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
  9422. * it, and responseReceivedExtraInfo may be fired before or after responseReceived.
  9423. */
  9424. export interface ResponseReceivedExtraInfoEvent {
  9425. /**
  9426. * Request identifier. Used to match this information to another responseReceived event.
  9427. */
  9428. requestId: RequestId;
  9429. /**
  9430. * A list of cookies which were not stored from the response along with the corresponding
  9431. * reasons for blocking. The cookies here may not be valid due to syntax errors, which
  9432. * are represented by the invalid cookie line string instead of a proper cookie.
  9433. */
  9434. blockedCookies: BlockedSetCookieWithReason[];
  9435. /**
  9436. * Raw response headers as they were received over the wire.
  9437. */
  9438. headers: Headers;
  9439. /**
  9440. * Raw response header text as it was received over the wire. The raw text may not always be
  9441. * available, such as in the case of HTTP/2 or QUIC.
  9442. */
  9443. headersText?: string;
  9444. }
  9445. }
  9446. /**
  9447. * This domain provides various functionality related to drawing atop the inspected page.
  9448. */
  9449. export namespace Overlay {
  9450. /**
  9451. * Configuration data for drawing the source order of an elements children.
  9452. */
  9453. export interface SourceOrderConfig {
  9454. /**
  9455. * the color to outline the givent element in.
  9456. */
  9457. parentOutlineColor: DOM.RGBA;
  9458. /**
  9459. * the color to outline the child elements in.
  9460. */
  9461. childOutlineColor: DOM.RGBA;
  9462. }
  9463. /**
  9464. * Configuration data for the highlighting of Grid elements.
  9465. */
  9466. export interface GridHighlightConfig {
  9467. /**
  9468. * Whether the extension lines from grid cells to the rulers should be shown (default: false).
  9469. */
  9470. showGridExtensionLines?: boolean;
  9471. /**
  9472. * Show Positive line number labels (default: false).
  9473. */
  9474. showPositiveLineNumbers?: boolean;
  9475. /**
  9476. * Show Negative line number labels (default: false).
  9477. */
  9478. showNegativeLineNumbers?: boolean;
  9479. /**
  9480. * Show area name labels (default: false).
  9481. */
  9482. showAreaNames?: boolean;
  9483. /**
  9484. * Show line name labels (default: false).
  9485. */
  9486. showLineNames?: boolean;
  9487. /**
  9488. * Show track size labels (default: false).
  9489. */
  9490. showTrackSizes?: boolean;
  9491. /**
  9492. * The grid container border highlight color (default: transparent).
  9493. */
  9494. gridBorderColor?: DOM.RGBA;
  9495. /**
  9496. * The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
  9497. */
  9498. cellBorderColor?: DOM.RGBA;
  9499. /**
  9500. * The row line color (default: transparent).
  9501. */
  9502. rowLineColor?: DOM.RGBA;
  9503. /**
  9504. * The column line color (default: transparent).
  9505. */
  9506. columnLineColor?: DOM.RGBA;
  9507. /**
  9508. * Whether the grid border is dashed (default: false).
  9509. */
  9510. gridBorderDash?: boolean;
  9511. /**
  9512. * Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
  9513. */
  9514. cellBorderDash?: boolean;
  9515. /**
  9516. * Whether row lines are dashed (default: false).
  9517. */
  9518. rowLineDash?: boolean;
  9519. /**
  9520. * Whether column lines are dashed (default: false).
  9521. */
  9522. columnLineDash?: boolean;
  9523. /**
  9524. * The row gap highlight fill color (default: transparent).
  9525. */
  9526. rowGapColor?: DOM.RGBA;
  9527. /**
  9528. * The row gap hatching fill color (default: transparent).
  9529. */
  9530. rowHatchColor?: DOM.RGBA;
  9531. /**
  9532. * The column gap highlight fill color (default: transparent).
  9533. */
  9534. columnGapColor?: DOM.RGBA;
  9535. /**
  9536. * The column gap hatching fill color (default: transparent).
  9537. */
  9538. columnHatchColor?: DOM.RGBA;
  9539. /**
  9540. * The named grid areas border color (Default: transparent).
  9541. */
  9542. areaBorderColor?: DOM.RGBA;
  9543. /**
  9544. * The grid container background color (Default: transparent).
  9545. */
  9546. gridBackgroundColor?: DOM.RGBA;
  9547. }
  9548. /**
  9549. * Configuration data for the highlighting of page elements.
  9550. */
  9551. export interface HighlightConfig {
  9552. /**
  9553. * Whether the node info tooltip should be shown (default: false).
  9554. */
  9555. showInfo?: boolean;
  9556. /**
  9557. * Whether the node styles in the tooltip (default: false).
  9558. */
  9559. showStyles?: boolean;
  9560. /**
  9561. * Whether the rulers should be shown (default: false).
  9562. */
  9563. showRulers?: boolean;
  9564. /**
  9565. * Whether the a11y info should be shown (default: true).
  9566. */
  9567. showAccessibilityInfo?: boolean;
  9568. /**
  9569. * Whether the extension lines from node to the rulers should be shown (default: false).
  9570. */
  9571. showExtensionLines?: boolean;
  9572. /**
  9573. * The content box highlight fill color (default: transparent).
  9574. */
  9575. contentColor?: DOM.RGBA;
  9576. /**
  9577. * The padding highlight fill color (default: transparent).
  9578. */
  9579. paddingColor?: DOM.RGBA;
  9580. /**
  9581. * The border highlight fill color (default: transparent).
  9582. */
  9583. borderColor?: DOM.RGBA;
  9584. /**
  9585. * The margin highlight fill color (default: transparent).
  9586. */
  9587. marginColor?: DOM.RGBA;
  9588. /**
  9589. * The event target element highlight fill color (default: transparent).
  9590. */
  9591. eventTargetColor?: DOM.RGBA;
  9592. /**
  9593. * The shape outside fill color (default: transparent).
  9594. */
  9595. shapeColor?: DOM.RGBA;
  9596. /**
  9597. * The shape margin fill color (default: transparent).
  9598. */
  9599. shapeMarginColor?: DOM.RGBA;
  9600. /**
  9601. * The grid layout color (default: transparent).
  9602. */
  9603. cssGridColor?: DOM.RGBA;
  9604. /**
  9605. * The color format used to format color styles (default: hex).
  9606. */
  9607. colorFormat?: ColorFormat;
  9608. /**
  9609. * The grid layout highlight configuration (default: all transparent).
  9610. */
  9611. gridHighlightConfig?: GridHighlightConfig;
  9612. }
  9613. export type ColorFormat = ('rgb' | 'hsl' | 'hex');
  9614. /**
  9615. * Configurations for Persistent Grid Highlight
  9616. */
  9617. export interface GridNodeHighlightConfig {
  9618. /**
  9619. * A descriptor for the highlight appearance.
  9620. */
  9621. gridHighlightConfig: GridHighlightConfig;
  9622. /**
  9623. * Identifier of the node to highlight.
  9624. */
  9625. nodeId: DOM.NodeId;
  9626. }
  9627. /**
  9628. * Configuration for dual screen hinge
  9629. */
  9630. export interface HingeConfig {
  9631. /**
  9632. * A rectangle represent hinge
  9633. */
  9634. rect: DOM.Rect;
  9635. /**
  9636. * The content box highlight fill color (default: a dark color).
  9637. */
  9638. contentColor?: DOM.RGBA;
  9639. /**
  9640. * The content box highlight outline color (default: transparent).
  9641. */
  9642. outlineColor?: DOM.RGBA;
  9643. }
  9644. export type InspectMode = ('searchForNode' | 'searchForUAShadowDOM' | 'captureAreaScreenshot' | 'showDistances' | 'none');
  9645. export interface GetHighlightObjectForTestRequest {
  9646. /**
  9647. * Id of the node to get highlight object for.
  9648. */
  9649. nodeId: DOM.NodeId;
  9650. /**
  9651. * Whether to include distance info.
  9652. */
  9653. includeDistance?: boolean;
  9654. /**
  9655. * Whether to include style info.
  9656. */
  9657. includeStyle?: boolean;
  9658. /**
  9659. * The color format to get config with (default: hex).
  9660. */
  9661. colorFormat?: ColorFormat;
  9662. /**
  9663. * Whether to show accessibility info (default: true).
  9664. */
  9665. showAccessibilityInfo?: boolean;
  9666. }
  9667. export interface GetHighlightObjectForTestResponse {
  9668. /**
  9669. * Highlight data for the node.
  9670. */
  9671. highlight: any;
  9672. }
  9673. export interface GetGridHighlightObjectsForTestRequest {
  9674. /**
  9675. * Ids of the node to get highlight object for.
  9676. */
  9677. nodeIds: DOM.NodeId[];
  9678. }
  9679. export interface GetGridHighlightObjectsForTestResponse {
  9680. /**
  9681. * Grid Highlight data for the node ids provided.
  9682. */
  9683. highlights: any;
  9684. }
  9685. export interface GetSourceOrderHighlightObjectForTestRequest {
  9686. /**
  9687. * Id of the node to highlight.
  9688. */
  9689. nodeId: DOM.NodeId;
  9690. }
  9691. export interface GetSourceOrderHighlightObjectForTestResponse {
  9692. /**
  9693. * Source order highlight data for the node id provided.
  9694. */
  9695. highlight: any;
  9696. }
  9697. export interface HighlightFrameRequest {
  9698. /**
  9699. * Identifier of the frame to highlight.
  9700. */
  9701. frameId: Page.FrameId;
  9702. /**
  9703. * The content box highlight fill color (default: transparent).
  9704. */
  9705. contentColor?: DOM.RGBA;
  9706. /**
  9707. * The content box highlight outline color (default: transparent).
  9708. */
  9709. contentOutlineColor?: DOM.RGBA;
  9710. }
  9711. export interface HighlightNodeRequest {
  9712. /**
  9713. * A descriptor for the highlight appearance.
  9714. */
  9715. highlightConfig: HighlightConfig;
  9716. /**
  9717. * Identifier of the node to highlight.
  9718. */
  9719. nodeId?: DOM.NodeId;
  9720. /**
  9721. * Identifier of the backend node to highlight.
  9722. */
  9723. backendNodeId?: DOM.BackendNodeId;
  9724. /**
  9725. * JavaScript object id of the node to be highlighted.
  9726. */
  9727. objectId?: Runtime.RemoteObjectId;
  9728. /**
  9729. * Selectors to highlight relevant nodes.
  9730. */
  9731. selector?: string;
  9732. }
  9733. export interface HighlightQuadRequest {
  9734. /**
  9735. * Quad to highlight
  9736. */
  9737. quad: DOM.Quad;
  9738. /**
  9739. * The highlight fill color (default: transparent).
  9740. */
  9741. color?: DOM.RGBA;
  9742. /**
  9743. * The highlight outline color (default: transparent).
  9744. */
  9745. outlineColor?: DOM.RGBA;
  9746. }
  9747. export interface HighlightRectRequest {
  9748. /**
  9749. * X coordinate
  9750. */
  9751. x: integer;
  9752. /**
  9753. * Y coordinate
  9754. */
  9755. y: integer;
  9756. /**
  9757. * Rectangle width
  9758. */
  9759. width: integer;
  9760. /**
  9761. * Rectangle height
  9762. */
  9763. height: integer;
  9764. /**
  9765. * The highlight fill color (default: transparent).
  9766. */
  9767. color?: DOM.RGBA;
  9768. /**
  9769. * The highlight outline color (default: transparent).
  9770. */
  9771. outlineColor?: DOM.RGBA;
  9772. }
  9773. export interface HighlightSourceOrderRequest {
  9774. /**
  9775. * A descriptor for the appearance of the overlay drawing.
  9776. */
  9777. sourceOrderConfig: SourceOrderConfig;
  9778. /**
  9779. * Identifier of the node to highlight.
  9780. */
  9781. nodeId?: DOM.NodeId;
  9782. /**
  9783. * Identifier of the backend node to highlight.
  9784. */
  9785. backendNodeId?: DOM.BackendNodeId;
  9786. /**
  9787. * JavaScript object id of the node to be highlighted.
  9788. */
  9789. objectId?: Runtime.RemoteObjectId;
  9790. }
  9791. export interface SetInspectModeRequest {
  9792. /**
  9793. * Set an inspection mode.
  9794. */
  9795. mode: InspectMode;
  9796. /**
  9797. * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
  9798. * == false`.
  9799. */
  9800. highlightConfig?: HighlightConfig;
  9801. }
  9802. export interface SetShowAdHighlightsRequest {
  9803. /**
  9804. * True for showing ad highlights
  9805. */
  9806. show: boolean;
  9807. }
  9808. export interface SetPausedInDebuggerMessageRequest {
  9809. /**
  9810. * The message to display, also triggers resume and step over controls.
  9811. */
  9812. message?: string;
  9813. }
  9814. export interface SetShowDebugBordersRequest {
  9815. /**
  9816. * True for showing debug borders
  9817. */
  9818. show: boolean;
  9819. }
  9820. export interface SetShowFPSCounterRequest {
  9821. /**
  9822. * True for showing the FPS counter
  9823. */
  9824. show: boolean;
  9825. }
  9826. export interface SetShowGridOverlaysRequest {
  9827. /**
  9828. * An array of node identifiers and descriptors for the highlight appearance.
  9829. */
  9830. gridNodeHighlightConfigs: GridNodeHighlightConfig[];
  9831. }
  9832. export interface SetShowPaintRectsRequest {
  9833. /**
  9834. * True for showing paint rectangles
  9835. */
  9836. result: boolean;
  9837. }
  9838. export interface SetShowLayoutShiftRegionsRequest {
  9839. /**
  9840. * True for showing layout shift regions
  9841. */
  9842. result: boolean;
  9843. }
  9844. export interface SetShowScrollBottleneckRectsRequest {
  9845. /**
  9846. * True for showing scroll bottleneck rects
  9847. */
  9848. show: boolean;
  9849. }
  9850. export interface SetShowHitTestBordersRequest {
  9851. /**
  9852. * True for showing hit-test borders
  9853. */
  9854. show: boolean;
  9855. }
  9856. export interface SetShowViewportSizeOnResizeRequest {
  9857. /**
  9858. * Whether to paint size or not.
  9859. */
  9860. show: boolean;
  9861. }
  9862. export interface SetShowHingeRequest {
  9863. /**
  9864. * hinge data, null means hideHinge
  9865. */
  9866. hingeConfig?: HingeConfig;
  9867. }
  9868. /**
  9869. * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
  9870. * user manually inspects an element.
  9871. */
  9872. export interface InspectNodeRequestedEvent {
  9873. /**
  9874. * Id of the node to inspect.
  9875. */
  9876. backendNodeId: DOM.BackendNodeId;
  9877. }
  9878. /**
  9879. * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
  9880. */
  9881. export interface NodeHighlightRequestedEvent {
  9882. nodeId: DOM.NodeId;
  9883. }
  9884. /**
  9885. * Fired when user asks to capture screenshot of some area on the page.
  9886. */
  9887. export interface ScreenshotRequestedEvent {
  9888. /**
  9889. * Viewport to capture, in device independent pixels (dip).
  9890. */
  9891. viewport: Page.Viewport;
  9892. }
  9893. }
  9894. /**
  9895. * Actions and events related to the inspected page belong to the page domain.
  9896. */
  9897. export namespace Page {
  9898. /**
  9899. * Unique frame identifier.
  9900. */
  9901. export type FrameId = string;
  9902. /**
  9903. * Indicates whether a frame has been identified as an ad.
  9904. */
  9905. export type AdFrameType = ('none' | 'child' | 'root');
  9906. /**
  9907. * Indicates whether the frame is a secure context and why it is the case.
  9908. */
  9909. export type SecureContextType = ('Secure' | 'SecureLocalhost' | 'InsecureScheme' | 'InsecureAncestor');
  9910. /**
  9911. * Indicates whether the frame is cross-origin isolated and why it is the case.
  9912. */
  9913. export type CrossOriginIsolatedContextType = ('Isolated' | 'NotIsolated' | 'NotIsolatedFeatureDisabled');
  9914. /**
  9915. * Information about the Frame on the page.
  9916. */
  9917. export interface Frame {
  9918. /**
  9919. * Frame unique identifier.
  9920. */
  9921. id: FrameId;
  9922. /**
  9923. * Parent frame identifier.
  9924. */
  9925. parentId?: string;
  9926. /**
  9927. * Identifier of the loader associated with this frame.
  9928. */
  9929. loaderId: Network.LoaderId;
  9930. /**
  9931. * Frame's name as specified in the tag.
  9932. */
  9933. name?: string;
  9934. /**
  9935. * Frame document's URL without fragment.
  9936. */
  9937. url: string;
  9938. /**
  9939. * Frame document's URL fragment including the '#'.
  9940. */
  9941. urlFragment?: string;
  9942. /**
  9943. * Frame document's registered domain, taking the public suffixes list into account.
  9944. * Extracted from the Frame's url.
  9945. * Example URLs: http://www.google.com/file.html -> "google.com"
  9946. * http://a.b.co.uk/file.html -> "b.co.uk"
  9947. */
  9948. domainAndRegistry: string;
  9949. /**
  9950. * Frame document's security origin.
  9951. */
  9952. securityOrigin: string;
  9953. /**
  9954. * Frame document's mimeType as determined by the browser.
  9955. */
  9956. mimeType: string;
  9957. /**
  9958. * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
  9959. */
  9960. unreachableUrl?: string;
  9961. /**
  9962. * Indicates whether this frame was tagged as an ad.
  9963. */
  9964. adFrameType?: AdFrameType;
  9965. /**
  9966. * Indicates whether the main document is a secure context and explains why that is the case.
  9967. */
  9968. secureContextType: SecureContextType;
  9969. /**
  9970. * Indicates whether this is a cross origin isolated context.
  9971. */
  9972. crossOriginIsolatedContextType: CrossOriginIsolatedContextType;
  9973. }
  9974. /**
  9975. * Information about the Resource on the page.
  9976. */
  9977. export interface FrameResource {
  9978. /**
  9979. * Resource URL.
  9980. */
  9981. url: string;
  9982. /**
  9983. * Type of this resource.
  9984. */
  9985. type: Network.ResourceType;
  9986. /**
  9987. * Resource mimeType as determined by the browser.
  9988. */
  9989. mimeType: string;
  9990. /**
  9991. * last-modified timestamp as reported by server.
  9992. */
  9993. lastModified?: Network.TimeSinceEpoch;
  9994. /**
  9995. * Resource content size.
  9996. */
  9997. contentSize?: number;
  9998. /**
  9999. * True if the resource failed to load.
  10000. */
  10001. failed?: boolean;
  10002. /**
  10003. * True if the resource was canceled during loading.
  10004. */
  10005. canceled?: boolean;
  10006. }
  10007. /**
  10008. * Information about the Frame hierarchy along with their cached resources.
  10009. */
  10010. export interface FrameResourceTree {
  10011. /**
  10012. * Frame information for this tree item.
  10013. */
  10014. frame: Frame;
  10015. /**
  10016. * Child frames.
  10017. */
  10018. childFrames?: FrameResourceTree[];
  10019. /**
  10020. * Information about frame resources.
  10021. */
  10022. resources: FrameResource[];
  10023. }
  10024. /**
  10025. * Information about the Frame hierarchy.
  10026. */
  10027. export interface FrameTree {
  10028. /**
  10029. * Frame information for this tree item.
  10030. */
  10031. frame: Frame;
  10032. /**
  10033. * Child frames.
  10034. */
  10035. childFrames?: FrameTree[];
  10036. }
  10037. /**
  10038. * Unique script identifier.
  10039. */
  10040. export type ScriptIdentifier = string;
  10041. /**
  10042. * Transition type.
  10043. */
  10044. export type TransitionType = ('link' | 'typed' | 'address_bar' | 'auto_bookmark' | 'auto_subframe' | 'manual_subframe' | 'generated' | 'auto_toplevel' | 'form_submit' | 'reload' | 'keyword' | 'keyword_generated' | 'other');
  10045. /**
  10046. * Navigation history entry.
  10047. */
  10048. export interface NavigationEntry {
  10049. /**
  10050. * Unique id of the navigation history entry.
  10051. */
  10052. id: integer;
  10053. /**
  10054. * URL of the navigation history entry.
  10055. */
  10056. url: string;
  10057. /**
  10058. * URL that the user typed in the url bar.
  10059. */
  10060. userTypedURL: string;
  10061. /**
  10062. * Title of the navigation history entry.
  10063. */
  10064. title: string;
  10065. /**
  10066. * Transition type.
  10067. */
  10068. transitionType: TransitionType;
  10069. }
  10070. /**
  10071. * Screencast frame metadata.
  10072. */
  10073. export interface ScreencastFrameMetadata {
  10074. /**
  10075. * Top offset in DIP.
  10076. */
  10077. offsetTop: number;
  10078. /**
  10079. * Page scale factor.
  10080. */
  10081. pageScaleFactor: number;
  10082. /**
  10083. * Device screen width in DIP.
  10084. */
  10085. deviceWidth: number;
  10086. /**
  10087. * Device screen height in DIP.
  10088. */
  10089. deviceHeight: number;
  10090. /**
  10091. * Position of horizontal scroll in CSS pixels.
  10092. */
  10093. scrollOffsetX: number;
  10094. /**
  10095. * Position of vertical scroll in CSS pixels.
  10096. */
  10097. scrollOffsetY: number;
  10098. /**
  10099. * Frame swap timestamp.
  10100. */
  10101. timestamp?: Network.TimeSinceEpoch;
  10102. }
  10103. /**
  10104. * Javascript dialog type.
  10105. */
  10106. export type DialogType = ('alert' | 'confirm' | 'prompt' | 'beforeunload');
  10107. /**
  10108. * Error while paring app manifest.
  10109. */
  10110. export interface AppManifestError {
  10111. /**
  10112. * Error message.
  10113. */
  10114. message: string;
  10115. /**
  10116. * If criticial, this is a non-recoverable parse error.
  10117. */
  10118. critical: integer;
  10119. /**
  10120. * Error line.
  10121. */
  10122. line: integer;
  10123. /**
  10124. * Error column.
  10125. */
  10126. column: integer;
  10127. }
  10128. /**
  10129. * Parsed app manifest properties.
  10130. */
  10131. export interface AppManifestParsedProperties {
  10132. /**
  10133. * Computed scope value
  10134. */
  10135. scope: string;
  10136. }
  10137. /**
  10138. * Layout viewport position and dimensions.
  10139. */
  10140. export interface LayoutViewport {
  10141. /**
  10142. * Horizontal offset relative to the document (CSS pixels).
  10143. */
  10144. pageX: integer;
  10145. /**
  10146. * Vertical offset relative to the document (CSS pixels).
  10147. */
  10148. pageY: integer;
  10149. /**
  10150. * Width (CSS pixels), excludes scrollbar if present.
  10151. */
  10152. clientWidth: integer;
  10153. /**
  10154. * Height (CSS pixels), excludes scrollbar if present.
  10155. */
  10156. clientHeight: integer;
  10157. }
  10158. /**
  10159. * Visual viewport position, dimensions, and scale.
  10160. */
  10161. export interface VisualViewport {
  10162. /**
  10163. * Horizontal offset relative to the layout viewport (CSS pixels).
  10164. */
  10165. offsetX: number;
  10166. /**
  10167. * Vertical offset relative to the layout viewport (CSS pixels).
  10168. */
  10169. offsetY: number;
  10170. /**
  10171. * Horizontal offset relative to the document (CSS pixels).
  10172. */
  10173. pageX: number;
  10174. /**
  10175. * Vertical offset relative to the document (CSS pixels).
  10176. */
  10177. pageY: number;
  10178. /**
  10179. * Width (CSS pixels), excludes scrollbar if present.
  10180. */
  10181. clientWidth: number;
  10182. /**
  10183. * Height (CSS pixels), excludes scrollbar if present.
  10184. */
  10185. clientHeight: number;
  10186. /**
  10187. * Scale relative to the ideal viewport (size at width=device-width).
  10188. */
  10189. scale: number;
  10190. /**
  10191. * Page zoom factor (CSS to device independent pixels ratio).
  10192. */
  10193. zoom?: number;
  10194. }
  10195. /**
  10196. * Viewport for capturing screenshot.
  10197. */
  10198. export interface Viewport {
  10199. /**
  10200. * X offset in device independent pixels (dip).
  10201. */
  10202. x: number;
  10203. /**
  10204. * Y offset in device independent pixels (dip).
  10205. */
  10206. y: number;
  10207. /**
  10208. * Rectangle width in device independent pixels (dip).
  10209. */
  10210. width: number;
  10211. /**
  10212. * Rectangle height in device independent pixels (dip).
  10213. */
  10214. height: number;
  10215. /**
  10216. * Page scale factor.
  10217. */
  10218. scale: number;
  10219. }
  10220. /**
  10221. * Generic font families collection.
  10222. */
  10223. export interface FontFamilies {
  10224. /**
  10225. * The standard font-family.
  10226. */
  10227. standard?: string;
  10228. /**
  10229. * The fixed font-family.
  10230. */
  10231. fixed?: string;
  10232. /**
  10233. * The serif font-family.
  10234. */
  10235. serif?: string;
  10236. /**
  10237. * The sansSerif font-family.
  10238. */
  10239. sansSerif?: string;
  10240. /**
  10241. * The cursive font-family.
  10242. */
  10243. cursive?: string;
  10244. /**
  10245. * The fantasy font-family.
  10246. */
  10247. fantasy?: string;
  10248. /**
  10249. * The pictograph font-family.
  10250. */
  10251. pictograph?: string;
  10252. }
  10253. /**
  10254. * Default font sizes.
  10255. */
  10256. export interface FontSizes {
  10257. /**
  10258. * Default standard font size.
  10259. */
  10260. standard?: integer;
  10261. /**
  10262. * Default fixed font size.
  10263. */
  10264. fixed?: integer;
  10265. }
  10266. export type ClientNavigationReason = ('formSubmissionGet' | 'formSubmissionPost' | 'httpHeaderRefresh' | 'scriptInitiated' | 'metaTagRefresh' | 'pageBlockInterstitial' | 'reload' | 'anchorClick');
  10267. export type ClientNavigationDisposition = ('currentTab' | 'newTab' | 'newWindow' | 'download');
  10268. export interface InstallabilityErrorArgument {
  10269. /**
  10270. * Argument name (e.g. name:'minimum-icon-size-in-pixels').
  10271. */
  10272. name: string;
  10273. /**
  10274. * Argument value (e.g. value:'64').
  10275. */
  10276. value: string;
  10277. }
  10278. /**
  10279. * The installability error
  10280. */
  10281. export interface InstallabilityError {
  10282. /**
  10283. * The error id (e.g. 'manifest-missing-suitable-icon').
  10284. */
  10285. errorId: string;
  10286. /**
  10287. * The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
  10288. */
  10289. errorArguments: InstallabilityErrorArgument[];
  10290. }
  10291. /**
  10292. * The referring-policy used for the navigation.
  10293. */
  10294. export type ReferrerPolicy = ('noReferrer' | 'noReferrerWhenDowngrade' | 'origin' | 'originWhenCrossOrigin' | 'sameOrigin' | 'strictOrigin' | 'strictOriginWhenCrossOrigin' | 'unsafeUrl');
  10295. export interface AddScriptToEvaluateOnLoadRequest {
  10296. scriptSource: string;
  10297. }
  10298. export interface AddScriptToEvaluateOnLoadResponse {
  10299. /**
  10300. * Identifier of the added script.
  10301. */
  10302. identifier: ScriptIdentifier;
  10303. }
  10304. export interface AddScriptToEvaluateOnNewDocumentRequest {
  10305. source: string;
  10306. /**
  10307. * If specified, creates an isolated world with the given name and evaluates given script in it.
  10308. * This world name will be used as the ExecutionContextDescription::name when the corresponding
  10309. * event is emitted.
  10310. */
  10311. worldName?: string;
  10312. }
  10313. export interface AddScriptToEvaluateOnNewDocumentResponse {
  10314. /**
  10315. * Identifier of the added script.
  10316. */
  10317. identifier: ScriptIdentifier;
  10318. }
  10319. export const enum CaptureScreenshotRequestFormat {
  10320. Jpeg = 'jpeg',
  10321. Png = 'png',
  10322. }
  10323. export interface CaptureScreenshotRequest {
  10324. /**
  10325. * Image compression format (defaults to png). (CaptureScreenshotRequestFormat enum)
  10326. */
  10327. format?: ('jpeg' | 'png');
  10328. /**
  10329. * Compression quality from range [0..100] (jpeg only).
  10330. */
  10331. quality?: integer;
  10332. /**
  10333. * Capture the screenshot of a given region only.
  10334. */
  10335. clip?: Viewport;
  10336. /**
  10337. * Capture the screenshot from the surface, rather than the view. Defaults to true.
  10338. */
  10339. fromSurface?: boolean;
  10340. }
  10341. export interface CaptureScreenshotResponse {
  10342. /**
  10343. * Base64-encoded image data.
  10344. */
  10345. data: string;
  10346. }
  10347. export const enum CaptureSnapshotRequestFormat {
  10348. MHTML = 'mhtml',
  10349. }
  10350. export interface CaptureSnapshotRequest {
  10351. /**
  10352. * Format (defaults to mhtml). (CaptureSnapshotRequestFormat enum)
  10353. */
  10354. format?: ('mhtml');
  10355. }
  10356. export interface CaptureSnapshotResponse {
  10357. /**
  10358. * Serialized page data.
  10359. */
  10360. data: string;
  10361. }
  10362. export interface CreateIsolatedWorldRequest {
  10363. /**
  10364. * Id of the frame in which the isolated world should be created.
  10365. */
  10366. frameId: FrameId;
  10367. /**
  10368. * An optional name which is reported in the Execution Context.
  10369. */
  10370. worldName?: string;
  10371. /**
  10372. * Whether or not universal access should be granted to the isolated world. This is a powerful
  10373. * option, use with caution.
  10374. */
  10375. grantUniveralAccess?: boolean;
  10376. }
  10377. export interface CreateIsolatedWorldResponse {
  10378. /**
  10379. * Execution context of the isolated world.
  10380. */
  10381. executionContextId: Runtime.ExecutionContextId;
  10382. }
  10383. export interface DeleteCookieRequest {
  10384. /**
  10385. * Name of the cookie to remove.
  10386. */
  10387. cookieName: string;
  10388. /**
  10389. * URL to match cooke domain and path.
  10390. */
  10391. url: string;
  10392. }
  10393. export interface GetAppManifestResponse {
  10394. /**
  10395. * Manifest location.
  10396. */
  10397. url: string;
  10398. errors: AppManifestError[];
  10399. /**
  10400. * Manifest content.
  10401. */
  10402. data?: string;
  10403. /**
  10404. * Parsed manifest properties
  10405. */
  10406. parsed?: AppManifestParsedProperties;
  10407. }
  10408. export interface GetInstallabilityErrorsResponse {
  10409. installabilityErrors: InstallabilityError[];
  10410. }
  10411. export interface GetManifestIconsResponse {
  10412. primaryIcon?: string;
  10413. }
  10414. export interface GetCookiesResponse {
  10415. /**
  10416. * Array of cookie objects.
  10417. */
  10418. cookies: Network.Cookie[];
  10419. }
  10420. export interface GetFrameTreeResponse {
  10421. /**
  10422. * Present frame tree structure.
  10423. */
  10424. frameTree: FrameTree;
  10425. }
  10426. export interface GetLayoutMetricsResponse {
  10427. /**
  10428. * Metrics relating to the layout viewport.
  10429. */
  10430. layoutViewport: LayoutViewport;
  10431. /**
  10432. * Metrics relating to the visual viewport.
  10433. */
  10434. visualViewport: VisualViewport;
  10435. /**
  10436. * Size of scrollable area.
  10437. */
  10438. contentSize: DOM.Rect;
  10439. }
  10440. export interface GetNavigationHistoryResponse {
  10441. /**
  10442. * Index of the current navigation history entry.
  10443. */
  10444. currentIndex: integer;
  10445. /**
  10446. * Array of navigation history entries.
  10447. */
  10448. entries: NavigationEntry[];
  10449. }
  10450. export interface GetResourceContentRequest {
  10451. /**
  10452. * Frame id to get resource for.
  10453. */
  10454. frameId: FrameId;
  10455. /**
  10456. * URL of the resource to get content for.
  10457. */
  10458. url: string;
  10459. }
  10460. export interface GetResourceContentResponse {
  10461. /**
  10462. * Resource content.
  10463. */
  10464. content: string;
  10465. /**
  10466. * True, if content was served as base64.
  10467. */
  10468. base64Encoded: boolean;
  10469. }
  10470. export interface GetResourceTreeResponse {
  10471. /**
  10472. * Present frame / resource tree structure.
  10473. */
  10474. frameTree: FrameResourceTree;
  10475. }
  10476. export interface HandleJavaScriptDialogRequest {
  10477. /**
  10478. * Whether to accept or dismiss the dialog.
  10479. */
  10480. accept: boolean;
  10481. /**
  10482. * The text to enter into the dialog prompt before accepting. Used only if this is a prompt
  10483. * dialog.
  10484. */
  10485. promptText?: string;
  10486. }
  10487. export interface NavigateRequest {
  10488. /**
  10489. * URL to navigate the page to.
  10490. */
  10491. url: string;
  10492. /**
  10493. * Referrer URL.
  10494. */
  10495. referrer?: string;
  10496. /**
  10497. * Intended transition type.
  10498. */
  10499. transitionType?: TransitionType;
  10500. /**
  10501. * Frame id to navigate, if not specified navigates the top frame.
  10502. */
  10503. frameId?: FrameId;
  10504. /**
  10505. * Referrer-policy used for the navigation.
  10506. */
  10507. referrerPolicy?: ReferrerPolicy;
  10508. }
  10509. export interface NavigateResponse {
  10510. /**
  10511. * Frame id that has navigated (or failed to navigate)
  10512. */
  10513. frameId: FrameId;
  10514. /**
  10515. * Loader identifier.
  10516. */
  10517. loaderId?: Network.LoaderId;
  10518. /**
  10519. * User friendly error message, present if and only if navigation has failed.
  10520. */
  10521. errorText?: string;
  10522. }
  10523. export interface NavigateToHistoryEntryRequest {
  10524. /**
  10525. * Unique id of the entry to navigate to.
  10526. */
  10527. entryId: integer;
  10528. }
  10529. export const enum PrintToPDFRequestTransferMode {
  10530. ReturnAsBase64 = 'ReturnAsBase64',
  10531. ReturnAsStream = 'ReturnAsStream',
  10532. }
  10533. export interface PrintToPDFRequest {
  10534. /**
  10535. * Paper orientation. Defaults to false.
  10536. */
  10537. landscape?: boolean;
  10538. /**
  10539. * Display header and footer. Defaults to false.
  10540. */
  10541. displayHeaderFooter?: boolean;
  10542. /**
  10543. * Print background graphics. Defaults to false.
  10544. */
  10545. printBackground?: boolean;
  10546. /**
  10547. * Scale of the webpage rendering. Defaults to 1.
  10548. */
  10549. scale?: number;
  10550. /**
  10551. * Paper width in inches. Defaults to 8.5 inches.
  10552. */
  10553. paperWidth?: number;
  10554. /**
  10555. * Paper height in inches. Defaults to 11 inches.
  10556. */
  10557. paperHeight?: number;
  10558. /**
  10559. * Top margin in inches. Defaults to 1cm (~0.4 inches).
  10560. */
  10561. marginTop?: number;
  10562. /**
  10563. * Bottom margin in inches. Defaults to 1cm (~0.4 inches).
  10564. */
  10565. marginBottom?: number;
  10566. /**
  10567. * Left margin in inches. Defaults to 1cm (~0.4 inches).
  10568. */
  10569. marginLeft?: number;
  10570. /**
  10571. * Right margin in inches. Defaults to 1cm (~0.4 inches).
  10572. */
  10573. marginRight?: number;
  10574. /**
  10575. * Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means
  10576. * print all pages.
  10577. */
  10578. pageRanges?: string;
  10579. /**
  10580. * Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'.
  10581. * Defaults to false.
  10582. */
  10583. ignoreInvalidPageRanges?: boolean;
  10584. /**
  10585. * HTML template for the print header. Should be valid HTML markup with following
  10586. * classes used to inject printing values into them:
  10587. * - `date`: formatted print date
  10588. * - `title`: document title
  10589. * - `url`: document location
  10590. * - `pageNumber`: current page number
  10591. * - `totalPages`: total pages in the document
  10592. *
  10593. * For example, `<span class=title></span>` would generate span containing the title.
  10594. */
  10595. headerTemplate?: string;
  10596. /**
  10597. * HTML template for the print footer. Should use the same format as the `headerTemplate`.
  10598. */
  10599. footerTemplate?: string;
  10600. /**
  10601. * Whether or not to prefer page size as defined by css. Defaults to false,
  10602. * in which case the content will be scaled to fit the paper size.
  10603. */
  10604. preferCSSPageSize?: boolean;
  10605. /**
  10606. * return as stream (PrintToPDFRequestTransferMode enum)
  10607. */
  10608. transferMode?: ('ReturnAsBase64' | 'ReturnAsStream');
  10609. }
  10610. export interface PrintToPDFResponse {
  10611. /**
  10612. * Base64-encoded pdf data. Empty if |returnAsStream| is specified.
  10613. */
  10614. data: string;
  10615. /**
  10616. * A handle of the stream that holds resulting PDF data.
  10617. */
  10618. stream?: IO.StreamHandle;
  10619. }
  10620. export interface ReloadRequest {
  10621. /**
  10622. * If true, browser cache is ignored (as if the user pressed Shift+refresh).
  10623. */
  10624. ignoreCache?: boolean;
  10625. /**
  10626. * If set, the script will be injected into all frames of the inspected page after reload.
  10627. * Argument will be ignored if reloading dataURL origin.
  10628. */
  10629. scriptToEvaluateOnLoad?: string;
  10630. }
  10631. export interface RemoveScriptToEvaluateOnLoadRequest {
  10632. identifier: ScriptIdentifier;
  10633. }
  10634. export interface RemoveScriptToEvaluateOnNewDocumentRequest {
  10635. identifier: ScriptIdentifier;
  10636. }
  10637. export interface ScreencastFrameAckRequest {
  10638. /**
  10639. * Frame number.
  10640. */
  10641. sessionId: integer;
  10642. }
  10643. export interface SearchInResourceRequest {
  10644. /**
  10645. * Frame id for resource to search in.
  10646. */
  10647. frameId: FrameId;
  10648. /**
  10649. * URL of the resource to search in.
  10650. */
  10651. url: string;
  10652. /**
  10653. * String to search for.
  10654. */
  10655. query: string;
  10656. /**
  10657. * If true, search is case sensitive.
  10658. */
  10659. caseSensitive?: boolean;
  10660. /**
  10661. * If true, treats string parameter as regex.
  10662. */
  10663. isRegex?: boolean;
  10664. }
  10665. export interface SearchInResourceResponse {
  10666. /**
  10667. * List of search matches.
  10668. */
  10669. result: Debugger.SearchMatch[];
  10670. }
  10671. export interface SetAdBlockingEnabledRequest {
  10672. /**
  10673. * Whether to block ads.
  10674. */
  10675. enabled: boolean;
  10676. }
  10677. export interface SetBypassCSPRequest {
  10678. /**
  10679. * Whether to bypass page CSP.
  10680. */
  10681. enabled: boolean;
  10682. }
  10683. export interface SetDeviceMetricsOverrideRequest {
  10684. /**
  10685. * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
  10686. */
  10687. width: integer;
  10688. /**
  10689. * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
  10690. */
  10691. height: integer;
  10692. /**
  10693. * Overriding device scale factor value. 0 disables the override.
  10694. */
  10695. deviceScaleFactor: number;
  10696. /**
  10697. * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
  10698. * autosizing and more.
  10699. */
  10700. mobile: boolean;
  10701. /**
  10702. * Scale to apply to resulting view image.
  10703. */
  10704. scale?: number;
  10705. /**
  10706. * Overriding screen width value in pixels (minimum 0, maximum 10000000).
  10707. */
  10708. screenWidth?: integer;
  10709. /**
  10710. * Overriding screen height value in pixels (minimum 0, maximum 10000000).
  10711. */
  10712. screenHeight?: integer;
  10713. /**
  10714. * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
  10715. */
  10716. positionX?: integer;
  10717. /**
  10718. * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
  10719. */
  10720. positionY?: integer;
  10721. /**
  10722. * Do not set visible view size, rely upon explicit setVisibleSize call.
  10723. */
  10724. dontSetVisibleSize?: boolean;
  10725. /**
  10726. * Screen orientation override.
  10727. */
  10728. screenOrientation?: Emulation.ScreenOrientation;
  10729. /**
  10730. * The viewport dimensions and scale. If not set, the override is cleared.
  10731. */
  10732. viewport?: Viewport;
  10733. }
  10734. export interface SetDeviceOrientationOverrideRequest {
  10735. /**
  10736. * Mock alpha
  10737. */
  10738. alpha: number;
  10739. /**
  10740. * Mock beta
  10741. */
  10742. beta: number;
  10743. /**
  10744. * Mock gamma
  10745. */
  10746. gamma: number;
  10747. }
  10748. export interface SetFontFamiliesRequest {
  10749. /**
  10750. * Specifies font families to set. If a font family is not specified, it won't be changed.
  10751. */
  10752. fontFamilies: FontFamilies;
  10753. }
  10754. export interface SetFontSizesRequest {
  10755. /**
  10756. * Specifies font sizes to set. If a font size is not specified, it won't be changed.
  10757. */
  10758. fontSizes: FontSizes;
  10759. }
  10760. export interface SetDocumentContentRequest {
  10761. /**
  10762. * Frame id to set HTML for.
  10763. */
  10764. frameId: FrameId;
  10765. /**
  10766. * HTML content to set.
  10767. */
  10768. html: string;
  10769. }
  10770. export const enum SetDownloadBehaviorRequestBehavior {
  10771. Deny = 'deny',
  10772. Allow = 'allow',
  10773. Default = 'default',
  10774. }
  10775. export interface SetDownloadBehaviorRequest {
  10776. /**
  10777. * Whether to allow all or deny all download requests, or use default Chrome behavior if
  10778. * available (otherwise deny). (SetDownloadBehaviorRequestBehavior enum)
  10779. */
  10780. behavior: ('deny' | 'allow' | 'default');
  10781. /**
  10782. * The default path to save downloaded files to. This is requred if behavior is set to 'allow'
  10783. */
  10784. downloadPath?: string;
  10785. }
  10786. export interface SetGeolocationOverrideRequest {
  10787. /**
  10788. * Mock latitude
  10789. */
  10790. latitude?: number;
  10791. /**
  10792. * Mock longitude
  10793. */
  10794. longitude?: number;
  10795. /**
  10796. * Mock accuracy
  10797. */
  10798. accuracy?: number;
  10799. }
  10800. export interface SetLifecycleEventsEnabledRequest {
  10801. /**
  10802. * If true, starts emitting lifecycle events.
  10803. */
  10804. enabled: boolean;
  10805. }
  10806. export const enum SetTouchEmulationEnabledRequestConfiguration {
  10807. Mobile = 'mobile',
  10808. Desktop = 'desktop',
  10809. }
  10810. export interface SetTouchEmulationEnabledRequest {
  10811. /**
  10812. * Whether the touch event emulation should be enabled.
  10813. */
  10814. enabled: boolean;
  10815. /**
  10816. * Touch/gesture events configuration. Default: current platform. (SetTouchEmulationEnabledRequestConfiguration enum)
  10817. */
  10818. configuration?: ('mobile' | 'desktop');
  10819. }
  10820. export const enum StartScreencastRequestFormat {
  10821. Jpeg = 'jpeg',
  10822. Png = 'png',
  10823. }
  10824. export interface StartScreencastRequest {
  10825. /**
  10826. * Image compression format. (StartScreencastRequestFormat enum)
  10827. */
  10828. format?: ('jpeg' | 'png');
  10829. /**
  10830. * Compression quality from range [0..100].
  10831. */
  10832. quality?: integer;
  10833. /**
  10834. * Maximum screenshot width.
  10835. */
  10836. maxWidth?: integer;
  10837. /**
  10838. * Maximum screenshot height.
  10839. */
  10840. maxHeight?: integer;
  10841. /**
  10842. * Send every n-th frame.
  10843. */
  10844. everyNthFrame?: integer;
  10845. }
  10846. export const enum SetWebLifecycleStateRequestState {
  10847. Frozen = 'frozen',
  10848. Active = 'active',
  10849. }
  10850. export interface SetWebLifecycleStateRequest {
  10851. /**
  10852. * Target lifecycle state (SetWebLifecycleStateRequestState enum)
  10853. */
  10854. state: ('frozen' | 'active');
  10855. }
  10856. export interface SetProduceCompilationCacheRequest {
  10857. enabled: boolean;
  10858. }
  10859. export interface AddCompilationCacheRequest {
  10860. url: string;
  10861. /**
  10862. * Base64-encoded data
  10863. */
  10864. data: string;
  10865. }
  10866. export interface GenerateTestReportRequest {
  10867. /**
  10868. * Message to be displayed in the report.
  10869. */
  10870. message: string;
  10871. /**
  10872. * Specifies the endpoint group to deliver the report to.
  10873. */
  10874. group?: string;
  10875. }
  10876. export interface SetInterceptFileChooserDialogRequest {
  10877. enabled: boolean;
  10878. }
  10879. export interface DomContentEventFiredEvent {
  10880. timestamp: Network.MonotonicTime;
  10881. }
  10882. export const enum FileChooserOpenedEventMode {
  10883. SelectSingle = 'selectSingle',
  10884. SelectMultiple = 'selectMultiple',
  10885. }
  10886. /**
  10887. * Emitted only when `page.interceptFileChooser` is enabled.
  10888. */
  10889. export interface FileChooserOpenedEvent {
  10890. /**
  10891. * Id of the frame containing input node.
  10892. */
  10893. frameId: FrameId;
  10894. /**
  10895. * Input node id.
  10896. */
  10897. backendNodeId: DOM.BackendNodeId;
  10898. /**
  10899. * Input mode. (FileChooserOpenedEventMode enum)
  10900. */
  10901. mode: ('selectSingle' | 'selectMultiple');
  10902. }
  10903. /**
  10904. * Fired when frame has been attached to its parent.
  10905. */
  10906. export interface FrameAttachedEvent {
  10907. /**
  10908. * Id of the frame that has been attached.
  10909. */
  10910. frameId: FrameId;
  10911. /**
  10912. * Parent frame identifier.
  10913. */
  10914. parentFrameId: FrameId;
  10915. /**
  10916. * JavaScript stack trace of when frame was attached, only set if frame initiated from script.
  10917. */
  10918. stack?: Runtime.StackTrace;
  10919. }
  10920. /**
  10921. * Fired when frame no longer has a scheduled navigation.
  10922. */
  10923. export interface FrameClearedScheduledNavigationEvent {
  10924. /**
  10925. * Id of the frame that has cleared its scheduled navigation.
  10926. */
  10927. frameId: FrameId;
  10928. }
  10929. /**
  10930. * Fired when frame has been detached from its parent.
  10931. */
  10932. export interface FrameDetachedEvent {
  10933. /**
  10934. * Id of the frame that has been detached.
  10935. */
  10936. frameId: FrameId;
  10937. }
  10938. /**
  10939. * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
  10940. */
  10941. export interface FrameNavigatedEvent {
  10942. /**
  10943. * Frame object.
  10944. */
  10945. frame: Frame;
  10946. }
  10947. /**
  10948. * Fired when a renderer-initiated navigation is requested.
  10949. * Navigation may still be cancelled after the event is issued.
  10950. */
  10951. export interface FrameRequestedNavigationEvent {
  10952. /**
  10953. * Id of the frame that is being navigated.
  10954. */
  10955. frameId: FrameId;
  10956. /**
  10957. * The reason for the navigation.
  10958. */
  10959. reason: ClientNavigationReason;
  10960. /**
  10961. * The destination URL for the requested navigation.
  10962. */
  10963. url: string;
  10964. /**
  10965. * The disposition for the navigation.
  10966. */
  10967. disposition: ClientNavigationDisposition;
  10968. }
  10969. /**
  10970. * Fired when frame schedules a potential navigation.
  10971. */
  10972. export interface FrameScheduledNavigationEvent {
  10973. /**
  10974. * Id of the frame that has scheduled a navigation.
  10975. */
  10976. frameId: FrameId;
  10977. /**
  10978. * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not
  10979. * guaranteed to start.
  10980. */
  10981. delay: number;
  10982. /**
  10983. * The reason for the navigation.
  10984. */
  10985. reason: ClientNavigationReason;
  10986. /**
  10987. * The destination URL for the scheduled navigation.
  10988. */
  10989. url: string;
  10990. }
  10991. /**
  10992. * Fired when frame has started loading.
  10993. */
  10994. export interface FrameStartedLoadingEvent {
  10995. /**
  10996. * Id of the frame that has started loading.
  10997. */
  10998. frameId: FrameId;
  10999. }
  11000. /**
  11001. * Fired when frame has stopped loading.
  11002. */
  11003. export interface FrameStoppedLoadingEvent {
  11004. /**
  11005. * Id of the frame that has stopped loading.
  11006. */
  11007. frameId: FrameId;
  11008. }
  11009. /**
  11010. * Fired when page is about to start a download.
  11011. */
  11012. export interface DownloadWillBeginEvent {
  11013. /**
  11014. * Id of the frame that caused download to begin.
  11015. */
  11016. frameId: FrameId;
  11017. /**
  11018. * Global unique identifier of the download.
  11019. */
  11020. guid: string;
  11021. /**
  11022. * URL of the resource being downloaded.
  11023. */
  11024. url: string;
  11025. /**
  11026. * Suggested file name of the resource (the actual name of the file saved on disk may differ).
  11027. */
  11028. suggestedFilename: string;
  11029. }
  11030. export const enum DownloadProgressEventState {
  11031. InProgress = 'inProgress',
  11032. Completed = 'completed',
  11033. Canceled = 'canceled',
  11034. }
  11035. /**
  11036. * Fired when download makes progress. Last call has |done| == true.
  11037. */
  11038. export interface DownloadProgressEvent {
  11039. /**
  11040. * Global unique identifier of the download.
  11041. */
  11042. guid: string;
  11043. /**
  11044. * Total expected bytes to download.
  11045. */
  11046. totalBytes: number;
  11047. /**
  11048. * Total bytes received.
  11049. */
  11050. receivedBytes: number;
  11051. /**
  11052. * Download status. (DownloadProgressEventState enum)
  11053. */
  11054. state: ('inProgress' | 'completed' | 'canceled');
  11055. }
  11056. /**
  11057. * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
  11058. * closed.
  11059. */
  11060. export interface JavascriptDialogClosedEvent {
  11061. /**
  11062. * Whether dialog was confirmed.
  11063. */
  11064. result: boolean;
  11065. /**
  11066. * User input in case of prompt.
  11067. */
  11068. userInput: string;
  11069. }
  11070. /**
  11071. * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
  11072. * open.
  11073. */
  11074. export interface JavascriptDialogOpeningEvent {
  11075. /**
  11076. * Frame url.
  11077. */
  11078. url: string;
  11079. /**
  11080. * Message that will be displayed by the dialog.
  11081. */
  11082. message: string;
  11083. /**
  11084. * Dialog type.
  11085. */
  11086. type: DialogType;
  11087. /**
  11088. * True iff browser is capable showing or acting on the given dialog. When browser has no
  11089. * dialog handler for given target, calling alert while Page domain is engaged will stall
  11090. * the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
  11091. */
  11092. hasBrowserHandler: boolean;
  11093. /**
  11094. * Default dialog prompt.
  11095. */
  11096. defaultPrompt?: string;
  11097. }
  11098. /**
  11099. * Fired for top level page lifecycle events such as navigation, load, paint, etc.
  11100. */
  11101. export interface LifecycleEventEvent {
  11102. /**
  11103. * Id of the frame.
  11104. */
  11105. frameId: FrameId;
  11106. /**
  11107. * Loader identifier. Empty string if the request is fetched from worker.
  11108. */
  11109. loaderId: Network.LoaderId;
  11110. name: string;
  11111. timestamp: Network.MonotonicTime;
  11112. }
  11113. export interface LoadEventFiredEvent {
  11114. timestamp: Network.MonotonicTime;
  11115. }
  11116. /**
  11117. * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
  11118. */
  11119. export interface NavigatedWithinDocumentEvent {
  11120. /**
  11121. * Id of the frame.
  11122. */
  11123. frameId: FrameId;
  11124. /**
  11125. * Frame's new url.
  11126. */
  11127. url: string;
  11128. }
  11129. /**
  11130. * Compressed image data requested by the `startScreencast`.
  11131. */
  11132. export interface ScreencastFrameEvent {
  11133. /**
  11134. * Base64-encoded compressed image.
  11135. */
  11136. data: string;
  11137. /**
  11138. * Screencast frame metadata.
  11139. */
  11140. metadata: ScreencastFrameMetadata;
  11141. /**
  11142. * Frame number.
  11143. */
  11144. sessionId: integer;
  11145. }
  11146. /**
  11147. * Fired when the page with currently enabled screencast was shown or hidden `.
  11148. */
  11149. export interface ScreencastVisibilityChangedEvent {
  11150. /**
  11151. * True if the page is visible.
  11152. */
  11153. visible: boolean;
  11154. }
  11155. /**
  11156. * Fired when a new window is going to be opened, via window.open(), link click, form submission,
  11157. * etc.
  11158. */
  11159. export interface WindowOpenEvent {
  11160. /**
  11161. * The URL for the new window.
  11162. */
  11163. url: string;
  11164. /**
  11165. * Window name.
  11166. */
  11167. windowName: string;
  11168. /**
  11169. * An array of enabled window features.
  11170. */
  11171. windowFeatures: string[];
  11172. /**
  11173. * Whether or not it was triggered by user gesture.
  11174. */
  11175. userGesture: boolean;
  11176. }
  11177. /**
  11178. * Issued for every compilation cache generated. Is only available
  11179. * if Page.setGenerateCompilationCache is enabled.
  11180. */
  11181. export interface CompilationCacheProducedEvent {
  11182. url: string;
  11183. /**
  11184. * Base64-encoded data
  11185. */
  11186. data: string;
  11187. }
  11188. }
  11189. export namespace Performance {
  11190. /**
  11191. * Run-time execution metric.
  11192. */
  11193. export interface Metric {
  11194. /**
  11195. * Metric name.
  11196. */
  11197. name: string;
  11198. /**
  11199. * Metric value.
  11200. */
  11201. value: number;
  11202. }
  11203. export const enum EnableRequestTimeDomain {
  11204. TimeTicks = 'timeTicks',
  11205. ThreadTicks = 'threadTicks',
  11206. }
  11207. export interface EnableRequest {
  11208. /**
  11209. * Time domain to use for collecting and reporting duration metrics. (EnableRequestTimeDomain enum)
  11210. */
  11211. timeDomain?: ('timeTicks' | 'threadTicks');
  11212. }
  11213. export const enum SetTimeDomainRequestTimeDomain {
  11214. TimeTicks = 'timeTicks',
  11215. ThreadTicks = 'threadTicks',
  11216. }
  11217. export interface SetTimeDomainRequest {
  11218. /**
  11219. * Time domain (SetTimeDomainRequestTimeDomain enum)
  11220. */
  11221. timeDomain: ('timeTicks' | 'threadTicks');
  11222. }
  11223. export interface GetMetricsResponse {
  11224. /**
  11225. * Current values for run-time metrics.
  11226. */
  11227. metrics: Metric[];
  11228. }
  11229. /**
  11230. * Current values of the metrics.
  11231. */
  11232. export interface MetricsEvent {
  11233. /**
  11234. * Current values of the metrics.
  11235. */
  11236. metrics: Metric[];
  11237. /**
  11238. * Timestamp title.
  11239. */
  11240. title: string;
  11241. }
  11242. }
  11243. /**
  11244. * Security
  11245. */
  11246. export namespace Security {
  11247. /**
  11248. * An internal certificate ID value.
  11249. */
  11250. export type CertificateId = integer;
  11251. /**
  11252. * A description of mixed content (HTTP resources on HTTPS pages), as defined by
  11253. * https://www.w3.org/TR/mixed-content/#categories
  11254. */
  11255. export type MixedContentType = ('blockable' | 'optionally-blockable' | 'none');
  11256. /**
  11257. * The security level of a page or resource.
  11258. */
  11259. export type SecurityState = ('unknown' | 'neutral' | 'insecure' | 'secure' | 'info' | 'insecure-broken');
  11260. /**
  11261. * Details about the security state of the page certificate.
  11262. */
  11263. export interface CertificateSecurityState {
  11264. /**
  11265. * Protocol name (e.g. "TLS 1.2" or "QUIC").
  11266. */
  11267. protocol: string;
  11268. /**
  11269. * Key Exchange used by the connection, or the empty string if not applicable.
  11270. */
  11271. keyExchange: string;
  11272. /**
  11273. * (EC)DH group used by the connection, if applicable.
  11274. */
  11275. keyExchangeGroup?: string;
  11276. /**
  11277. * Cipher name.
  11278. */
  11279. cipher: string;
  11280. /**
  11281. * TLS MAC. Note that AEAD ciphers do not have separate MACs.
  11282. */
  11283. mac?: string;
  11284. /**
  11285. * Page certificate.
  11286. */
  11287. certificate: string[];
  11288. /**
  11289. * Certificate subject name.
  11290. */
  11291. subjectName: string;
  11292. /**
  11293. * Name of the issuing CA.
  11294. */
  11295. issuer: string;
  11296. /**
  11297. * Certificate valid from date.
  11298. */
  11299. validFrom: Network.TimeSinceEpoch;
  11300. /**
  11301. * Certificate valid to (expiration) date
  11302. */
  11303. validTo: Network.TimeSinceEpoch;
  11304. /**
  11305. * The highest priority network error code, if the certificate has an error.
  11306. */
  11307. certificateNetworkError?: string;
  11308. /**
  11309. * True if the certificate uses a weak signature aglorithm.
  11310. */
  11311. certificateHasWeakSignature: boolean;
  11312. /**
  11313. * True if the certificate has a SHA1 signature in the chain.
  11314. */
  11315. certificateHasSha1Signature: boolean;
  11316. /**
  11317. * True if modern SSL
  11318. */
  11319. modernSSL: boolean;
  11320. /**
  11321. * True if the connection is using an obsolete SSL protocol.
  11322. */
  11323. obsoleteSslProtocol: boolean;
  11324. /**
  11325. * True if the connection is using an obsolete SSL key exchange.
  11326. */
  11327. obsoleteSslKeyExchange: boolean;
  11328. /**
  11329. * True if the connection is using an obsolete SSL cipher.
  11330. */
  11331. obsoleteSslCipher: boolean;
  11332. /**
  11333. * True if the connection is using an obsolete SSL signature.
  11334. */
  11335. obsoleteSslSignature: boolean;
  11336. }
  11337. export type SafetyTipStatus = ('badReputation' | 'lookalike');
  11338. export interface SafetyTipInfo {
  11339. /**
  11340. * Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
  11341. */
  11342. safetyTipStatus: SafetyTipStatus;
  11343. /**
  11344. * The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
  11345. */
  11346. safeUrl?: string;
  11347. }
  11348. /**
  11349. * Security state information about the page.
  11350. */
  11351. export interface VisibleSecurityState {
  11352. /**
  11353. * The security level of the page.
  11354. */
  11355. securityState: SecurityState;
  11356. /**
  11357. * Security state details about the page certificate.
  11358. */
  11359. certificateSecurityState?: CertificateSecurityState;
  11360. /**
  11361. * The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
  11362. */
  11363. safetyTipInfo?: SafetyTipInfo;
  11364. /**
  11365. * Array of security state issues ids.
  11366. */
  11367. securityStateIssueIds: string[];
  11368. }
  11369. /**
  11370. * An explanation of an factor contributing to the security state.
  11371. */
  11372. export interface SecurityStateExplanation {
  11373. /**
  11374. * Security state representing the severity of the factor being explained.
  11375. */
  11376. securityState: SecurityState;
  11377. /**
  11378. * Title describing the type of factor.
  11379. */
  11380. title: string;
  11381. /**
  11382. * Short phrase describing the type of factor.
  11383. */
  11384. summary: string;
  11385. /**
  11386. * Full text explanation of the factor.
  11387. */
  11388. description: string;
  11389. /**
  11390. * The type of mixed content described by the explanation.
  11391. */
  11392. mixedContentType: MixedContentType;
  11393. /**
  11394. * Page certificate.
  11395. */
  11396. certificate: string[];
  11397. /**
  11398. * Recommendations to fix any issues.
  11399. */
  11400. recommendations?: string[];
  11401. }
  11402. /**
  11403. * Information about insecure content on the page.
  11404. */
  11405. export interface InsecureContentStatus {
  11406. /**
  11407. * Always false.
  11408. */
  11409. ranMixedContent: boolean;
  11410. /**
  11411. * Always false.
  11412. */
  11413. displayedMixedContent: boolean;
  11414. /**
  11415. * Always false.
  11416. */
  11417. containedMixedForm: boolean;
  11418. /**
  11419. * Always false.
  11420. */
  11421. ranContentWithCertErrors: boolean;
  11422. /**
  11423. * Always false.
  11424. */
  11425. displayedContentWithCertErrors: boolean;
  11426. /**
  11427. * Always set to unknown.
  11428. */
  11429. ranInsecureContentStyle: SecurityState;
  11430. /**
  11431. * Always set to unknown.
  11432. */
  11433. displayedInsecureContentStyle: SecurityState;
  11434. }
  11435. /**
  11436. * The action to take when a certificate error occurs. continue will continue processing the
  11437. * request and cancel will cancel the request.
  11438. */
  11439. export type CertificateErrorAction = ('continue' | 'cancel');
  11440. export interface SetIgnoreCertificateErrorsRequest {
  11441. /**
  11442. * If true, all certificate errors will be ignored.
  11443. */
  11444. ignore: boolean;
  11445. }
  11446. export interface HandleCertificateErrorRequest {
  11447. /**
  11448. * The ID of the event.
  11449. */
  11450. eventId: integer;
  11451. /**
  11452. * The action to take on the certificate error.
  11453. */
  11454. action: CertificateErrorAction;
  11455. }
  11456. export interface SetOverrideCertificateErrorsRequest {
  11457. /**
  11458. * If true, certificate errors will be overridden.
  11459. */
  11460. override: boolean;
  11461. }
  11462. /**
  11463. * There is a certificate error. If overriding certificate errors is enabled, then it should be
  11464. * handled with the `handleCertificateError` command. Note: this event does not fire if the
  11465. * certificate error has been allowed internally. Only one client per target should override
  11466. * certificate errors at the same time.
  11467. */
  11468. export interface CertificateErrorEvent {
  11469. /**
  11470. * The ID of the event.
  11471. */
  11472. eventId: integer;
  11473. /**
  11474. * The type of the error.
  11475. */
  11476. errorType: string;
  11477. /**
  11478. * The url that was requested.
  11479. */
  11480. requestURL: string;
  11481. }
  11482. /**
  11483. * The security state of the page changed.
  11484. */
  11485. export interface VisibleSecurityStateChangedEvent {
  11486. /**
  11487. * Security state information about the page.
  11488. */
  11489. visibleSecurityState: VisibleSecurityState;
  11490. }
  11491. /**
  11492. * The security state of the page changed.
  11493. */
  11494. export interface SecurityStateChangedEvent {
  11495. /**
  11496. * Security state.
  11497. */
  11498. securityState: SecurityState;
  11499. /**
  11500. * True if the page was loaded over cryptographic transport such as HTTPS.
  11501. */
  11502. schemeIsCryptographic: boolean;
  11503. /**
  11504. * List of explanations for the security state. If the overall security state is `insecure` or
  11505. * `warning`, at least one corresponding explanation should be included.
  11506. */
  11507. explanations: SecurityStateExplanation[];
  11508. /**
  11509. * Information about insecure content on the page.
  11510. */
  11511. insecureContentStatus: InsecureContentStatus;
  11512. /**
  11513. * Overrides user-visible description of the state.
  11514. */
  11515. summary?: string;
  11516. }
  11517. }
  11518. export namespace ServiceWorker {
  11519. export type RegistrationID = string;
  11520. /**
  11521. * ServiceWorker registration.
  11522. */
  11523. export interface ServiceWorkerRegistration {
  11524. registrationId: RegistrationID;
  11525. scopeURL: string;
  11526. isDeleted: boolean;
  11527. }
  11528. export type ServiceWorkerVersionRunningStatus = ('stopped' | 'starting' | 'running' | 'stopping');
  11529. export type ServiceWorkerVersionStatus = ('new' | 'installing' | 'installed' | 'activating' | 'activated' | 'redundant');
  11530. /**
  11531. * ServiceWorker version.
  11532. */
  11533. export interface ServiceWorkerVersion {
  11534. versionId: string;
  11535. registrationId: RegistrationID;
  11536. scriptURL: string;
  11537. runningStatus: ServiceWorkerVersionRunningStatus;
  11538. status: ServiceWorkerVersionStatus;
  11539. /**
  11540. * The Last-Modified header value of the main script.
  11541. */
  11542. scriptLastModified?: number;
  11543. /**
  11544. * The time at which the response headers of the main script were received from the server.
  11545. * For cached script it is the last time the cache entry was validated.
  11546. */
  11547. scriptResponseTime?: number;
  11548. controlledClients?: Target.TargetID[];
  11549. targetId?: Target.TargetID;
  11550. }
  11551. /**
  11552. * ServiceWorker error message.
  11553. */
  11554. export interface ServiceWorkerErrorMessage {
  11555. errorMessage: string;
  11556. registrationId: RegistrationID;
  11557. versionId: string;
  11558. sourceURL: string;
  11559. lineNumber: integer;
  11560. columnNumber: integer;
  11561. }
  11562. export interface DeliverPushMessageRequest {
  11563. origin: string;
  11564. registrationId: RegistrationID;
  11565. data: string;
  11566. }
  11567. export interface DispatchSyncEventRequest {
  11568. origin: string;
  11569. registrationId: RegistrationID;
  11570. tag: string;
  11571. lastChance: boolean;
  11572. }
  11573. export interface DispatchPeriodicSyncEventRequest {
  11574. origin: string;
  11575. registrationId: RegistrationID;
  11576. tag: string;
  11577. }
  11578. export interface InspectWorkerRequest {
  11579. versionId: string;
  11580. }
  11581. export interface SetForceUpdateOnPageLoadRequest {
  11582. forceUpdateOnPageLoad: boolean;
  11583. }
  11584. export interface SkipWaitingRequest {
  11585. scopeURL: string;
  11586. }
  11587. export interface StartWorkerRequest {
  11588. scopeURL: string;
  11589. }
  11590. export interface StopWorkerRequest {
  11591. versionId: string;
  11592. }
  11593. export interface UnregisterRequest {
  11594. scopeURL: string;
  11595. }
  11596. export interface UpdateRegistrationRequest {
  11597. scopeURL: string;
  11598. }
  11599. export interface WorkerErrorReportedEvent {
  11600. errorMessage: ServiceWorkerErrorMessage;
  11601. }
  11602. export interface WorkerRegistrationUpdatedEvent {
  11603. registrations: ServiceWorkerRegistration[];
  11604. }
  11605. export interface WorkerVersionUpdatedEvent {
  11606. versions: ServiceWorkerVersion[];
  11607. }
  11608. }
  11609. export namespace Storage {
  11610. /**
  11611. * Enum of possible storage types.
  11612. */
  11613. export type StorageType = ('appcache' | 'cookies' | 'file_systems' | 'indexeddb' | 'local_storage' | 'shader_cache' | 'websql' | 'service_workers' | 'cache_storage' | 'all' | 'other');
  11614. /**
  11615. * Usage for a storage type.
  11616. */
  11617. export interface UsageForType {
  11618. /**
  11619. * Name of storage type.
  11620. */
  11621. storageType: StorageType;
  11622. /**
  11623. * Storage usage (bytes).
  11624. */
  11625. usage: number;
  11626. }
  11627. export interface ClearDataForOriginRequest {
  11628. /**
  11629. * Security origin.
  11630. */
  11631. origin: string;
  11632. /**
  11633. * Comma separated list of StorageType to clear.
  11634. */
  11635. storageTypes: string;
  11636. }
  11637. export interface GetCookiesRequest {
  11638. /**
  11639. * Browser context to use when called on the browser endpoint.
  11640. */
  11641. browserContextId?: Browser.BrowserContextID;
  11642. }
  11643. export interface GetCookiesResponse {
  11644. /**
  11645. * Array of cookie objects.
  11646. */
  11647. cookies: Network.Cookie[];
  11648. }
  11649. export interface SetCookiesRequest {
  11650. /**
  11651. * Cookies to be set.
  11652. */
  11653. cookies: Network.CookieParam[];
  11654. /**
  11655. * Browser context to use when called on the browser endpoint.
  11656. */
  11657. browserContextId?: Browser.BrowserContextID;
  11658. }
  11659. export interface ClearCookiesRequest {
  11660. /**
  11661. * Browser context to use when called on the browser endpoint.
  11662. */
  11663. browserContextId?: Browser.BrowserContextID;
  11664. }
  11665. export interface GetUsageAndQuotaRequest {
  11666. /**
  11667. * Security origin.
  11668. */
  11669. origin: string;
  11670. }
  11671. export interface GetUsageAndQuotaResponse {
  11672. /**
  11673. * Storage usage (bytes).
  11674. */
  11675. usage: number;
  11676. /**
  11677. * Storage quota (bytes).
  11678. */
  11679. quota: number;
  11680. /**
  11681. * Whether or not the origin has an active storage quota override
  11682. */
  11683. overrideActive: boolean;
  11684. /**
  11685. * Storage usage per type (bytes).
  11686. */
  11687. usageBreakdown: UsageForType[];
  11688. }
  11689. export interface OverrideQuotaForOriginRequest {
  11690. /**
  11691. * Security origin.
  11692. */
  11693. origin: string;
  11694. /**
  11695. * The quota size (in bytes) to override the original quota with.
  11696. * If this is called multiple times, the overriden quota will be equal to
  11697. * the quotaSize provided in the final call. If this is called without
  11698. * specifying a quotaSize, the quota will be reset to the default value for
  11699. * the specified origin. If this is called multiple times with different
  11700. * origins, the override will be maintained for each origin until it is
  11701. * disabled (called without a quotaSize).
  11702. */
  11703. quotaSize?: number;
  11704. }
  11705. export interface TrackCacheStorageForOriginRequest {
  11706. /**
  11707. * Security origin.
  11708. */
  11709. origin: string;
  11710. }
  11711. export interface TrackIndexedDBForOriginRequest {
  11712. /**
  11713. * Security origin.
  11714. */
  11715. origin: string;
  11716. }
  11717. export interface UntrackCacheStorageForOriginRequest {
  11718. /**
  11719. * Security origin.
  11720. */
  11721. origin: string;
  11722. }
  11723. export interface UntrackIndexedDBForOriginRequest {
  11724. /**
  11725. * Security origin.
  11726. */
  11727. origin: string;
  11728. }
  11729. /**
  11730. * A cache's contents have been modified.
  11731. */
  11732. export interface CacheStorageContentUpdatedEvent {
  11733. /**
  11734. * Origin to update.
  11735. */
  11736. origin: string;
  11737. /**
  11738. * Name of cache in origin.
  11739. */
  11740. cacheName: string;
  11741. }
  11742. /**
  11743. * A cache has been added/deleted.
  11744. */
  11745. export interface CacheStorageListUpdatedEvent {
  11746. /**
  11747. * Origin to update.
  11748. */
  11749. origin: string;
  11750. }
  11751. /**
  11752. * The origin's IndexedDB object store has been modified.
  11753. */
  11754. export interface IndexedDBContentUpdatedEvent {
  11755. /**
  11756. * Origin to update.
  11757. */
  11758. origin: string;
  11759. /**
  11760. * Database to update.
  11761. */
  11762. databaseName: string;
  11763. /**
  11764. * ObjectStore to update.
  11765. */
  11766. objectStoreName: string;
  11767. }
  11768. /**
  11769. * The origin's IndexedDB database list has been modified.
  11770. */
  11771. export interface IndexedDBListUpdatedEvent {
  11772. /**
  11773. * Origin to update.
  11774. */
  11775. origin: string;
  11776. }
  11777. }
  11778. /**
  11779. * The SystemInfo domain defines methods and events for querying low-level system information.
  11780. */
  11781. export namespace SystemInfo {
  11782. /**
  11783. * Describes a single graphics processor (GPU).
  11784. */
  11785. export interface GPUDevice {
  11786. /**
  11787. * PCI ID of the GPU vendor, if available; 0 otherwise.
  11788. */
  11789. vendorId: number;
  11790. /**
  11791. * PCI ID of the GPU device, if available; 0 otherwise.
  11792. */
  11793. deviceId: number;
  11794. /**
  11795. * Sub sys ID of the GPU, only available on Windows.
  11796. */
  11797. subSysId?: number;
  11798. /**
  11799. * Revision of the GPU, only available on Windows.
  11800. */
  11801. revision?: number;
  11802. /**
  11803. * String description of the GPU vendor, if the PCI ID is not available.
  11804. */
  11805. vendorString: string;
  11806. /**
  11807. * String description of the GPU device, if the PCI ID is not available.
  11808. */
  11809. deviceString: string;
  11810. /**
  11811. * String description of the GPU driver vendor.
  11812. */
  11813. driverVendor: string;
  11814. /**
  11815. * String description of the GPU driver version.
  11816. */
  11817. driverVersion: string;
  11818. }
  11819. /**
  11820. * Describes the width and height dimensions of an entity.
  11821. */
  11822. export interface Size {
  11823. /**
  11824. * Width in pixels.
  11825. */
  11826. width: integer;
  11827. /**
  11828. * Height in pixels.
  11829. */
  11830. height: integer;
  11831. }
  11832. /**
  11833. * Describes a supported video decoding profile with its associated minimum and
  11834. * maximum resolutions.
  11835. */
  11836. export interface VideoDecodeAcceleratorCapability {
  11837. /**
  11838. * Video codec profile that is supported, e.g. VP9 Profile 2.
  11839. */
  11840. profile: string;
  11841. /**
  11842. * Maximum video dimensions in pixels supported for this |profile|.
  11843. */
  11844. maxResolution: Size;
  11845. /**
  11846. * Minimum video dimensions in pixels supported for this |profile|.
  11847. */
  11848. minResolution: Size;
  11849. }
  11850. /**
  11851. * Describes a supported video encoding profile with its associated maximum
  11852. * resolution and maximum framerate.
  11853. */
  11854. export interface VideoEncodeAcceleratorCapability {
  11855. /**
  11856. * Video codec profile that is supported, e.g H264 Main.
  11857. */
  11858. profile: string;
  11859. /**
  11860. * Maximum video dimensions in pixels supported for this |profile|.
  11861. */
  11862. maxResolution: Size;
  11863. /**
  11864. * Maximum encoding framerate in frames per second supported for this
  11865. * |profile|, as fraction's numerator and denominator, e.g. 24/1 fps,
  11866. * 24000/1001 fps, etc.
  11867. */
  11868. maxFramerateNumerator: integer;
  11869. maxFramerateDenominator: integer;
  11870. }
  11871. /**
  11872. * YUV subsampling type of the pixels of a given image.
  11873. */
  11874. export type SubsamplingFormat = ('yuv420' | 'yuv422' | 'yuv444');
  11875. /**
  11876. * Image format of a given image.
  11877. */
  11878. export type ImageType = ('jpeg' | 'webp' | 'unknown');
  11879. /**
  11880. * Describes a supported image decoding profile with its associated minimum and
  11881. * maximum resolutions and subsampling.
  11882. */
  11883. export interface ImageDecodeAcceleratorCapability {
  11884. /**
  11885. * Image coded, e.g. Jpeg.
  11886. */
  11887. imageType: ImageType;
  11888. /**
  11889. * Maximum supported dimensions of the image in pixels.
  11890. */
  11891. maxDimensions: Size;
  11892. /**
  11893. * Minimum supported dimensions of the image in pixels.
  11894. */
  11895. minDimensions: Size;
  11896. /**
  11897. * Optional array of supported subsampling formats, e.g. 4:2:0, if known.
  11898. */
  11899. subsamplings: SubsamplingFormat[];
  11900. }
  11901. /**
  11902. * Provides information about the GPU(s) on the system.
  11903. */
  11904. export interface GPUInfo {
  11905. /**
  11906. * The graphics devices on the system. Element 0 is the primary GPU.
  11907. */
  11908. devices: GPUDevice[];
  11909. /**
  11910. * An optional dictionary of additional GPU related attributes.
  11911. */
  11912. auxAttributes?: any;
  11913. /**
  11914. * An optional dictionary of graphics features and their status.
  11915. */
  11916. featureStatus?: any;
  11917. /**
  11918. * An optional array of GPU driver bug workarounds.
  11919. */
  11920. driverBugWorkarounds: string[];
  11921. /**
  11922. * Supported accelerated video decoding capabilities.
  11923. */
  11924. videoDecoding: VideoDecodeAcceleratorCapability[];
  11925. /**
  11926. * Supported accelerated video encoding capabilities.
  11927. */
  11928. videoEncoding: VideoEncodeAcceleratorCapability[];
  11929. /**
  11930. * Supported accelerated image decoding capabilities.
  11931. */
  11932. imageDecoding: ImageDecodeAcceleratorCapability[];
  11933. }
  11934. /**
  11935. * Represents process info.
  11936. */
  11937. export interface ProcessInfo {
  11938. /**
  11939. * Specifies process type.
  11940. */
  11941. type: string;
  11942. /**
  11943. * Specifies process id.
  11944. */
  11945. id: integer;
  11946. /**
  11947. * Specifies cumulative CPU usage in seconds across all threads of the
  11948. * process since the process start.
  11949. */
  11950. cpuTime: number;
  11951. }
  11952. export interface GetInfoResponse {
  11953. /**
  11954. * Information about the GPUs on the system.
  11955. */
  11956. gpu: GPUInfo;
  11957. /**
  11958. * A platform-dependent description of the model of the machine. On Mac OS, this is, for
  11959. * example, 'MacBookPro'. Will be the empty string if not supported.
  11960. */
  11961. modelName: string;
  11962. /**
  11963. * A platform-dependent description of the version of the machine. On Mac OS, this is, for
  11964. * example, '10.1'. Will be the empty string if not supported.
  11965. */
  11966. modelVersion: string;
  11967. /**
  11968. * The command line string used to launch the browser. Will be the empty string if not
  11969. * supported.
  11970. */
  11971. commandLine: string;
  11972. }
  11973. export interface GetProcessInfoResponse {
  11974. /**
  11975. * An array of process info blocks.
  11976. */
  11977. processInfo: ProcessInfo[];
  11978. }
  11979. }
  11980. /**
  11981. * Supports additional targets discovery and allows to attach to them.
  11982. */
  11983. export namespace Target {
  11984. export type TargetID = string;
  11985. /**
  11986. * Unique identifier of attached debugging session.
  11987. */
  11988. export type SessionID = string;
  11989. export interface TargetInfo {
  11990. targetId: TargetID;
  11991. type: string;
  11992. title: string;
  11993. url: string;
  11994. /**
  11995. * Whether the target has an attached client.
  11996. */
  11997. attached: boolean;
  11998. /**
  11999. * Opener target Id
  12000. */
  12001. openerId?: TargetID;
  12002. /**
  12003. * Whether the target has access to the originating window.
  12004. */
  12005. canAccessOpener: boolean;
  12006. /**
  12007. * Frame id of originating window (is only set if target has an opener).
  12008. */
  12009. openerFrameId?: Page.FrameId;
  12010. browserContextId?: Browser.BrowserContextID;
  12011. }
  12012. export interface RemoteLocation {
  12013. host: string;
  12014. port: integer;
  12015. }
  12016. export interface ActivateTargetRequest {
  12017. targetId: TargetID;
  12018. }
  12019. export interface AttachToTargetRequest {
  12020. targetId: TargetID;
  12021. /**
  12022. * Enables "flat" access to the session via specifying sessionId attribute in the commands.
  12023. * We plan to make this the default, deprecate non-flattened mode,
  12024. * and eventually retire it. See crbug.com/991325.
  12025. */
  12026. flatten?: boolean;
  12027. }
  12028. export interface AttachToTargetResponse {
  12029. /**
  12030. * Id assigned to the session.
  12031. */
  12032. sessionId: SessionID;
  12033. }
  12034. export interface AttachToBrowserTargetResponse {
  12035. /**
  12036. * Id assigned to the session.
  12037. */
  12038. sessionId: SessionID;
  12039. }
  12040. export interface CloseTargetRequest {
  12041. targetId: TargetID;
  12042. }
  12043. export interface CloseTargetResponse {
  12044. /**
  12045. * Always set to true. If an error occurs, the response indicates protocol error.
  12046. */
  12047. success: boolean;
  12048. }
  12049. export interface ExposeDevToolsProtocolRequest {
  12050. targetId: TargetID;
  12051. /**
  12052. * Binding name, 'cdp' if not specified.
  12053. */
  12054. bindingName?: string;
  12055. }
  12056. export interface CreateBrowserContextRequest {
  12057. /**
  12058. * If specified, disposes this context when debugging session disconnects.
  12059. */
  12060. disposeOnDetach?: boolean;
  12061. /**
  12062. * Proxy server, similar to the one passed to --proxy-server
  12063. */
  12064. proxyServer?: string;
  12065. /**
  12066. * Proxy bypass list, similar to the one passed to --proxy-bypass-list
  12067. */
  12068. proxyBypassList?: string;
  12069. }
  12070. export interface CreateBrowserContextResponse {
  12071. /**
  12072. * The id of the context created.
  12073. */
  12074. browserContextId: Browser.BrowserContextID;
  12075. }
  12076. export interface GetBrowserContextsResponse {
  12077. /**
  12078. * An array of browser context ids.
  12079. */
  12080. browserContextIds: Browser.BrowserContextID[];
  12081. }
  12082. export interface CreateTargetRequest {
  12083. /**
  12084. * The initial URL the page will be navigated to.
  12085. */
  12086. url: string;
  12087. /**
  12088. * Frame width in DIP (headless chrome only).
  12089. */
  12090. width?: integer;
  12091. /**
  12092. * Frame height in DIP (headless chrome only).
  12093. */
  12094. height?: integer;
  12095. /**
  12096. * The browser context to create the page in.
  12097. */
  12098. browserContextId?: Browser.BrowserContextID;
  12099. /**
  12100. * Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,
  12101. * not supported on MacOS yet, false by default).
  12102. */
  12103. enableBeginFrameControl?: boolean;
  12104. /**
  12105. * Whether to create a new Window or Tab (chrome-only, false by default).
  12106. */
  12107. newWindow?: boolean;
  12108. /**
  12109. * Whether to create the target in background or foreground (chrome-only,
  12110. * false by default).
  12111. */
  12112. background?: boolean;
  12113. }
  12114. export interface CreateTargetResponse {
  12115. /**
  12116. * The id of the page opened.
  12117. */
  12118. targetId: TargetID;
  12119. }
  12120. export interface DetachFromTargetRequest {
  12121. /**
  12122. * Session to detach.
  12123. */
  12124. sessionId?: SessionID;
  12125. /**
  12126. * Deprecated.
  12127. */
  12128. targetId?: TargetID;
  12129. }
  12130. export interface DisposeBrowserContextRequest {
  12131. browserContextId: Browser.BrowserContextID;
  12132. }
  12133. export interface GetTargetInfoRequest {
  12134. targetId?: TargetID;
  12135. }
  12136. export interface GetTargetInfoResponse {
  12137. targetInfo: TargetInfo;
  12138. }
  12139. export interface GetTargetsResponse {
  12140. /**
  12141. * The list of targets.
  12142. */
  12143. targetInfos: TargetInfo[];
  12144. }
  12145. export interface SendMessageToTargetRequest {
  12146. message: string;
  12147. /**
  12148. * Identifier of the session.
  12149. */
  12150. sessionId?: SessionID;
  12151. /**
  12152. * Deprecated.
  12153. */
  12154. targetId?: TargetID;
  12155. }
  12156. export interface SetAutoAttachRequest {
  12157. /**
  12158. * Whether to auto-attach to related targets.
  12159. */
  12160. autoAttach: boolean;
  12161. /**
  12162. * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
  12163. * to run paused targets.
  12164. */
  12165. waitForDebuggerOnStart: boolean;
  12166. /**
  12167. * Enables "flat" access to the session via specifying sessionId attribute in the commands.
  12168. * We plan to make this the default, deprecate non-flattened mode,
  12169. * and eventually retire it. See crbug.com/991325.
  12170. */
  12171. flatten?: boolean;
  12172. }
  12173. export interface SetDiscoverTargetsRequest {
  12174. /**
  12175. * Whether to discover available targets.
  12176. */
  12177. discover: boolean;
  12178. }
  12179. export interface SetRemoteLocationsRequest {
  12180. /**
  12181. * List of remote locations.
  12182. */
  12183. locations: RemoteLocation[];
  12184. }
  12185. /**
  12186. * Issued when attached to target because of auto-attach or `attachToTarget` command.
  12187. */
  12188. export interface AttachedToTargetEvent {
  12189. /**
  12190. * Identifier assigned to the session used to send/receive messages.
  12191. */
  12192. sessionId: SessionID;
  12193. targetInfo: TargetInfo;
  12194. waitingForDebugger: boolean;
  12195. }
  12196. /**
  12197. * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
  12198. * issued multiple times per target if multiple sessions have been attached to it.
  12199. */
  12200. export interface DetachedFromTargetEvent {
  12201. /**
  12202. * Detached session identifier.
  12203. */
  12204. sessionId: SessionID;
  12205. /**
  12206. * Deprecated.
  12207. */
  12208. targetId?: TargetID;
  12209. }
  12210. /**
  12211. * Notifies about a new protocol message received from the session (as reported in
  12212. * `attachedToTarget` event).
  12213. */
  12214. export interface ReceivedMessageFromTargetEvent {
  12215. /**
  12216. * Identifier of a session which sends a message.
  12217. */
  12218. sessionId: SessionID;
  12219. message: string;
  12220. /**
  12221. * Deprecated.
  12222. */
  12223. targetId?: TargetID;
  12224. }
  12225. /**
  12226. * Issued when a possible inspection target is created.
  12227. */
  12228. export interface TargetCreatedEvent {
  12229. targetInfo: TargetInfo;
  12230. }
  12231. /**
  12232. * Issued when a target is destroyed.
  12233. */
  12234. export interface TargetDestroyedEvent {
  12235. targetId: TargetID;
  12236. }
  12237. /**
  12238. * Issued when a target has crashed.
  12239. */
  12240. export interface TargetCrashedEvent {
  12241. targetId: TargetID;
  12242. /**
  12243. * Termination status type.
  12244. */
  12245. status: string;
  12246. /**
  12247. * Termination error code.
  12248. */
  12249. errorCode: integer;
  12250. }
  12251. /**
  12252. * Issued when some information about a target has changed. This only happens between
  12253. * `targetCreated` and `targetDestroyed`.
  12254. */
  12255. export interface TargetInfoChangedEvent {
  12256. targetInfo: TargetInfo;
  12257. }
  12258. }
  12259. /**
  12260. * The Tethering domain defines methods and events for browser port binding.
  12261. */
  12262. export namespace Tethering {
  12263. export interface BindRequest {
  12264. /**
  12265. * Port number to bind.
  12266. */
  12267. port: integer;
  12268. }
  12269. export interface UnbindRequest {
  12270. /**
  12271. * Port number to unbind.
  12272. */
  12273. port: integer;
  12274. }
  12275. /**
  12276. * Informs that port was successfully bound and got a specified connection id.
  12277. */
  12278. export interface AcceptedEvent {
  12279. /**
  12280. * Port number that was successfully bound.
  12281. */
  12282. port: integer;
  12283. /**
  12284. * Connection id to be used.
  12285. */
  12286. connectionId: string;
  12287. }
  12288. }
  12289. export namespace Tracing {
  12290. /**
  12291. * Configuration for memory dump. Used only when "memory-infra" category is enabled.
  12292. */
  12293. export interface MemoryDumpConfig {
  12294. [key: string]: string;
  12295. }
  12296. export const enum TraceConfigRecordMode {
  12297. RecordUntilFull = 'recordUntilFull',
  12298. RecordContinuously = 'recordContinuously',
  12299. RecordAsMuchAsPossible = 'recordAsMuchAsPossible',
  12300. EchoToConsole = 'echoToConsole',
  12301. }
  12302. export interface TraceConfig {
  12303. /**
  12304. * Controls how the trace buffer stores data. (TraceConfigRecordMode enum)
  12305. */
  12306. recordMode?: ('recordUntilFull' | 'recordContinuously' | 'recordAsMuchAsPossible' | 'echoToConsole');
  12307. /**
  12308. * Turns on JavaScript stack sampling.
  12309. */
  12310. enableSampling?: boolean;
  12311. /**
  12312. * Turns on system tracing.
  12313. */
  12314. enableSystrace?: boolean;
  12315. /**
  12316. * Turns on argument filter.
  12317. */
  12318. enableArgumentFilter?: boolean;
  12319. /**
  12320. * Included category filters.
  12321. */
  12322. includedCategories?: string[];
  12323. /**
  12324. * Excluded category filters.
  12325. */
  12326. excludedCategories?: string[];
  12327. /**
  12328. * Configuration to synthesize the delays in tracing.
  12329. */
  12330. syntheticDelays?: string[];
  12331. /**
  12332. * Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
  12333. */
  12334. memoryDumpConfig?: MemoryDumpConfig;
  12335. }
  12336. /**
  12337. * Data format of a trace. Can be either the legacy JSON format or the
  12338. * protocol buffer format. Note that the JSON format will be deprecated soon.
  12339. */
  12340. export type StreamFormat = ('json' | 'proto');
  12341. /**
  12342. * Compression type to use for traces returned via streams.
  12343. */
  12344. export type StreamCompression = ('none' | 'gzip');
  12345. export interface GetCategoriesResponse {
  12346. /**
  12347. * A list of supported tracing categories.
  12348. */
  12349. categories: string[];
  12350. }
  12351. export interface RecordClockSyncMarkerRequest {
  12352. /**
  12353. * The ID of this clock sync marker
  12354. */
  12355. syncId: string;
  12356. }
  12357. export interface RequestMemoryDumpRequest {
  12358. /**
  12359. * Enables more deterministic results by forcing garbage collection
  12360. */
  12361. deterministic?: boolean;
  12362. }
  12363. export interface RequestMemoryDumpResponse {
  12364. /**
  12365. * GUID of the resulting global memory dump.
  12366. */
  12367. dumpGuid: string;
  12368. /**
  12369. * True iff the global memory dump succeeded.
  12370. */
  12371. success: boolean;
  12372. }
  12373. export const enum StartRequestTransferMode {
  12374. ReportEvents = 'ReportEvents',
  12375. ReturnAsStream = 'ReturnAsStream',
  12376. }
  12377. export interface StartRequest {
  12378. /**
  12379. * Category/tag filter
  12380. */
  12381. categories?: string;
  12382. /**
  12383. * Tracing options
  12384. */
  12385. options?: string;
  12386. /**
  12387. * If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
  12388. */
  12389. bufferUsageReportingInterval?: number;
  12390. /**
  12391. * Whether to report trace events as series of dataCollected events or to save trace to a
  12392. * stream (defaults to `ReportEvents`). (StartRequestTransferMode enum)
  12393. */
  12394. transferMode?: ('ReportEvents' | 'ReturnAsStream');
  12395. /**
  12396. * Trace data format to use. This only applies when using `ReturnAsStream`
  12397. * transfer mode (defaults to `json`).
  12398. */
  12399. streamFormat?: StreamFormat;
  12400. /**
  12401. * Compression format to use. This only applies when using `ReturnAsStream`
  12402. * transfer mode (defaults to `none`)
  12403. */
  12404. streamCompression?: StreamCompression;
  12405. traceConfig?: TraceConfig;
  12406. }
  12407. export interface BufferUsageEvent {
  12408. /**
  12409. * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
  12410. * total size.
  12411. */
  12412. percentFull?: number;
  12413. /**
  12414. * An approximate number of events in the trace log.
  12415. */
  12416. eventCount?: number;
  12417. /**
  12418. * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
  12419. * total size.
  12420. */
  12421. value?: number;
  12422. }
  12423. /**
  12424. * Contains an bucket of collected trace events. When tracing is stopped collected events will be
  12425. * send as a sequence of dataCollected events followed by tracingComplete event.
  12426. */
  12427. export interface DataCollectedEvent {
  12428. value: any[];
  12429. }
  12430. /**
  12431. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  12432. * delivered via dataCollected events.
  12433. */
  12434. export interface TracingCompleteEvent {
  12435. /**
  12436. * Indicates whether some trace data is known to have been lost, e.g. because the trace ring
  12437. * buffer wrapped around.
  12438. */
  12439. dataLossOccurred: boolean;
  12440. /**
  12441. * A handle of the stream that holds resulting trace data.
  12442. */
  12443. stream?: IO.StreamHandle;
  12444. /**
  12445. * Trace data format of returned stream.
  12446. */
  12447. traceFormat?: StreamFormat;
  12448. /**
  12449. * Compression format of returned stream.
  12450. */
  12451. streamCompression?: StreamCompression;
  12452. }
  12453. }
  12454. /**
  12455. * A domain for letting clients substitute browser's network layer with client code.
  12456. */
  12457. export namespace Fetch {
  12458. /**
  12459. * Unique request identifier.
  12460. */
  12461. export type RequestId = string;
  12462. /**
  12463. * Stages of the request to handle. Request will intercept before the request is
  12464. * sent. Response will intercept after the response is received (but before response
  12465. * body is received.
  12466. */
  12467. export type RequestStage = ('Request' | 'Response');
  12468. export interface RequestPattern {
  12469. /**
  12470. * Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is
  12471. * backslash. Omitting is equivalent to "*".
  12472. */
  12473. urlPattern?: string;
  12474. /**
  12475. * If set, only requests for matching resource types will be intercepted.
  12476. */
  12477. resourceType?: Network.ResourceType;
  12478. /**
  12479. * Stage at wich to begin intercepting requests. Default is Request.
  12480. */
  12481. requestStage?: RequestStage;
  12482. }
  12483. /**
  12484. * Response HTTP header entry
  12485. */
  12486. export interface HeaderEntry {
  12487. name: string;
  12488. value: string;
  12489. }
  12490. export const enum AuthChallengeSource {
  12491. Server = 'Server',
  12492. Proxy = 'Proxy',
  12493. }
  12494. /**
  12495. * Authorization challenge for HTTP status code 401 or 407.
  12496. */
  12497. export interface AuthChallenge {
  12498. /**
  12499. * Source of the authentication challenge. (AuthChallengeSource enum)
  12500. */
  12501. source?: ('Server' | 'Proxy');
  12502. /**
  12503. * Origin of the challenger.
  12504. */
  12505. origin: string;
  12506. /**
  12507. * The authentication scheme used, such as basic or digest
  12508. */
  12509. scheme: string;
  12510. /**
  12511. * The realm of the challenge. May be empty.
  12512. */
  12513. realm: string;
  12514. }
  12515. export const enum AuthChallengeResponseResponse {
  12516. Default = 'Default',
  12517. CancelAuth = 'CancelAuth',
  12518. ProvideCredentials = 'ProvideCredentials',
  12519. }
  12520. /**
  12521. * Response to an AuthChallenge.
  12522. */
  12523. export interface AuthChallengeResponse {
  12524. /**
  12525. * The decision on what to do in response to the authorization challenge. Default means
  12526. * deferring to the default behavior of the net stack, which will likely either the Cancel
  12527. * authentication or display a popup dialog box. (AuthChallengeResponseResponse enum)
  12528. */
  12529. response: ('Default' | 'CancelAuth' | 'ProvideCredentials');
  12530. /**
  12531. * The username to provide, possibly empty. Should only be set if response is
  12532. * ProvideCredentials.
  12533. */
  12534. username?: string;
  12535. /**
  12536. * The password to provide, possibly empty. Should only be set if response is
  12537. * ProvideCredentials.
  12538. */
  12539. password?: string;
  12540. }
  12541. export interface EnableRequest {
  12542. /**
  12543. * If specified, only requests matching any of these patterns will produce
  12544. * fetchRequested event and will be paused until clients response. If not set,
  12545. * all requests will be affected.
  12546. */
  12547. patterns?: RequestPattern[];
  12548. /**
  12549. * If true, authRequired events will be issued and requests will be paused
  12550. * expecting a call to continueWithAuth.
  12551. */
  12552. handleAuthRequests?: boolean;
  12553. }
  12554. export interface FailRequestRequest {
  12555. /**
  12556. * An id the client received in requestPaused event.
  12557. */
  12558. requestId: RequestId;
  12559. /**
  12560. * Causes the request to fail with the given reason.
  12561. */
  12562. errorReason: Network.ErrorReason;
  12563. }
  12564. export interface FulfillRequestRequest {
  12565. /**
  12566. * An id the client received in requestPaused event.
  12567. */
  12568. requestId: RequestId;
  12569. /**
  12570. * An HTTP response code.
  12571. */
  12572. responseCode: integer;
  12573. /**
  12574. * Response headers.
  12575. */
  12576. responseHeaders?: HeaderEntry[];
  12577. /**
  12578. * Alternative way of specifying response headers as a \0-separated
  12579. * series of name: value pairs. Prefer the above method unless you
  12580. * need to represent some non-UTF8 values that can't be transmitted
  12581. * over the protocol as text.
  12582. */
  12583. binaryResponseHeaders?: string;
  12584. /**
  12585. * A response body.
  12586. */
  12587. body?: string;
  12588. /**
  12589. * A textual representation of responseCode.
  12590. * If absent, a standard phrase matching responseCode is used.
  12591. */
  12592. responsePhrase?: string;
  12593. }
  12594. export interface ContinueRequestRequest {
  12595. /**
  12596. * An id the client received in requestPaused event.
  12597. */
  12598. requestId: RequestId;
  12599. /**
  12600. * If set, the request url will be modified in a way that's not observable by page.
  12601. */
  12602. url?: string;
  12603. /**
  12604. * If set, the request method is overridden.
  12605. */
  12606. method?: string;
  12607. /**
  12608. * If set, overrides the post data in the request.
  12609. */
  12610. postData?: string;
  12611. /**
  12612. * If set, overrides the request headers.
  12613. */
  12614. headers?: HeaderEntry[];
  12615. }
  12616. export interface ContinueWithAuthRequest {
  12617. /**
  12618. * An id the client received in authRequired event.
  12619. */
  12620. requestId: RequestId;
  12621. /**
  12622. * Response to with an authChallenge.
  12623. */
  12624. authChallengeResponse: AuthChallengeResponse;
  12625. }
  12626. export interface GetResponseBodyRequest {
  12627. /**
  12628. * Identifier for the intercepted request to get body for.
  12629. */
  12630. requestId: RequestId;
  12631. }
  12632. export interface GetResponseBodyResponse {
  12633. /**
  12634. * Response body.
  12635. */
  12636. body: string;
  12637. /**
  12638. * True, if content was sent as base64.
  12639. */
  12640. base64Encoded: boolean;
  12641. }
  12642. export interface TakeResponseBodyAsStreamRequest {
  12643. requestId: RequestId;
  12644. }
  12645. export interface TakeResponseBodyAsStreamResponse {
  12646. stream: IO.StreamHandle;
  12647. }
  12648. /**
  12649. * Issued when the domain is enabled and the request URL matches the
  12650. * specified filter. The request is paused until the client responds
  12651. * with one of continueRequest, failRequest or fulfillRequest.
  12652. * The stage of the request can be determined by presence of responseErrorReason
  12653. * and responseStatusCode -- the request is at the response stage if either
  12654. * of these fields is present and in the request stage otherwise.
  12655. */
  12656. export interface RequestPausedEvent {
  12657. /**
  12658. * Each request the page makes will have a unique id.
  12659. */
  12660. requestId: RequestId;
  12661. /**
  12662. * The details of the request.
  12663. */
  12664. request: Network.Request;
  12665. /**
  12666. * The id of the frame that initiated the request.
  12667. */
  12668. frameId: Page.FrameId;
  12669. /**
  12670. * How the requested resource will be used.
  12671. */
  12672. resourceType: Network.ResourceType;
  12673. /**
  12674. * Response error if intercepted at response stage.
  12675. */
  12676. responseErrorReason?: Network.ErrorReason;
  12677. /**
  12678. * Response code if intercepted at response stage.
  12679. */
  12680. responseStatusCode?: integer;
  12681. /**
  12682. * Response headers if intercepted at the response stage.
  12683. */
  12684. responseHeaders?: HeaderEntry[];
  12685. /**
  12686. * If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,
  12687. * then this networkId will be the same as the requestId present in the requestWillBeSent event.
  12688. */
  12689. networkId?: RequestId;
  12690. }
  12691. /**
  12692. * Issued when the domain is enabled with handleAuthRequests set to true.
  12693. * The request is paused until client responds with continueWithAuth.
  12694. */
  12695. export interface AuthRequiredEvent {
  12696. /**
  12697. * Each request the page makes will have a unique id.
  12698. */
  12699. requestId: RequestId;
  12700. /**
  12701. * The details of the request.
  12702. */
  12703. request: Network.Request;
  12704. /**
  12705. * The id of the frame that initiated the request.
  12706. */
  12707. frameId: Page.FrameId;
  12708. /**
  12709. * How the requested resource will be used.
  12710. */
  12711. resourceType: Network.ResourceType;
  12712. /**
  12713. * Details of the Authorization Challenge encountered.
  12714. * If this is set, client should respond with continueRequest that
  12715. * contains AuthChallengeResponse.
  12716. */
  12717. authChallenge: AuthChallenge;
  12718. }
  12719. }
  12720. /**
  12721. * This domain allows inspection of Web Audio API.
  12722. * https://webaudio.github.io/web-audio-api/
  12723. */
  12724. export namespace WebAudio {
  12725. /**
  12726. * An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
  12727. */
  12728. export type GraphObjectId = string;
  12729. /**
  12730. * Enum of BaseAudioContext types
  12731. */
  12732. export type ContextType = ('realtime' | 'offline');
  12733. /**
  12734. * Enum of AudioContextState from the spec
  12735. */
  12736. export type ContextState = ('suspended' | 'running' | 'closed');
  12737. /**
  12738. * Enum of AudioNode types
  12739. */
  12740. export type NodeType = string;
  12741. /**
  12742. * Enum of AudioNode::ChannelCountMode from the spec
  12743. */
  12744. export type ChannelCountMode = ('clamped-max' | 'explicit' | 'max');
  12745. /**
  12746. * Enum of AudioNode::ChannelInterpretation from the spec
  12747. */
  12748. export type ChannelInterpretation = ('discrete' | 'speakers');
  12749. /**
  12750. * Enum of AudioParam types
  12751. */
  12752. export type ParamType = string;
  12753. /**
  12754. * Enum of AudioParam::AutomationRate from the spec
  12755. */
  12756. export type AutomationRate = ('a-rate' | 'k-rate');
  12757. /**
  12758. * Fields in AudioContext that change in real-time.
  12759. */
  12760. export interface ContextRealtimeData {
  12761. /**
  12762. * The current context time in second in BaseAudioContext.
  12763. */
  12764. currentTime: number;
  12765. /**
  12766. * The time spent on rendering graph divided by render qunatum duration,
  12767. * and multiplied by 100. 100 means the audio renderer reached the full
  12768. * capacity and glitch may occur.
  12769. */
  12770. renderCapacity: number;
  12771. /**
  12772. * A running mean of callback interval.
  12773. */
  12774. callbackIntervalMean: number;
  12775. /**
  12776. * A running variance of callback interval.
  12777. */
  12778. callbackIntervalVariance: number;
  12779. }
  12780. /**
  12781. * Protocol object for BaseAudioContext
  12782. */
  12783. export interface BaseAudioContext {
  12784. contextId: GraphObjectId;
  12785. contextType: ContextType;
  12786. contextState: ContextState;
  12787. realtimeData?: ContextRealtimeData;
  12788. /**
  12789. * Platform-dependent callback buffer size.
  12790. */
  12791. callbackBufferSize: number;
  12792. /**
  12793. * Number of output channels supported by audio hardware in use.
  12794. */
  12795. maxOutputChannelCount: number;
  12796. /**
  12797. * Context sample rate.
  12798. */
  12799. sampleRate: number;
  12800. }
  12801. /**
  12802. * Protocol object for AudioListener
  12803. */
  12804. export interface AudioListener {
  12805. listenerId: GraphObjectId;
  12806. contextId: GraphObjectId;
  12807. }
  12808. /**
  12809. * Protocol object for AudioNode
  12810. */
  12811. export interface AudioNode {
  12812. nodeId: GraphObjectId;
  12813. contextId: GraphObjectId;
  12814. nodeType: NodeType;
  12815. numberOfInputs: number;
  12816. numberOfOutputs: number;
  12817. channelCount: number;
  12818. channelCountMode: ChannelCountMode;
  12819. channelInterpretation: ChannelInterpretation;
  12820. }
  12821. /**
  12822. * Protocol object for AudioParam
  12823. */
  12824. export interface AudioParam {
  12825. paramId: GraphObjectId;
  12826. nodeId: GraphObjectId;
  12827. contextId: GraphObjectId;
  12828. paramType: ParamType;
  12829. rate: AutomationRate;
  12830. defaultValue: number;
  12831. minValue: number;
  12832. maxValue: number;
  12833. }
  12834. export interface GetRealtimeDataRequest {
  12835. contextId: GraphObjectId;
  12836. }
  12837. export interface GetRealtimeDataResponse {
  12838. realtimeData: ContextRealtimeData;
  12839. }
  12840. /**
  12841. * Notifies that a new BaseAudioContext has been created.
  12842. */
  12843. export interface ContextCreatedEvent {
  12844. context: BaseAudioContext;
  12845. }
  12846. /**
  12847. * Notifies that an existing BaseAudioContext will be destroyed.
  12848. */
  12849. export interface ContextWillBeDestroyedEvent {
  12850. contextId: GraphObjectId;
  12851. }
  12852. /**
  12853. * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
  12854. */
  12855. export interface ContextChangedEvent {
  12856. context: BaseAudioContext;
  12857. }
  12858. /**
  12859. * Notifies that the construction of an AudioListener has finished.
  12860. */
  12861. export interface AudioListenerCreatedEvent {
  12862. listener: AudioListener;
  12863. }
  12864. /**
  12865. * Notifies that a new AudioListener has been created.
  12866. */
  12867. export interface AudioListenerWillBeDestroyedEvent {
  12868. contextId: GraphObjectId;
  12869. listenerId: GraphObjectId;
  12870. }
  12871. /**
  12872. * Notifies that a new AudioNode has been created.
  12873. */
  12874. export interface AudioNodeCreatedEvent {
  12875. node: AudioNode;
  12876. }
  12877. /**
  12878. * Notifies that an existing AudioNode has been destroyed.
  12879. */
  12880. export interface AudioNodeWillBeDestroyedEvent {
  12881. contextId: GraphObjectId;
  12882. nodeId: GraphObjectId;
  12883. }
  12884. /**
  12885. * Notifies that a new AudioParam has been created.
  12886. */
  12887. export interface AudioParamCreatedEvent {
  12888. param: AudioParam;
  12889. }
  12890. /**
  12891. * Notifies that an existing AudioParam has been destroyed.
  12892. */
  12893. export interface AudioParamWillBeDestroyedEvent {
  12894. contextId: GraphObjectId;
  12895. nodeId: GraphObjectId;
  12896. paramId: GraphObjectId;
  12897. }
  12898. /**
  12899. * Notifies that two AudioNodes are connected.
  12900. */
  12901. export interface NodesConnectedEvent {
  12902. contextId: GraphObjectId;
  12903. sourceId: GraphObjectId;
  12904. destinationId: GraphObjectId;
  12905. sourceOutputIndex?: number;
  12906. destinationInputIndex?: number;
  12907. }
  12908. /**
  12909. * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
  12910. */
  12911. export interface NodesDisconnectedEvent {
  12912. contextId: GraphObjectId;
  12913. sourceId: GraphObjectId;
  12914. destinationId: GraphObjectId;
  12915. sourceOutputIndex?: number;
  12916. destinationInputIndex?: number;
  12917. }
  12918. /**
  12919. * Notifies that an AudioNode is connected to an AudioParam.
  12920. */
  12921. export interface NodeParamConnectedEvent {
  12922. contextId: GraphObjectId;
  12923. sourceId: GraphObjectId;
  12924. destinationId: GraphObjectId;
  12925. sourceOutputIndex?: number;
  12926. }
  12927. /**
  12928. * Notifies that an AudioNode is disconnected to an AudioParam.
  12929. */
  12930. export interface NodeParamDisconnectedEvent {
  12931. contextId: GraphObjectId;
  12932. sourceId: GraphObjectId;
  12933. destinationId: GraphObjectId;
  12934. sourceOutputIndex?: number;
  12935. }
  12936. }
  12937. /**
  12938. * This domain allows configuring virtual authenticators to test the WebAuthn
  12939. * API.
  12940. */
  12941. export namespace WebAuthn {
  12942. export type AuthenticatorId = string;
  12943. export type AuthenticatorProtocol = ('u2f' | 'ctap2');
  12944. export type AuthenticatorTransport = ('usb' | 'nfc' | 'ble' | 'cable' | 'internal');
  12945. export interface VirtualAuthenticatorOptions {
  12946. protocol: AuthenticatorProtocol;
  12947. transport: AuthenticatorTransport;
  12948. /**
  12949. * Defaults to false.
  12950. */
  12951. hasResidentKey?: boolean;
  12952. /**
  12953. * Defaults to false.
  12954. */
  12955. hasUserVerification?: boolean;
  12956. /**
  12957. * If set to true, the authenticator will support the largeBlob extension.
  12958. * https://w3c.github.io/webauthn#largeBlob
  12959. * Defaults to false.
  12960. */
  12961. hasLargeBlob?: boolean;
  12962. /**
  12963. * If set to true, tests of user presence will succeed immediately.
  12964. * Otherwise, they will not be resolved. Defaults to true.
  12965. */
  12966. automaticPresenceSimulation?: boolean;
  12967. /**
  12968. * Sets whether User Verification succeeds or fails for an authenticator.
  12969. * Defaults to false.
  12970. */
  12971. isUserVerified?: boolean;
  12972. }
  12973. export interface Credential {
  12974. credentialId: string;
  12975. isResidentCredential: boolean;
  12976. /**
  12977. * Relying Party ID the credential is scoped to. Must be set when adding a
  12978. * credential.
  12979. */
  12980. rpId?: string;
  12981. /**
  12982. * The ECDSA P-256 private key in PKCS#8 format.
  12983. */
  12984. privateKey: string;
  12985. /**
  12986. * An opaque byte sequence with a maximum size of 64 bytes mapping the
  12987. * credential to a specific user.
  12988. */
  12989. userHandle?: string;
  12990. /**
  12991. * Signature counter. This is incremented by one for each successful
  12992. * assertion.
  12993. * See https://w3c.github.io/webauthn/#signature-counter
  12994. */
  12995. signCount: integer;
  12996. }
  12997. export interface AddVirtualAuthenticatorRequest {
  12998. options: VirtualAuthenticatorOptions;
  12999. }
  13000. export interface AddVirtualAuthenticatorResponse {
  13001. authenticatorId: AuthenticatorId;
  13002. }
  13003. export interface RemoveVirtualAuthenticatorRequest {
  13004. authenticatorId: AuthenticatorId;
  13005. }
  13006. export interface AddCredentialRequest {
  13007. authenticatorId: AuthenticatorId;
  13008. credential: Credential;
  13009. }
  13010. export interface GetCredentialRequest {
  13011. authenticatorId: AuthenticatorId;
  13012. credentialId: string;
  13013. }
  13014. export interface GetCredentialResponse {
  13015. credential: Credential;
  13016. }
  13017. export interface GetCredentialsRequest {
  13018. authenticatorId: AuthenticatorId;
  13019. }
  13020. export interface GetCredentialsResponse {
  13021. credentials: Credential[];
  13022. }
  13023. export interface RemoveCredentialRequest {
  13024. authenticatorId: AuthenticatorId;
  13025. credentialId: string;
  13026. }
  13027. export interface ClearCredentialsRequest {
  13028. authenticatorId: AuthenticatorId;
  13029. }
  13030. export interface SetUserVerifiedRequest {
  13031. authenticatorId: AuthenticatorId;
  13032. isUserVerified: boolean;
  13033. }
  13034. export interface SetAutomaticPresenceSimulationRequest {
  13035. authenticatorId: AuthenticatorId;
  13036. enabled: boolean;
  13037. }
  13038. }
  13039. /**
  13040. * This domain allows detailed inspection of media elements
  13041. */
  13042. export namespace Media {
  13043. /**
  13044. * Players will get an ID that is unique within the agent context.
  13045. */
  13046. export type PlayerId = string;
  13047. export type Timestamp = number;
  13048. export const enum PlayerMessageLevel {
  13049. Error = 'error',
  13050. Warning = 'warning',
  13051. Info = 'info',
  13052. Debug = 'debug',
  13053. }
  13054. /**
  13055. * Have one type per entry in MediaLogRecord::Type
  13056. * Corresponds to kMessage
  13057. */
  13058. export interface PlayerMessage {
  13059. /**
  13060. * Keep in sync with MediaLogMessageLevel
  13061. * We are currently keeping the message level 'error' separate from the
  13062. * PlayerError type because right now they represent different things,
  13063. * this one being a DVLOG(ERROR) style log message that gets printed
  13064. * based on what log level is selected in the UI, and the other is a
  13065. * representation of a media::PipelineStatus object. Soon however we're
  13066. * going to be moving away from using PipelineStatus for errors and
  13067. * introducing a new error type which should hopefully let us integrate
  13068. * the error log level into the PlayerError type. (PlayerMessageLevel enum)
  13069. */
  13070. level: ('error' | 'warning' | 'info' | 'debug');
  13071. message: string;
  13072. }
  13073. /**
  13074. * Corresponds to kMediaPropertyChange
  13075. */
  13076. export interface PlayerProperty {
  13077. name: string;
  13078. value: string;
  13079. }
  13080. /**
  13081. * Corresponds to kMediaEventTriggered
  13082. */
  13083. export interface PlayerEvent {
  13084. timestamp: Timestamp;
  13085. value: string;
  13086. }
  13087. export const enum PlayerErrorType {
  13088. Pipeline_error = 'pipeline_error',
  13089. Media_error = 'media_error',
  13090. }
  13091. /**
  13092. * Corresponds to kMediaError
  13093. */
  13094. export interface PlayerError {
  13095. /**
  13096. * (PlayerErrorType enum)
  13097. */
  13098. type: ('pipeline_error' | 'media_error');
  13099. /**
  13100. * When this switches to using media::Status instead of PipelineStatus
  13101. * we can remove "errorCode" and replace it with the fields from
  13102. * a Status instance. This also seems like a duplicate of the error
  13103. * level enum - there is a todo bug to have that level removed and
  13104. * use this instead. (crbug.com/1068454)
  13105. */
  13106. errorCode: string;
  13107. }
  13108. /**
  13109. * This can be called multiple times, and can be used to set / override /
  13110. * remove player properties. A null propValue indicates removal.
  13111. */
  13112. export interface PlayerPropertiesChangedEvent {
  13113. playerId: PlayerId;
  13114. properties: PlayerProperty[];
  13115. }
  13116. /**
  13117. * Send events as a list, allowing them to be batched on the browser for less
  13118. * congestion. If batched, events must ALWAYS be in chronological order.
  13119. */
  13120. export interface PlayerEventsAddedEvent {
  13121. playerId: PlayerId;
  13122. events: PlayerEvent[];
  13123. }
  13124. /**
  13125. * Send a list of any messages that need to be delivered.
  13126. */
  13127. export interface PlayerMessagesLoggedEvent {
  13128. playerId: PlayerId;
  13129. messages: PlayerMessage[];
  13130. }
  13131. /**
  13132. * Send a list of any errors that need to be delivered.
  13133. */
  13134. export interface PlayerErrorsRaisedEvent {
  13135. playerId: PlayerId;
  13136. errors: PlayerError[];
  13137. }
  13138. /**
  13139. * Called whenever a player is created, or when a new agent joins and recieves
  13140. * a list of active players. If an agent is restored, it will recieve the full
  13141. * list of player ids and all events again.
  13142. */
  13143. export interface PlayersCreatedEvent {
  13144. players: PlayerId[];
  13145. }
  13146. }
  13147. }
  13148. export default Protocol;