browser.webidl 1.4 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267
  1. /*
  2. * This software has been developed by TIXEO.
  3. *
  4. * Copyright (c) 2004-2024 TIXE - All Rights Reserved.
  5. *
  6. * COPYRIGHT:
  7. * This file is the property of TIXEO.
  8. * It can not be used, modified, copied without the explicit written
  9. * authorization from a mandated member of TIXEO.
  10. *
  11. * The above copyright notice and this permission notice shall be included in all
  12. * copies or substantial portions of the Software.
  13. *
  14. * WARRANTY:
  15. * This software is provided "AS IS" and any express or implied warranties,
  16. * including, but not limited to, the implied warranties of merchantability and
  17. * fitness for a particular purpose are disclaimed. In no no event shall copyright
  18. * holders be liable for any direct, indirect, incidental, special, exemplary
  19. * or consequential damages (including, but not limited to, procurement of
  20. * substitute goods or services; loss of use, data, or profits; or business
  21. * interruption) however caused and on any theory of liability, whether in
  22. * contract, strict liability, or tort (including negligence or otherwise)
  23. * arising in any way out of the use of this software, even if advised or the
  24. * possibility of such damage.
  25. *
  26. * SOURCE : https://github.com/othree/webidl.git
  27. * WEBIDL LISTING :
  28. * AbortController
  29. * AbortSignal
  30. * AbstractRange
  31. * AbstractWorker
  32. * AccessibleNode
  33. * AddonEvent
  34. * AddonManager
  35. * AnalyserNode
  36. * Animatable
  37. * Animation
  38. * AnimationEffect
  39. * AnimationEvent
  40. * AnimationFrameProvider
  41. * AnimationPlaybackEvent
  42. * AnimationTimeline
  43. * AnonymousContent
  44. * AppInfo
  45. * AppNotificationServiceOptions
  46. * APZTestData
  47. * ARIAMixin
  48. * Attr
  49. * AudioBuffer
  50. * AudioBufferSourceNode
  51. * AudioContext
  52. * AudioData
  53. * AudioDecoder
  54. * AudioDestinationNode
  55. * AudioEncoder
  56. * AudioListener
  57. * AudioNode
  58. * AudioParam
  59. * AudioParamDescriptor
  60. * AudioParamMap
  61. * AudioProcessingEvent
  62. * AudioScheduledSourceNode
  63. * AudioTrack
  64. * AudioTrackList
  65. * AudioWorklet
  66. * AudioWorkletGlobalScope
  67. * AudioWorkletNode
  68. * AudioWorkletProcessor
  69. * AutocompleteInfo
  70. * BarProp
  71. * BaseAudioContext
  72. * BaseKeyframeTypes
  73. * BasicCardPayment
  74. * BatteryManager
  75. * BeforeUnloadEvent
  76. * BiquadFilterNode
  77. * Blob
  78. * BlobEvent
  79. * BroadcastChannel
  80. * BrowserElementDictionaries
  81. * Cache
  82. * CacheStorage
  83. * CancelContentJSOptions
  84. * CanvasCaptureMediaStream
  85. * CanvasRenderingContext2D
  86. * CaretPosition
  87. * CaretStateChangedEvent
  88. * CDATASection
  89. * ChannelMergerNode
  90. * ChannelSplitterNode
  91. * CharacterData
  92. * CheckerboardReportService
  93. * ChildNode
  94. * Client
  95. * Clients
  96. * Clipboard
  97. * ClipboardEvent
  98. * CloseEvent
  99. * Comment
  100. * CompositionEvent
  101. * CompressionStream
  102. * Console
  103. * ConstantSourceNode
  104. * ContentVisibilityAutoStateChangeEvent
  105. * ConvolverNode
  106. * CreateOfferRequest
  107. * CredentialManagement
  108. * Crypto
  109. * CSPDictionaries
  110. * CSPReport
  111. * CSS
  112. * CSSAnimation
  113. * CSSConditionRule
  114. * CSSContainerRule
  115. * CSSCounterStyleRule
  116. * CSSFontFaceRule
  117. * CSSFontFeatureValuesRule
  118. * CSSFontPaletteValuesRule
  119. * CSSGroupingRule
  120. * CSSImportRule
  121. * CSSKeyframeRule
  122. * CSSKeyframesRule
  123. * CSSLayerBlockRule
  124. * CSSLayerStatementRule
  125. * CSSMediaRule
  126. * CSSMozDocumentRule
  127. * CSSNamespaceRule
  128. * CSSPageRule
  129. * CSSPropertyRule
  130. * CSSPseudoElement
  131. * CSSRule
  132. * CSSRuleList
  133. * CSSScopeRule
  134. * CSSStyleDeclaration
  135. * CSSStyleRule
  136. * CSSStyleSheet
  137. * CSSSupportsRule
  138. * CSSTransition
  139. * CustomElementRegistry
  140. * CustomEvent
  141. * DataTransfer
  142. * DataTransferItem
  143. * DataTransferItemList
  144. * DecoderDoctorNotification
  145. * DecompressionStream
  146. * DedicatedWorkerGlobalScope
  147. * DelayNode
  148. * DeviceLightEvent
  149. * DeviceMotionEvent
  150. * DeviceOrientationEvent
  151. * Directory
  152. * Document
  153. * DocumentFragment
  154. * DocumentOrShadowRoot
  155. * DocumentTimeline
  156. * DocumentType
  157. * DOMException
  158. * DOMImplementation
  159. * DOMLocalization
  160. * DOMMatrix
  161. * DOMParser
  162. * DOMPoint
  163. * DOMQuad
  164. * DOMRect
  165. * DOMRectList
  166. * DOMStringList
  167. * DOMStringMap
  168. * DOMTokenList
  169. * DragEvent
  170. * DynamicsCompressorNode
  171. * Element
  172. * ElementInternals
  173. * EncodedAudioChunk
  174. * EncodedVideoChunk
  175. * ErrorEvent
  176. * Event
  177. * EventHandler
  178. * EventListener
  179. * EventSource
  180. * EventTarget
  181. * ExtendableEvent
  182. * ExtendableMessageEvent
  183. * ExtensionAlarms
  184. * ExtensionBrowser
  185. * ExtensionBrowserSettings
  186. * ExtensionBrowserSettingsColorManagement
  187. * ExtensionDns
  188. * ExtensionEventManager
  189. * ExtensionMockAPI
  190. * ExtensionPort
  191. * ExtensionProxy
  192. * ExtensionRuntime
  193. * ExtensionScripting
  194. * ExtensionSetting
  195. * ExtensionTest
  196. * External
  197. * FailedCertSecurityInfo
  198. * FakePluginTagInit
  199. * FeaturePolicy
  200. * Fetch
  201. * FetchEvent
  202. * FetchObserver
  203. * File
  204. * FileList
  205. * FileMode
  206. * FileReader
  207. * FileReaderSync
  208. * FileSystem
  209. * FileSystemDirectoryEntry
  210. * FileSystemDirectoryHandle
  211. * FileSystemDirectoryIterator
  212. * FileSystemDirectoryReader
  213. * FileSystemEntry
  214. * FileSystemFileEntry
  215. * FileSystemFileHandle
  216. * FileSystemHandle
  217. * FileSystemSyncAccessHandle
  218. * FileSystemWritableFileStream
  219. * FinalizationRegistry
  220. * FocusEvent
  221. * FontFace
  222. * FontFaceSet
  223. * FontFaceSetLoadEvent
  224. * FontFaceSource
  225. * FormData
  226. * FormDataEvent
  227. * FragmentDirective
  228. * FrameCrashedEvent
  229. * Function
  230. * FuzzingFunctions
  231. * GainNode
  232. * Gamepad
  233. * GamepadAxisMoveEvent
  234. * GamepadButtonEvent
  235. * GamepadEvent
  236. * GamepadHapticActuator
  237. * GamepadLightIndicator
  238. * GamepadPose
  239. * GamepadServiceTest
  240. * GamepadTouch
  241. * GenericTransformStream
  242. * Geolocation
  243. * GeolocationCoordinates
  244. * GeolocationPosition
  245. * GeolocationPositionError
  246. * GeometryUtils
  247. * GetUserMediaRequest
  248. * Glean
  249. * GleanMetrics
  250. * GleanPings
  251. * GPUUncapturedErrorEvent
  252. * HashChangeEvent
  253. * Headers
  254. * Highlight
  255. * History
  256. * HTMLAllCollection
  257. * HTMLAnchorElement
  258. * HTMLAreaElement
  259. * HTMLAudioElement
  260. * HTMLBaseElement
  261. * HTMLBodyElement
  262. * HTMLBRElement
  263. * HTMLButtonElement
  264. * HTMLCanvasElement
  265. * HTMLCollection
  266. * HTMLDataElement
  267. * HTMLDataListElement
  268. * HTMLDetailsElement
  269. * HTMLDialogElement
  270. * HTMLDirectoryElement
  271. * HTMLDivElement
  272. * HTMLDListElement
  273. * HTMLDocument
  274. * HTMLElement
  275. * HTMLEmbedElement
  276. * HTMLFieldSetElement
  277. * HTMLFontElement
  278. * HTMLFormControlsCollection
  279. * HTMLFormElement
  280. * HTMLFrameElement
  281. * HTMLFrameSetElement
  282. * HTMLHeadElement
  283. * HTMLHeadingElement
  284. * HTMLHRElement
  285. * HTMLHtmlElement
  286. * HTMLHyperlinkElementUtils
  287. * HTMLIFrameElement
  288. * HTMLImageElement
  289. * HTMLInputElement
  290. * HTMLLabelElement
  291. * HTMLLegendElement
  292. * HTMLLIElement
  293. * HTMLLinkElement
  294. * HTMLMapElement
  295. * HTMLMarqueeElement
  296. * HTMLMediaElement
  297. * HTMLMenuElement
  298. * HTMLMetaElement
  299. * HTMLMeterElement
  300. * HTMLModElement
  301. * HTMLObjectElement
  302. * HTMLOListElement
  303. * HTMLOptGroupElement
  304. * HTMLOptionElement
  305. * HTMLOptionsCollection
  306. * HTMLOutputElement
  307. * HTMLParagraphElement
  308. * HTMLParamElement
  309. * HTMLPictureElement
  310. * HTMLPreElement
  311. * HTMLProgressElement
  312. * HTMLQuoteElement
  313. * HTMLScriptElement
  314. * HTMLSelectElement
  315. * HTMLSlotElement
  316. * HTMLSourceElement
  317. * HTMLSpanElement
  318. * HTMLStyleElement
  319. * HTMLTableCaptionElement
  320. * HTMLTableCellElement
  321. * HTMLTableColElement
  322. * HTMLTableElement
  323. * HTMLTableRowElement
  324. * HTMLTableSectionElement
  325. * HTMLTemplateElement
  326. * HTMLTextAreaElement
  327. * HTMLTimeElement
  328. * HTMLTitleElement
  329. * HTMLTrackElement
  330. * HTMLUListElement
  331. * HTMLVideoElement
  332. * IDBCursor
  333. * IDBDatabase
  334. * IDBFactory
  335. * IDBIndex
  336. * IDBKeyRange
  337. * IDBObjectStore
  338. * IDBOpenDBRequest
  339. * IDBRequest
  340. * IDBTransaction
  341. * IDBVersionChangeEvent
  342. * IdentityCredential
  343. * IdleDeadline
  344. * IIRFilterNode
  345. * ImageBitmap
  346. * ImageBitmapRenderingContext
  347. * ImageCapture
  348. * ImageCaptureErrorEvent
  349. * ImageData
  350. * ImageDocument
  351. * InputEvent
  352. * InstallTrigger
  353. * IntersectionObserver
  354. * IntlUtils
  355. * InvokeEvent
  356. * InvokerElement
  357. * IterableIterator
  358. * KeyAlgorithm
  359. * KeyboardEvent
  360. * KeyEvent
  361. * KeyframeAnimationOptions
  362. * KeyframeEffect
  363. * KeyIdsInitData
  364. * LinkStyle
  365. * Localization
  366. * Location
  367. * Lock
  368. * LockManager
  369. * MathMLElement
  370. * MediaCapabilities
  371. * MediaDebugInfo
  372. * MediaDeviceInfo
  373. * MediaDevices
  374. * MediaElementAudioSourceNode
  375. * MediaEncryptedEvent
  376. * MediaError
  377. * MediaKeyError
  378. * MediaKeyMessageEvent
  379. * MediaKeys
  380. * MediaKeySession
  381. * MediaKeysRequestStatus
  382. * MediaKeyStatusMap
  383. * MediaKeySystemAccess
  384. * MediaList
  385. * MediaQueryList
  386. * MediaQueryListEvent
  387. * MediaRecorder
  388. * MediaRecorderErrorEvent
  389. * MediaSession
  390. * MediaSource
  391. * MediaStream
  392. * MediaStreamAudioDestinationNode
  393. * MediaStreamAudioSourceNode
  394. * MediaStreamError
  395. * MediaStreamEvent
  396. * MediaStreamTrack
  397. * MediaStreamTrackAudioSourceNode
  398. * MediaStreamTrackEvent
  399. * MediaTrackSettings
  400. * MediaTrackSupportedConstraints
  401. * MerchantValidationEvent
  402. * MessageChannel
  403. * MessageEvent
  404. * MessagePort
  405. * MIDIAccess
  406. * MIDIConnectionEvent
  407. * MIDIInput
  408. * MIDIInputMap
  409. * MIDIMessageEvent
  410. * MIDIOptions
  411. * MIDIOutput
  412. * MIDIOutputMap
  413. * MIDIPort
  414. * MimeType
  415. * MimeTypeArray
  416. * MouseEvent
  417. * MouseScrollEvent
  418. * MozApplicationEvent
  419. * MozFrameLoaderOwner
  420. * MutationEvent
  421. * MutationObserver
  422. * NamedNodeMap
  423. * NavigationPreloadManager
  424. * Navigator
  425. * NetErrorInfo
  426. * NetworkInformation
  427. * NetworkOptions
  428. * Node
  429. * NodeFilter
  430. * NodeIterator
  431. * NodeList
  432. * NonElementParentNode
  433. * Notification
  434. * NotificationEvent
  435. * NotifyPaintEvent
  436. * OfflineAudioCompletionEvent
  437. * OfflineAudioContext
  438. * OffscreenCanvas
  439. * OffscreenCanvasRenderingContext2D
  440. * OscillatorNode
  441. * PageTransitionEvent
  442. * PaintRequest
  443. * PaintRequestList
  444. * PaintWorkletGlobalScope
  445. * PannerNode
  446. * ParentNode
  447. * PaymentAddress
  448. * PaymentMethodChangeEvent
  449. * PaymentRequest
  450. * PaymentRequestUpdateEvent
  451. * PaymentResponse
  452. * PeerConnectionImpl
  453. * PeerConnectionObserver
  454. * PeerConnectionObserverEnums
  455. * Performance
  456. * PerformanceEntry
  457. * PerformanceEntryEvent
  458. * PerformanceEventTiming
  459. * PerformanceLargestContentfulPaint
  460. * PerformanceMark
  461. * PerformanceMeasure
  462. * PerformanceNavigation
  463. * PerformanceNavigationTiming
  464. * PerformanceObserver
  465. * PerformanceObserverEntryList
  466. * PerformancePaintTiming
  467. * PerformanceResourceTiming
  468. * PerformanceServerTiming
  469. * PerformanceTiming
  470. * PeriodicWave
  471. * Permissions
  472. * PermissionStatus
  473. * Plugin
  474. * PluginArray
  475. * PointerEvent
  476. * PopoverInvokerElement
  477. * PopStateEvent
  478. * PopupBlockedEvent
  479. * PositionStateEvent
  480. * ProcessingInstruction
  481. * ProgressEvent
  482. * Promise
  483. * PromiseRejectionEvent
  484. * PushEvent
  485. * PushManager
  486. * PushMessageData
  487. * PushSubscription
  488. * PushSubscriptionOptions
  489. * QueuingStrategy
  490. * RadioNodeList
  491. * Range
  492. * ReadableByteStreamController
  493. * ReadableStream
  494. * ReadableStreamBYOBReader
  495. * ReadableStreamBYOBRequest
  496. * ReadableStreamDefaultController
  497. * ReadableStreamDefaultReader
  498. * ReferrerPolicy
  499. * Reporting
  500. * Request
  501. * ResizeObserver
  502. * Response
  503. * RTCCertificate
  504. * RTCConfiguration
  505. * RTCDataChannel
  506. * RTCDataChannelEvent
  507. * RTCDtlsTransport
  508. * RTCDTMFSender
  509. * RTCDTMFToneChangeEvent
  510. * RTCEncodedAudioFrame
  511. * RTCEncodedVideoFrame
  512. * RTCIceCandidate
  513. * RTCIceTransport
  514. * RTCIdentityAssertion
  515. * RTCIdentityProvider
  516. * RTCPeerConnection
  517. * RTCPeerConnectionIceEvent
  518. * RTCPeerConnectionStatic
  519. * RTCRtpCapabilities
  520. * RTCRtpParameters
  521. * RTCRtpReceiver
  522. * RTCRtpScriptTransform
  523. * RTCRtpScriptTransformer
  524. * RTCRtpSender
  525. * RTCRtpSources
  526. * RTCRtpTransceiver
  527. * RTCSctpTransport
  528. * RTCSessionDescription
  529. * RTCStatsReport
  530. * RTCTrackEvent
  531. * RTCTransformEvent
  532. * Sanitizer
  533. * Screen
  534. * ScreenOrientation
  535. * ScriptProcessorNode
  536. * ScrollAreaEvent
  537. * ScrollViewChangeEvent
  538. * SecurityPolicyViolationEvent
  539. * Selection
  540. * ServiceWorker
  541. * ServiceWorkerContainer
  542. * ServiceWorkerGlobalScope
  543. * ServiceWorkerRegistration
  544. * ShadowRealmGlobalScope
  545. * ShadowRoot
  546. * SharedWorker
  547. * SharedWorkerGlobalScope
  548. * SimpleGestureEvent
  549. * SocketCommon
  550. * SourceBuffer
  551. * SourceBufferList
  552. * SpeechGrammar
  553. * SpeechGrammarList
  554. * SpeechRecognition
  555. * SpeechRecognitionAlternative
  556. * SpeechRecognitionError
  557. * SpeechRecognitionEvent
  558. * SpeechRecognitionResult
  559. * SpeechRecognitionResultList
  560. * SpeechSynthesis
  561. * SpeechSynthesisErrorEvent
  562. * SpeechSynthesisEvent
  563. * SpeechSynthesisUtterance
  564. * SpeechSynthesisVoice
  565. * StaticRange
  566. * StereoPannerNode
  567. * Storage
  568. * StorageEvent
  569. * StorageManager
  570. * StreamFilter
  571. * StreamFilterDataEvent
  572. * StructuredCloneTester
  573. * StyleSheet
  574. * StyleSheetList
  575. * SubmitEvent
  576. * SubtleCrypto
  577. * SVGAElement
  578. * SVGAngle
  579. * SVGAnimatedAngle
  580. * SVGAnimatedBoolean
  581. * SVGAnimatedEnumeration
  582. * SVGAnimatedInteger
  583. * SVGAnimatedLength
  584. * SVGAnimatedLengthList
  585. * SVGAnimatedNumber
  586. * SVGAnimatedNumberList
  587. * SVGAnimatedPathData
  588. * SVGAnimatedPoints
  589. * SVGAnimatedPreserveAspectRatio
  590. * SVGAnimatedRect
  591. * SVGAnimatedString
  592. * SVGAnimatedTransformList
  593. * SVGAnimateElement
  594. * SVGAnimateMotionElement
  595. * SVGAnimateTransformElement
  596. * SVGAnimationElement
  597. * SVGCircleElement
  598. * SVGClipPathElement
  599. * SVGComponentTransferFunctionElement
  600. * SVGDefsElement
  601. * SVGDescElement
  602. * SVGElement
  603. * SVGEllipseElement
  604. * SVGFEBlendElement
  605. * SVGFEColorMatrixElement
  606. * SVGFEComponentTransferElement
  607. * SVGFECompositeElement
  608. * SVGFEConvolveMatrixElement
  609. * SVGFEDiffuseLightingElement
  610. * SVGFEDisplacementMapElement
  611. * SVGFEDistantLightElement
  612. * SVGFEDropShadowElement
  613. * SVGFEFloodElement
  614. * SVGFEFuncAElement
  615. * SVGFEFuncBElement
  616. * SVGFEFuncGElement
  617. * SVGFEFuncRElement
  618. * SVGFEGaussianBlurElement
  619. * SVGFEImageElement
  620. * SVGFEMergeElement
  621. * SVGFEMergeNodeElement
  622. * SVGFEMorphologyElement
  623. * SVGFEOffsetElement
  624. * SVGFEPointLightElement
  625. * SVGFESpecularLightingElement
  626. * SVGFESpotLightElement
  627. * SVGFETileElement
  628. * SVGFETurbulenceElement
  629. * SVGFilterElement
  630. * SVGFilterPrimitiveStandardAttributes
  631. * SVGFitToViewBox
  632. * SVGForeignObjectElement
  633. * SVGGElement
  634. * SVGGeometryElement
  635. * SVGGradientElement
  636. * SVGGraphicsElement
  637. * SVGImageElement
  638. * SVGLength
  639. * SVGLengthList
  640. * SVGLinearGradientElement
  641. * SVGLineElement
  642. * SVGMarkerElement
  643. * SVGMaskElement
  644. * SVGMatrix
  645. * SVGMetadataElement
  646. * SVGMPathElement
  647. * SVGNumber
  648. * SVGNumberList
  649. * SVGPathElement
  650. * SVGPathSeg
  651. * SVGPathSegList
  652. * SVGPatternElement
  653. * SVGPoint
  654. * SVGPointList
  655. * SVGPolygonElement
  656. * SVGPolylineElement
  657. * SVGPreserveAspectRatio
  658. * SVGRadialGradientElement
  659. * SVGRect
  660. * SVGRectElement
  661. * SVGScriptElement
  662. * SVGSetElement
  663. * SVGStopElement
  664. * SVGStringList
  665. * SVGStyleElement
  666. * SVGSVGElement
  667. * SVGSwitchElement
  668. * SVGSymbolElement
  669. * SVGTests
  670. * SVGTextContentElement
  671. * SVGTextElement
  672. * SVGTextPathElement
  673. * SVGTextPositioningElement
  674. * SVGTitleElement
  675. * SVGTransform
  676. * SVGTransformList
  677. * SVGTSpanElement
  678. * SVGUnitTypes
  679. * SVGURIReference
  680. * SVGUseElement
  681. * SVGViewElement
  682. * SVGZoomAndPan
  683. * TaskPriorityChangeEvent
  684. * TCPServerSocket
  685. * TCPServerSocketEvent
  686. * TCPSocket
  687. * TCPSocketErrorEvent
  688. * TCPSocketEvent
  689. * TestFunctions
  690. * TestInterfaceJS
  691. * TestInterfaceJSDictionaries
  692. * TestInterfaceJSMaplikeSetlikeIterable
  693. * TestInterfaceObservableArray
  694. * TestUtils
  695. * Text
  696. * TextClause
  697. * TextDecoder
  698. * TextDecoderStream
  699. * TextEncoder
  700. * TextEncoderStream
  701. * TextTrack
  702. * TextTrackCue
  703. * TextTrackCueList
  704. * TextTrackList
  705. * TimeEvent
  706. * TimeRanges
  707. * ToggleEvent
  708. * Touch
  709. * TouchEvent
  710. * TouchList
  711. * TrackEvent
  712. * Transformer
  713. * TransformStream
  714. * TransformStreamDefaultController
  715. * TransitionEvent
  716. * TreeWalker
  717. * TrustedTypes
  718. * UDPMessageEvent
  719. * UDPSocket
  720. * UIEvent
  721. * UnderlyingSink
  722. * UnderlyingSource
  723. * URL
  724. * URLSearchParams
  725. * UserActivation
  726. * UserProximityEvent
  727. * ValidityState
  728. * VideoColorSpace
  729. * VideoDecoder
  730. * VideoEncoder
  731. * VideoFrame
  732. * VideoPlaybackQuality
  733. * VideoTrack
  734. * VideoTrackList
  735. * VisualViewport
  736. * VRDisplay
  737. * VRDisplayEvent
  738. * VRServiceTest
  739. * VTTCue
  740. * VTTRegion
  741. * WakeLock
  742. * WakeLockSentinel
  743. * WaveShaperNode
  744. * WebAuthentication
  745. * WebGL2RenderingContext
  746. * WebGLContextEvent
  747. * WebGLRenderingContext
  748. * WebGPU
  749. * WebrtcGlobalInformation
  750. * WebSocket
  751. * WebTaskScheduling
  752. * WebTransport
  753. * WebTransportDatagramDuplexStream
  754. * WebTransportError
  755. * WebTransportSendReceiveStream
  756. * WebXR
  757. * WheelEvent
  758. * Window
  759. * WindowOrWorkerGlobalScope
  760. * Worker
  761. * WorkerDebuggerGlobalScope
  762. * WorkerGlobalScope
  763. * WorkerLocation
  764. * WorkerNavigator
  765. * WorkerTestUtils
  766. * Worklet
  767. * WorkletGlobalScope
  768. * WritableStream
  769. * WritableStreamDefaultController
  770. * WritableStreamDefaultWriter
  771. * XMLDocument
  772. * XMLHttpRequest
  773. * XMLHttpRequestEventTarget
  774. * XMLHttpRequestUpload
  775. * XMLSerializer
  776. * XPathEvaluator
  777. * XPathExpression
  778. * XPathNSResolver
  779. * XPathResult
  780. * XRInputSourceEvent
  781. * XRInputSourcesChangeEvent
  782. * XRReferenceSpaceEvent
  783. * XRSessionEvent
  784. * XSLTProcessor
  785. */
  786. /* ---------------------- AbortController ----------------------------- */
  787. /* ./webidl/AbortController.webidl */
  788. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  789. /* This Source Code Form is subject to the terms of the Mozilla Public
  790. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  791. * You can obtain one at http://mozilla.org/MPL/2.0/.
  792. *
  793. * The origin of this IDL file is
  794. * https://dom.spec.whatwg.org/#abortcontroller
  795. */
  796. [Exposed=*]
  797. interface AbortController {
  798. [Throws]
  799. constructor();
  800. [SameObject] readonly attribute AbortSignal signal;
  801. undefined abort(optional any reason);
  802. };
  803. /* ---------------------- AbortSignal ----------------------------- */
  804. /* ./webidl/AbortSignal.webidl */
  805. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  806. /* This Source Code Form is subject to the terms of the Mozilla Public
  807. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  808. * You can obtain one at http://mozilla.org/MPL/2.0/.
  809. *
  810. * The origin of this IDL file is
  811. * https://dom.spec.whatwg.org/#abortsignal
  812. */
  813. [Exposed=*]
  814. interface AbortSignal : EventTarget {
  815. [NewObject] static AbortSignal abort(optional any reason);
  816. [Exposed=(Window,Worker), NewObject, Throws]
  817. static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
  818. [NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
  819. readonly attribute boolean aborted;
  820. readonly attribute any reason;
  821. [Throws] undefined throwIfAborted();
  822. attribute EventHandler onabort;
  823. };
  824. /* ---------------------- AbstractRange ----------------------------- */
  825. /* ./webidl/AbstractRange.webidl */
  826. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  827. /* This Source Code Form is subject to the terms of the Mozilla Public
  828. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  829. * You can obtain one at http://mozilla.org/MPL/2.0/.
  830. *
  831. * The origin of this IDL file is
  832. * https://dom.spec.whatwg.org/#abstractrange
  833. *
  834. * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C
  835. * liability, trademark and document use rules apply.
  836. */
  837. [Exposed=Window]
  838. interface AbstractRange {
  839. [BinaryName="GetStartContainer"]
  840. readonly attribute Node startContainer;
  841. readonly attribute unsigned long startOffset;
  842. [BinaryName="GetEndContainer"]
  843. readonly attribute Node endContainer;
  844. readonly attribute unsigned long endOffset;
  845. readonly attribute boolean collapsed;
  846. };
  847. /* ---------------------- AbstractWorker ----------------------------- */
  848. /* ./webidl/AbstractWorker.webidl */
  849. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  850. /* This Source Code Form is subject to the terms of the Mozilla Public
  851. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  852. * You can obtain one at http://mozilla.org/MPL/2.0/.
  853. */
  854. [Exposed=(Window,Worker)]
  855. interface mixin AbstractWorker {
  856. attribute EventHandler onerror;
  857. };
  858. /* ---------------------- AccessibleNode ----------------------------- */
  859. /* ./webidl/AccessibleNode.webidl */
  860. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  861. /* This Source Code Form is subject to the terms of the Mozilla Public
  862. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  863. * You can obtain one at http://mozilla.org/MPL/2.0/.
  864. */
  865. [Func="mozilla::dom::AccessibleNode::IsAOMEnabled",
  866. Exposed=Window]
  867. interface AccessibleNode {
  868. readonly attribute DOMString computedRole;
  869. [Frozen, Cached, Pure]
  870. readonly attribute sequence<DOMString> states;
  871. [Frozen, Cached, Pure]
  872. readonly attribute sequence<DOMString> attributes;
  873. readonly attribute Node? DOMNode;
  874. boolean is(DOMString... states);
  875. boolean has(DOMString... attributes);
  876. [Throws]
  877. any get(DOMString attribute);
  878. attribute DOMString? role;
  879. attribute DOMString? roleDescription;
  880. // Accessible label and descriptor
  881. attribute DOMString? label;
  882. // Global states and properties
  883. attribute DOMString? current;
  884. // Accessible properties
  885. attribute DOMString? autocomplete;
  886. attribute DOMString? keyShortcuts;
  887. attribute boolean? modal;
  888. attribute boolean? multiline;
  889. attribute boolean? multiselectable;
  890. attribute DOMString? orientation;
  891. attribute boolean? readOnly;
  892. attribute boolean? required;
  893. attribute DOMString? sort;
  894. // Range values
  895. attribute DOMString? placeholder;
  896. attribute double? valueMax;
  897. attribute double? valueMin;
  898. attribute double? valueNow;
  899. attribute DOMString? valueText;
  900. // Accessible states
  901. attribute DOMString? checked;
  902. attribute boolean? disabled;
  903. attribute boolean? expanded;
  904. attribute DOMString? hasPopUp;
  905. attribute boolean? hidden;
  906. attribute DOMString? invalid;
  907. attribute DOMString? pressed;
  908. attribute boolean? selected;
  909. // Live regions
  910. attribute boolean? atomic;
  911. attribute boolean? busy;
  912. attribute DOMString? live;
  913. attribute DOMString? relevant;
  914. // Other relationships
  915. attribute AccessibleNode? activeDescendant;
  916. attribute AccessibleNode? details;
  917. attribute AccessibleNode? errorMessage;
  918. // Collections.
  919. attribute long? colCount;
  920. attribute unsigned long? colIndex;
  921. attribute unsigned long? colSpan;
  922. attribute unsigned long? level;
  923. attribute unsigned long? posInSet;
  924. attribute long? rowCount;
  925. attribute unsigned long? rowIndex;
  926. attribute unsigned long? rowSpan;
  927. attribute long? setSize;
  928. };
  929. /* ---------------------- AddonEvent ----------------------------- */
  930. /* ./webidl/AddonEvent.webidl */
  931. /* This Source Code Form is subject to the terms of the Mozilla Public
  932. * License, v. 2.0. If a copy of the MPL was not distributed with this
  933. * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
  934. [Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
  935. Exposed=Window]
  936. interface AddonEvent : Event {
  937. constructor(DOMString type, AddonEventInit eventInitDict);
  938. readonly attribute DOMString id;
  939. };
  940. dictionary AddonEventInit : EventInit {
  941. required DOMString id;
  942. };
  943. /* ---------------------- AddonManager ----------------------------- */
  944. /* ./webidl/AddonManager.webidl */
  945. /* This Source Code Form is subject to the terms of the Mozilla Public
  946. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  947. * You can obtain one at http://mozilla.org/MPL/2.0/.
  948. */
  949. /* We need a JSImplementation but cannot get one without a contract ID.
  950. Since Addon and AddonInstall are only ever created from JS they don't need
  951. real contract IDs. */
  952. [ChromeOnly, JSImplementation="dummy",
  953. Exposed=Window]
  954. interface Addon {
  955. // The add-on's ID.
  956. readonly attribute DOMString id;
  957. // The add-on's version.
  958. readonly attribute DOMString version;
  959. // The add-on's type (extension, theme, etc.).
  960. readonly attribute DOMString type;
  961. // The add-on's name in the current locale.
  962. readonly attribute DOMString name;
  963. // The add-on's description in the current locale.
  964. readonly attribute DOMString description;
  965. // If the user has enabled this add-on, note that it still may not be running
  966. // depending on whether enabling requires a restart or if the add-on is
  967. // incompatible in some way.
  968. readonly attribute boolean isEnabled;
  969. // If the add-on is currently active in the browser.
  970. readonly attribute boolean isActive;
  971. // If the add-on may be uninstalled
  972. readonly attribute boolean canUninstall;
  973. Promise<boolean> uninstall();
  974. Promise<undefined> setEnabled(boolean value);
  975. };
  976. [ChromeOnly, JSImplementation="dummy",
  977. Exposed=Window]
  978. interface AddonInstall : EventTarget {
  979. // One of the STATE_* symbols from AddonManager.sys.mjs
  980. readonly attribute DOMString state;
  981. // One of the ERROR_* symbols from AddonManager.sys.mjs, or null
  982. readonly attribute DOMString? error;
  983. // How many bytes have been downloaded
  984. readonly attribute long long progress;
  985. // How many total bytes will need to be downloaded or -1 if unknown
  986. readonly attribute long long maxProgress;
  987. Promise<undefined> install();
  988. Promise<undefined> cancel();
  989. };
  990. dictionary addonInstallOptions {
  991. required DOMString url;
  992. // If a non-empty string is passed for "hash", it is used to verify the
  993. // checksum of the downloaded XPI before installing. If is omitted or if
  994. // it is null or empty string, no checksum verification is performed.
  995. DOMString? hash = null;
  996. };
  997. [HeaderFile="mozilla/AddonManagerWebAPI.h",
  998. Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
  999. JSImplementation="@mozilla.org/addon-web-api/manager;1",
  1000. WantsEventListenerHooks,
  1001. Exposed=Window]
  1002. interface AddonManager : EventTarget {
  1003. /**
  1004. * Gets information about an add-on
  1005. *
  1006. * @param id
  1007. * The ID of the add-on to test for.
  1008. * @return A promise. It will resolve to an Addon if the add-on is installed.
  1009. */
  1010. Promise<Addon> getAddonByID(DOMString id);
  1011. /**
  1012. * Creates an AddonInstall object for a given URL.
  1013. *
  1014. * @param options
  1015. * Only one supported option: 'url', the URL of the addon to install.
  1016. * @return A promise that resolves to an instance of AddonInstall.
  1017. */
  1018. Promise<AddonInstall> createInstall(optional addonInstallOptions options = {});
  1019. /**
  1020. * Opens an Abuse Report dialog window for the addon with the given id.
  1021. * The addon may be currently installed (in which case the report will
  1022. * include the details available locally), or not (in which case the report
  1023. * will include the details that can be retrieved from the AMO API endpoint).
  1024. *
  1025. * @param id
  1026. * The ID of the add-on to report.
  1027. * @return A promise that resolves to a boolean (true when the report
  1028. * has been submitted successfully, false if the user cancelled
  1029. * the report). The Promise is rejected is the report fails
  1030. * for a reason other than user cancellation.
  1031. */
  1032. Promise<boolean> reportAbuse(DOMString id);
  1033. // Indicator to content whether handing off the reports to the integrated
  1034. // abuse report panel is enabled.
  1035. readonly attribute boolean abuseReportPanelEnabled;
  1036. };
  1037. [ChromeOnly,Exposed=Window,HeaderFile="mozilla/AddonManagerWebAPI.h"]
  1038. namespace AddonManagerPermissions {
  1039. boolean isHostPermitted(DOMString host);
  1040. };
  1041. /* ---------------------- AnalyserNode ----------------------------- */
  1042. /* ./webidl/AnalyserNode.webidl */
  1043. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1044. /* This Source Code Form is subject to the terms of the Mozilla Public
  1045. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1046. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1047. *
  1048. * The origin of this IDL file is
  1049. * https://webaudio.github.io/web-audio-api/
  1050. *
  1051. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1052. * liability, trademark and document use rules apply.
  1053. */
  1054. dictionary AnalyserOptions : AudioNodeOptions {
  1055. unsigned long fftSize = 2048;
  1056. double maxDecibels = -30;
  1057. double minDecibels = -100;
  1058. double smoothingTimeConstant = 0.8;
  1059. };
  1060. [Pref="dom.webaudio.enabled",
  1061. Exposed=Window]
  1062. interface AnalyserNode : AudioNode {
  1063. [Throws]
  1064. constructor(BaseAudioContext context,
  1065. optional AnalyserOptions options = {});
  1066. // Real-time frequency-domain data
  1067. undefined getFloatFrequencyData(Float32Array array);
  1068. undefined getByteFrequencyData(Uint8Array array);
  1069. // Real-time waveform data
  1070. undefined getFloatTimeDomainData(Float32Array array);
  1071. undefined getByteTimeDomainData(Uint8Array array);
  1072. [SetterThrows, Pure]
  1073. attribute unsigned long fftSize;
  1074. [Pure]
  1075. readonly attribute unsigned long frequencyBinCount;
  1076. [SetterThrows, Pure]
  1077. attribute double minDecibels;
  1078. [SetterThrows, Pure]
  1079. attribute double maxDecibels;
  1080. [SetterThrows, Pure]
  1081. attribute double smoothingTimeConstant;
  1082. };
  1083. // Mozilla extension
  1084. AnalyserNode includes AudioNodePassThrough;
  1085. /* ---------------------- Animatable ----------------------------- */
  1086. /* ./webidl/Animatable.webidl */
  1087. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1088. /* This Source Code Form is subject to the terms of the Mozilla Public
  1089. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1090. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1091. *
  1092. * The origin of this IDL file is
  1093. * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
  1094. *
  1095. * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1096. * liability, trademark and document use rules apply.
  1097. */
  1098. dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
  1099. DOMString id = "";
  1100. };
  1101. dictionary GetAnimationsOptions {
  1102. boolean subtree = false;
  1103. };
  1104. interface mixin Animatable {
  1105. [Throws]
  1106. Animation animate(object? keyframes,
  1107. optional UnrestrictedDoubleOrKeyframeAnimationOptions options = {});
  1108. sequence<Animation> getAnimations(optional GetAnimationsOptions options = {});
  1109. };
  1110. /* ---------------------- Animation ----------------------------- */
  1111. /* ./webidl/Animation.webidl */
  1112. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1113. /* This Source Code Form is subject to the terms of the Mozilla Public
  1114. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1115. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1116. *
  1117. * The origin of this IDL file is
  1118. * https://drafts.csswg.org/web-animations/#animation
  1119. *
  1120. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1121. * liability, trademark and document use rules apply.
  1122. */
  1123. enum AnimationPlayState { "idle", "running", "paused", "finished" };
  1124. enum AnimationReplaceState { "active", "removed", "persisted" };
  1125. [Exposed=Window]
  1126. interface Animation : EventTarget {
  1127. [Throws]
  1128. constructor(optional AnimationEffect? effect = null,
  1129. optional AnimationTimeline? timeline);
  1130. attribute DOMString id;
  1131. [Pure]
  1132. attribute AnimationEffect? effect;
  1133. // Bug 1676794. Drop BinaryName once we support ScrollTimeline interface.
  1134. [Func="Document::AreWebAnimationsTimelinesEnabled",
  1135. BinaryName="timelineFromJS"]
  1136. attribute AnimationTimeline? timeline;
  1137. [BinaryName="startTimeAsDouble"]
  1138. attribute double? startTime;
  1139. [SetterThrows, BinaryName="currentTimeAsDouble"]
  1140. attribute double? currentTime;
  1141. attribute double playbackRate;
  1142. [BinaryName="playStateFromJS"]
  1143. readonly attribute AnimationPlayState playState;
  1144. [BinaryName="pendingFromJS"]
  1145. readonly attribute boolean pending;
  1146. readonly attribute AnimationReplaceState replaceState;
  1147. [Throws]
  1148. readonly attribute Promise<Animation> ready;
  1149. [Throws]
  1150. readonly attribute Promise<Animation> finished;
  1151. attribute EventHandler onfinish;
  1152. attribute EventHandler oncancel;
  1153. attribute EventHandler onremove;
  1154. undefined cancel();
  1155. [Throws]
  1156. undefined finish();
  1157. [Throws, BinaryName="playFromJS"]
  1158. undefined play();
  1159. [Throws, BinaryName="pauseFromJS"]
  1160. undefined pause();
  1161. undefined updatePlaybackRate (double playbackRate);
  1162. [Throws]
  1163. undefined reverse();
  1164. undefined persist();
  1165. [CEReactions, Throws]
  1166. undefined commitStyles();
  1167. };
  1168. // Non-standard extensions
  1169. partial interface Animation {
  1170. [ChromeOnly] readonly attribute boolean isRunningOnCompositor;
  1171. };
  1172. /* ---------------------- AnimationEffect ----------------------------- */
  1173. /* ./webidl/AnimationEffect.webidl */
  1174. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1175. /* This Source Code Form is subject to the terms of the Mozilla Public
  1176. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1177. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1178. *
  1179. * The origin of this IDL file is
  1180. * https://drafts.csswg.org/web-animations/#animationeffectreadonly
  1181. *
  1182. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1183. * liability, trademark and document use rules apply.
  1184. */
  1185. enum FillMode {
  1186. "none",
  1187. "forwards",
  1188. "backwards",
  1189. "both",
  1190. "auto"
  1191. };
  1192. enum PlaybackDirection {
  1193. "normal",
  1194. "reverse",
  1195. "alternate",
  1196. "alternate-reverse"
  1197. };
  1198. dictionary EffectTiming {
  1199. double delay = 0.0;
  1200. double endDelay = 0.0;
  1201. FillMode fill = "auto";
  1202. double iterationStart = 0.0;
  1203. unrestricted double iterations = 1.0;
  1204. (unrestricted double or DOMString) duration = "auto";
  1205. PlaybackDirection direction = "normal";
  1206. UTF8String easing = "linear";
  1207. };
  1208. dictionary OptionalEffectTiming {
  1209. double delay;
  1210. double endDelay;
  1211. FillMode fill;
  1212. double iterationStart;
  1213. unrestricted double iterations;
  1214. (unrestricted double or DOMString) duration;
  1215. PlaybackDirection direction;
  1216. UTF8String easing;
  1217. };
  1218. dictionary ComputedEffectTiming : EffectTiming {
  1219. unrestricted double endTime = 0.0;
  1220. unrestricted double activeDuration = 0.0;
  1221. double? localTime = null;
  1222. double? progress = null;
  1223. unrestricted double? currentIteration = null;
  1224. };
  1225. [Exposed=Window]
  1226. interface AnimationEffect {
  1227. EffectTiming getTiming();
  1228. [BinaryName="getComputedTimingAsDict"]
  1229. ComputedEffectTiming getComputedTiming();
  1230. [Throws]
  1231. undefined updateTiming(optional OptionalEffectTiming timing = {});
  1232. };
  1233. /* ---------------------- AnimationEvent ----------------------------- */
  1234. /* ./webidl/AnimationEvent.webidl */
  1235. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1236. /* This Source Code Form is subject to the terms of the Mozilla Public
  1237. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1238. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1239. *
  1240. * The origin of this IDL file is
  1241. * http://www.w3.org/TR/css3-animations/#animation-events-
  1242. * http://dev.w3.org/csswg/css3-animations/#animation-events-
  1243. *
  1244. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1245. * liability, trademark and document use rules apply.
  1246. */
  1247. [Exposed=Window]
  1248. interface AnimationEvent : Event {
  1249. constructor(DOMString type, optional AnimationEventInit eventInitDict = {});
  1250. readonly attribute DOMString animationName;
  1251. readonly attribute float elapsedTime;
  1252. readonly attribute DOMString pseudoElement;
  1253. };
  1254. dictionary AnimationEventInit : EventInit {
  1255. DOMString animationName = "";
  1256. float elapsedTime = 0;
  1257. DOMString pseudoElement = "";
  1258. };
  1259. /* ---------------------- AnimationFrameProvider ----------------------------- */
  1260. /* ./webidl/AnimationFrameProvider.webidl */
  1261. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1262. /* This Source Code Form is subject to the terms of the Mozilla Public
  1263. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1264. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1265. *
  1266. * The origin of this IDL file is
  1267. * https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
  1268. */
  1269. callback FrameRequestCallback = undefined (DOMHighResTimeStamp time);
  1270. interface mixin AnimationFrameProvider {
  1271. [Throws] long requestAnimationFrame(FrameRequestCallback callback);
  1272. [Throws] undefined cancelAnimationFrame(long handle);
  1273. };
  1274. /* ---------------------- AnimationPlaybackEvent ----------------------------- */
  1275. /* ./webidl/AnimationPlaybackEvent.webidl */
  1276. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1277. /* This Source Code Form is subject to the terms of the Mozilla Public
  1278. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1279. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1280. *
  1281. * The origin of this IDL file is
  1282. * https://drafts.csswg.org/web-animations/#animationplaybackevent
  1283. *
  1284. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1285. * liability, trademark and document use rules apply.
  1286. */
  1287. [Exposed=Window]
  1288. interface AnimationPlaybackEvent : Event {
  1289. constructor(DOMString type,
  1290. optional AnimationPlaybackEventInit eventInitDict = {});
  1291. readonly attribute double? currentTime;
  1292. readonly attribute double? timelineTime;
  1293. };
  1294. dictionary AnimationPlaybackEventInit : EventInit {
  1295. double? currentTime = null;
  1296. double? timelineTime = null;
  1297. };
  1298. /* ---------------------- AnimationTimeline ----------------------------- */
  1299. /* ./webidl/AnimationTimeline.webidl */
  1300. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1301. /* This Source Code Form is subject to the terms of the Mozilla Public
  1302. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1303. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1304. *
  1305. * The origin of this IDL file is
  1306. * https://drafts.csswg.org/web-animations/#animationtimeline
  1307. *
  1308. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1309. * liability, trademark and document use rules apply.
  1310. */
  1311. [Func="Document::AreWebAnimationsTimelinesEnabled",
  1312. Exposed=Window]
  1313. interface AnimationTimeline {
  1314. [BinaryName="currentTimeAsDouble"]
  1315. readonly attribute double? currentTime;
  1316. };
  1317. /* ---------------------- AnonymousContent ----------------------------- */
  1318. /* ./webidl/AnonymousContent.webidl */
  1319. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1320. /* This Source Code Form is subject to the terms of the Mozilla Public
  1321. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1322. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1323. */
  1324. /*
  1325. * This file declares the AnonymousContent interface which is used to
  1326. * manipulate content that has been inserted into the document's canvasFrame
  1327. * anonymous container. See Document.insertAnonymousContent.
  1328. * Users of this API must never remove the host of the shadow root.
  1329. */
  1330. [ChromeOnly, Exposed=Window]
  1331. interface AnonymousContent {
  1332. readonly attribute ShadowRoot root;
  1333. };
  1334. /* ---------------------- AppInfo ----------------------------- */
  1335. /* ./webidl/AppInfo.webidl */
  1336. /* This Source Code Form is subject to the terms of the Mozilla Public
  1337. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1338. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  1339. /**
  1340. * This dictionnary holds the parameters supporting the app:// protocol.
  1341. */
  1342. dictionary AppInfo
  1343. {
  1344. DOMString path = "";
  1345. boolean isCoreApp = false;
  1346. };
  1347. /* ---------------------- AppNotificationServiceOptions ----------------------------- */
  1348. /* ./webidl/AppNotificationServiceOptions.webidl */
  1349. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1350. /* This Source Code Form is subject to the terms of the Mozilla Public
  1351. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1352. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1353. */
  1354. interface MozObserver;
  1355. dictionary AppNotificationServiceOptions {
  1356. boolean textClickable = false;
  1357. DOMString manifestURL = "";
  1358. DOMString id = "";
  1359. DOMString dbId = "";
  1360. DOMString dir = "";
  1361. DOMString lang = "";
  1362. DOMString tag = "";
  1363. DOMString data = "";
  1364. NotificationBehavior mozbehavior = {};
  1365. };
  1366. /* ---------------------- APZTestData ----------------------------- */
  1367. /* ./webidl/APZTestData.webidl */
  1368. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1369. /* This Source Code Form is subject to the terms of the Mozilla Public
  1370. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1371. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1372. */
  1373. /*
  1374. * This file declares data structures used to communicate data logged by
  1375. * various components for the purpose of APZ testing (see bug 961289 and
  1376. * gfx/layers/apz/test/APZTestData.h) to JS test code.
  1377. */
  1378. // A single key-value pair in the data.
  1379. dictionary ScrollFrameDataEntry {
  1380. DOMString key;
  1381. DOMString value;
  1382. };
  1383. // All the key-value pairs associated with a given scrollable frame.
  1384. // The scrollable frame is identified by a scroll id.
  1385. dictionary ScrollFrameData {
  1386. unsigned long long scrollId;
  1387. sequence<ScrollFrameDataEntry> entries;
  1388. };
  1389. // All the scrollable frames associated with a given paint or repaint request.
  1390. // The paint or repaint request is identified by a sequence number.
  1391. dictionary APZBucket {
  1392. unsigned long sequenceNumber;
  1393. sequence<ScrollFrameData> scrollFrames;
  1394. };
  1395. [Pref="apz.test.logging_enabled",
  1396. Exposed=Window]
  1397. namespace APZHitResultFlags {
  1398. // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo
  1399. const unsigned short INVISIBLE = 0;
  1400. const unsigned short VISIBLE = 0x0001;
  1401. const unsigned short IRREGULAR_AREA = 0x0002;
  1402. const unsigned short APZ_AWARE_LISTENERS = 0x0004;
  1403. const unsigned short INACTIVE_SCROLLFRAME = 0x0008;
  1404. const unsigned short PAN_X_DISABLED = 0x0010;
  1405. const unsigned short PAN_Y_DISABLED = 0x0020;
  1406. const unsigned short PINCH_ZOOM_DISABLED = 0x0040;
  1407. const unsigned short DOUBLE_TAP_ZOOM_DISABLED = 0x0080;
  1408. const unsigned short SCROLLBAR = 0x0100;
  1409. const unsigned short SCROLLBAR_THUMB = 0x0200;
  1410. const unsigned short SCROLLBAR_VERTICAL = 0x0400;
  1411. const unsigned short REQUIRES_TARGET_CONFIRMATION = 0x0800;
  1412. };
  1413. dictionary APZHitResult {
  1414. float screenX;
  1415. float screenY;
  1416. unsigned short hitResult; // combination of the APZHitResultFlags.* flags
  1417. unsigned long long layersId;
  1418. unsigned long long scrollId;
  1419. };
  1420. dictionary APZSampledResult {
  1421. float scrollOffsetX;
  1422. float scrollOffsetY;
  1423. DOMHighResTimeStamp sampledTimeStamp;
  1424. unsigned long long layersId;
  1425. unsigned long long scrollId;
  1426. };
  1427. dictionary AdditionalDataEntry {
  1428. DOMString key;
  1429. DOMString value;
  1430. };
  1431. // All the paints and repaint requests. This is the top-level data structure.
  1432. [GenerateConversionToJS]
  1433. dictionary APZTestData {
  1434. sequence<APZBucket> paints;
  1435. sequence<APZBucket> repaintRequests;
  1436. sequence<APZHitResult> hitResults;
  1437. sequence<APZSampledResult> sampledResults;
  1438. sequence<AdditionalDataEntry> additionalData;
  1439. };
  1440. // A frame uniformity measurement for every scrollable layer
  1441. dictionary FrameUniformity {
  1442. unsigned long layerAddress;
  1443. float frameUniformity;
  1444. };
  1445. [GenerateConversionToJS]
  1446. dictionary FrameUniformityResults {
  1447. sequence<FrameUniformity> layerUniformities;
  1448. };
  1449. /* ---------------------- ARIAMixin ----------------------------- */
  1450. /* ./webidl/ARIAMixin.webidl */
  1451. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1452. /* This Source Code Form is subject to the terms of the Mozilla Public
  1453. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1454. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1455. *
  1456. * The origin of this IDL file is
  1457. * https://w3c.github.io/aria/#ARIAMixin
  1458. *
  1459. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1460. * liability, trademark and document use rules apply.
  1461. */
  1462. interface mixin ARIAMixin {
  1463. [Pref="accessibility.ARIAElementReflection.enabled", CEReactions]
  1464. attribute Element? ariaActiveDescendantElement;
  1465. [CEReactions, SetterThrows]
  1466. attribute DOMString? role;
  1467. [CEReactions, SetterThrows]
  1468. attribute DOMString? ariaAtomic;
  1469. [CEReactions, SetterThrows]
  1470. attribute DOMString? ariaAutoComplete;
  1471. [CEReactions, SetterThrows]
  1472. attribute DOMString? ariaBrailleLabel;
  1473. [CEReactions, SetterThrows]
  1474. attribute DOMString? ariaBrailleRoleDescription;
  1475. [CEReactions, SetterThrows]
  1476. attribute DOMString? ariaBusy;
  1477. [CEReactions, SetterThrows]
  1478. attribute DOMString? ariaChecked;
  1479. [CEReactions, SetterThrows]
  1480. attribute DOMString? ariaColCount;
  1481. [CEReactions, SetterThrows]
  1482. attribute DOMString? ariaColIndex;
  1483. [CEReactions, SetterThrows]
  1484. attribute DOMString? ariaColIndexText;
  1485. [CEReactions, SetterThrows]
  1486. attribute DOMString? ariaColSpan;
  1487. [CEReactions, SetterThrows]
  1488. attribute DOMString? ariaCurrent;
  1489. [CEReactions, SetterThrows]
  1490. attribute DOMString? ariaDescription;
  1491. [CEReactions, SetterThrows]
  1492. attribute DOMString? ariaDisabled;
  1493. [CEReactions, SetterThrows]
  1494. attribute DOMString? ariaExpanded;
  1495. [CEReactions, SetterThrows]
  1496. attribute DOMString? ariaHasPopup;
  1497. [CEReactions, SetterThrows]
  1498. attribute DOMString? ariaHidden;
  1499. [CEReactions, SetterThrows]
  1500. attribute DOMString? ariaInvalid;
  1501. [CEReactions, SetterThrows]
  1502. attribute DOMString? ariaKeyShortcuts;
  1503. [CEReactions, SetterThrows]
  1504. attribute DOMString? ariaLabel;
  1505. [CEReactions, SetterThrows]
  1506. attribute DOMString? ariaLevel;
  1507. [CEReactions, SetterThrows]
  1508. attribute DOMString? ariaLive;
  1509. [CEReactions, SetterThrows]
  1510. attribute DOMString? ariaModal;
  1511. [CEReactions, SetterThrows]
  1512. attribute DOMString? ariaMultiLine;
  1513. [CEReactions, SetterThrows]
  1514. attribute DOMString? ariaMultiSelectable;
  1515. [CEReactions, SetterThrows]
  1516. attribute DOMString? ariaOrientation;
  1517. [CEReactions, SetterThrows]
  1518. attribute DOMString? ariaPlaceholder;
  1519. [CEReactions, SetterThrows]
  1520. attribute DOMString? ariaPosInSet;
  1521. [CEReactions, SetterThrows]
  1522. attribute DOMString? ariaPressed;
  1523. [CEReactions, SetterThrows]
  1524. attribute DOMString? ariaReadOnly;
  1525. [CEReactions, SetterThrows]
  1526. attribute DOMString? ariaRelevant;
  1527. [CEReactions, SetterThrows]
  1528. attribute DOMString? ariaRequired;
  1529. [CEReactions, SetterThrows]
  1530. attribute DOMString? ariaRoleDescription;
  1531. [CEReactions, SetterThrows]
  1532. attribute DOMString? ariaRowCount;
  1533. [CEReactions, SetterThrows]
  1534. attribute DOMString? ariaRowIndex;
  1535. [CEReactions, SetterThrows]
  1536. attribute DOMString? ariaRowIndexText;
  1537. [CEReactions, SetterThrows]
  1538. attribute DOMString? ariaRowSpan;
  1539. [CEReactions, SetterThrows]
  1540. attribute DOMString? ariaSelected;
  1541. [CEReactions, SetterThrows]
  1542. attribute DOMString? ariaSetSize;
  1543. [CEReactions, SetterThrows]
  1544. attribute DOMString? ariaSort;
  1545. [CEReactions, SetterThrows]
  1546. attribute DOMString? ariaValueMax;
  1547. [CEReactions, SetterThrows]
  1548. attribute DOMString? ariaValueMin;
  1549. [CEReactions, SetterThrows]
  1550. attribute DOMString? ariaValueNow;
  1551. [CEReactions, SetterThrows]
  1552. attribute DOMString? ariaValueText;
  1553. };
  1554. /* ---------------------- Attr ----------------------------- */
  1555. /* ./webidl/Attr.webidl */
  1556. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1557. /* This Source Code Form is subject to the terms of the Mozilla Public
  1558. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1559. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1560. *
  1561. * The origin of this IDL file is
  1562. * http://www.w3.org/TR/2012/WD-dom-20120105/
  1563. *
  1564. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1565. * liability, trademark and document use rules apply.
  1566. */
  1567. [Exposed=Window]
  1568. interface Attr : Node {
  1569. readonly attribute DOMString localName;
  1570. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  1571. attribute DOMString value;
  1572. [Constant]
  1573. readonly attribute DOMString name;
  1574. [Constant]
  1575. readonly attribute DOMString? namespaceURI;
  1576. [Constant]
  1577. readonly attribute DOMString? prefix;
  1578. readonly attribute boolean specified;
  1579. };
  1580. // Mozilla extensions
  1581. partial interface Attr {
  1582. readonly attribute Element? ownerElement;
  1583. };
  1584. /* ---------------------- AudioBuffer ----------------------------- */
  1585. /* ./webidl/AudioBuffer.webidl */
  1586. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1587. /* This Source Code Form is subject to the terms of the Mozilla Public
  1588. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1589. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1590. *
  1591. * The origin of this IDL file is
  1592. * https://webaudio.github.io/web-audio-api/
  1593. *
  1594. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1595. * liability, trademark and document use rules apply.
  1596. */
  1597. dictionary AudioBufferOptions {
  1598. unsigned long numberOfChannels = 1;
  1599. required unsigned long length;
  1600. required float sampleRate;
  1601. };
  1602. [Pref="dom.webaudio.enabled",
  1603. Exposed=Window]
  1604. interface AudioBuffer {
  1605. [Throws]
  1606. constructor(AudioBufferOptions options);
  1607. readonly attribute float sampleRate;
  1608. readonly attribute unsigned long length;
  1609. // in seconds
  1610. readonly attribute double duration;
  1611. readonly attribute unsigned long numberOfChannels;
  1612. [Throws]
  1613. Float32Array getChannelData(unsigned long channel);
  1614. [Throws]
  1615. undefined copyFromChannel(Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0);
  1616. [Throws]
  1617. undefined copyToChannel(Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0);
  1618. };
  1619. /* ---------------------- AudioBufferSourceNode ----------------------------- */
  1620. /* ./webidl/AudioBufferSourceNode.webidl */
  1621. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1622. /* This Source Code Form is subject to the terms of the Mozilla Public
  1623. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1624. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1625. *
  1626. * The origin of this IDL file is
  1627. * https://webaudio.github.io/web-audio-api/
  1628. *
  1629. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1630. * liability, trademark and document use rules apply.
  1631. */
  1632. dictionary AudioBufferSourceOptions {
  1633. AudioBuffer? buffer;
  1634. float detune = 0;
  1635. boolean loop = false;
  1636. double loopEnd = 0;
  1637. double loopStart = 0;
  1638. float playbackRate = 1;
  1639. };
  1640. [Pref="dom.webaudio.enabled",
  1641. Exposed=Window]
  1642. interface AudioBufferSourceNode : AudioScheduledSourceNode {
  1643. constructor(BaseAudioContext context,
  1644. optional AudioBufferSourceOptions options = {});
  1645. [SetterThrows]
  1646. attribute AudioBuffer? buffer;
  1647. readonly attribute AudioParam playbackRate;
  1648. readonly attribute AudioParam detune;
  1649. attribute boolean loop;
  1650. attribute double loopStart;
  1651. attribute double loopEnd;
  1652. [Throws]
  1653. undefined start(optional double when = 0, optional double grainOffset = 0,
  1654. optional double grainDuration);
  1655. };
  1656. // Mozilla extensions
  1657. AudioBufferSourceNode includes AudioNodePassThrough;
  1658. /* ---------------------- AudioContext ----------------------------- */
  1659. /* ./webidl/AudioContext.webidl */
  1660. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1661. /* This Source Code Form is subject to the terms of the Mozilla Public
  1662. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1663. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1664. *
  1665. * The origin of this IDL file is
  1666. * https://webaudio.github.io/web-audio-api/
  1667. *
  1668. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1669. * liability, trademark and document use rules apply.
  1670. */
  1671. dictionary AudioContextOptions {
  1672. float sampleRate;
  1673. };
  1674. dictionary AudioTimestamp {
  1675. double contextTime;
  1676. DOMHighResTimeStamp performanceTime;
  1677. };
  1678. [Pref="dom.webaudio.enabled",
  1679. Exposed=Window]
  1680. interface AudioContext : BaseAudioContext {
  1681. [Throws]
  1682. constructor(optional AudioContextOptions contextOptions = {});
  1683. readonly attribute double baseLatency;
  1684. readonly attribute double outputLatency;
  1685. AudioTimestamp getOutputTimestamp();
  1686. [NewObject]
  1687. Promise<undefined> suspend();
  1688. [NewObject]
  1689. Promise<undefined> close();
  1690. [NewObject, Throws]
  1691. MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
  1692. [NewObject, Throws]
  1693. MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
  1694. [NewObject, Throws]
  1695. MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack);
  1696. [NewObject, Throws]
  1697. MediaStreamAudioDestinationNode createMediaStreamDestination();
  1698. };
  1699. /* ---------------------- AudioData ----------------------------- */
  1700. /* ./webidl/AudioData.webidl */
  1701. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1702. /* This Source Code Form is subject to the terms of the Mozilla Public
  1703. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1704. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1705. *
  1706. * The origin of this IDL file is
  1707. * https://w3c.github.io/webcodecs/#audiodata
  1708. */
  1709. // [Serializable, Transferable] are implemented without adding attributes here,
  1710. // but directly with {Read,Write}StructuredClone and Transfer/FromTransfered.
  1711. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
  1712. interface AudioData {
  1713. [Throws]
  1714. constructor(AudioDataInit init);
  1715. readonly attribute AudioSampleFormat? format;
  1716. readonly attribute float sampleRate;
  1717. readonly attribute unsigned long numberOfFrames;
  1718. readonly attribute unsigned long numberOfChannels;
  1719. readonly attribute unsigned long long duration; // microseconds
  1720. readonly attribute long long timestamp; // microseconds
  1721. [Throws]
  1722. unsigned long allocationSize(AudioDataCopyToOptions options);
  1723. [Throws]
  1724. undefined copyTo(
  1725. // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)`
  1726. ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination,
  1727. AudioDataCopyToOptions options);
  1728. [Throws]
  1729. AudioData clone();
  1730. undefined close();
  1731. };
  1732. dictionary AudioDataInit {
  1733. required AudioSampleFormat format;
  1734. required float sampleRate;
  1735. required [EnforceRange] unsigned long numberOfFrames;
  1736. required [EnforceRange] unsigned long numberOfChannels;
  1737. required [EnforceRange] long long timestamp; // microseconds
  1738. // bug 1696216: Should be AllowSharedBufferSource
  1739. required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
  1740. sequence<ArrayBuffer> transfer = [];
  1741. };
  1742. enum AudioSampleFormat {
  1743. "u8",
  1744. "s16",
  1745. "s32",
  1746. "f32",
  1747. "u8-planar",
  1748. "s16-planar",
  1749. "s32-planar",
  1750. "f32-planar",
  1751. };
  1752. dictionary AudioDataCopyToOptions {
  1753. required [EnforceRange] unsigned long planeIndex;
  1754. [EnforceRange] unsigned long frameOffset = 0;
  1755. [EnforceRange] unsigned long frameCount;
  1756. AudioSampleFormat format;
  1757. };
  1758. /* ---------------------- AudioDecoder ----------------------------- */
  1759. /* ./webidl/AudioDecoder.webidl */
  1760. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1761. /* This Source Code Form is subject to the terms of the Mozilla Public
  1762. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1763. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1764. *
  1765. * The origin of this IDL file is
  1766. * https://w3c.github.io/webcodecs/#audiodecoder
  1767. */
  1768. [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
  1769. interface AudioDecoder : EventTarget {
  1770. [Throws]
  1771. constructor(AudioDecoderInit init);
  1772. readonly attribute CodecState state;
  1773. readonly attribute unsigned long decodeQueueSize;
  1774. attribute EventHandler ondequeue;
  1775. [Throws]
  1776. undefined configure(AudioDecoderConfig config);
  1777. [Throws]
  1778. undefined decode(EncodedAudioChunk chunk);
  1779. [NewObject, Throws]
  1780. Promise<undefined> flush();
  1781. [Throws]
  1782. undefined reset();
  1783. [Throws]
  1784. undefined close();
  1785. [NewObject, Throws]
  1786. static Promise<AudioDecoderSupport> isConfigSupported(AudioDecoderConfig config);
  1787. };
  1788. dictionary AudioDecoderInit {
  1789. required AudioDataOutputCallback output;
  1790. required WebCodecsErrorCallback error;
  1791. };
  1792. callback AudioDataOutputCallback = undefined(AudioData output);
  1793. dictionary AudioDecoderSupport {
  1794. boolean supported;
  1795. AudioDecoderConfig config;
  1796. };
  1797. dictionary AudioDecoderConfig {
  1798. required DOMString codec;
  1799. required [EnforceRange] unsigned long sampleRate;
  1800. required [EnforceRange] unsigned long numberOfChannels;
  1801. // Bug 1696216: Should be AllowSharedBufferSource
  1802. ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description;
  1803. };
  1804. /* ---------------------- AudioDestinationNode ----------------------------- */
  1805. /* ./webidl/AudioDestinationNode.webidl */
  1806. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1807. /* This Source Code Form is subject to the terms of the Mozilla Public
  1808. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1809. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1810. *
  1811. * The origin of this IDL file is
  1812. * https://webaudio.github.io/web-audio-api/
  1813. *
  1814. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1815. * liability, trademark and document use rules apply.
  1816. */
  1817. [Pref="dom.webaudio.enabled",
  1818. Exposed=Window]
  1819. interface AudioDestinationNode : AudioNode {
  1820. readonly attribute unsigned long maxChannelCount;
  1821. };
  1822. /* ---------------------- AudioEncoder ----------------------------- */
  1823. /* ./webidl/AudioEncoder.webidl */
  1824. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1825. /* This Source Code Form is subject to the terms of the Mozilla Public
  1826. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1827. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1828. *
  1829. * The origin of this IDL file is
  1830. * https://w3c.github.io/webcodecs/#audioencoder
  1831. * Some members of this API are codec-specific, in which case the source of the
  1832. * IDL are in the codec-specific registry entries, that are listed in
  1833. * https://w3c.github.io/webcodecs/codec_registry.html. Those members are
  1834. * commented with a link of the document in which the member is listed.
  1835. */
  1836. dictionary AudioEncoderSupport {
  1837. boolean supported;
  1838. AudioEncoderConfig config;
  1839. };
  1840. dictionary AudioEncoderConfig {
  1841. required DOMString codec;
  1842. [EnforceRange] unsigned long sampleRate;
  1843. [EnforceRange] unsigned long numberOfChannels;
  1844. [EnforceRange] unsigned long long bitrate;
  1845. BitrateMode bitrateMode = "variable";
  1846. OpusEncoderConfig opus;
  1847. };
  1848. // Opus specific configuration options:
  1849. // https://w3c.github.io/webcodecs/opus_codec_registration.html
  1850. enum OpusBitstreamFormat {
  1851. "opus",
  1852. "ogg",
  1853. };
  1854. dictionary OpusEncoderConfig {
  1855. OpusBitstreamFormat format = "opus";
  1856. [EnforceRange] unsigned long long frameDuration = 20000;
  1857. [EnforceRange] unsigned long complexity;
  1858. [EnforceRange] unsigned long packetlossperc = 0;
  1859. boolean useinbandfec = false;
  1860. boolean usedtx = false;
  1861. };
  1862. [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
  1863. interface AudioEncoder : EventTarget {
  1864. [Throws]
  1865. constructor(AudioEncoderInit init);
  1866. readonly attribute CodecState state;
  1867. readonly attribute unsigned long encodeQueueSize;
  1868. attribute EventHandler ondequeue;
  1869. [Throws]
  1870. undefined configure(AudioEncoderConfig config);
  1871. [Throws, BinaryName="AudioEncoder::EncodeAudioData"]
  1872. undefined encode(AudioData data);
  1873. [Throws]
  1874. Promise<undefined> flush();
  1875. [Throws]
  1876. undefined reset();
  1877. [Throws]
  1878. undefined close();
  1879. [NewObject, Throws]
  1880. static Promise<AudioEncoderSupport> isConfigSupported(AudioEncoderConfig config);
  1881. };
  1882. dictionary AudioEncoderInit {
  1883. required EncodedAudioChunkOutputCallback output;
  1884. required WebCodecsErrorCallback error;
  1885. };
  1886. callback EncodedAudioChunkOutputCallback =
  1887. undefined (EncodedAudioChunk output,
  1888. optional EncodedAudioChunkMetadata metadata = {});
  1889. dictionary EncodedAudioChunkMetadata {
  1890. AudioDecoderConfig decoderConfig;
  1891. };
  1892. /* ---------------------- AudioListener ----------------------------- */
  1893. /* ./webidl/AudioListener.webidl */
  1894. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1895. /* This Source Code Form is subject to the terms of the Mozilla Public
  1896. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1897. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1898. *
  1899. * The origin of this IDL file is
  1900. * https://webaudio.github.io/web-audio-api/
  1901. *
  1902. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1903. * liability, trademark and document use rules apply.
  1904. */
  1905. [Pref="dom.webaudio.enabled",
  1906. Exposed=Window]
  1907. interface AudioListener {
  1908. // Uses a 3D cartesian coordinate system
  1909. undefined setPosition(double x, double y, double z);
  1910. undefined setOrientation(double x, double y, double z, double xUp, double yUp, double zUp);
  1911. };
  1912. /* ---------------------- AudioNode ----------------------------- */
  1913. /* ./webidl/AudioNode.webidl */
  1914. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1915. /* This Source Code Form is subject to the terms of the Mozilla Public
  1916. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1917. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1918. *
  1919. * The origin of this IDL file is
  1920. * https://webaudio.github.io/web-audio-api/
  1921. *
  1922. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1923. * liability, trademark and document use rules apply.
  1924. */
  1925. enum ChannelCountMode {
  1926. "max",
  1927. "clamped-max",
  1928. "explicit"
  1929. };
  1930. enum ChannelInterpretation {
  1931. "speakers",
  1932. "discrete"
  1933. };
  1934. dictionary AudioNodeOptions {
  1935. unsigned long channelCount;
  1936. ChannelCountMode channelCountMode;
  1937. ChannelInterpretation channelInterpretation;
  1938. };
  1939. [Pref="dom.webaudio.enabled",
  1940. Exposed=Window]
  1941. interface AudioNode : EventTarget {
  1942. [Throws]
  1943. AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
  1944. [Throws]
  1945. undefined connect(AudioParam destination, optional unsigned long output = 0);
  1946. [Throws]
  1947. undefined disconnect();
  1948. [Throws]
  1949. undefined disconnect(unsigned long output);
  1950. [Throws]
  1951. undefined disconnect(AudioNode destination);
  1952. [Throws]
  1953. undefined disconnect(AudioNode destination, unsigned long output);
  1954. [Throws]
  1955. undefined disconnect(AudioNode destination, unsigned long output, unsigned long input);
  1956. [Throws]
  1957. undefined disconnect(AudioParam destination);
  1958. [Throws]
  1959. undefined disconnect(AudioParam destination, unsigned long output);
  1960. readonly attribute BaseAudioContext context;
  1961. readonly attribute unsigned long numberOfInputs;
  1962. readonly attribute unsigned long numberOfOutputs;
  1963. // Channel up-mixing and down-mixing rules for all inputs.
  1964. [SetterThrows]
  1965. attribute unsigned long channelCount;
  1966. [SetterThrows, BinaryName="channelCountModeValue"]
  1967. attribute ChannelCountMode channelCountMode;
  1968. [SetterThrows, BinaryName="channelInterpretationValue"]
  1969. attribute ChannelInterpretation channelInterpretation;
  1970. };
  1971. // Mozilla extension
  1972. partial interface AudioNode {
  1973. [ChromeOnly]
  1974. readonly attribute unsigned long id;
  1975. };
  1976. interface mixin AudioNodePassThrough {
  1977. [ChromeOnly]
  1978. attribute boolean passThrough;
  1979. };
  1980. /* ---------------------- AudioParam ----------------------------- */
  1981. /* ./webidl/AudioParam.webidl */
  1982. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  1983. /* This Source Code Form is subject to the terms of the Mozilla Public
  1984. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  1985. * You can obtain one at http://mozilla.org/MPL/2.0/.
  1986. *
  1987. * The origin of this IDL file is
  1988. * https://webaudio.github.io/web-audio-api/#enumdef-automationrate
  1989. * https://webaudio.github.io/web-audio-api/#audioparam
  1990. *
  1991. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  1992. * liability, trademark and document use rules apply.
  1993. */
  1994. enum AutomationRate {
  1995. "a-rate",
  1996. "k-rate"
  1997. };
  1998. [Pref="dom.webaudio.enabled",
  1999. Exposed=Window]
  2000. interface AudioParam {
  2001. [SetterThrows]
  2002. attribute float value;
  2003. readonly attribute float defaultValue;
  2004. readonly attribute float minValue;
  2005. readonly attribute float maxValue;
  2006. // Parameter automation.
  2007. [Throws]
  2008. AudioParam setValueAtTime(float value, double startTime);
  2009. [Throws]
  2010. AudioParam linearRampToValueAtTime(float value, double endTime);
  2011. [Throws]
  2012. AudioParam exponentialRampToValueAtTime(float value, double endTime);
  2013. // Exponentially approach the target value with a rate having the given time constant.
  2014. [Throws]
  2015. AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
  2016. // Sets an array of arbitrary parameter values starting at time for the given duration.
  2017. // The number of values will be scaled to fit into the desired duration.
  2018. [Throws]
  2019. AudioParam setValueCurveAtTime(sequence<float> values, double startTime, double duration);
  2020. // Cancels all scheduled parameter changes with times greater than or equal to startTime.
  2021. [Throws]
  2022. AudioParam cancelScheduledValues(double startTime);
  2023. };
  2024. // Mozilla extension
  2025. partial interface AudioParam {
  2026. // The ID of the AudioNode this AudioParam belongs to.
  2027. [ChromeOnly]
  2028. readonly attribute unsigned long parentNodeId;
  2029. // The name of the AudioParam
  2030. [ChromeOnly]
  2031. readonly attribute DOMString name;
  2032. };
  2033. partial interface AudioParam {
  2034. // This attribute is used for mochitest only.
  2035. [ChromeOnly]
  2036. readonly attribute boolean isTrackSuspended;
  2037. };
  2038. /* ---------------------- AudioParamDescriptor ----------------------------- */
  2039. /* ./webidl/AudioParamDescriptor.webidl */
  2040. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2041. /* This Source Code Form is subject to the terms of the Mozilla Public
  2042. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2043. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2044. *
  2045. * The origin of this IDL file is
  2046. * https://webaudio.github.io/web-audio-api/#dictdef-audioparamdescriptor
  2047. *
  2048. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2049. * liability, trademark and document use rules apply.
  2050. */
  2051. [GenerateInit]
  2052. dictionary AudioParamDescriptor {
  2053. required DOMString name;
  2054. float defaultValue = 0;
  2055. float minValue = -3.4028235e38;
  2056. float maxValue = 3.4028235e38;
  2057. // AutomationRate for AudioWorklet is not needed until bug 1504984 is
  2058. // implemented
  2059. // AutomationRate automationRate = "a-rate";
  2060. };
  2061. /* ---------------------- AudioParamMap ----------------------------- */
  2062. /* ./webidl/AudioParamMap.webidl */
  2063. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2064. /* This Source Code Form is subject to the terms of the Mozilla Public
  2065. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2066. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2067. *
  2068. * The origin of this IDL file is
  2069. * https://webaudio.github.io/web-audio-api/#audioparammap
  2070. *
  2071. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2072. * liability, trademark and document use rules apply.
  2073. */
  2074. [SecureContext, Exposed=Window]
  2075. interface AudioParamMap {
  2076. readonly maplike<DOMString, AudioParam>;
  2077. };
  2078. /* ---------------------- AudioProcessingEvent ----------------------------- */
  2079. /* ./webidl/AudioProcessingEvent.webidl */
  2080. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2081. /* This Source Code Form is subject to the terms of the Mozilla Public
  2082. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2083. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2084. *
  2085. * The origin of this IDL file is
  2086. * https://webaudio.github.io/web-audio-api/
  2087. *
  2088. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2089. * liability, trademark and document use rules apply.
  2090. */
  2091. [Pref="dom.webaudio.enabled",
  2092. Exposed=Window]
  2093. interface AudioProcessingEvent : Event {
  2094. readonly attribute double playbackTime;
  2095. [Throws]
  2096. readonly attribute AudioBuffer inputBuffer;
  2097. [Throws]
  2098. readonly attribute AudioBuffer outputBuffer;
  2099. };
  2100. /* ---------------------- AudioScheduledSourceNode ----------------------------- */
  2101. /* ./webidl/AudioScheduledSourceNode.webidl */
  2102. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2103. /* This Source Code Form is subject to the terms of the Mozilla Public
  2104. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2105. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2106. *
  2107. * The origin of this IDL file is
  2108. * https://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode
  2109. *
  2110. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2111. * liability, trademark and document use rules apply.
  2112. */
  2113. [Exposed=Window]
  2114. interface AudioScheduledSourceNode : AudioNode {
  2115. attribute EventHandler onended;
  2116. [Throws]
  2117. undefined start (optional double when = 0);
  2118. [Throws]
  2119. undefined stop (optional double when = 0);
  2120. };
  2121. /* ---------------------- AudioTrack ----------------------------- */
  2122. /* ./webidl/AudioTrack.webidl */
  2123. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2124. /* This Source Code Form is subject to the terms of the Mozilla Public
  2125. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2126. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2127. *
  2128. * The origin of this IDL file is
  2129. * http://www.whatwg.org/specs/web-apps/current-work/#audiotrack
  2130. */
  2131. [Pref="media.track.enabled",
  2132. Exposed=Window]
  2133. interface AudioTrack {
  2134. readonly attribute DOMString id;
  2135. readonly attribute DOMString kind;
  2136. readonly attribute DOMString label;
  2137. readonly attribute DOMString language;
  2138. attribute boolean enabled;
  2139. };
  2140. /* ---------------------- AudioTrackList ----------------------------- */
  2141. /* ./webidl/AudioTrackList.webidl */
  2142. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2143. /* This Source Code Form is subject to the terms of the Mozilla Public
  2144. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2145. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2146. *
  2147. * The origin of this IDL file is
  2148. * http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist
  2149. */
  2150. [Pref="media.track.enabled",
  2151. Exposed=Window]
  2152. interface AudioTrackList : EventTarget {
  2153. readonly attribute unsigned long length;
  2154. getter AudioTrack (unsigned long index);
  2155. AudioTrack? getTrackById(DOMString id);
  2156. attribute EventHandler onchange;
  2157. attribute EventHandler onaddtrack;
  2158. attribute EventHandler onremovetrack;
  2159. };
  2160. /* ---------------------- AudioWorklet ----------------------------- */
  2161. /* ./webidl/AudioWorklet.webidl */
  2162. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2163. /* This Source Code Form is subject to the terms of the Mozilla Public
  2164. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2165. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2166. *
  2167. * The origin of this IDL file is
  2168. * https://webaudio.github.io/web-audio-api/
  2169. *
  2170. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2171. * liability, trademark and document use rules apply.
  2172. */
  2173. [Exposed=Window, SecureContext]
  2174. interface AudioWorklet : Worklet {
  2175. };
  2176. /* ---------------------- AudioWorkletGlobalScope ----------------------------- */
  2177. /* ./webidl/AudioWorkletGlobalScope.webidl */
  2178. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2179. /* This Source Code Form is subject to the terms of the Mozilla Public
  2180. * License, v. 2.0. If a copy of the MPL was not distributed with this
  2181. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  2182. *
  2183. * The origin of this IDL file is
  2184. * https://webaudio.github.io/web-audio-api/#audioworkletglobalscope
  2185. */
  2186. callback constructor AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options);
  2187. [Global=(Worklet,AudioWorklet),Exposed=AudioWorklet]
  2188. interface AudioWorkletGlobalScope : WorkletGlobalScope {
  2189. [Throws]
  2190. undefined registerProcessor (DOMString name, AudioWorkletProcessorConstructor processorCtor);
  2191. readonly attribute unsigned long long currentFrame;
  2192. readonly attribute double currentTime;
  2193. readonly attribute float sampleRate;
  2194. };
  2195. /* ---------------------- AudioWorkletNode ----------------------------- */
  2196. /* ./webidl/AudioWorkletNode.webidl */
  2197. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2198. /* This Source Code Form is subject to the terms of the Mozilla Public
  2199. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2200. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2201. *
  2202. * The origin of this IDL file is
  2203. * https://webaudio.github.io/web-audio-api/
  2204. *
  2205. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2206. * liability, trademark and document use rules apply.
  2207. */
  2208. [GenerateConversionToJS]
  2209. dictionary AudioWorkletNodeOptions : AudioNodeOptions {
  2210. unsigned long numberOfInputs = 1;
  2211. unsigned long numberOfOutputs = 1;
  2212. sequence<unsigned long> outputChannelCount;
  2213. record<DOMString, double> parameterData;
  2214. object processorOptions;
  2215. };
  2216. [SecureContext, Exposed=Window]
  2217. interface AudioWorkletNode : AudioNode {
  2218. [Throws]
  2219. constructor(BaseAudioContext context, DOMString name,
  2220. optional AudioWorkletNodeOptions options = {});
  2221. [Throws]
  2222. readonly attribute AudioParamMap parameters;
  2223. readonly attribute MessagePort port;
  2224. attribute EventHandler onprocessorerror;
  2225. };
  2226. /* ---------------------- AudioWorkletProcessor ----------------------------- */
  2227. /* ./webidl/AudioWorkletProcessor.webidl */
  2228. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2229. /* This Source Code Form is subject to the terms of the Mozilla Public
  2230. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2231. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2232. *
  2233. * The origin of this IDL file is
  2234. * https://webaudio.github.io/web-audio-api/#audioworkletprocessor
  2235. *
  2236. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2237. * liability, trademark and document use rules apply.
  2238. */
  2239. [Exposed=AudioWorklet]
  2240. interface AudioWorkletProcessor {
  2241. [Throws]
  2242. constructor();
  2243. readonly attribute MessagePort port;
  2244. };
  2245. /* ---------------------- AutocompleteInfo ----------------------------- */
  2246. /* ./webidl/AutocompleteInfo.webidl */
  2247. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2248. /* This Source Code Form is subject to the terms of the Mozilla Public
  2249. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2250. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2251. */
  2252. /**
  2253. * This dictionary is used for the input, textarea and select element's
  2254. * getAutocompleteInfo method.
  2255. */
  2256. dictionary AutocompleteInfo {
  2257. DOMString section = "";
  2258. DOMString addressType = "";
  2259. DOMString contactType = "";
  2260. DOMString fieldName = "";
  2261. DOMString credentialType = "";
  2262. boolean canAutomaticallyPersist = true;
  2263. };
  2264. /* ---------------------- BarProp ----------------------------- */
  2265. /* ./webidl/BarProp.webidl */
  2266. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2267. /* This Source Code Form is subject to the terms of the Mozilla Public
  2268. * License, v. 2.0. If a copy of the MPL was not distributed with this
  2269. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  2270. */
  2271. [Exposed=Window]
  2272. interface BarProp
  2273. {
  2274. [Throws, NeedsCallerType]
  2275. attribute boolean visible;
  2276. };
  2277. /* ---------------------- BaseAudioContext ----------------------------- */
  2278. /* ./webidl/BaseAudioContext.webidl */
  2279. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2280. /* This Source Code Form is subject to the terms of the Mozilla Public
  2281. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2282. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2283. *
  2284. * The origin of this IDL file is
  2285. * https://webaudio.github.io/web-audio-api/#idl-def-BaseAudioContext
  2286. *
  2287. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2288. * liability, trademark and document use rules apply.
  2289. */
  2290. callback DecodeSuccessCallback = undefined (AudioBuffer decodedData);
  2291. callback DecodeErrorCallback = undefined (DOMException error);
  2292. enum AudioContextState {
  2293. "suspended",
  2294. "running",
  2295. "closed"
  2296. };
  2297. [Exposed=Window]
  2298. interface BaseAudioContext : EventTarget {
  2299. readonly attribute AudioDestinationNode destination;
  2300. readonly attribute float sampleRate;
  2301. readonly attribute double currentTime;
  2302. readonly attribute AudioListener listener;
  2303. readonly attribute AudioContextState state;
  2304. [Throws, SameObject, SecureContext]
  2305. readonly attribute AudioWorklet audioWorklet;
  2306. [NewObject]
  2307. Promise<undefined> resume();
  2308. attribute EventHandler onstatechange;
  2309. [NewObject, Throws]
  2310. AudioBuffer createBuffer (unsigned long numberOfChannels,
  2311. unsigned long length,
  2312. float sampleRate);
  2313. [NewObject]
  2314. Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData,
  2315. optional DecodeSuccessCallback successCallback,
  2316. optional DecodeErrorCallback errorCallback);
  2317. // AudioNode creation
  2318. [NewObject]
  2319. AudioBufferSourceNode createBufferSource();
  2320. [NewObject]
  2321. ConstantSourceNode createConstantSource();
  2322. [NewObject, Throws]
  2323. ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
  2324. optional unsigned long numberOfInputChannels = 2,
  2325. optional unsigned long numberOfOutputChannels = 2);
  2326. [NewObject, Throws]
  2327. AnalyserNode createAnalyser();
  2328. [NewObject, Throws]
  2329. GainNode createGain();
  2330. [NewObject, Throws]
  2331. DelayNode createDelay(optional double maxDelayTime = 1); // TODO: no = 1
  2332. [NewObject, Throws]
  2333. BiquadFilterNode createBiquadFilter();
  2334. [NewObject, Throws]
  2335. IIRFilterNode createIIRFilter(sequence<double> feedforward, sequence<double> feedback);
  2336. [NewObject, Throws]
  2337. WaveShaperNode createWaveShaper();
  2338. [NewObject, Throws]
  2339. PannerNode createPanner();
  2340. [NewObject, Throws]
  2341. StereoPannerNode createStereoPanner();
  2342. [NewObject, Throws]
  2343. ConvolverNode createConvolver();
  2344. [NewObject, Throws]
  2345. ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
  2346. [NewObject, Throws]
  2347. ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
  2348. [NewObject, Throws]
  2349. DynamicsCompressorNode createDynamicsCompressor();
  2350. [NewObject, Throws]
  2351. OscillatorNode createOscillator();
  2352. [NewObject, Throws]
  2353. PeriodicWave createPeriodicWave(sequence<float> real,
  2354. sequence<float> imag,
  2355. optional PeriodicWaveConstraints constraints = {});
  2356. };
  2357. /* ---------------------- BaseKeyframeTypes ----------------------------- */
  2358. /* ./webidl/BaseKeyframeTypes.webidl */
  2359. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2360. /* This Source Code Form is subject to the terms of the Mozilla Public
  2361. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2362. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2363. *
  2364. * The origin of this IDL file is
  2365. * https://drafts.csswg.org/web-animations/#the-compositeoperation-enumeration
  2366. * https://drafts.csswg.org/web-animations/#dictdef-basepropertyindexedkeyframe
  2367. * https://drafts.csswg.org/web-animations/#dictdef-basekeyframe
  2368. * https://drafts.csswg.org/web-animations/#dictdef-basecomputedkeyframe
  2369. *
  2370. * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2371. * liability, trademark and document use rules apply.
  2372. */
  2373. enum CompositeOperation { "replace", "add", "accumulate" };
  2374. // NOTE: The order of the values in this enum are important.
  2375. //
  2376. // We assume that CompositeOperation is a subset of CompositeOperationOrAuto so
  2377. // that we can cast between the two types (provided the value is not "auto").
  2378. //
  2379. // If that assumption ceases to hold we will need to update the conversion
  2380. // in KeyframeUtils::GetAnimationPropertiesFromKeyframes.
  2381. enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
  2382. // The following dictionary types are not referred to by other .webidl files,
  2383. // but we use it for manual JS->IDL and IDL->JS conversions in KeyframeEffect's
  2384. // implementation.
  2385. [GenerateInit]
  2386. dictionary BasePropertyIndexedKeyframe {
  2387. (double? or sequence<double?>) offset = [];
  2388. (UTF8String or sequence<UTF8String>) easing = [];
  2389. (CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
  2390. };
  2391. [GenerateInit]
  2392. dictionary BaseKeyframe {
  2393. double? offset = null;
  2394. UTF8String easing = "linear";
  2395. [Pref="dom.animations-api.compositing.enabled"]
  2396. CompositeOperationOrAuto composite = "auto";
  2397. // Non-standard extensions
  2398. // Member to allow testing when StyleAnimationValue::ComputeValues fails.
  2399. //
  2400. // Note that we currently only apply this to shorthand properties since
  2401. // it's easier to annotate shorthand property values and because we have
  2402. // only ever observed ComputeValues failing on shorthand values.
  2403. //
  2404. // Bug 1216844 should remove this member since after that bug is fixed we will
  2405. // have a well-defined behavior to use when animation endpoints are not
  2406. // available.
  2407. [ChromeOnly] boolean simulateComputeValuesFailure = false;
  2408. };
  2409. [GenerateConversionToJS]
  2410. dictionary BaseComputedKeyframe : BaseKeyframe {
  2411. double computedOffset;
  2412. };
  2413. /* ---------------------- BasicCardPayment ----------------------------- */
  2414. /* ./webidl/BasicCardPayment.webidl */
  2415. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2416. /* This Source Code Form is subject to the terms of the Mozilla Public
  2417. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2418. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2419. *
  2420. * The origin of this WebIDL file is
  2421. * https://www.w3.org/TR/payment-method-basic-card/
  2422. */
  2423. [GenerateInit]
  2424. dictionary BasicCardRequest {
  2425. sequence<DOMString> supportedNetworks = [];
  2426. boolean requestSecurityCode = true;
  2427. };
  2428. [GenerateConversionToJS]
  2429. dictionary BasicCardResponse {
  2430. DOMString cardholderName = "";
  2431. required DOMString cardNumber;
  2432. DOMString expiryMonth = "";
  2433. DOMString expiryYear = "";
  2434. DOMString cardSecurityCode = "";
  2435. PaymentAddress? billingAddress = null;
  2436. };
  2437. [GenerateConversionToJS]
  2438. dictionary BasicCardChangeDetails {
  2439. PaymentAddress? billingAddress = null;
  2440. };
  2441. [GenerateInit]
  2442. dictionary BasicCardErrors {
  2443. DOMString cardNumber;
  2444. DOMString cardholderName;
  2445. DOMString cardSecurityCode;
  2446. DOMString expiryMonth;
  2447. DOMString expiryYear;
  2448. AddressErrors billingAddress;
  2449. };
  2450. /* ---------------------- BatteryManager ----------------------------- */
  2451. /* ./webidl/BatteryManager.webidl */
  2452. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2453. /* This Source Code Form is subject to the terms of the Mozilla Public
  2454. * License, v. 2.0. If a copy of the MPL was not distributed with this
  2455. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  2456. *
  2457. * The origin of this IDL file is
  2458. * http://www.w3.org/TR/battery-status/
  2459. *
  2460. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2461. * liability, trademark and document use rules apply.
  2462. */
  2463. [ChromeOnly, Exposed=Window]
  2464. interface BatteryManager : EventTarget {
  2465. readonly attribute boolean charging;
  2466. readonly attribute unrestricted double chargingTime;
  2467. readonly attribute unrestricted double dischargingTime;
  2468. readonly attribute double level;
  2469. attribute EventHandler onchargingchange;
  2470. attribute EventHandler onchargingtimechange;
  2471. attribute EventHandler ondischargingtimechange;
  2472. attribute EventHandler onlevelchange;
  2473. };
  2474. /* ---------------------- BeforeUnloadEvent ----------------------------- */
  2475. /* ./webidl/BeforeUnloadEvent.webidl */
  2476. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2477. /* This Source Code Form is subject to the terms of the Mozilla Public
  2478. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2479. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2480. *
  2481. * For more information on this interface, please see
  2482. * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
  2483. */
  2484. [Exposed=Window]
  2485. interface BeforeUnloadEvent : Event {
  2486. attribute DOMString returnValue;
  2487. };
  2488. /* ---------------------- BiquadFilterNode ----------------------------- */
  2489. /* ./webidl/BiquadFilterNode.webidl */
  2490. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2491. /* This Source Code Form is subject to the terms of the Mozilla Public
  2492. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2493. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2494. *
  2495. * The origin of this IDL file is
  2496. * https://webaudio.github.io/web-audio-api/
  2497. *
  2498. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2499. * liability, trademark and document use rules apply.
  2500. */
  2501. enum BiquadFilterType {
  2502. "lowpass",
  2503. "highpass",
  2504. "bandpass",
  2505. "lowshelf",
  2506. "highshelf",
  2507. "peaking",
  2508. "notch",
  2509. "allpass"
  2510. };
  2511. dictionary BiquadFilterOptions : AudioNodeOptions {
  2512. BiquadFilterType type = "lowpass";
  2513. float Q = 1;
  2514. float detune = 0;
  2515. float frequency = 350;
  2516. float gain = 0;
  2517. };
  2518. [Pref="dom.webaudio.enabled",
  2519. Exposed=Window]
  2520. interface BiquadFilterNode : AudioNode {
  2521. [Throws]
  2522. constructor(BaseAudioContext context,
  2523. optional BiquadFilterOptions options = {});
  2524. attribute BiquadFilterType type;
  2525. readonly attribute AudioParam frequency; // in Hertz
  2526. readonly attribute AudioParam detune; // in Cents
  2527. readonly attribute AudioParam Q; // Quality factor
  2528. readonly attribute AudioParam gain; // in Decibels
  2529. [Throws]
  2530. undefined getFrequencyResponse(Float32Array frequencyHz,
  2531. Float32Array magResponse,
  2532. Float32Array phaseResponse);
  2533. };
  2534. // Mozilla extension
  2535. BiquadFilterNode includes AudioNodePassThrough;
  2536. /* ---------------------- Blob ----------------------------- */
  2537. /* ./webidl/Blob.webidl */
  2538. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2539. /* This Source Code Form is subject to the terms of the Mozilla Public
  2540. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2541. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2542. *
  2543. * The origin of this IDL file is
  2544. * https://w3c.github.io/FileAPI/#blob
  2545. *
  2546. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2547. * liability, trademark and document use rules apply.
  2548. */
  2549. typedef (BufferSource or Blob or UTF8String) BlobPart;
  2550. [Exposed=(Window,Worker)]
  2551. interface Blob {
  2552. [Throws]
  2553. constructor(optional sequence<BlobPart> blobParts,
  2554. optional BlobPropertyBag options = {});
  2555. [GetterThrows]
  2556. readonly attribute unsigned long long size;
  2557. readonly attribute DOMString type;
  2558. //slice Blob into byte-ranged chunks
  2559. [Throws]
  2560. Blob slice(optional [Clamp] long long start,
  2561. optional [Clamp] long long end,
  2562. optional DOMString contentType);
  2563. // read from the Blob.
  2564. [NewObject, Throws] ReadableStream stream();
  2565. [NewObject] Promise<USVString> text();
  2566. [NewObject] Promise<ArrayBuffer> arrayBuffer();
  2567. };
  2568. enum EndingType { "transparent", "native" };
  2569. dictionary BlobPropertyBag {
  2570. DOMString type = "";
  2571. EndingType endings = "transparent";
  2572. };
  2573. partial interface Blob {
  2574. // This returns the type of BlobImpl used for this Blob.
  2575. [ChromeOnly]
  2576. readonly attribute DOMString blobImplType;
  2577. };
  2578. /* ---------------------- BlobEvent ----------------------------- */
  2579. /* ./webidl/BlobEvent.webidl */
  2580. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2581. /* This Source Code Form is subject to the terms of the Mozilla Public
  2582. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2583. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2584. *
  2585. * The origin of this IDL file is:
  2586. * https://w3c.github.io/mediacapture-record/#blobevent-section
  2587. */
  2588. [Exposed=Window]
  2589. interface BlobEvent : Event
  2590. {
  2591. constructor(DOMString type, BlobEventInit eventInitDict);
  2592. readonly attribute Blob data;
  2593. };
  2594. dictionary BlobEventInit : EventInit
  2595. {
  2596. required Blob data;
  2597. };
  2598. /* ---------------------- BroadcastChannel ----------------------------- */
  2599. /* ./webidl/BroadcastChannel.webidl */
  2600. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2601. /* This Source Code Form is subject to the terms of the Mozilla Public
  2602. * License, v. 2.0. If a copy of the MPL was not distributed with this
  2603. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  2604. *
  2605. * For more information on this interface, please see
  2606. * https://html.spec.whatwg.org/#broadcastchannel
  2607. */
  2608. [Exposed=(Window,Worker)]
  2609. interface BroadcastChannel : EventTarget {
  2610. [Throws]
  2611. constructor(DOMString channel);
  2612. readonly attribute DOMString name;
  2613. [Throws]
  2614. undefined postMessage(any message);
  2615. undefined close();
  2616. attribute EventHandler onmessage;
  2617. attribute EventHandler onmessageerror;
  2618. };
  2619. /* ---------------------- BrowserElementDictionaries ----------------------------- */
  2620. /* ./webidl/BrowserElementDictionaries.webidl */
  2621. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2622. /* This Source Code Form is subject to the terms of the Mozilla Public
  2623. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2624. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2625. *
  2626. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  2627. * liability, trademark and document use rules apply.
  2628. */
  2629. [GenerateConversionToJS]
  2630. dictionary OpenWindowEventDetail {
  2631. DOMString url = "";
  2632. DOMString name = "";
  2633. DOMString features = "";
  2634. Node? frameElement = null;
  2635. boolean forceNoReferrer = false;
  2636. };
  2637. [GenerateConversionToJS]
  2638. dictionary DOMWindowResizeEventDetail {
  2639. long width = 0;
  2640. long height = 0;
  2641. };
  2642. /* ---------------------- Cache ----------------------------- */
  2643. /* ./webidl/Cache.webidl */
  2644. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2645. /* This Source Code Form is subject to the terms of the Mozilla Public
  2646. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2647. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2648. *
  2649. * The origin of this IDL file is
  2650. * https://w3c.github.io/ServiceWorker/#cache-interface
  2651. */
  2652. [Exposed=(Window,Worker),
  2653. Func="nsGlobalWindowInner::CachesEnabled"]
  2654. interface Cache {
  2655. [NewObject]
  2656. Promise<Response> match(RequestInfo request, optional CacheQueryOptions options = {});
  2657. [NewObject]
  2658. Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {});
  2659. [NewObject, NeedsCallerType]
  2660. Promise<undefined> add(RequestInfo request);
  2661. [NewObject, NeedsCallerType]
  2662. Promise<undefined> addAll(sequence<RequestInfo> requests);
  2663. [NewObject]
  2664. Promise<undefined> put(RequestInfo request, Response response);
  2665. [NewObject]
  2666. Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {});
  2667. [NewObject]
  2668. Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options = {});
  2669. };
  2670. dictionary CacheQueryOptions {
  2671. boolean ignoreSearch = false;
  2672. boolean ignoreMethod = false;
  2673. boolean ignoreVary = false;
  2674. };
  2675. dictionary CacheBatchOperation {
  2676. DOMString type;
  2677. Request request;
  2678. Response response;
  2679. CacheQueryOptions options;
  2680. };
  2681. /* ---------------------- CacheStorage ----------------------------- */
  2682. /* ./webidl/CacheStorage.webidl */
  2683. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2684. /* This Source Code Form is subject to the terms of the Mozilla Public
  2685. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2686. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2687. *
  2688. * The origin of this IDL file is
  2689. * https://w3c.github.io/ServiceWorker/#cachestorage-interface
  2690. */
  2691. interface Principal;
  2692. [Exposed=(Window,Worker),
  2693. Func="nsGlobalWindowInner::CachesEnabled"]
  2694. interface CacheStorage {
  2695. [Throws, ChromeOnly]
  2696. constructor(CacheStorageNamespace namespace, Principal principal);
  2697. [NewObject]
  2698. Promise<Response> match(RequestInfo request, optional MultiCacheQueryOptions options = {});
  2699. [NewObject]
  2700. Promise<boolean> has(DOMString cacheName);
  2701. [NewObject]
  2702. Promise<Cache> open(DOMString cacheName);
  2703. [NewObject]
  2704. Promise<boolean> delete(DOMString cacheName);
  2705. [NewObject]
  2706. Promise<sequence<DOMString>> keys();
  2707. };
  2708. dictionary MultiCacheQueryOptions : CacheQueryOptions {
  2709. DOMString cacheName;
  2710. };
  2711. // chrome-only, gecko specific extension
  2712. enum CacheStorageNamespace {
  2713. "content", "chrome"
  2714. };
  2715. /* ---------------------- CancelContentJSOptions ----------------------------- */
  2716. /* ./webidl/CancelContentJSOptions.webidl */
  2717. /* This Source Code Form is subject to the terms of the Mozilla Public
  2718. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2719. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  2720. [GenerateInit]
  2721. dictionary CancelContentJSOptions {
  2722. long index = 0;
  2723. URI? uri = null;
  2724. long epoch = 0;
  2725. };
  2726. /* ---------------------- CanvasCaptureMediaStream ----------------------------- */
  2727. /* ./webidl/CanvasCaptureMediaStream.webidl */
  2728. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2729. /* This Source Code Form is subject to the terms of the Mozilla Public
  2730. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2731. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2732. *
  2733. * The origin of this IDL file is
  2734. * https://w3c.github.io/mediacapture-fromelement/index.html
  2735. *
  2736. * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  2737. * W3C liability, trademark and document use rules apply.
  2738. */
  2739. [Exposed=Window]
  2740. interface CanvasCaptureMediaStream : MediaStream {
  2741. readonly attribute HTMLCanvasElement canvas;
  2742. undefined requestFrame();
  2743. };
  2744. /* ---------------------- CanvasRenderingContext2D ----------------------------- */
  2745. /* ./webidl/CanvasRenderingContext2D.webidl */
  2746. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2747. /* This Source Code Form is subject to the terms of the Mozilla Public
  2748. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  2749. * You can obtain one at http://mozilla.org/MPL/2.0/.
  2750. *
  2751. * The origin of this IDL file is
  2752. * http://www.whatwg.org/specs/web-apps/current-work/
  2753. *
  2754. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  2755. * Opera Software ASA. You are granted a license to use, reproduce
  2756. * and create derivative works of this document.
  2757. */
  2758. enum CanvasWindingRule { "nonzero", "evenodd" };
  2759. enum CanvasLineCap { "butt", "round", "square" };
  2760. enum CanvasLineJoin { "round", "bevel", "miter" };
  2761. enum CanvasTextAlign { "start", "end", "left", "right", "center" };
  2762. enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
  2763. enum CanvasDirection { "ltr", "rtl", "inherit" };
  2764. enum CanvasFontKerning { "auto", "normal", "none" };
  2765. enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" };
  2766. enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" };
  2767. enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" };
  2768. [GenerateInit]
  2769. dictionary CanvasRenderingContext2DSettings {
  2770. // signal if the canvas contains an alpha channel
  2771. boolean alpha = true;
  2772. boolean desynchronized = false;
  2773. PredefinedColorSpace colorSpace = "srgb";
  2774. // whether or not we're planning to do a lot of readback operations
  2775. boolean willReadFrequently = false;
  2776. };
  2777. dictionary HitRegionOptions {
  2778. Path2D? path = null;
  2779. DOMString id = "";
  2780. Element? control = null;
  2781. };
  2782. typedef (HTMLImageElement or
  2783. SVGImageElement) HTMLOrSVGImageElement;
  2784. typedef (HTMLOrSVGImageElement or
  2785. HTMLCanvasElement or
  2786. HTMLVideoElement or
  2787. OffscreenCanvas or
  2788. ImageBitmap or
  2789. VideoFrame) CanvasImageSource;
  2790. [Exposed=Window]
  2791. interface CanvasRenderingContext2D {
  2792. // back-reference to the canvas. Might be null if we're not
  2793. // associated with a canvas.
  2794. readonly attribute HTMLCanvasElement? canvas;
  2795. CanvasRenderingContext2DSettings getContextAttributes();
  2796. // Show the caret if appropriate when drawing
  2797. [Func="CanvasUtils::HasDrawWindowPrivilege"]
  2798. const unsigned long DRAWWINDOW_DRAW_CARET = 0x01;
  2799. // Don't flush pending layout notifications that could otherwise
  2800. // be batched up
  2801. [Func="CanvasUtils::HasDrawWindowPrivilege"]
  2802. const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
  2803. // Draw scrollbars and scroll the viewport if they are present
  2804. [Func="CanvasUtils::HasDrawWindowPrivilege"]
  2805. const unsigned long DRAWWINDOW_DRAW_VIEW = 0x04;
  2806. // Use the widget layer manager if available. This means hardware
  2807. // acceleration may be used, but it might actually be slower or
  2808. // lower quality than normal. It will however more accurately reflect
  2809. // the pixels rendered to the screen.
  2810. [Func="CanvasUtils::HasDrawWindowPrivilege"]
  2811. const unsigned long DRAWWINDOW_USE_WIDGET_LAYERS = 0x08;
  2812. // Don't synchronously decode images - draw what we have
  2813. [Func="CanvasUtils::HasDrawWindowPrivilege"]
  2814. const unsigned long DRAWWINDOW_ASYNC_DECODE_IMAGES = 0x10;
  2815. /**
  2816. * Renders a region of a window into the canvas. The contents of
  2817. * the window's viewport are rendered, ignoring viewport clipping
  2818. * and scrolling.
  2819. *
  2820. * @param x
  2821. * @param y
  2822. * @param w
  2823. * @param h specify the area of the window to render, in CSS
  2824. * pixels.
  2825. *
  2826. * @param backgroundColor the canvas is filled with this color
  2827. * before we render the window into it. This color may be
  2828. * transparent/translucent. It is given as a CSS color string
  2829. * (e.g., rgb() or rgba()).
  2830. *
  2831. * @param flags Used to better control the drawWindow call.
  2832. * Flags can be ORed together.
  2833. *
  2834. * Of course, the rendering obeys the current scale, transform and
  2835. * globalAlpha values.
  2836. *
  2837. * Hints:
  2838. * -- If 'rgba(0,0,0,0)' is used for the background color, the
  2839. * drawing will be transparent wherever the window is transparent.
  2840. * -- Top-level browsed documents are usually not transparent
  2841. * because the user's background-color preference is applied,
  2842. * but IFRAMEs are transparent if the page doesn't set a background.
  2843. * -- If an opaque color is used for the background color, rendering
  2844. * will be faster because we won't have to compute the window's
  2845. * transparency.
  2846. *
  2847. * This API cannot currently be used by Web content. It is chrome
  2848. * and Web Extensions (with a permission) only.
  2849. */
  2850. [Throws, NeedsSubjectPrincipal, Func="CanvasUtils::HasDrawWindowPrivilege"]
  2851. undefined drawWindow(Window window, double x, double y, double w, double h,
  2852. UTF8String bgColor, optional unsigned long flags = 0);
  2853. /**
  2854. * This causes a context that is currently using a hardware-accelerated
  2855. * backend to fallback to a software one. All state should be preserved.
  2856. */
  2857. [ChromeOnly]
  2858. undefined demote();
  2859. };
  2860. CanvasRenderingContext2D includes CanvasState;
  2861. CanvasRenderingContext2D includes CanvasTransform;
  2862. CanvasRenderingContext2D includes CanvasCompositing;
  2863. CanvasRenderingContext2D includes CanvasImageSmoothing;
  2864. CanvasRenderingContext2D includes CanvasFillStrokeStyles;
  2865. CanvasRenderingContext2D includes CanvasShadowStyles;
  2866. CanvasRenderingContext2D includes CanvasFilters;
  2867. CanvasRenderingContext2D includes CanvasRect;
  2868. CanvasRenderingContext2D includes CanvasDrawPath;
  2869. CanvasRenderingContext2D includes CanvasUserInterface;
  2870. CanvasRenderingContext2D includes CanvasText;
  2871. CanvasRenderingContext2D includes CanvasDrawImage;
  2872. CanvasRenderingContext2D includes CanvasImageData;
  2873. CanvasRenderingContext2D includes CanvasPathDrawingStyles;
  2874. CanvasRenderingContext2D includes CanvasTextDrawingStyles;
  2875. CanvasRenderingContext2D includes CanvasPathMethods;
  2876. interface mixin CanvasState {
  2877. // state
  2878. undefined save(); // push state on state stack
  2879. undefined restore(); // pop state stack and restore state
  2880. undefined reset(); // reset the rendering context to its default state
  2881. boolean isContextLost(); // return whether context is lost
  2882. };
  2883. interface mixin CanvasTransform {
  2884. // transformations (default transform is the identity matrix)
  2885. [Throws, LenientFloat]
  2886. undefined scale(double x, double y);
  2887. [Throws, LenientFloat]
  2888. undefined rotate(double angle);
  2889. [Throws, LenientFloat]
  2890. undefined translate(double x, double y);
  2891. [Throws, LenientFloat]
  2892. undefined transform(double a, double b, double c, double d, double e, double f);
  2893. [NewObject, Throws] DOMMatrix getTransform();
  2894. [Throws, LenientFloat]
  2895. undefined setTransform(double a, double b, double c, double d, double e, double f);
  2896. [Throws]
  2897. undefined setTransform(optional DOMMatrix2DInit transform = {});
  2898. [Throws]
  2899. undefined resetTransform();
  2900. };
  2901. interface mixin CanvasCompositing {
  2902. attribute unrestricted double globalAlpha; // (default 1.0)
  2903. [Throws]
  2904. attribute DOMString globalCompositeOperation; // (default source-over)
  2905. };
  2906. interface mixin CanvasImageSmoothing {
  2907. // drawing images
  2908. attribute boolean imageSmoothingEnabled;
  2909. };
  2910. interface mixin CanvasFillStrokeStyles {
  2911. // colors and styles (see also the CanvasPathDrawingStyles interface)
  2912. attribute (UTF8String or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
  2913. attribute (UTF8String or CanvasGradient or CanvasPattern) fillStyle; // (default black)
  2914. [NewObject]
  2915. CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
  2916. [NewObject, Throws]
  2917. CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
  2918. [NewObject]
  2919. CanvasGradient createConicGradient(double angle, double cx, double cy);
  2920. [NewObject, Throws]
  2921. CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
  2922. };
  2923. interface mixin CanvasShadowStyles {
  2924. [LenientFloat]
  2925. attribute double shadowOffsetX; // (default 0)
  2926. [LenientFloat]
  2927. attribute double shadowOffsetY; // (default 0)
  2928. [LenientFloat]
  2929. attribute double shadowBlur; // (default 0)
  2930. attribute UTF8String shadowColor; // (default transparent black)
  2931. };
  2932. interface mixin CanvasFilters {
  2933. [SetterThrows]
  2934. attribute UTF8String filter; // (default empty string = no filter)
  2935. };
  2936. interface mixin CanvasRect {
  2937. [LenientFloat]
  2938. undefined clearRect(double x, double y, double w, double h);
  2939. [LenientFloat]
  2940. undefined fillRect(double x, double y, double w, double h);
  2941. [LenientFloat]
  2942. undefined strokeRect(double x, double y, double w, double h);
  2943. };
  2944. interface mixin CanvasDrawPath {
  2945. // path API (see also CanvasPathMethods)
  2946. undefined beginPath();
  2947. undefined fill(optional CanvasWindingRule winding = "nonzero");
  2948. undefined fill(Path2D path, optional CanvasWindingRule winding = "nonzero");
  2949. undefined stroke();
  2950. undefined stroke(Path2D path);
  2951. undefined clip(optional CanvasWindingRule winding = "nonzero");
  2952. undefined clip(Path2D path, optional CanvasWindingRule winding = "nonzero");
  2953. // NOT IMPLEMENTED undefined resetClip();
  2954. [NeedsSubjectPrincipal]
  2955. boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
  2956. [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes.
  2957. boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
  2958. [NeedsSubjectPrincipal]
  2959. boolean isPointInStroke(double x, double y);
  2960. [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes.
  2961. boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
  2962. };
  2963. interface mixin CanvasUserInterface {
  2964. [Throws] undefined drawFocusIfNeeded(Element element);
  2965. // NOT IMPLEMENTED undefined scrollPathIntoView();
  2966. // NOT IMPLEMENTED undefined scrollPathIntoView(Path path);
  2967. };
  2968. interface mixin CanvasText {
  2969. // text (see also the CanvasPathDrawingStyles interface)
  2970. [Throws, LenientFloat]
  2971. undefined fillText(DOMString text, double x, double y, optional double maxWidth);
  2972. [Throws, LenientFloat]
  2973. undefined strokeText(DOMString text, double x, double y, optional double maxWidth);
  2974. [NewObject, Throws]
  2975. TextMetrics measureText(DOMString text);
  2976. };
  2977. interface mixin CanvasDrawImage {
  2978. [Throws, LenientFloat]
  2979. undefined drawImage(CanvasImageSource image, double dx, double dy);
  2980. [Throws, LenientFloat]
  2981. undefined drawImage(CanvasImageSource image, double dx, double dy, double dw, double dh);
  2982. [Throws, LenientFloat]
  2983. undefined drawImage(CanvasImageSource image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
  2984. };
  2985. // See https://github.com/whatwg/html/issues/6262 for [EnforceRange] usage.
  2986. interface mixin CanvasImageData {
  2987. // pixel manipulation
  2988. [NewObject, Throws]
  2989. ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh);
  2990. [NewObject, Throws]
  2991. ImageData createImageData(ImageData imagedata);
  2992. [NewObject, Throws, NeedsSubjectPrincipal]
  2993. ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh);
  2994. [Throws]
  2995. undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy);
  2996. [Throws]
  2997. undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
  2998. };
  2999. interface mixin CanvasPathDrawingStyles {
  3000. // line caps/joins
  3001. [LenientFloat]
  3002. attribute double lineWidth; // (default 1)
  3003. attribute CanvasLineCap lineCap; // (default "butt")
  3004. attribute CanvasLineJoin lineJoin; // (default "miter")
  3005. [LenientFloat]
  3006. attribute double miterLimit; // (default 10)
  3007. // dashed lines
  3008. [LenientFloat, Throws] undefined setLineDash(sequence<double> segments); // default empty
  3009. sequence<double> getLineDash();
  3010. [LenientFloat] attribute double lineDashOffset;
  3011. };
  3012. interface mixin CanvasTextDrawingStyles {
  3013. // text
  3014. [SetterThrows]
  3015. attribute UTF8String font; // (default 10px sans-serif)
  3016. attribute CanvasTextAlign textAlign; // (default: "start")
  3017. attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
  3018. attribute CanvasDirection direction; // (default: "inherit")
  3019. attribute UTF8String letterSpacing; // default: "0px"
  3020. attribute CanvasFontKerning fontKerning; // (default: "auto")
  3021. attribute CanvasFontStretch fontStretch; // (default: "normal")
  3022. attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal")
  3023. attribute CanvasTextRendering textRendering; // (default: "auto")
  3024. attribute UTF8String wordSpacing; // default: "0px"
  3025. };
  3026. interface mixin CanvasPathMethods {
  3027. // shared path API methods
  3028. undefined closePath();
  3029. [LenientFloat]
  3030. undefined moveTo(double x, double y);
  3031. [LenientFloat]
  3032. undefined lineTo(double x, double y);
  3033. [LenientFloat]
  3034. undefined quadraticCurveTo(double cpx, double cpy, double x, double y);
  3035. [LenientFloat]
  3036. undefined bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
  3037. [Throws, LenientFloat]
  3038. undefined arcTo(double x1, double y1, double x2, double y2, double radius);
  3039. // NOT IMPLEMENTED [LenientFloat] undefined arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation);
  3040. [LenientFloat]
  3041. undefined rect(double x, double y, double w, double h);
  3042. [Throws]
  3043. undefined roundRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>) radii = 0);
  3044. [Throws, LenientFloat]
  3045. undefined arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
  3046. [Throws, LenientFloat]
  3047. undefined ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, optional boolean anticlockwise = false);
  3048. };
  3049. [Exposed=(Window,Worker),
  3050. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  3051. interface CanvasGradient {
  3052. // opaque object
  3053. [Throws]
  3054. // addColorStop should take a double
  3055. undefined addColorStop(float offset, UTF8String color);
  3056. };
  3057. [Exposed=(Window,Worker),
  3058. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  3059. interface CanvasPattern {
  3060. // opaque object
  3061. // [Throws, LenientFloat] - could not do this overload because of bug 1020975
  3062. // undefined setTransform(double a, double b, double c, double d, double e, double f);
  3063. [Throws]
  3064. undefined setTransform(optional DOMMatrix2DInit matrix = {});
  3065. };
  3066. [Exposed=(Window,Worker)]
  3067. interface TextMetrics {
  3068. // x-direction
  3069. readonly attribute double width; // advance width
  3070. // [experimental] actualBoundingBox* attributes
  3071. [Pref="dom.textMetrics.actualBoundingBox.enabled"]
  3072. readonly attribute double actualBoundingBoxLeft;
  3073. [Pref="dom.textMetrics.actualBoundingBox.enabled"]
  3074. readonly attribute double actualBoundingBoxRight;
  3075. // y-direction
  3076. // [experimental] fontBoundingBox* attributes
  3077. [Pref="dom.textMetrics.fontBoundingBox.enabled"]
  3078. readonly attribute double fontBoundingBoxAscent;
  3079. [Pref="dom.textMetrics.fontBoundingBox.enabled"]
  3080. readonly attribute double fontBoundingBoxDescent;
  3081. // [experimental] actualBoundingBox* attributes
  3082. [Pref="dom.textMetrics.actualBoundingBox.enabled"]
  3083. readonly attribute double actualBoundingBoxAscent;
  3084. [Pref="dom.textMetrics.actualBoundingBox.enabled"]
  3085. readonly attribute double actualBoundingBoxDescent;
  3086. // [experimental] emHeight* attributes
  3087. [Pref="dom.textMetrics.emHeight.enabled"]
  3088. readonly attribute double emHeightAscent;
  3089. [Pref="dom.textMetrics.emHeight.enabled"]
  3090. readonly attribute double emHeightDescent;
  3091. // [experimental] *Baseline attributes
  3092. [Pref="dom.textMetrics.baselines.enabled"]
  3093. readonly attribute double hangingBaseline;
  3094. [Pref="dom.textMetrics.baselines.enabled"]
  3095. readonly attribute double alphabeticBaseline;
  3096. [Pref="dom.textMetrics.baselines.enabled"]
  3097. readonly attribute double ideographicBaseline;
  3098. };
  3099. [Exposed=(Window,Worker)]
  3100. interface Path2D
  3101. {
  3102. constructor();
  3103. constructor(Path2D other);
  3104. constructor(DOMString pathString);
  3105. [Throws] undefined addPath(Path2D path, optional DOMMatrix2DInit transform = {});
  3106. };
  3107. Path2D includes CanvasPathMethods;
  3108. /* ---------------------- CaretPosition ----------------------------- */
  3109. /* ./webidl/CaretPosition.webidl */
  3110. /* This Source Code Form is subject to the terms of the Mozilla Public
  3111. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3112. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  3113. [Exposed=Window]
  3114. interface CaretPosition {
  3115. /**
  3116. * The offsetNode could potentially be null due to anonymous content.
  3117. */
  3118. readonly attribute Node? offsetNode;
  3119. readonly attribute unsigned long offset;
  3120. };
  3121. /**
  3122. * Gecko specific methods and properties for CaretPosition.
  3123. */
  3124. partial interface CaretPosition {
  3125. DOMRect? getClientRect();
  3126. };
  3127. /* ---------------------- CaretStateChangedEvent ----------------------------- */
  3128. /* ./webidl/CaretStateChangedEvent.webidl */
  3129. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3130. /* This Source Code Form is subject to the terms of the Mozilla Public
  3131. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3132. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3133. */
  3134. enum CaretChangedReason {
  3135. "visibilitychange",
  3136. "updateposition",
  3137. "longpressonemptycontent",
  3138. "taponcaret",
  3139. "presscaret",
  3140. "releasecaret",
  3141. "scroll",
  3142. "dragcaret"
  3143. };
  3144. dictionary CaretStateChangedEventInit : EventInit {
  3145. boolean collapsed = true;
  3146. DOMRectReadOnly? boundingClientRect = null;
  3147. CaretChangedReason reason = "visibilitychange";
  3148. boolean caretVisible = false;
  3149. boolean caretVisuallyVisible = false;
  3150. boolean selectionVisible = false;
  3151. boolean selectionEditable = false;
  3152. DOMString selectedTextContent = "";
  3153. long clientX = 0;
  3154. long clientY = 0;
  3155. };
  3156. [ChromeOnly,
  3157. Exposed=Window]
  3158. interface CaretStateChangedEvent : Event {
  3159. constructor(DOMString type,
  3160. optional CaretStateChangedEventInit eventInit = {});
  3161. readonly attribute boolean collapsed;
  3162. /* The bounding client rect is relative to the visual viewport. */
  3163. readonly attribute DOMRectReadOnly? boundingClientRect;
  3164. readonly attribute CaretChangedReason reason;
  3165. readonly attribute boolean caretVisible;
  3166. readonly attribute boolean caretVisuallyVisible;
  3167. readonly attribute boolean selectionVisible;
  3168. readonly attribute boolean selectionEditable;
  3169. readonly attribute DOMString selectedTextContent;
  3170. [Pref="layout.accessiblecaret.magnifier.enabled"]
  3171. readonly attribute long clientX;
  3172. [Pref="layout.accessiblecaret.magnifier.enabled"]
  3173. readonly attribute long clientY;
  3174. };
  3175. /* ---------------------- CDATASection ----------------------------- */
  3176. /* ./webidl/CDATASection.webidl */
  3177. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3178. /* This Source Code Form is subject to the terms of the Mozilla Public
  3179. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3180. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3181. */
  3182. [Exposed=Window]
  3183. interface CDATASection : Text {
  3184. };
  3185. /* ---------------------- ChannelMergerNode ----------------------------- */
  3186. /* ./webidl/ChannelMergerNode.webidl */
  3187. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3188. /* This Source Code Form is subject to the terms of the Mozilla Public
  3189. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3190. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3191. *
  3192. * The origin of this IDL file is
  3193. * https://webaudio.github.io/web-audio-api/
  3194. *
  3195. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3196. * liability, trademark and document use rules apply.
  3197. */
  3198. dictionary ChannelMergerOptions : AudioNodeOptions {
  3199. unsigned long numberOfInputs = 6;
  3200. };
  3201. [Pref="dom.webaudio.enabled",
  3202. Exposed=Window]
  3203. interface ChannelMergerNode : AudioNode {
  3204. [Throws]
  3205. constructor(BaseAudioContext context,
  3206. optional ChannelMergerOptions options = {});
  3207. };
  3208. /* ---------------------- ChannelSplitterNode ----------------------------- */
  3209. /* ./webidl/ChannelSplitterNode.webidl */
  3210. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3211. /* This Source Code Form is subject to the terms of the Mozilla Public
  3212. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3213. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3214. *
  3215. * The origin of this IDL file is
  3216. * https://webaudio.github.io/web-audio-api/
  3217. *
  3218. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3219. * liability, trademark and document use rules apply.
  3220. */
  3221. dictionary ChannelSplitterOptions : AudioNodeOptions {
  3222. unsigned long numberOfOutputs = 6;
  3223. };
  3224. [Pref="dom.webaudio.enabled",
  3225. Exposed=Window]
  3226. interface ChannelSplitterNode : AudioNode {
  3227. [Throws]
  3228. constructor(BaseAudioContext context,
  3229. optional ChannelSplitterOptions options = {});
  3230. };
  3231. /* ---------------------- CharacterData ----------------------------- */
  3232. /* ./webidl/CharacterData.webidl */
  3233. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3234. /* This Source Code Form is subject to the terms of the Mozilla Public
  3235. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3236. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3237. *
  3238. * The origin of this IDL file is
  3239. * http://dom.spec.whatwg.org/#characterdata
  3240. *
  3241. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3242. * liability, trademark and document use rules apply.
  3243. */
  3244. [Exposed=Window]
  3245. interface CharacterData : Node {
  3246. [Pure, SetterThrows]
  3247. attribute [LegacyNullToEmptyString] DOMString data;
  3248. [Pure]
  3249. readonly attribute unsigned long length;
  3250. [Throws]
  3251. DOMString substringData(unsigned long offset, unsigned long count);
  3252. [Throws]
  3253. undefined appendData(DOMString data);
  3254. [Throws]
  3255. undefined insertData(unsigned long offset, DOMString data);
  3256. [Throws]
  3257. undefined deleteData(unsigned long offset, unsigned long count);
  3258. [Throws]
  3259. undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
  3260. };
  3261. CharacterData includes ChildNode;
  3262. CharacterData includes NonDocumentTypeChildNode;
  3263. /* ---------------------- CheckerboardReportService ----------------------------- */
  3264. /* ./webidl/CheckerboardReportService.webidl */
  3265. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3266. /* This Source Code Form is subject to the terms of the Mozilla Public
  3267. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3268. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3269. */
  3270. /*
  3271. * This file declares data structures used to communicate checkerboard reports
  3272. * from C++ code to about:checkerboard (see bug 1238042). These dictionaries
  3273. * are NOT exposed to standard web content.
  3274. */
  3275. enum CheckerboardReason {
  3276. "severe",
  3277. "recent"
  3278. };
  3279. // Individual checkerboard report. Contains fields for the severity of the
  3280. // checkerboard event, the timestamp at which it was reported, the detailed
  3281. // log of the event, and the reason this report was saved (currently either
  3282. // "severe" or "recent").
  3283. dictionary CheckerboardReport {
  3284. unsigned long severity;
  3285. DOMTimeStamp timestamp; // milliseconds since epoch
  3286. DOMString log;
  3287. CheckerboardReason reason;
  3288. };
  3289. // The guard function only allows creation of this interface on the
  3290. // about:checkerboard page, and only if it's in the parent process.
  3291. [Func="mozilla::dom::CheckerboardReportService::IsEnabled",
  3292. Exposed=Window]
  3293. interface CheckerboardReportService {
  3294. constructor();
  3295. /**
  3296. * Gets the available checkerboard reports.
  3297. */
  3298. sequence<CheckerboardReport> getReports();
  3299. /**
  3300. * Gets the state of the apz.record_checkerboarding pref.
  3301. */
  3302. boolean isRecordingEnabled();
  3303. /**
  3304. * Sets the state of the apz.record_checkerboarding pref.
  3305. */
  3306. undefined setRecordingEnabled(boolean aEnabled);
  3307. /**
  3308. * Flush any in-progress checkerboard reports. Since this happens
  3309. * asynchronously, the caller may register an observer with the observer
  3310. * service to be notified when this operation is complete. The observer should
  3311. * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving
  3312. * this notification, the caller may call getReports() to obtain the flushed
  3313. * reports, along with any other reports that are available.
  3314. */
  3315. undefined flushActiveReports();
  3316. };
  3317. /* ---------------------- ChildNode ----------------------------- */
  3318. /* ./webidl/ChildNode.webidl */
  3319. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3320. /* This Source Code Form is subject to the terms of the Mozilla Public
  3321. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3322. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3323. *
  3324. * The origin of this IDL file is
  3325. * http://dom.spec.whatwg.org/#interface-childnode
  3326. */
  3327. interface mixin ChildNode {
  3328. [CEReactions, Throws, Unscopable]
  3329. undefined before((Node or DOMString)... nodes);
  3330. [CEReactions, Throws, Unscopable]
  3331. undefined after((Node or DOMString)... nodes);
  3332. [CEReactions, Throws, Unscopable]
  3333. undefined replaceWith((Node or DOMString)... nodes);
  3334. [CEReactions, Unscopable]
  3335. undefined remove();
  3336. };
  3337. interface mixin NonDocumentTypeChildNode {
  3338. [Pure]
  3339. readonly attribute Element? previousElementSibling;
  3340. [Pure]
  3341. readonly attribute Element? nextElementSibling;
  3342. };
  3343. /* ---------------------- Client ----------------------------- */
  3344. /* ./webidl/Client.webidl */
  3345. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3346. /* This Source Code Form is subject to the terms of the Mozilla Public
  3347. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3348. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3349. *
  3350. * The origin of this IDL file is
  3351. * https://w3c.github.io/ServiceWorker/#client-interface
  3352. *
  3353. */
  3354. [Exposed=ServiceWorker]
  3355. interface Client {
  3356. readonly attribute USVString url;
  3357. // Remove frameType in bug 1290936
  3358. [BinaryName="GetFrameType"]
  3359. readonly attribute FrameType frameType;
  3360. readonly attribute ClientType type;
  3361. readonly attribute DOMString id;
  3362. // Implement reserved in bug 1264177
  3363. // readonly attribute boolean reserved;
  3364. [Throws]
  3365. undefined postMessage(any message, sequence<object> transfer);
  3366. [Throws]
  3367. undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {});
  3368. };
  3369. [Exposed=ServiceWorker]
  3370. interface WindowClient : Client {
  3371. [BinaryName="GetVisibilityState"]
  3372. readonly attribute VisibilityState visibilityState;
  3373. readonly attribute boolean focused;
  3374. // Implement ancestorOrigins in bug 1264180
  3375. // [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins;
  3376. [Throws, NewObject, NeedsCallerType]
  3377. Promise<WindowClient> focus();
  3378. [Throws, NewObject]
  3379. Promise<WindowClient> navigate(USVString url);
  3380. };
  3381. // Remove FrameType in bug 1290936
  3382. enum FrameType {
  3383. "auxiliary",
  3384. "top-level",
  3385. "nested",
  3386. "none"
  3387. };
  3388. /* ---------------------- Clients ----------------------------- */
  3389. /* ./webidl/Clients.webidl */
  3390. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3391. /* This Source Code Form is subject to the terms of the Mozilla Public
  3392. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3393. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3394. *
  3395. * The origin of this IDL file is
  3396. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  3397. *
  3398. */
  3399. [Exposed=ServiceWorker]
  3400. interface Clients {
  3401. // The objects returned will be new instances every time
  3402. [NewObject]
  3403. Promise<(Client or undefined)> get(DOMString id);
  3404. [NewObject]
  3405. Promise<sequence<Client>> matchAll(optional ClientQueryOptions options = {});
  3406. [NewObject]
  3407. Promise<WindowClient?> openWindow(USVString url);
  3408. [NewObject]
  3409. Promise<undefined> claim();
  3410. };
  3411. dictionary ClientQueryOptions {
  3412. boolean includeUncontrolled = false;
  3413. ClientType type = "window";
  3414. };
  3415. enum ClientType {
  3416. "window",
  3417. "worker",
  3418. "sharedworker",
  3419. // https://github.com/w3c/ServiceWorker/issues/1036
  3420. "serviceworker",
  3421. "all"
  3422. };
  3423. /* ---------------------- Clipboard ----------------------------- */
  3424. /* ./webidl/Clipboard.webidl */
  3425. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3426. /* This Source Code Form is subject to the terms of the Mozilla Public
  3427. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3428. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3429. *
  3430. * The origin of this IDL file is
  3431. * https://w3c.github.io/clipboard-apis/
  3432. *
  3433. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3434. * liability, trademark and document use rules apply.
  3435. */
  3436. typedef sequence<ClipboardItem> ClipboardItems;
  3437. [SecureContext,
  3438. Exposed=Window,
  3439. InstrumentedProps=(read,readText,write)]
  3440. interface Clipboard : EventTarget {
  3441. [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal]
  3442. Promise<ClipboardItems> read();
  3443. [Func="Clipboard::ReadTextEnabled", NewObject, NeedsSubjectPrincipal]
  3444. Promise<DOMString> readText();
  3445. [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal]
  3446. Promise<undefined> write(ClipboardItems data);
  3447. [NewObject, NeedsSubjectPrincipal]
  3448. Promise<undefined> writeText(DOMString data);
  3449. };
  3450. typedef (DOMString or Blob) ClipboardItemDataType;
  3451. typedef Promise<ClipboardItemDataType> ClipboardItemData;
  3452. // callback ClipboardItemDelayedCallback = ClipboardItemData ();
  3453. [SecureContext, Exposed=Window, Pref="dom.events.asyncClipboard.clipboardItem"]
  3454. interface ClipboardItem {
  3455. [Throws]
  3456. constructor(record<DOMString, ClipboardItemData> items,
  3457. optional ClipboardItemOptions options = {});
  3458. // static ClipboardItem createDelayed(
  3459. // record<DOMString, ClipboardItemDelayedCallback> items,
  3460. // optional ClipboardItemOptions options = {});
  3461. readonly attribute PresentationStyle presentationStyle;
  3462. // readonly attribute long long lastModified;
  3463. // readonly attribute boolean delayed;
  3464. // TODO: Use FrozenArray once available. (Bug 1236777)
  3465. // readonly attribute FrozenArray<DOMString> types;
  3466. [Frozen, Cached, Pure]
  3467. readonly attribute sequence<DOMString> types;
  3468. [NewObject]
  3469. Promise<Blob> getType(DOMString type);
  3470. };
  3471. enum PresentationStyle { "unspecified", "inline", "attachment" };
  3472. dictionary ClipboardItemOptions {
  3473. PresentationStyle presentationStyle = "unspecified";
  3474. };
  3475. /* ---------------------- ClipboardEvent ----------------------------- */
  3476. /* ./webidl/ClipboardEvent.webidl */
  3477. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3478. /* This Source Code Form is subject to the terms of the Mozilla Public
  3479. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3480. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3481. *
  3482. * For more information on this interface please see
  3483. * http://dev.w3.org/2006/webapi/clipops/#x5-clipboard-event-interfaces
  3484. *
  3485. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3486. * liability, trademark and document use rules apply.
  3487. */
  3488. [Exposed=Window]
  3489. interface ClipboardEvent : Event
  3490. {
  3491. [Throws]
  3492. constructor(DOMString type, optional ClipboardEventInit eventInitDict = {});
  3493. readonly attribute DataTransfer? clipboardData;
  3494. };
  3495. dictionary ClipboardEventInit : EventInit
  3496. {
  3497. DOMString data = "";
  3498. DOMString dataType = "";
  3499. };
  3500. /* ---------------------- CloseEvent ----------------------------- */
  3501. /* ./webidl/CloseEvent.webidl */
  3502. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3503. /* This Source Code Form is subject to the terms of the Mozilla Public
  3504. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3505. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3506. *
  3507. * The nsIDOMCloseEvent interface is the interface to the event
  3508. * close on a WebSocket object.
  3509. *
  3510. * For more information on this interface, please see
  3511. * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
  3512. */
  3513. [LegacyEventInit,
  3514. Exposed=(Window,Worker)]
  3515. interface CloseEvent : Event
  3516. {
  3517. constructor(DOMString type, optional CloseEventInit eventInitDict = {});
  3518. readonly attribute boolean wasClean;
  3519. readonly attribute unsigned short code;
  3520. readonly attribute DOMString reason;
  3521. };
  3522. dictionary CloseEventInit : EventInit
  3523. {
  3524. boolean wasClean = false;
  3525. unsigned short code = 0;
  3526. DOMString reason = "";
  3527. };
  3528. /* ---------------------- Comment ----------------------------- */
  3529. /* ./webidl/Comment.webidl */
  3530. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3531. /* This Source Code Form is subject to the terms of the Mozilla Public
  3532. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3533. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3534. *
  3535. * The origin of this IDL file is
  3536. * http://dom.spec.whatwg.org/#comment
  3537. *
  3538. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3539. * liability, trademark and document use rules apply.
  3540. */
  3541. [Exposed=Window]
  3542. interface Comment : CharacterData {
  3543. [Throws]
  3544. constructor(optional DOMString data = "");
  3545. };
  3546. /* ---------------------- CompositionEvent ----------------------------- */
  3547. /* ./webidl/CompositionEvent.webidl */
  3548. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3549. /* This Source Code Form is subject to the terms of the Mozilla Public
  3550. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3551. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3552. *
  3553. * https://w3c.github.io/uievents/#interface-compositionevent
  3554. *
  3555. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3556. * liability, trademark and document use rules apply.
  3557. */
  3558. [Exposed=Window]
  3559. interface CompositionEvent : UIEvent
  3560. {
  3561. constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
  3562. readonly attribute DOMString? data;
  3563. // locale is currently non-standard
  3564. readonly attribute DOMString locale;
  3565. /**
  3566. * ranges is trying to expose TextRangeArray in Gecko so a
  3567. * js-plugin couble be able to know the clauses information
  3568. */
  3569. [ChromeOnly,Cached,Pure]
  3570. readonly attribute sequence<TextClause> ranges;
  3571. };
  3572. dictionary CompositionEventInit : UIEventInit {
  3573. DOMString data = "";
  3574. };
  3575. partial interface CompositionEvent
  3576. {
  3577. undefined initCompositionEvent(DOMString typeArg,
  3578. optional boolean canBubbleArg = false,
  3579. optional boolean cancelableArg = false,
  3580. optional Window? viewArg = null,
  3581. optional DOMString? dataArg = null,
  3582. optional DOMString localeArg = "");
  3583. };
  3584. /* ---------------------- CompressionStream ----------------------------- */
  3585. /* ./webidl/CompressionStream.webidl */
  3586. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3587. /* This Source Code Form is subject to the terms of the Mozilla Public
  3588. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3589. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3590. *
  3591. * The origin of this IDL file is
  3592. * https://wicg.github.io/compression/#compression-stream
  3593. */
  3594. enum CompressionFormat {
  3595. "deflate",
  3596. "deflate-raw",
  3597. "gzip",
  3598. };
  3599. [Exposed=*, Pref="dom.compression_streams.enabled"]
  3600. interface CompressionStream {
  3601. [Throws]
  3602. constructor(CompressionFormat format);
  3603. };
  3604. CompressionStream includes GenericTransformStream;
  3605. /* ---------------------- Console ----------------------------- */
  3606. /* ./webidl/Console.webidl */
  3607. /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3608. /* vim: set ts=2 et sw=2 tw=80: */
  3609. /* This Source Code Form is subject to the terms of the Mozilla Public
  3610. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3611. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3612. *
  3613. * For more information on this interface, please see
  3614. * https://console.spec.whatwg.org/#console-namespace
  3615. */
  3616. [Exposed=(Window,Worker,WorkerDebugger,Worklet),
  3617. ClassString="Console",
  3618. ProtoObjectHack]
  3619. namespace console {
  3620. // NOTE: if you touch this namespace, remember to update the ConsoleInstance
  3621. // interface as well! - dom/chrome-webidl/ConsoleInstance.webidl
  3622. // Logging
  3623. [UseCounter]
  3624. undefined assert(optional boolean condition = false, any... data);
  3625. [UseCounter]
  3626. undefined clear();
  3627. [UseCounter]
  3628. undefined count(optional DOMString label = "default");
  3629. [UseCounter]
  3630. undefined countReset(optional DOMString label = "default");
  3631. [UseCounter]
  3632. undefined debug(any... data);
  3633. [UseCounter]
  3634. undefined error(any... data);
  3635. [UseCounter]
  3636. undefined info(any... data);
  3637. [UseCounter]
  3638. undefined log(any... data);
  3639. [UseCounter]
  3640. undefined table(any... data); // FIXME: The spec is still unclear about this.
  3641. [UseCounter]
  3642. undefined trace(any... data);
  3643. [UseCounter]
  3644. undefined warn(any... data);
  3645. [UseCounter]
  3646. undefined dir(any... data); // FIXME: This doesn't follow the spec yet.
  3647. [UseCounter]
  3648. undefined dirxml(any... data);
  3649. // Grouping
  3650. [UseCounter]
  3651. undefined group(any... data);
  3652. [UseCounter]
  3653. undefined groupCollapsed(any... data);
  3654. [UseCounter]
  3655. undefined groupEnd();
  3656. // Timing
  3657. [UseCounter]
  3658. undefined time(optional DOMString label = "default");
  3659. [UseCounter]
  3660. undefined timeLog(optional DOMString label = "default", any... data);
  3661. [UseCounter]
  3662. undefined timeEnd(optional DOMString label = "default");
  3663. // Mozilla only or Webcompat methods
  3664. [UseCounter]
  3665. undefined _exception(any... data);
  3666. [UseCounter]
  3667. undefined timeStamp(optional any data);
  3668. [UseCounter]
  3669. undefined profile(any... data);
  3670. [UseCounter]
  3671. undefined profileEnd(any... data);
  3672. [ChromeOnly]
  3673. const boolean IS_NATIVE_CONSOLE = true;
  3674. [ChromeOnly, NewObject]
  3675. ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {});
  3676. };
  3677. /* ---------------------- ConstantSourceNode ----------------------------- */
  3678. /* ./webidl/ConstantSourceNode.webidl */
  3679. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3680. /* This Source Code Form is subject to the terms of the Mozilla Public
  3681. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3682. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3683. *
  3684. * The origin of this IDL file is
  3685. * https://webaudio.github.io/web-audio-api/
  3686. *
  3687. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3688. * liability, trademark and document use rules apply.
  3689. */
  3690. dictionary ConstantSourceOptions {
  3691. float offset = 1;
  3692. };
  3693. [Pref="dom.webaudio.enabled",
  3694. Exposed=Window]
  3695. interface ConstantSourceNode : AudioScheduledSourceNode {
  3696. constructor(BaseAudioContext context,
  3697. optional ConstantSourceOptions options = {});
  3698. readonly attribute AudioParam offset;
  3699. };
  3700. /* ---------------------- ContentVisibilityAutoStateChangeEvent ----------------------------- */
  3701. /* ./webidl/ContentVisibilityAutoStateChangeEvent.webidl */
  3702. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3703. /* This Source Code Form is subject to the terms of the Mozilla Public
  3704. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3705. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3706. *
  3707. * https://drafts.csswg.org/css-contain-2/#content-visibility-auto-state-changed
  3708. */
  3709. [Exposed=Window, Pref="layout.css.content-visibility.enabled"]
  3710. interface ContentVisibilityAutoStateChangeEvent : Event {
  3711. constructor(DOMString type,
  3712. optional ContentVisibilityAutoStateChangeEventInit eventInitDict = {});
  3713. readonly attribute boolean skipped;
  3714. };
  3715. dictionary ContentVisibilityAutoStateChangeEventInit : EventInit {
  3716. boolean skipped = false;
  3717. };
  3718. /* ---------------------- ConvolverNode ----------------------------- */
  3719. /* ./webidl/ConvolverNode.webidl */
  3720. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3721. /* This Source Code Form is subject to the terms of the Mozilla Public
  3722. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3723. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3724. *
  3725. * The origin of this IDL file is
  3726. * https://webaudio.github.io/web-audio-api/
  3727. *
  3728. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3729. * liability, trademark and document use rules apply.
  3730. */
  3731. dictionary ConvolverOptions : AudioNodeOptions {
  3732. AudioBuffer? buffer;
  3733. boolean disableNormalization = false;
  3734. };
  3735. [Pref="dom.webaudio.enabled",
  3736. Exposed=Window]
  3737. interface ConvolverNode : AudioNode {
  3738. [Throws]
  3739. constructor(BaseAudioContext context, optional
  3740. ConvolverOptions options = {});
  3741. [SetterThrows]
  3742. attribute AudioBuffer? buffer;
  3743. attribute boolean normalize;
  3744. };
  3745. // Mozilla extension
  3746. ConvolverNode includes AudioNodePassThrough;
  3747. /* ---------------------- CreateOfferRequest ----------------------------- */
  3748. /* ./webidl/CreateOfferRequest.webidl */
  3749. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3750. /* This Source Code Form is subject to the terms of the Mozilla Public
  3751. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3752. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3753. *
  3754. * This is an internal IDL file
  3755. */
  3756. [ChromeOnly,
  3757. JSImplementation="@mozilla.org/dom/createofferrequest;1",
  3758. Exposed=Window]
  3759. interface CreateOfferRequest {
  3760. readonly attribute unsigned long long windowID;
  3761. readonly attribute unsigned long long innerWindowID;
  3762. readonly attribute DOMString callID;
  3763. readonly attribute boolean isSecure;
  3764. };
  3765. /* ---------------------- CredentialManagement ----------------------------- */
  3766. /* ./webidl/CredentialManagement.webidl */
  3767. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3768. /* This Source Code Form is subject to the terms of the Mozilla Public
  3769. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3770. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3771. *
  3772. * The origin of this IDL file is
  3773. * https://w3c.github.io/webappsec-credential-management/
  3774. * and
  3775. * https://w3c.github.io/webauthn/
  3776. * and
  3777. * https://fedidcg.github.io/FedCM/
  3778. */
  3779. [Exposed=Window, SecureContext]
  3780. interface Credential {
  3781. readonly attribute USVString id;
  3782. readonly attribute DOMString type;
  3783. };
  3784. [Exposed=Window, SecureContext]
  3785. interface CredentialsContainer {
  3786. [NewObject]
  3787. Promise<Credential?> get(optional CredentialRequestOptions options = {});
  3788. [NewObject]
  3789. Promise<Credential?> create(optional CredentialCreationOptions options = {});
  3790. [NewObject]
  3791. Promise<Credential> store(Credential credential);
  3792. [NewObject]
  3793. Promise<undefined> preventSilentAccess();
  3794. };
  3795. dictionary CredentialRequestOptions {
  3796. CredentialMediationRequirement mediation = "optional";
  3797. AbortSignal signal;
  3798. // This is taken from the partial definition in
  3799. // https://w3c.github.io/webauthn/#sctn-credentialrequestoptions-extension
  3800. [Pref="security.webauth.webauthn"]
  3801. PublicKeyCredentialRequestOptions publicKey;
  3802. // This is taken from the partial definition in
  3803. // https://fedidcg.github.io/FedCM/#browser-api-credential-request-options
  3804. [Pref="dom.security.credentialmanagement.identity.enabled"]
  3805. IdentityCredentialRequestOptions identity;
  3806. };
  3807. enum CredentialMediationRequirement {
  3808. "silent",
  3809. "optional",
  3810. "conditional",
  3811. "required"
  3812. };
  3813. dictionary CredentialCreationOptions {
  3814. // This is taken from the partial definition in
  3815. // https://w3c.github.io/webauthn/#sctn-credentialcreationoptions-extension
  3816. [Pref="security.webauth.webauthn"]
  3817. PublicKeyCredentialCreationOptions publicKey;
  3818. AbortSignal signal;
  3819. };
  3820. /* ---------------------- Crypto ----------------------------- */
  3821. /* ./webidl/Crypto.webidl */
  3822. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3823. /* This Source Code Form is subject to the terms of the Mozilla Public
  3824. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3825. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3826. *
  3827. * The origin of this IDL file is
  3828. * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface
  3829. */
  3830. [Exposed=(Window,Worker)]
  3831. interface mixin GlobalCrypto {
  3832. [Throws] readonly attribute Crypto crypto;
  3833. };
  3834. [Exposed=(Window,Worker)]
  3835. interface Crypto {
  3836. [SecureContext]
  3837. readonly attribute SubtleCrypto subtle;
  3838. [Throws]
  3839. ArrayBufferView getRandomValues(ArrayBufferView array);
  3840. [SecureContext]
  3841. UTF8String randomUUID();
  3842. };
  3843. /* ---------------------- CSPDictionaries ----------------------------- */
  3844. /* ./webidl/CSPDictionaries.webidl */
  3845. /* This Source Code Form is subject to the terms of the Mozilla Public
  3846. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3847. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  3848. /**
  3849. * Dictionary used to display CSP info.
  3850. */
  3851. dictionary CSP {
  3852. boolean report-only = false;
  3853. sequence<DOMString> default-src;
  3854. sequence<DOMString> script-src;
  3855. sequence<DOMString> object-src;
  3856. sequence<DOMString> style-src;
  3857. sequence<DOMString> img-src;
  3858. sequence<DOMString> media-src;
  3859. sequence<DOMString> frame-src;
  3860. sequence<DOMString> font-src;
  3861. sequence<DOMString> connect-src;
  3862. sequence<DOMString> report-uri;
  3863. sequence<DOMString> frame-ancestors;
  3864. // sequence<DOMString> reflected-xss; // not supported in Firefox
  3865. sequence<DOMString> base-uri;
  3866. sequence<DOMString> form-action;
  3867. sequence<DOMString> referrer;
  3868. sequence<DOMString> manifest-src;
  3869. sequence<DOMString> upgrade-insecure-requests;
  3870. sequence<DOMString> child-src;
  3871. sequence<DOMString> block-all-mixed-content;
  3872. sequence<DOMString> sandbox;
  3873. sequence<DOMString> worker-src;
  3874. sequence<DOMString> script-src-elem;
  3875. sequence<DOMString> script-src-attr;
  3876. };
  3877. [GenerateToJSON]
  3878. dictionary CSPPolicies {
  3879. sequence<CSP> csp-policies;
  3880. };
  3881. /* ---------------------- CSPReport ----------------------------- */
  3882. /* ./webidl/CSPReport.webidl */
  3883. /* This Source Code Form is subject to the terms of the Mozilla Public
  3884. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3885. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  3886. /**
  3887. * This dictionary holds the parameters used to send
  3888. * CSP reports in JSON format.
  3889. *
  3890. * Based on https://w3c.github.io/webappsec-csp/#deprecated-serialize-violation
  3891. */
  3892. dictionary CSPReportProperties {
  3893. DOMString document-uri = "";
  3894. DOMString referrer = "";
  3895. DOMString blocked-uri = "";
  3896. DOMString effective-directive = "";
  3897. DOMString violated-directive = "";
  3898. DOMString original-policy= "";
  3899. SecurityPolicyViolationEventDisposition disposition = "report";
  3900. long status-code = 0;
  3901. DOMString source-file;
  3902. DOMString script-sample;
  3903. long line-number;
  3904. long column-number;
  3905. };
  3906. [GenerateToJSON]
  3907. dictionary CSPReport {
  3908. // We always want to have a "csp-report" property, so just pre-initialize it
  3909. // to an empty dictionary..
  3910. CSPReportProperties csp-report = {};
  3911. };
  3912. /* ---------------------- CSS ----------------------------- */
  3913. /* ./webidl/CSS.webidl */
  3914. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3915. /* This Source Code Form is subject to the terms of the Mozilla Public
  3916. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3917. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3918. *
  3919. * The origin of this IDL file is
  3920. * http://dev.w3.org/csswg/css3-conditional/
  3921. * http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
  3922. * https://www.w3.org/TR/css-highlight-api-1/#registration
  3923. *
  3924. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3925. * liability, trademark and document use rules apply.
  3926. */
  3927. [Exposed=Window]
  3928. namespace CSS {
  3929. boolean supports(UTF8String property, UTF8String value);
  3930. boolean supports(UTF8String conditionText);
  3931. };
  3932. // http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
  3933. partial namespace CSS {
  3934. DOMString escape(DOMString ident);
  3935. };
  3936. // https://www.w3.org/TR/css-highlight-api-1/#registration
  3937. partial namespace CSS {
  3938. [Pref="dom.customHighlightAPI.enabled", GetterThrows]
  3939. readonly attribute HighlightRegistry highlights;
  3940. };
  3941. // https://drafts.css-houdini.org/css-properties-values-api-1/#registering-custom-properties
  3942. // See https://github.com/w3c/css-houdini-drafts/pull/1100 for DOMString vs. UTF8String
  3943. dictionary PropertyDefinition {
  3944. required UTF8String name;
  3945. UTF8String syntax = "*";
  3946. required boolean inherits;
  3947. UTF8String initialValue;
  3948. };
  3949. partial namespace CSS {
  3950. [Pref="layout.css.properties-and-values.enabled", Throws]
  3951. undefined registerProperty(PropertyDefinition definition);
  3952. };
  3953. /* ---------------------- CSSAnimation ----------------------------- */
  3954. /* ./webidl/CSSAnimation.webidl */
  3955. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3956. /* This Source Code Form is subject to the terms of the Mozilla Public
  3957. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3958. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3959. *
  3960. * The origin of this IDL file is
  3961. * http://dev.w3.org/csswg/css-animations-2/#the-CSSAnimation-interface
  3962. *
  3963. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  3964. * liability, trademark and document use rules apply.
  3965. */
  3966. [HeaderFile="nsAnimationManager.h", Exposed=Window]
  3967. interface CSSAnimation : Animation {
  3968. [Constant] readonly attribute DOMString animationName;
  3969. };
  3970. /* ---------------------- CSSConditionRule ----------------------------- */
  3971. /* ./webidl/CSSConditionRule.webidl */
  3972. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3973. /* This Source Code Form is subject to the terms of the Mozilla Public
  3974. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3975. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3976. *
  3977. * The origin of this IDL file is
  3978. * https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
  3979. */
  3980. // https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
  3981. [Exposed=Window]
  3982. interface CSSConditionRule : CSSGroupingRule {
  3983. readonly attribute UTF8String conditionText;
  3984. };
  3985. /* ---------------------- CSSContainerRule ----------------------------- */
  3986. /* ./webidl/CSSContainerRule.webidl */
  3987. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3988. /* This Source Code Form is subject to the terms of the Mozilla Public
  3989. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3990. * You can obtain one at http://mozilla.org/MPL/2.0/.
  3991. *
  3992. * The origin of this IDL file is
  3993. * https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
  3994. */
  3995. // https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
  3996. [Exposed=Window, Pref="layout.css.container-queries.enabled"]
  3997. interface CSSContainerRule : CSSConditionRule {
  3998. readonly attribute UTF8String containerName;
  3999. readonly attribute UTF8String containerQuery;
  4000. // Performs a container query look-up for an element.
  4001. [ChromeOnly] Element? queryContainerFor(Element element);
  4002. };
  4003. /* ---------------------- CSSCounterStyleRule ----------------------------- */
  4004. /* ./webidl/CSSCounterStyleRule.webidl */
  4005. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4006. /* This Source Code Form is subject to the terms of the Mozilla Public
  4007. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4008. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4009. *
  4010. * The origin of this IDL file is
  4011. * https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
  4012. */
  4013. // https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
  4014. [Exposed=Window]
  4015. interface CSSCounterStyleRule : CSSRule {
  4016. attribute DOMString name;
  4017. attribute UTF8String system;
  4018. attribute UTF8String symbols;
  4019. attribute UTF8String additiveSymbols;
  4020. attribute UTF8String negative;
  4021. attribute UTF8String prefix;
  4022. attribute UTF8String suffix;
  4023. attribute UTF8String range;
  4024. attribute UTF8String pad;
  4025. attribute UTF8String speakAs;
  4026. attribute UTF8String fallback;
  4027. };
  4028. /* ---------------------- CSSFontFaceRule ----------------------------- */
  4029. /* ./webidl/CSSFontFaceRule.webidl */
  4030. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4031. /* This Source Code Form is subject to the terms of the Mozilla Public
  4032. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4033. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4034. *
  4035. * The origin of this IDL file is
  4036. * https://drafts.csswg.org/css-fonts/#om-fontface
  4037. */
  4038. // https://drafts.csswg.org/css-fonts/#om-fontface
  4039. // But we implement a very old draft, apparently....
  4040. // See bug 1058408 for implementing the current spec.
  4041. [Exposed=Window]
  4042. interface CSSFontFaceRule : CSSRule {
  4043. [SameObject] readonly attribute CSSStyleDeclaration style;
  4044. };
  4045. /* ---------------------- CSSFontFeatureValuesRule ----------------------------- */
  4046. /* ./webidl/CSSFontFeatureValuesRule.webidl */
  4047. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4048. /* This Source Code Form is subject to the terms of the Mozilla Public
  4049. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4050. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4051. *
  4052. * The origin of this IDL file is
  4053. * https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
  4054. */
  4055. // https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
  4056. // but we don't implement anything remotely resembling the spec.
  4057. [Exposed=Window]
  4058. interface CSSFontFeatureValuesRule : CSSRule {
  4059. [SetterThrows]
  4060. attribute UTF8String fontFamily;
  4061. // Not yet implemented
  4062. // readonly attribute CSSFontFeatureValuesMap annotation;
  4063. // readonly attribute CSSFontFeatureValuesMap ornaments;
  4064. // readonly attribute CSSFontFeatureValuesMap stylistic;
  4065. // readonly attribute CSSFontFeatureValuesMap swash;
  4066. // readonly attribute CSSFontFeatureValuesMap characterVariant;
  4067. // readonly attribute CSSFontFeatureValuesMap styleset;
  4068. };
  4069. partial interface CSSFontFeatureValuesRule {
  4070. // Gecko addition?
  4071. [SetterThrows]
  4072. attribute UTF8String valueText;
  4073. };
  4074. /* ---------------------- CSSFontPaletteValuesRule ----------------------------- */
  4075. /* ./webidl/CSSFontPaletteValuesRule.webidl */
  4076. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4077. /* This Source Code Form is subject to the terms of the Mozilla Public
  4078. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4079. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4080. *
  4081. * The origin of this IDL file is
  4082. * https://drafts.csswg.org/css-fonts/#om-fontpalettevalues
  4083. */
  4084. [Exposed=Window, Pref="layout.css.font-palette.enabled"]
  4085. interface CSSFontPaletteValuesRule : CSSRule {
  4086. readonly attribute UTF8String name;
  4087. readonly attribute UTF8String fontFamily;
  4088. readonly attribute UTF8String basePalette;
  4089. readonly attribute UTF8String overrideColors;
  4090. };
  4091. /* ---------------------- CSSGroupingRule ----------------------------- */
  4092. /* ./webidl/CSSGroupingRule.webidl */
  4093. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4094. /* This Source Code Form is subject to the terms of the Mozilla Public
  4095. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4096. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4097. *
  4098. * The origin of this IDL file is
  4099. * https://drafts.csswg.org/cssom/#cssgroupingrule
  4100. */
  4101. // https://drafts.csswg.org/cssom/#cssgroupingrule
  4102. [Exposed=Window]
  4103. interface CSSGroupingRule : CSSRule {
  4104. [SameObject] readonly attribute CSSRuleList cssRules;
  4105. [Throws]
  4106. unsigned long insertRule(UTF8String rule, optional unsigned long index = 0);
  4107. [Throws]
  4108. undefined deleteRule(unsigned long index);
  4109. };
  4110. /* ---------------------- CSSImportRule ----------------------------- */
  4111. /* ./webidl/CSSImportRule.webidl */
  4112. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4113. /* This Source Code Form is subject to the terms of the Mozilla Public
  4114. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4115. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4116. *
  4117. * The origin of this IDL file is
  4118. * https://drafts.csswg.org/cssom/#cssimportrule
  4119. */
  4120. // https://drafts.csswg.org/cssom/#cssimportrule
  4121. [Exposed=Window]
  4122. interface CSSImportRule : CSSRule {
  4123. readonly attribute DOMString href;
  4124. // Per spec, the .media is never null, but in our implementation it can
  4125. // be since stylesheet can be null, and in Stylo, media is derived from
  4126. // the stylesheet. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
  4127. [SameObject, PutForwards=mediaText] readonly attribute MediaList? media;
  4128. [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet;
  4129. readonly attribute UTF8String? layerName;
  4130. readonly attribute UTF8String? supportsText;
  4131. };
  4132. /* ---------------------- CSSKeyframeRule ----------------------------- */
  4133. /* ./webidl/CSSKeyframeRule.webidl */
  4134. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4135. /* This Source Code Form is subject to the terms of the Mozilla Public
  4136. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4137. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4138. *
  4139. * The origin of this IDL file is
  4140. * https://drafts.csswg.org/css-animations/#interface-csskeyframerule
  4141. */
  4142. // https://drafts.csswg.org/css-animations/#interface-csskeyframerule
  4143. [Exposed=Window]
  4144. interface CSSKeyframeRule : CSSRule {
  4145. attribute UTF8String keyText;
  4146. [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
  4147. };
  4148. /* ---------------------- CSSKeyframesRule ----------------------------- */
  4149. /* ./webidl/CSSKeyframesRule.webidl */
  4150. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4151. /* This Source Code Form is subject to the terms of the Mozilla Public
  4152. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4153. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4154. *
  4155. * The origin of this IDL file is
  4156. * https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
  4157. */
  4158. // https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
  4159. [Exposed=Window]
  4160. interface CSSKeyframesRule : CSSRule {
  4161. attribute DOMString name;
  4162. readonly attribute CSSRuleList cssRules;
  4163. getter CSSKeyframeRule (unsigned long index);
  4164. readonly attribute unsigned long length;
  4165. undefined appendRule(DOMString rule);
  4166. undefined deleteRule(DOMString select);
  4167. CSSKeyframeRule? findRule(DOMString select);
  4168. };
  4169. /* ---------------------- CSSLayerBlockRule ----------------------------- */
  4170. /* ./webidl/CSSLayerBlockRule.webidl */
  4171. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4172. /* This Source Code Form is subject to the terms of the Mozilla Public
  4173. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4174. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4175. *
  4176. * The origin of this IDL file is
  4177. * https://drafts.csswg.org/css-cascade-5/#the-csslayerblockrule-interface
  4178. */
  4179. [Exposed=Window]
  4180. interface CSSLayerBlockRule : CSSGroupingRule {
  4181. readonly attribute UTF8String name;
  4182. };
  4183. /* ---------------------- CSSLayerStatementRule ----------------------------- */
  4184. /* ./webidl/CSSLayerStatementRule.webidl */
  4185. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4186. /* This Source Code Form is subject to the terms of the Mozilla Public
  4187. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4188. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4189. *
  4190. * The origin of this IDL file is
  4191. * https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface
  4192. */
  4193. [Exposed=Window]
  4194. interface CSSLayerStatementRule : CSSRule {
  4195. // readonly attribute FrozenArray<CSSOMString> nameList;
  4196. [Frozen, Cached, Pure]
  4197. readonly attribute sequence<UTF8String> nameList;
  4198. };
  4199. /* ---------------------- CSSMediaRule ----------------------------- */
  4200. /* ./webidl/CSSMediaRule.webidl */
  4201. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4202. /* This Source Code Form is subject to the terms of the Mozilla Public
  4203. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4204. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4205. *
  4206. * The origin of this IDL file is
  4207. * https://drafts.csswg.org/cssom/#the-cssmediarule-interface
  4208. * https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
  4209. */
  4210. // https://drafts.csswg.org/cssom/#the-cssmediarule-interface and
  4211. // https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
  4212. // except they disagree with each other. We're taking the inheritance from
  4213. // css-conditional and the PutForwards behavior from cssom.
  4214. [Exposed=Window]
  4215. interface CSSMediaRule : CSSConditionRule {
  4216. [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
  4217. };
  4218. /* ---------------------- CSSMozDocumentRule ----------------------------- */
  4219. /* ./webidl/CSSMozDocumentRule.webidl */
  4220. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4221. /* This Source Code Form is subject to the terms of the Mozilla Public
  4222. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4223. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4224. */
  4225. // This is a non-standard interface for @-moz-document rules
  4226. [Exposed=Window]
  4227. interface CSSMozDocumentRule : CSSConditionRule {
  4228. // XXX Add access to the URL list.
  4229. };
  4230. /* ---------------------- CSSNamespaceRule ----------------------------- */
  4231. /* ./webidl/CSSNamespaceRule.webidl */
  4232. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4233. /* This Source Code Form is subject to the terms of the Mozilla Public
  4234. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4235. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4236. *
  4237. * The origin of this IDL file is
  4238. * https://drafts.csswg.org/cssom/#cssnamespacerule
  4239. */
  4240. // https://drafts.csswg.org/cssom/#cssnamespacerule
  4241. [Exposed=Window]
  4242. interface CSSNamespaceRule : CSSRule {
  4243. readonly attribute DOMString namespaceURI;
  4244. readonly attribute DOMString prefix;
  4245. };
  4246. /* ---------------------- CSSPageRule ----------------------------- */
  4247. /* ./webidl/CSSPageRule.webidl */
  4248. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4249. /* This Source Code Form is subject to the terms of the Mozilla Public
  4250. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4251. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4252. *
  4253. * The origin of this IDL file is
  4254. * https://drafts.csswg.org/cssom/#the-csspagerule-interface
  4255. */
  4256. // https://drafts.csswg.org/cssom/#the-csspagerule-interface
  4257. // Per spec, this should inherit from CSSGroupingRule, but we don't
  4258. // implement this yet.
  4259. [Exposed=Window]
  4260. interface CSSPageRule : CSSRule {
  4261. attribute UTF8String selectorText;
  4262. [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
  4263. };
  4264. /* ---------------------- CSSPropertyRule ----------------------------- */
  4265. /* ./webidl/CSSPropertyRule.webidl */
  4266. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4267. /* This Source Code Form is subject to the terms of the Mozilla Public
  4268. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4269. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4270. *
  4271. * The origin of this IDL file is
  4272. * https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface
  4273. */
  4274. // https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface
  4275. [Exposed=Window, Pref="layout.css.properties-and-values.enabled"]
  4276. interface CSSPropertyRule : CSSRule {
  4277. readonly attribute UTF8String name;
  4278. readonly attribute UTF8String syntax;
  4279. readonly attribute boolean inherits;
  4280. readonly attribute UTF8String? initialValue;
  4281. };
  4282. /* ---------------------- CSSPseudoElement ----------------------------- */
  4283. /* ./webidl/CSSPseudoElement.webidl */
  4284. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4285. /* This Source Code Form is subject to the terms of the Mozilla Public
  4286. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4287. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4288. *
  4289. * The origin of this IDL file is
  4290. * https://drafts.csswg.org/css-pseudo-4/#csspseudoelement
  4291. *
  4292. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  4293. * liability, trademark and document use rules apply.
  4294. */
  4295. [Pref="dom.css_pseudo_element.enabled",
  4296. Exposed=Window]
  4297. interface CSSPseudoElement {
  4298. readonly attribute DOMString type;
  4299. readonly attribute Element element;
  4300. };
  4301. /* ---------------------- CSSRule ----------------------------- */
  4302. /* ./webidl/CSSRule.webidl */
  4303. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4304. /* This Source Code Form is subject to the terms of the Mozilla Public
  4305. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4306. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4307. *
  4308. * The origin of this IDL file is
  4309. * https://drafts.csswg.org/cssom/#the-cssrule-interface
  4310. * https://drafts.csswg.org/css-animations/#interface-cssrule
  4311. * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
  4312. * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
  4313. * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
  4314. */
  4315. // https://drafts.csswg.org/cssom/#the-cssrule-interface
  4316. [Exposed=Window]
  4317. interface CSSRule {
  4318. const unsigned short STYLE_RULE = 1;
  4319. const unsigned short CHARSET_RULE = 2; // historical
  4320. const unsigned short IMPORT_RULE = 3;
  4321. const unsigned short MEDIA_RULE = 4;
  4322. const unsigned short FONT_FACE_RULE = 5;
  4323. const unsigned short PAGE_RULE = 6;
  4324. // FIXME: We don't support MARGIN_RULE yet.
  4325. // XXXbz Should we expose the constant anyway?
  4326. // const unsigned short MARGIN_RULE = 9;
  4327. const unsigned short NAMESPACE_RULE = 10;
  4328. [BinaryName="typeForBindings"] readonly attribute unsigned short type;
  4329. attribute UTF8String cssText;
  4330. readonly attribute CSSRule? parentRule;
  4331. readonly attribute CSSStyleSheet? parentStyleSheet;
  4332. };
  4333. // https://drafts.csswg.org/css-animations/#interface-cssrule
  4334. partial interface CSSRule {
  4335. const unsigned short KEYFRAMES_RULE = 7;
  4336. const unsigned short KEYFRAME_RULE = 8;
  4337. };
  4338. // https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
  4339. partial interface CSSRule {
  4340. const unsigned short COUNTER_STYLE_RULE = 11;
  4341. };
  4342. // https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
  4343. partial interface CSSRule {
  4344. const unsigned short SUPPORTS_RULE = 12;
  4345. };
  4346. // Non-standard extension for @-moz-document rules.
  4347. partial interface CSSRule {
  4348. [ChromeOnly]
  4349. const unsigned short DOCUMENT_RULE = 13;
  4350. };
  4351. // https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
  4352. partial interface CSSRule {
  4353. const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  4354. };
  4355. /* ---------------------- CSSRuleList ----------------------------- */
  4356. /* ./webidl/CSSRuleList.webidl */
  4357. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4358. /* This Source Code Form is subject to the terms of the Mozilla Public
  4359. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4360. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4361. */
  4362. [Exposed=Window]
  4363. interface CSSRuleList {
  4364. readonly attribute unsigned long length;
  4365. getter CSSRule? item(unsigned long index);
  4366. };
  4367. /* ---------------------- CSSScopeRule ----------------------------- */
  4368. /* ./webidl/CSSScopeRule.webidl */
  4369. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4370. /* This Source Code Form is subject to the terms of the Mozilla Public
  4371. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4372. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4373. *
  4374. * The origin of this IDL file is
  4375. * https://drafts.csswg.org/css-cascade-6/#the-cssscoperule-interface
  4376. */
  4377. [Exposed=Window, Pref="layout.css.at-scope.enabled"]
  4378. interface CSSScopeRule : CSSGroupingRule {
  4379. readonly attribute UTF8String? start;
  4380. readonly attribute UTF8String? end;
  4381. };
  4382. /* ---------------------- CSSStyleDeclaration ----------------------------- */
  4383. /* ./webidl/CSSStyleDeclaration.webidl */
  4384. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4385. /* This Source Code Form is subject to the terms of the Mozilla Public
  4386. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4387. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4388. *
  4389. * The origin of this IDL file is
  4390. * http://dev.w3.org/csswg/cssom/
  4391. */
  4392. // Because of getComputedStyle, many CSSStyleDeclaration objects can be
  4393. // short-living.
  4394. [ProbablyShortLivingWrapper,
  4395. Exposed=Window]
  4396. interface CSSStyleDeclaration {
  4397. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  4398. attribute UTF8String cssText;
  4399. readonly attribute unsigned long length;
  4400. getter UTF8String item(unsigned long index);
  4401. [Throws, ChromeOnly]
  4402. sequence<UTF8String> getCSSImageURLs(UTF8String property);
  4403. [ChromeOnly]
  4404. readonly attribute float usedFontSize;
  4405. UTF8String getPropertyValue(UTF8String property);
  4406. UTF8String getPropertyPriority(UTF8String property);
  4407. [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
  4408. undefined setProperty(UTF8String property, [LegacyNullToEmptyString] UTF8String value, optional [LegacyNullToEmptyString] UTF8String priority = "");
  4409. [CEReactions, Throws]
  4410. UTF8String removeProperty(UTF8String property);
  4411. readonly attribute CSSRule? parentRule;
  4412. };
  4413. /* ---------------------- CSSStyleRule ----------------------------- */
  4414. /* ./webidl/CSSStyleRule.webidl */
  4415. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4416. /* This Source Code Form is subject to the terms of the Mozilla Public
  4417. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4418. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4419. *
  4420. * The origin of this IDL file is
  4421. * https://drafts.csswg.org/cssom/#the-cssstylerule-interface
  4422. */
  4423. // https://drafts.csswg.org/cssom/#the-cssstylerule-interface
  4424. [Exposed=Window]
  4425. interface CSSStyleRule : CSSGroupingRule {
  4426. attribute UTF8String selectorText;
  4427. [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
  4428. [ChromeOnly] readonly attribute unsigned long selectorCount;
  4429. [ChromeOnly] UTF8String selectorTextAt(unsigned long index, optional boolean desugared = false);
  4430. [ChromeOnly] unsigned long long selectorSpecificityAt(unsigned long index, optional boolean desugared = false);
  4431. [ChromeOnly] boolean selectorMatchesElement(
  4432. unsigned long selectorIndex,
  4433. Element element,
  4434. optional [LegacyNullToEmptyString] DOMString pseudo = "",
  4435. optional boolean includeVisitedStyle = false);
  4436. [ChromeOnly] sequence<SelectorWarning> getSelectorWarnings();
  4437. };
  4438. enum SelectorWarningKind {
  4439. "UnconstrainedHas",
  4440. };
  4441. dictionary SelectorWarning {
  4442. required unsigned long index;
  4443. required SelectorWarningKind kind;
  4444. };
  4445. /* ---------------------- CSSStyleSheet ----------------------------- */
  4446. /* ./webidl/CSSStyleSheet.webidl */
  4447. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4448. /* This Source Code Form is subject to the terms of the Mozilla Public
  4449. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4450. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4451. *
  4452. * The origin of this IDL file is
  4453. * http://dev.w3.org/csswg/cssom/
  4454. * https://wicg.github.io/construct-stylesheets/
  4455. */
  4456. enum CSSStyleSheetParsingMode {
  4457. "author",
  4458. "user",
  4459. "agent"
  4460. };
  4461. dictionary CSSStyleSheetInit {
  4462. (MediaList or UTF8String) media = "";
  4463. boolean disabled = false;
  4464. UTF8String baseURL;
  4465. };
  4466. [Exposed=Window]
  4467. interface CSSStyleSheet : StyleSheet {
  4468. [Throws]
  4469. constructor(optional CSSStyleSheetInit options = {});
  4470. [Pure, BinaryName="DOMOwnerRule"]
  4471. readonly attribute CSSRule? ownerRule;
  4472. [Throws, NeedsSubjectPrincipal]
  4473. readonly attribute CSSRuleList cssRules;
  4474. [ChromeOnly, BinaryName="parsingModeDOM"]
  4475. readonly attribute CSSStyleSheetParsingMode parsingMode;
  4476. [Throws, NeedsSubjectPrincipal]
  4477. unsigned long insertRule(UTF8String rule, optional unsigned long index = 0);
  4478. [Throws, NeedsSubjectPrincipal]
  4479. undefined deleteRule(unsigned long index);
  4480. [NewObject]
  4481. Promise<CSSStyleSheet> replace(UTF8String text);
  4482. [Throws]
  4483. undefined replaceSync(UTF8String text);
  4484. // Non-standard WebKit things.
  4485. [Throws, NeedsSubjectPrincipal, BinaryName="cssRules"]
  4486. readonly attribute CSSRuleList rules;
  4487. [Throws, NeedsSubjectPrincipal, BinaryName="deleteRule"]
  4488. undefined removeRule(optional unsigned long index = 0);
  4489. [Throws, NeedsSubjectPrincipal]
  4490. long addRule(optional UTF8String selector = "undefined", optional UTF8String style = "undefined", optional unsigned long index);
  4491. };
  4492. /* ---------------------- CSSSupportsRule ----------------------------- */
  4493. /* ./webidl/CSSSupportsRule.webidl */
  4494. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4495. /* This Source Code Form is subject to the terms of the Mozilla Public
  4496. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4497. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4498. *
  4499. * The origin of this IDL file is
  4500. * https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
  4501. */
  4502. // https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
  4503. [Exposed=Window]
  4504. interface CSSSupportsRule : CSSConditionRule {
  4505. };
  4506. /* ---------------------- CSSTransition ----------------------------- */
  4507. /* ./webidl/CSSTransition.webidl */
  4508. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4509. /* This Source Code Form is subject to the terms of the Mozilla Public
  4510. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4511. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4512. *
  4513. * The origin of this IDL file is
  4514. * http://dev.w3.org/csswg/css-transitions-2/#the-CSSTransition-interface
  4515. *
  4516. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  4517. * liability, trademark and document use rules apply.
  4518. */
  4519. [HeaderFile="nsTransitionManager.h", Exposed=Window]
  4520. interface CSSTransition : Animation {
  4521. [Constant] readonly attribute DOMString transitionProperty;
  4522. };
  4523. /* ---------------------- CustomElementRegistry ----------------------------- */
  4524. /* ./webidl/CustomElementRegistry.webidl */
  4525. /* This Source Code Form is subject to the terms of the Mozilla Public
  4526. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4527. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4528. // https://html.spec.whatwg.org/#dom-window-customelements
  4529. [Exposed=Window]
  4530. interface CustomElementRegistry {
  4531. [CEReactions, Throws, UseCounter]
  4532. undefined define(DOMString name, CustomElementConstructor constructor,
  4533. optional ElementDefinitionOptions options = {});
  4534. [ChromeOnly, Throws]
  4535. undefined setElementCreationCallback(DOMString name, CustomElementCreationCallback callback);
  4536. (CustomElementConstructor or undefined) get(DOMString name);
  4537. DOMString? getName(CustomElementConstructor constructor);
  4538. [Throws]
  4539. Promise<CustomElementConstructor> whenDefined(DOMString name);
  4540. [CEReactions] undefined upgrade(Node root);
  4541. };
  4542. dictionary ElementDefinitionOptions {
  4543. DOMString extends;
  4544. };
  4545. enum RestoreReason {
  4546. "restore",
  4547. "autocomplete",
  4548. };
  4549. callback constructor CustomElementConstructor = any ();
  4550. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4551. callback CustomElementCreationCallback = undefined (DOMString name);
  4552. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4553. callback LifecycleConnectedCallback = undefined();
  4554. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4555. callback LifecycleDisconnectedCallback = undefined();
  4556. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4557. callback LifecycleAdoptedCallback = undefined(Document? oldDocument,
  4558. Document? newDocment);
  4559. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4560. callback LifecycleAttributeChangedCallback = undefined(DOMString attrName,
  4561. DOMString? oldValue,
  4562. DOMString? newValue,
  4563. DOMString? namespaceURI);
  4564. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4565. callback LifecycleFormAssociatedCallback = undefined(HTMLFormElement? form);
  4566. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4567. callback LifecycleFormResetCallback = undefined();
  4568. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4569. callback LifecycleFormDisabledCallback = undefined(boolean disabled);
  4570. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4571. callback LifecycleFormStateRestoreCallback = undefined((File or USVString or FormData)? state, RestoreReason reason);
  4572. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  4573. callback LifecycleGetCustomInterfaceCallback = object?(any iid);
  4574. // Unsorted is necessary until https://github.com/whatwg/html/issues/3580 is resolved.
  4575. [GenerateInit, Unsorted]
  4576. dictionary LifecycleCallbacks {
  4577. LifecycleConnectedCallback connectedCallback;
  4578. LifecycleDisconnectedCallback disconnectedCallback;
  4579. LifecycleAdoptedCallback adoptedCallback;
  4580. LifecycleAttributeChangedCallback attributeChangedCallback;
  4581. [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback;
  4582. };
  4583. [GenerateInit, Unsorted]
  4584. dictionary FormAssociatedLifecycleCallbacks {
  4585. LifecycleFormAssociatedCallback formAssociatedCallback;
  4586. LifecycleFormResetCallback formResetCallback;
  4587. LifecycleFormDisabledCallback formDisabledCallback;
  4588. LifecycleFormStateRestoreCallback formStateRestoreCallback;
  4589. };
  4590. /* ---------------------- CustomEvent ----------------------------- */
  4591. /* ./webidl/CustomEvent.webidl */
  4592. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4593. /* This Source Code Form is subject to the terms of the Mozilla Public
  4594. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4595. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4596. *
  4597. * The origin of this IDL file is
  4598. * http://www.w3.org/TR/2012/WD-dom-20120105/
  4599. *
  4600. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  4601. * liability, trademark and document use rules apply.
  4602. */
  4603. [Exposed=(Window, Worker)]
  4604. interface CustomEvent : Event
  4605. {
  4606. constructor(DOMString type, optional CustomEventInit eventInitDict = {});
  4607. readonly attribute any detail;
  4608. // initCustomEvent is a Gecko specific deprecated method.
  4609. undefined initCustomEvent(DOMString type,
  4610. optional boolean canBubble = false,
  4611. optional boolean cancelable = false,
  4612. optional any detail = null);
  4613. };
  4614. dictionary CustomEventInit : EventInit
  4615. {
  4616. any detail = null;
  4617. };
  4618. /* ---------------------- DataTransfer ----------------------------- */
  4619. /* ./webidl/DataTransfer.webidl */
  4620. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4621. /* This Source Code Form is subject to the terms of the Mozilla Public
  4622. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4623. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4624. *
  4625. * The origin of this IDL file is:
  4626. * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
  4627. */
  4628. interface ContentSecurityPolicy;
  4629. [Exposed=Window]
  4630. interface DataTransfer {
  4631. constructor();
  4632. attribute DOMString dropEffect;
  4633. attribute DOMString effectAllowed;
  4634. readonly attribute DataTransferItemList items;
  4635. undefined setDragImage(Element image, long x, long y);
  4636. [Frozen, Cached, Pure, NeedsCallerType]
  4637. readonly attribute sequence<DOMString> types;
  4638. [Throws, NeedsSubjectPrincipal]
  4639. DOMString getData(DOMString format);
  4640. [Throws, NeedsSubjectPrincipal]
  4641. undefined setData(DOMString format, DOMString data);
  4642. [Throws, NeedsSubjectPrincipal]
  4643. undefined clearData(optional DOMString format);
  4644. [NeedsSubjectPrincipal]
  4645. readonly attribute FileList? files;
  4646. };
  4647. // Mozilla specific stuff
  4648. partial interface DataTransfer {
  4649. /*
  4650. * Set the drag source. Usually you would not change this, but it will
  4651. * affect which node the drag and dragend events are fired at. The
  4652. * default target is the node that was dragged.
  4653. *
  4654. * @param element drag source to use
  4655. * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
  4656. */
  4657. [Throws, UseCounter]
  4658. undefined addElement(Element element);
  4659. /**
  4660. * The number of items being dragged.
  4661. */
  4662. [ChromeOnly]
  4663. readonly attribute unsigned long mozItemCount;
  4664. /**
  4665. * Sets the drag cursor state. Primarily used to control the cursor during
  4666. * tab drags, but could be expanded to other uses. XXX Currently implemented
  4667. * on Win32 only.
  4668. *
  4669. * Possible values:
  4670. * auto - use default system behavior.
  4671. * default - set the cursor to an arrow during the drag operation.
  4672. *
  4673. * Values other than 'default' are indentical to setting mozCursor to
  4674. * 'auto'.
  4675. */
  4676. [UseCounter]
  4677. attribute DOMString mozCursor;
  4678. /**
  4679. * Holds a list of the format types of the data that is stored for an item
  4680. * at the specified index. If the index is not in the range from 0 to
  4681. * itemCount - 1, an empty string list is returned.
  4682. */
  4683. [Throws, ChromeOnly]
  4684. DOMStringList mozTypesAt(unsigned long index);
  4685. /**
  4686. * Remove the data associated with the given format for an item at the
  4687. * specified index. The index is in the range from zero to itemCount - 1.
  4688. *
  4689. * If the last format for the item is removed, the entire item is removed,
  4690. * reducing the itemCount by one.
  4691. *
  4692. * If format is empty, then the data associated with all formats is removed.
  4693. * If the format is not found, then this method has no effect.
  4694. *
  4695. * @param format the format to remove
  4696. * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
  4697. * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
  4698. */
  4699. [Throws, ChromeOnly]
  4700. undefined mozClearDataAt(DOMString format, unsigned long index);
  4701. /*
  4702. * A data transfer may store multiple items, each at a given zero-based
  4703. * index. setDataAt may only be called with an index argument less than
  4704. * itemCount in which case an existing item is modified, or equal to
  4705. * itemCount in which case a new item is added, and the itemCount is
  4706. * incremented by one.
  4707. *
  4708. * Data should be added in order of preference, with the most specific
  4709. * format added first and the least specific format added last. If data of
  4710. * the given format already exists, it is replaced in the same position as
  4711. * the old data.
  4712. *
  4713. * The data should be either a string, a primitive boolean or number type
  4714. * (which will be converted into a string) or an nsISupports.
  4715. *
  4716. * @param format the format to add
  4717. * @param data the data to add
  4718. * @throws NS_ERROR_NULL_POINTER if the data is null
  4719. * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater than itemCount
  4720. * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
  4721. */
  4722. [Throws, ChromeOnly]
  4723. undefined mozSetDataAt(DOMString format, any data, unsigned long index);
  4724. /**
  4725. * Retrieve the data associated with the given format for an item at the
  4726. * specified index, or null if it does not exist. The index should be in the
  4727. * range from zero to itemCount - 1.
  4728. *
  4729. * @param format the format of the data to look up
  4730. * @returns the data of the given format, or null if it doesn't exist.
  4731. * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
  4732. */
  4733. [Throws, ChromeOnly]
  4734. any mozGetDataAt(DOMString format, unsigned long index);
  4735. /**
  4736. * Update the drag image. Arguments are the same as setDragImage. This is only
  4737. * valid within the parent chrome process.
  4738. */
  4739. [ChromeOnly]
  4740. undefined updateDragImage(Element image, long x, long y);
  4741. /**
  4742. * Will be true when the user has cancelled the drag (typically by pressing
  4743. * Escape) and when the drag has been cancelled unexpectedly. This will be
  4744. * false otherwise, including when the drop has been rejected by its target.
  4745. * This property is only relevant for the dragend event.
  4746. */
  4747. [UseCounter]
  4748. readonly attribute boolean mozUserCancelled;
  4749. /**
  4750. * The node that the mouse was pressed over to begin the drag. For external
  4751. * drags, or if the caller cannot access this node, this will be null.
  4752. */
  4753. [UseCounter]
  4754. readonly attribute Node? mozSourceNode;
  4755. /**
  4756. * The top-level window context that mouse was pressed over to begin the drag.
  4757. * For external drags, this will be null.
  4758. */
  4759. [ChromeOnly]
  4760. readonly attribute WindowContext? sourceTopWindowContext;
  4761. /**
  4762. * The URI spec of the triggering principal. This may be different than
  4763. * sourceNode's principal when sourceNode is xul:browser and the drag is
  4764. * triggered in a browsing context inside it.
  4765. */
  4766. [ChromeOnly]
  4767. readonly attribute DOMString mozTriggeringPrincipalURISpec;
  4768. [ChromeOnly]
  4769. readonly attribute ContentSecurityPolicy? mozCSP;
  4770. /**
  4771. * Copy the given DataTransfer for the given event. Used by testing code for
  4772. * creating emulated Drag and Drop events in the UI.
  4773. *
  4774. * NOTE: Don't expose a DataTransfer produced with this method to the web or
  4775. * use this for non-testing purposes. It can easily be used to get the
  4776. * DataTransfer into an invalid state, and is an unstable implementation
  4777. * detail of EventUtils.synthesizeDrag.
  4778. */
  4779. [Throws, ChromeOnly]
  4780. DataTransfer mozCloneForEvent(DOMString event);
  4781. /**
  4782. * Whether to show the "fail" animation that returns a dragged item
  4783. * to its source. Only works on macOS, and has to be set early in the drag
  4784. * on that platform.
  4785. * Defaults to true.
  4786. */
  4787. [ChromeOnly]
  4788. attribute boolean mozShowFailAnimation;
  4789. };
  4790. /* ---------------------- DataTransferItem ----------------------------- */
  4791. /* ./webidl/DataTransferItem.webidl */
  4792. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4793. /* This Source Code Form is subject to the terms of the Mozilla Public
  4794. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4795. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4796. *
  4797. * The origin of this IDL file is:
  4798. * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface
  4799. * https://wicg.github.io/entries-api/#idl-index
  4800. */
  4801. [InstrumentedProps=(webkitGetAsEntry),Exposed=Window]
  4802. interface DataTransferItem {
  4803. readonly attribute DOMString kind;
  4804. readonly attribute DOMString type;
  4805. [Throws, NeedsSubjectPrincipal]
  4806. undefined getAsString(FunctionStringCallback? callback);
  4807. [Throws, NeedsSubjectPrincipal]
  4808. File? getAsFile();
  4809. };
  4810. callback FunctionStringCallback = undefined (DOMString data);
  4811. // https://wicg.github.io/entries-api/#idl-index
  4812. partial interface DataTransferItem {
  4813. [Pref="dom.webkitBlink.filesystem.enabled", BinaryName="getAsEntry", Throws,
  4814. NeedsSubjectPrincipal]
  4815. FileSystemEntry? webkitGetAsEntry();
  4816. };
  4817. /* ---------------------- DataTransferItemList ----------------------------- */
  4818. /* ./webidl/DataTransferItemList.webidl */
  4819. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4820. /* This Source Code Form is subject to the terms of the Mozilla Public
  4821. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4822. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4823. *
  4824. * The origin of this IDL file is:
  4825. * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface
  4826. */
  4827. [Exposed=Window]
  4828. interface DataTransferItemList {
  4829. readonly attribute unsigned long length;
  4830. getter DataTransferItem (unsigned long index);
  4831. [Throws, NeedsSubjectPrincipal]
  4832. DataTransferItem? add(DOMString data, DOMString type);
  4833. [Throws, NeedsSubjectPrincipal]
  4834. DataTransferItem? add(File data);
  4835. [Throws, NeedsSubjectPrincipal]
  4836. undefined remove(unsigned long index);
  4837. [Throws, NeedsSubjectPrincipal]
  4838. undefined clear();
  4839. };
  4840. /* ---------------------- DecoderDoctorNotification ----------------------------- */
  4841. /* ./webidl/DecoderDoctorNotification.webidl */
  4842. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4843. /* This Source Code Form is subject to the terms of the Mozilla Public
  4844. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4845. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4846. */
  4847. enum DecoderDoctorNotificationType {
  4848. "cannot-play",
  4849. "platform-decoder-not-found",
  4850. "can-play-but-some-missing-decoders",
  4851. "cannot-initialize-pulseaudio",
  4852. "unsupported-libavcodec",
  4853. "decode-error",
  4854. "decode-warning",
  4855. };
  4856. enum DecoderDoctorReportType {
  4857. "mediawidevinenowmf",
  4858. "mediawmfneeded",
  4859. "mediaplatformdecodernotfound",
  4860. "mediacannotplaynodecoders",
  4861. "medianodecoders",
  4862. "mediacannotinitializepulseaudio",
  4863. "mediaunsupportedlibavcodec",
  4864. "mediadecodeerror",
  4865. "mediadecodewarning",
  4866. };
  4867. [GenerateToJSON]
  4868. dictionary DecoderDoctorNotification {
  4869. required DecoderDoctorNotificationType type;
  4870. // True when the issue has been solved.
  4871. required boolean isSolved;
  4872. // Key from dom.properties, used for telemetry and prefs.
  4873. required DOMString decoderDoctorReportId;
  4874. // If provided, formats (or key systems) at issue.
  4875. DOMString formats;
  4876. // If provided, technical details about the decode-error/warning.
  4877. DOMString decodeIssue;
  4878. // If provided, URL of the document where the issue happened.
  4879. DOMString docURL;
  4880. // If provided, URL of the media resource that caused a decode-error/warning.
  4881. DOMString resourceURL;
  4882. };
  4883. /* ---------------------- DecompressionStream ----------------------------- */
  4884. /* ./webidl/DecompressionStream.webidl */
  4885. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4886. /* This Source Code Form is subject to the terms of the Mozilla Public
  4887. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4888. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4889. *
  4890. * The origin of this IDL file is
  4891. * https://wicg.github.io/compression/#decompression-stream
  4892. */
  4893. [Exposed=*, Pref="dom.compression_streams.enabled"]
  4894. interface DecompressionStream {
  4895. [Throws]
  4896. constructor(CompressionFormat format);
  4897. };
  4898. DecompressionStream includes GenericTransformStream;
  4899. /* ---------------------- DedicatedWorkerGlobalScope ----------------------------- */
  4900. /* ./webidl/DedicatedWorkerGlobalScope.webidl */
  4901. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4902. /* This Source Code Form is subject to the terms of the Mozilla Public
  4903. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4904. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4905. *
  4906. * The origin of this IDL file is
  4907. * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
  4908. *
  4909. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  4910. * Software ASA.
  4911. * You are granted a license to use, reproduce and create derivative works of
  4912. * this document.
  4913. */
  4914. [Global=(Worker,DedicatedWorker),
  4915. Exposed=DedicatedWorker]
  4916. interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
  4917. [Replaceable]
  4918. readonly attribute DOMString name;
  4919. [Throws]
  4920. undefined postMessage(any message, sequence<object> transfer);
  4921. [Throws]
  4922. undefined postMessage(any message, optional StructuredSerializeOptions options = {});
  4923. undefined close();
  4924. attribute EventHandler onmessage;
  4925. attribute EventHandler onmessageerror;
  4926. };
  4927. // https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-methods
  4928. partial interface DedicatedWorkerGlobalScope {
  4929. [Pref="media.peerconnection.enabled",
  4930. Pref="media.peerconnection.scripttransform.enabled"] attribute EventHandler onrtctransform;
  4931. };
  4932. // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
  4933. DedicatedWorkerGlobalScope includes AnimationFrameProvider;
  4934. /* ---------------------- DelayNode ----------------------------- */
  4935. /* ./webidl/DelayNode.webidl */
  4936. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4937. /* This Source Code Form is subject to the terms of the Mozilla Public
  4938. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4939. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4940. *
  4941. * The origin of this IDL file is
  4942. * https://webaudio.github.io/web-audio-api/
  4943. *
  4944. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  4945. * liability, trademark and document use rules apply.
  4946. */
  4947. dictionary DelayOptions : AudioNodeOptions {
  4948. double maxDelayTime = 1;
  4949. double delayTime = 0;
  4950. };
  4951. [Pref="dom.webaudio.enabled",
  4952. Exposed=Window]
  4953. interface DelayNode : AudioNode {
  4954. [Throws]
  4955. constructor(BaseAudioContext context, optional DelayOptions options = {});
  4956. readonly attribute AudioParam delayTime;
  4957. };
  4958. // Mozilla extension
  4959. DelayNode includes AudioNodePassThrough;
  4960. /* ---------------------- DeviceLightEvent ----------------------------- */
  4961. /* ./webidl/DeviceLightEvent.webidl */
  4962. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4963. /* This Source Code Form is subject to the terms of the Mozilla Public
  4964. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4965. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4966. */
  4967. [Pref="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
  4968. Exposed=Window]
  4969. interface DeviceLightEvent : Event
  4970. {
  4971. constructor(DOMString type, optional DeviceLightEventInit eventInitDict = {});
  4972. readonly attribute unrestricted double value;
  4973. };
  4974. dictionary DeviceLightEventInit : EventInit
  4975. {
  4976. unrestricted double value = Infinity;
  4977. };
  4978. /* ---------------------- DeviceMotionEvent ----------------------------- */
  4979. /* ./webidl/DeviceMotionEvent.webidl */
  4980. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  4981. /* This Source Code Form is subject to the terms of the Mozilla Public
  4982. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4983. * You can obtain one at http://mozilla.org/MPL/2.0/.
  4984. *
  4985. * https://w3c.github.io/deviceorientation/
  4986. */
  4987. [LegacyNoInterfaceObject,
  4988. Exposed=Window]
  4989. interface DeviceAcceleration {
  4990. readonly attribute double? x;
  4991. readonly attribute double? y;
  4992. readonly attribute double? z;
  4993. };
  4994. [LegacyNoInterfaceObject,
  4995. Exposed=Window]
  4996. interface DeviceRotationRate {
  4997. readonly attribute double? alpha;
  4998. readonly attribute double? beta;
  4999. readonly attribute double? gamma;
  5000. };
  5001. [Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
  5002. Exposed=Window]
  5003. interface DeviceMotionEvent : Event {
  5004. constructor(DOMString type,
  5005. optional DeviceMotionEventInit eventInitDict = {});
  5006. readonly attribute DeviceAcceleration? acceleration;
  5007. readonly attribute DeviceAcceleration? accelerationIncludingGravity;
  5008. readonly attribute DeviceRotationRate? rotationRate;
  5009. readonly attribute double? interval;
  5010. };
  5011. dictionary DeviceAccelerationInit {
  5012. double? x = null;
  5013. double? y = null;
  5014. double? z = null;
  5015. };
  5016. dictionary DeviceRotationRateInit {
  5017. double? alpha = null;
  5018. double? beta = null;
  5019. double? gamma = null;
  5020. };
  5021. dictionary DeviceMotionEventInit : EventInit {
  5022. // FIXME: bug 1493860: should this "= {}" be here?
  5023. DeviceAccelerationInit acceleration = {};
  5024. // FIXME: bug 1493860: should this "= {}" be here?
  5025. DeviceAccelerationInit accelerationIncludingGravity = {};
  5026. // FIXME: bug 1493860: should this "= {}" be here?
  5027. DeviceRotationRateInit rotationRate = {};
  5028. double? interval = null;
  5029. };
  5030. // Mozilla extensions.
  5031. partial interface DeviceMotionEvent {
  5032. undefined initDeviceMotionEvent(DOMString type,
  5033. optional boolean canBubble = false,
  5034. optional boolean cancelable = false,
  5035. optional DeviceAccelerationInit acceleration = {},
  5036. optional DeviceAccelerationInit accelerationIncludingGravity = {},
  5037. optional DeviceRotationRateInit rotationRate = {},
  5038. optional double? interval = null);
  5039. };
  5040. /* ---------------------- DeviceOrientationEvent ----------------------------- */
  5041. /* ./webidl/DeviceOrientationEvent.webidl */
  5042. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5043. /* This Source Code Form is subject to the terms of the Mozilla Public
  5044. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5045. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5046. */
  5047. [Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit,
  5048. Exposed=Window]
  5049. interface DeviceOrientationEvent : Event
  5050. {
  5051. constructor(DOMString type,
  5052. optional DeviceOrientationEventInit eventInitDict = {});
  5053. readonly attribute double? alpha;
  5054. readonly attribute double? beta;
  5055. readonly attribute double? gamma;
  5056. readonly attribute boolean absolute;
  5057. // initDeviceOrientationEvent is a Gecko specific deprecated method.
  5058. undefined initDeviceOrientationEvent(DOMString type,
  5059. optional boolean canBubble = false,
  5060. optional boolean cancelable = false,
  5061. optional double? alpha = null,
  5062. optional double? beta = null,
  5063. optional double? gamma = null,
  5064. optional boolean absolute = false);
  5065. };
  5066. dictionary DeviceOrientationEventInit : EventInit
  5067. {
  5068. double? alpha = null;
  5069. double? beta = null;
  5070. double? gamma = null;
  5071. boolean absolute = false;
  5072. };
  5073. /* ---------------------- Directory ----------------------------- */
  5074. /* ./webidl/Directory.webidl */
  5075. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5076. /* This Source Code Form is subject to the terms of the Mozilla Public
  5077. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5078. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5079. */
  5080. /*
  5081. * All functions on Directory that accept DOMString arguments for file or
  5082. * directory names only allow relative path to current directory itself. The
  5083. * path should be a descendent path like "path/to/file.txt" and not contain a
  5084. * segment of ".." or ".". So the paths aren't allowed to walk up the directory
  5085. * tree. For example, paths like "../foo", "..", "/foo/bar" or "foo/../bar" are
  5086. * not allowed.
  5087. *
  5088. * http://w3c.github.io/filesystem-api/#idl-def-Directory
  5089. * https://microsoftedge.github.io/directory-upload/proposal.html#directory-interface
  5090. */
  5091. [Exposed=(Window,Worker)]
  5092. interface Directory {
  5093. // This ChromeOnly constructor is used by the MockFilePicker for testing only.
  5094. [Throws, ChromeOnly]
  5095. constructor(DOMString path);
  5096. /*
  5097. * The leaf name of the directory.
  5098. */
  5099. [Throws]
  5100. readonly attribute DOMString name;
  5101. };
  5102. [Exposed=(Window,Worker)]
  5103. partial interface Directory {
  5104. // Already defined in the main interface declaration:
  5105. //readonly attribute DOMString name;
  5106. /*
  5107. * The path of the Directory (includes both its basename and leafname).
  5108. * The path begins with the name of the ancestor Directory that was
  5109. * originally exposed to content (say via a directory picker) and traversed
  5110. * to obtain this Directory. Full filesystem paths are not exposed to
  5111. * unprivilaged content.
  5112. */
  5113. [Throws]
  5114. readonly attribute DOMString path;
  5115. /*
  5116. * Getter for the immediate children of this directory.
  5117. */
  5118. [NewObject]
  5119. Promise<sequence<(File or Directory)>> getFilesAndDirectories();
  5120. [NewObject]
  5121. Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
  5122. };
  5123. /* ---------------------- Document ----------------------------- */
  5124. /* ./webidl/Document.webidl */
  5125. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5126. /* This Source Code Form is subject to the terms of the Mozilla Public
  5127. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5128. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5129. *
  5130. * https://dom.spec.whatwg.org/#interface-document
  5131. * https://html.spec.whatwg.org/multipage/dom.html#the-document-object
  5132. * https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
  5133. * https://fullscreen.spec.whatwg.org/#api
  5134. * https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
  5135. * https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
  5136. * https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
  5137. * https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
  5138. * https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
  5139. * https://wicg.github.io/feature-policy/#policy
  5140. * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
  5141. */
  5142. interface ContentSecurityPolicy;
  5143. interface Principal;
  5144. interface WindowProxy;
  5145. interface nsISupports;
  5146. interface URI;
  5147. interface nsIDocShell;
  5148. interface nsILoadGroup;
  5149. interface nsIReferrerInfo;
  5150. interface nsICookieJarSettings;
  5151. interface nsIPermissionDelegateHandler;
  5152. interface XULCommandDispatcher;
  5153. enum VisibilityState { "hidden", "visible" };
  5154. /* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
  5155. dictionary ElementCreationOptions {
  5156. DOMString is;
  5157. [ChromeOnly]
  5158. DOMString pseudo;
  5159. };
  5160. /* https://dom.spec.whatwg.org/#interface-document */
  5161. [Exposed=Window,
  5162. InstrumentedProps=(caretRangeFromPoint,
  5163. exitPictureInPicture,
  5164. featurePolicy,
  5165. onbeforecopy,
  5166. onbeforecut,
  5167. onbeforepaste,
  5168. oncancel,
  5169. onfreeze,
  5170. onmousewheel,
  5171. onresume,
  5172. onsearch,
  5173. onwebkitfullscreenchange,
  5174. onwebkitfullscreenerror,
  5175. pictureInPictureElement,
  5176. pictureInPictureEnabled,
  5177. registerElement,
  5178. wasDiscarded,
  5179. webkitCancelFullScreen,
  5180. webkitCurrentFullScreenElement,
  5181. webkitExitFullscreen,
  5182. webkitFullscreenElement,
  5183. webkitFullscreenEnabled,
  5184. webkitHidden,
  5185. webkitIsFullScreen,
  5186. webkitVisibilityState,
  5187. xmlEncoding,
  5188. xmlStandalone,
  5189. xmlVersion)]
  5190. interface Document : Node {
  5191. [Throws]
  5192. constructor();
  5193. [Throws]
  5194. readonly attribute DOMImplementation implementation;
  5195. [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
  5196. readonly attribute DOMString URL;
  5197. [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
  5198. readonly attribute DOMString documentURI;
  5199. [Pure]
  5200. readonly attribute DOMString compatMode;
  5201. [Pure]
  5202. readonly attribute DOMString characterSet;
  5203. [Pure,BinaryName="characterSet"]
  5204. readonly attribute DOMString charset; // legacy alias of .characterSet
  5205. [Pure,BinaryName="characterSet"]
  5206. readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
  5207. [Pure]
  5208. readonly attribute DOMString contentType;
  5209. [Pure]
  5210. readonly attribute DocumentType? doctype;
  5211. [Pure]
  5212. readonly attribute Element? documentElement;
  5213. [Pure]
  5214. HTMLCollection getElementsByTagName(DOMString localName);
  5215. [Pure, Throws]
  5216. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  5217. [Pure]
  5218. HTMLCollection getElementsByClassName(DOMString classNames);
  5219. // These DOM methods cannot be accessed by UA Widget scripts
  5220. // because the DOM element reflectors will be in the content scope,
  5221. // instead of the desired UA Widget scope.
  5222. [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
  5223. Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
  5224. [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
  5225. Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {});
  5226. [NewObject]
  5227. DocumentFragment createDocumentFragment();
  5228. [NewObject, Func="IsNotUAWidget"]
  5229. Text createTextNode(DOMString data);
  5230. [NewObject, Func="IsNotUAWidget"]
  5231. Comment createComment(DOMString data);
  5232. [NewObject, Throws]
  5233. ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
  5234. [CEReactions, Throws, Func="IsNotUAWidget"]
  5235. Node importNode(Node node, optional boolean deep = false);
  5236. [CEReactions, Throws, Func="IsNotUAWidget"]
  5237. Node adoptNode(Node node);
  5238. [NewObject, Throws, NeedsCallerType]
  5239. Event createEvent(DOMString interface);
  5240. [NewObject, Throws]
  5241. Range createRange();
  5242. // NodeFilter.SHOW_ALL = 0xFFFFFFFF
  5243. [NewObject, Throws]
  5244. NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  5245. [NewObject, Throws]
  5246. TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  5247. // NEW
  5248. // No support for prepend/append yet
  5249. // undefined prepend((Node or DOMString)... nodes);
  5250. // undefined append((Node or DOMString)... nodes);
  5251. // These are not in the spec, but leave them for now for backwards compat.
  5252. // So sort of like Gecko extensions
  5253. [NewObject, Throws]
  5254. CDATASection createCDATASection(DOMString data);
  5255. [NewObject, Throws]
  5256. Attr createAttribute(DOMString name);
  5257. [NewObject, Throws]
  5258. Attr createAttributeNS(DOMString? namespace, DOMString name);
  5259. };
  5260. // https://html.spec.whatwg.org/multipage/dom.html#the-document-object
  5261. partial interface Document {
  5262. [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  5263. static Document parseHTMLUnsafe(DOMString html);
  5264. [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
  5265. [SetterThrows] attribute DOMString domain;
  5266. readonly attribute DOMString referrer;
  5267. [Throws] attribute DOMString cookie;
  5268. readonly attribute DOMString lastModified;
  5269. readonly attribute DOMString readyState;
  5270. // DOM tree accessors
  5271. //(Not proxy yet)getter object (DOMString name);
  5272. [CEReactions, SetterThrows, Pure]
  5273. attribute DOMString title;
  5274. [CEReactions, Pure]
  5275. attribute DOMString dir;
  5276. [CEReactions, Pure, SetterThrows]
  5277. attribute HTMLElement? body;
  5278. [Pure]
  5279. readonly attribute HTMLHeadElement? head;
  5280. [SameObject] readonly attribute HTMLCollection images;
  5281. [SameObject] readonly attribute HTMLCollection embeds;
  5282. [SameObject] readonly attribute HTMLCollection plugins;
  5283. [SameObject] readonly attribute HTMLCollection links;
  5284. [SameObject] readonly attribute HTMLCollection forms;
  5285. [SameObject] readonly attribute HTMLCollection scripts;
  5286. [Pure]
  5287. NodeList getElementsByName(DOMString elementName);
  5288. //(Not implemented)readonly attribute DOMElementMap cssElementMap;
  5289. // dynamic markup insertion
  5290. [CEReactions, Throws]
  5291. Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
  5292. [CEReactions, Throws]
  5293. WindowProxy? open(USVString url, DOMString name, DOMString features);
  5294. [CEReactions, Throws]
  5295. undefined close();
  5296. [CEReactions, Throws]
  5297. undefined write(DOMString... text);
  5298. [CEReactions, Throws]
  5299. undefined writeln(DOMString... text);
  5300. // user interaction
  5301. [Pure]
  5302. readonly attribute WindowProxy? defaultView;
  5303. [Throws]
  5304. boolean hasFocus();
  5305. [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
  5306. attribute DOMString designMode;
  5307. [CEReactions, Throws, NeedsSubjectPrincipal]
  5308. boolean execCommand(DOMString commandId, optional boolean showUI = false,
  5309. optional DOMString value = "");
  5310. [Throws, NeedsSubjectPrincipal]
  5311. boolean queryCommandEnabled(DOMString commandId);
  5312. [Throws]
  5313. boolean queryCommandIndeterm(DOMString commandId);
  5314. [Throws]
  5315. boolean queryCommandState(DOMString commandId);
  5316. [Throws, NeedsCallerType]
  5317. boolean queryCommandSupported(DOMString commandId);
  5318. [Throws]
  5319. DOMString queryCommandValue(DOMString commandId);
  5320. //(Not implemented)readonly attribute HTMLCollection commands;
  5321. // special event handler IDL attributes that only apply to Document objects
  5322. [LegacyLenientThis] attribute EventHandler onreadystatechange;
  5323. // Gecko extensions?
  5324. attribute EventHandler onbeforescriptexecute;
  5325. attribute EventHandler onafterscriptexecute;
  5326. /**
  5327. * True if this document is synthetic : stand alone image, video, audio file,
  5328. * etc.
  5329. */
  5330. [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument;
  5331. /**
  5332. * Returns the script element whose script is currently being processed.
  5333. *
  5334. * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
  5335. */
  5336. [Pure]
  5337. readonly attribute Element? currentScript;
  5338. /**
  5339. * Release the current mouse capture if it is on an element within this
  5340. * document.
  5341. *
  5342. * @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
  5343. */
  5344. [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"]
  5345. undefined releaseCapture();
  5346. /**
  5347. * Use the given DOM element as the source image of target |-moz-element()|.
  5348. *
  5349. * This function introduces a new special ID (called "image element ID"),
  5350. * which is only used by |-moz-element()|, and associates it with the given
  5351. * DOM element. Image elements ID's have the higher precedence than general
  5352. * HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
  5353. * |-moz-element(#<id>)| uses |<element>| as the source image even if there
  5354. * is another element with id attribute = |<id>|. To unregister an image
  5355. * element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
  5356. *
  5357. * Example:
  5358. * <script>
  5359. * canvas = document.createElement("canvas");
  5360. * canvas.setAttribute("width", 100);
  5361. * canvas.setAttribute("height", 100);
  5362. * // draw to canvas
  5363. * document.mozSetImageElement("canvasbg", canvas);
  5364. * </script>
  5365. * <div style="background-image: -moz-element(#canvasbg);"></div>
  5366. *
  5367. * @param aImageElementId an image element ID to associate with
  5368. * |aImageElement|
  5369. * @param aImageElement a DOM element to be used as the source image of
  5370. * |-moz-element(#aImageElementId)|. If this is null, the function will
  5371. * unregister the image element ID |aImageElementId|.
  5372. *
  5373. * @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
  5374. */
  5375. [UseCounter]
  5376. undefined mozSetImageElement(DOMString aImageElementId,
  5377. Element? aImageElement);
  5378. [ChromeOnly]
  5379. readonly attribute URI? documentURIObject;
  5380. /**
  5381. * Current referrer policy - one of the referrer policy value from
  5382. * ReferrerPolicy.webidl.
  5383. */
  5384. [ChromeOnly]
  5385. readonly attribute ReferrerPolicy referrerPolicy;
  5386. /**
  5387. * Current referrer info, which holds all referrer related information
  5388. * including referrer policy and raw referrer of document.
  5389. */
  5390. [ChromeOnly]
  5391. readonly attribute nsIReferrerInfo referrerInfo;
  5392. };
  5393. // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
  5394. partial interface Document {
  5395. [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor;
  5396. [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor;
  5397. [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor;
  5398. [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor;
  5399. [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
  5400. [SameObject] readonly attribute HTMLCollection anchors;
  5401. [SameObject] readonly attribute HTMLCollection applets;
  5402. undefined clear();
  5403. // @deprecated These are old Netscape 4 methods. Do not use,
  5404. // the implementation is no-op.
  5405. // XXXbz do we actually need these anymore?
  5406. undefined captureEvents();
  5407. undefined releaseEvents();
  5408. [SameObject] readonly attribute HTMLAllCollection all;
  5409. };
  5410. // https://fullscreen.spec.whatwg.org/#api
  5411. partial interface Document {
  5412. // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
  5413. // versions have it uppercase.
  5414. [LegacyLenientSetter, Unscopable]
  5415. readonly attribute boolean fullscreen;
  5416. [BinaryName="fullscreen"]
  5417. readonly attribute boolean mozFullScreen;
  5418. [LegacyLenientSetter, NeedsCallerType]
  5419. readonly attribute boolean fullscreenEnabled;
  5420. [BinaryName="fullscreenEnabled", NeedsCallerType]
  5421. readonly attribute boolean mozFullScreenEnabled;
  5422. [NewObject]
  5423. Promise<undefined> exitFullscreen();
  5424. [NewObject, BinaryName="exitFullscreen"]
  5425. Promise<undefined> mozCancelFullScreen();
  5426. // Events handlers
  5427. attribute EventHandler onfullscreenchange;
  5428. attribute EventHandler onfullscreenerror;
  5429. };
  5430. // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
  5431. // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
  5432. partial interface Document {
  5433. undefined exitPointerLock();
  5434. // Event handlers
  5435. attribute EventHandler onpointerlockchange;
  5436. attribute EventHandler onpointerlockerror;
  5437. };
  5438. // Mozilla-internal document extensions specific to error pages.
  5439. partial interface Document {
  5440. [Func="Document::CallerIsTrustedAboutCertError", NewObject]
  5441. Promise<any> addCertException(boolean isTemporary);
  5442. [Func="Document::CallerIsTrustedAboutHttpsOnlyError"]
  5443. undefined reloadWithHttpsOnlyException();
  5444. [Func="Document::CallerIsTrustedAboutCertError", Throws]
  5445. FailedCertSecurityInfo getFailedCertSecurityInfo();
  5446. [Func="Document::CallerIsTrustedAboutNetError", Throws]
  5447. NetErrorInfo getNetErrorInfo();
  5448. };
  5449. // https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
  5450. partial interface Document {
  5451. readonly attribute boolean hidden;
  5452. readonly attribute VisibilityState visibilityState;
  5453. attribute EventHandler onvisibilitychange;
  5454. };
  5455. // https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
  5456. partial interface Document {
  5457. attribute DOMString? selectedStyleSheetSet;
  5458. readonly attribute DOMString? lastStyleSheetSet;
  5459. readonly attribute DOMString? preferredStyleSheetSet;
  5460. [Constant]
  5461. readonly attribute DOMStringList styleSheetSets;
  5462. undefined enableStyleSheetsForSet (DOMString? name);
  5463. };
  5464. // https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
  5465. partial interface Document {
  5466. CaretPosition? caretPositionFromPoint (float x, float y);
  5467. readonly attribute Element? scrollingElement;
  5468. };
  5469. // https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
  5470. partial interface Document {
  5471. [Func="Document::AreWebAnimationsTimelinesEnabled"]
  5472. readonly attribute DocumentTimeline timeline;
  5473. };
  5474. // https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
  5475. partial interface Document {
  5476. [BinaryName="SVGRootElement"]
  5477. readonly attribute SVGSVGElement? rootElement;
  5478. };
  5479. // Mozilla extensions of various sorts
  5480. partial interface Document {
  5481. // Creates a new XUL element regardless of the document's default type.
  5482. [ChromeOnly, CEReactions, NewObject, Throws]
  5483. Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
  5484. // Wether the document was loaded using a nsXULPrototypeDocument.
  5485. [ChromeOnly]
  5486. readonly attribute boolean loadedFromPrototype;
  5487. // The principal to use for the storage area of this document
  5488. [ChromeOnly]
  5489. readonly attribute Principal effectiveStoragePrincipal;
  5490. // You should probably not be using this principal getter since it performs
  5491. // no checks to ensure that the partitioned principal should really be used
  5492. // here. It is only designed to be used in very specific circumstances, such
  5493. // as when inheriting the document/storage principal.
  5494. [ChromeOnly]
  5495. readonly attribute Principal partitionedPrincipal;
  5496. // The cookieJarSettings of this document
  5497. [ChromeOnly]
  5498. readonly attribute nsICookieJarSettings cookieJarSettings;
  5499. // Touch bits
  5500. // XXXbz I can't find the sane spec for this stuff, so just cribbing
  5501. // from our xpidl for now.
  5502. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  5503. Touch createTouch(optional Window? view = null,
  5504. optional EventTarget? target = null,
  5505. optional long identifier = 0,
  5506. optional long pageX = 0,
  5507. optional long pageY = 0,
  5508. optional long screenX = 0,
  5509. optional long screenY = 0,
  5510. optional long clientX = 0,
  5511. optional long clientY = 0,
  5512. optional long radiusX = 0,
  5513. optional long radiusY = 0,
  5514. optional float rotationAngle = 0,
  5515. optional float force = 0);
  5516. // XXXbz a hack to get around the fact that we don't support variadics as
  5517. // distinguishing arguments yet. Once this hack is removed. we can also
  5518. // remove the corresponding overload on Document, since Touch... and
  5519. // sequence<Touch> look the same in the C++.
  5520. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  5521. TouchList createTouchList(Touch touch, Touch... touches);
  5522. // XXXbz and another hack for the fact that we can't usefully have optional
  5523. // distinguishing arguments but need a working zero-arg form of
  5524. // createTouchList().
  5525. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  5526. TouchList createTouchList();
  5527. [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  5528. TouchList createTouchList(sequence<Touch> touches);
  5529. [ChromeOnly]
  5530. attribute boolean styleSheetChangeEventsEnabled;
  5531. [ChromeOnly]
  5532. attribute boolean devToolsAnonymousAndShadowEventsEnabled;
  5533. [ChromeOnly, BinaryName="contentLanguageForBindings"] readonly attribute DOMString contentLanguage;
  5534. [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
  5535. // Blocks the initial document parser until the given promise is settled.
  5536. [ChromeOnly, NewObject]
  5537. Promise<any> blockParsing(Promise<any> promise,
  5538. optional BlockParsingOptions options = {});
  5539. [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"]
  5540. undefined blockUnblockOnload(boolean block);
  5541. // like documentURI, except that for error pages, it returns the URI we were
  5542. // trying to load when we hit an error, rather than the error page's own URI.
  5543. [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
  5544. // A promise that is resolved when we have both fired DOMContentLoaded and
  5545. // are ready to start layout.
  5546. // This is used for the "document_idle" webextension script injection point.
  5547. [ChromeOnly, Throws]
  5548. readonly attribute Promise<undefined> documentReadyForIdle;
  5549. // Lazily created command dispatcher, returns null if the document is not
  5550. // chrome privileged.
  5551. [ChromeOnly]
  5552. readonly attribute XULCommandDispatcher? commandDispatcher;
  5553. [ChromeOnly]
  5554. attribute boolean devToolsWatchingDOMMutations;
  5555. /**
  5556. * Returns all the shadow roots connected to the document, in no particular
  5557. * order, and without regard to open/closed-ness. Also returns UA widgets
  5558. * (like <video> controls), which can be checked using
  5559. * ShadowRoot.isUAWidget().
  5560. */
  5561. [ChromeOnly]
  5562. sequence<ShadowRoot> getConnectedShadowRoots();
  5563. };
  5564. dictionary BlockParsingOptions {
  5565. /**
  5566. * If true, blocks script-created parsers (created via document.open()) in
  5567. * addition to network-created parsers.
  5568. */
  5569. boolean blockScriptCreated = true;
  5570. };
  5571. // Extension to give chrome JS the ability to determine when a document was
  5572. // created to satisfy an iframe with srcdoc attribute.
  5573. partial interface Document {
  5574. [ChromeOnly] readonly attribute boolean isSrcdocDocument;
  5575. };
  5576. // Extension to give chrome JS the ability to get the underlying
  5577. // sandbox flag attribute
  5578. partial interface Document {
  5579. [ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
  5580. };
  5581. /**
  5582. * Chrome document anonymous content management.
  5583. * This is a Chrome-only API that allows inserting fixed positioned anonymous
  5584. * content on top of the current page displayed in the document.
  5585. */
  5586. partial interface Document {
  5587. /**
  5588. * If aForce is true, tries to update layout to be able to insert the element
  5589. * synchronously.
  5590. */
  5591. [ChromeOnly, NewObject, Throws]
  5592. AnonymousContent insertAnonymousContent(optional boolean aForce = false);
  5593. /**
  5594. * Removes the element inserted into the CanvasFrame given an AnonymousContent
  5595. * instance.
  5596. */
  5597. [ChromeOnly]
  5598. undefined removeAnonymousContent(AnonymousContent aContent);
  5599. };
  5600. // http://w3c.github.io/selection-api/#extensions-to-document-interface
  5601. partial interface Document {
  5602. [Throws]
  5603. Selection? getSelection();
  5604. };
  5605. // https://github.com/whatwg/html/issues/3338
  5606. partial interface Document {
  5607. [Pref="dom.storage_access.enabled", NewObject]
  5608. Promise<boolean> hasStorageAccess();
  5609. [Pref="dom.storage_access.enabled", NewObject]
  5610. Promise<undefined> requestStorageAccess();
  5611. // https://github.com/privacycg/storage-access/pull/100
  5612. [Pref="dom.storage_access.forward_declared.enabled", NewObject]
  5613. Promise<undefined> requestStorageAccessUnderSite(DOMString serializedSite);
  5614. [Pref="dom.storage_access.forward_declared.enabled", NewObject]
  5615. Promise<undefined> completeStorageAccessRequestFromSite(DOMString serializedSite);
  5616. };
  5617. // A privileged API to give chrome privileged code and the content script of the
  5618. // webcompat extension the ability to request the storage access for a given
  5619. // third party.
  5620. partial interface Document {
  5621. [Func="Document::CallerCanAccessPrivilegeSSA", NewObject]
  5622. Promise<undefined> requestStorageAccessForOrigin(DOMString thirdPartyOrigin, optional boolean requireUserInteraction = true);
  5623. };
  5624. // Extension to give chrome JS the ability to determine whether
  5625. // the user has interacted with the document or not.
  5626. partial interface Document {
  5627. [ChromeOnly] readonly attribute boolean userHasInteracted;
  5628. };
  5629. // Extension to give chrome JS the ability to simulate activate the document
  5630. // by user gesture.
  5631. partial interface Document {
  5632. [ChromeOnly]
  5633. undefined notifyUserGestureActivation();
  5634. // For testing only.
  5635. [ChromeOnly]
  5636. undefined clearUserGestureActivation();
  5637. [ChromeOnly]
  5638. readonly attribute boolean hasBeenUserGestureActivated;
  5639. [ChromeOnly]
  5640. readonly attribute boolean hasValidTransientUserGestureActivation;
  5641. [ChromeOnly]
  5642. readonly attribute DOMHighResTimeStamp lastUserGestureTimeStamp;
  5643. [ChromeOnly]
  5644. boolean consumeTransientUserGestureActivation();
  5645. };
  5646. // Extension to give chrome JS the ability to set an event handler which is
  5647. // called with certain events that happened while events were suppressed in the
  5648. // document or one of its subdocuments.
  5649. partial interface Document {
  5650. [ChromeOnly]
  5651. undefined setSuppressedEventListener(EventListener? aListener);
  5652. };
  5653. // Allows frontend code to query a CSP which needs to be passed for a
  5654. // new load into docshell. Further, allows to query the CSP in JSON
  5655. // format for testing purposes.
  5656. partial interface Document {
  5657. [ChromeOnly] readonly attribute ContentSecurityPolicy? csp;
  5658. [ChromeOnly] readonly attribute DOMString cspJSON;
  5659. };
  5660. partial interface Document {
  5661. [Func="Document::DocumentSupportsL10n"] readonly attribute DocumentL10n? l10n;
  5662. [Func="Document::DocumentSupportsL10n"] readonly attribute boolean hasPendingL10nMutations;
  5663. };
  5664. Document includes XPathEvaluatorMixin;
  5665. Document includes GlobalEventHandlers;
  5666. Document includes TouchEventHandlers;
  5667. Document includes ParentNode;
  5668. Document includes OnErrorEventHandlerForNodes;
  5669. Document includes GeometryUtils;
  5670. Document includes FontFaceSource;
  5671. Document includes DocumentOrShadowRoot;
  5672. // https://w3c.github.io/webappsec-feature-policy/#idl-index
  5673. partial interface Document {
  5674. [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
  5675. readonly attribute FeaturePolicy featurePolicy;
  5676. };
  5677. // Extension to give chrome JS the ability to specify a non-default keypress
  5678. // event model.
  5679. partial interface Document {
  5680. /**
  5681. * setKeyPressEventModel() is called when we need to check whether the web
  5682. * app requires specific keypress event model or not.
  5683. *
  5684. * @param aKeyPressEventModel Proper keypress event model for the web app.
  5685. * KEYPRESS_EVENT_MODEL_DEFAULT:
  5686. * Use default keypress event model. I.e., depending on
  5687. * "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value"
  5688. * pref.
  5689. * KEYPRESS_EVENT_MODEL_SPLIT:
  5690. * Use split model. I.e, if keypress event inputs a character,
  5691. * keyCode should be 0. Otherwise, charCode should be 0.
  5692. * KEYPRESS_EVENT_MODEL_CONFLATED:
  5693. * Use conflated model. I.e., keyCode and charCode values of each
  5694. * keypress event should be set to same value.
  5695. */
  5696. [ChromeOnly]
  5697. const unsigned short KEYPRESS_EVENT_MODEL_DEFAULT = 0;
  5698. [ChromeOnly]
  5699. const unsigned short KEYPRESS_EVENT_MODEL_SPLIT = 1;
  5700. [ChromeOnly]
  5701. const unsigned short KEYPRESS_EVENT_MODEL_CONFLATED = 2;
  5702. [ChromeOnly]
  5703. undefined setKeyPressEventModel(unsigned short aKeyPressEventModel);
  5704. };
  5705. // Extensions to return information about about the nodes blocked by the
  5706. // Safebrowsing API inside a document.
  5707. partial interface Document {
  5708. /*
  5709. * Number of nodes that have been blocked by the Safebrowsing API to prevent
  5710. * tracking, cryptomining and so on. This method is for testing only.
  5711. */
  5712. [ChromeOnly, Pure]
  5713. readonly attribute long blockedNodeByClassifierCount;
  5714. /*
  5715. * List of nodes that have been blocked by the Safebrowsing API to prevent
  5716. * tracking, fingerprinting, cryptomining and so on. This method is for
  5717. * testing only.
  5718. */
  5719. [ChromeOnly, Pure]
  5720. readonly attribute NodeList blockedNodesByClassifier;
  5721. };
  5722. // Extension to programmatically simulate a user interaction on a document,
  5723. // used for testing.
  5724. partial interface Document {
  5725. [ChromeOnly, BinaryName="setUserHasInteracted"]
  5726. undefined userInteractionForTesting();
  5727. };
  5728. // Extension for permission delegation.
  5729. partial interface Document {
  5730. [ChromeOnly, Pure]
  5731. readonly attribute nsIPermissionDelegateHandler permDelegateHandler;
  5732. };
  5733. // Extension used by the password manager to infer form submissions.
  5734. partial interface Document {
  5735. /*
  5736. * Set whether the document notifies an event when a fetch or
  5737. * XHR completes successfully.
  5738. */
  5739. [ChromeOnly]
  5740. undefined setNotifyFetchSuccess(boolean aShouldNotify);
  5741. /*
  5742. * Set whether a form and a password field notify an event when it is
  5743. * removed from the DOM tree.
  5744. */
  5745. [ChromeOnly]
  5746. undefined setNotifyFormOrPasswordRemoved(boolean aShouldNotify);
  5747. };
  5748. // Extension to allow chrome code to detect initial about:blank documents.
  5749. partial interface Document {
  5750. [ChromeOnly]
  5751. readonly attribute boolean isInitialDocument;
  5752. };
  5753. // Extension to allow chrome code to get some wireframe-like structure.
  5754. enum WireframeRectType {
  5755. "image",
  5756. "background",
  5757. "text",
  5758. "unknown",
  5759. };
  5760. dictionary WireframeTaggedRect {
  5761. unrestricted double x = 0;
  5762. unrestricted double y = 0;
  5763. unrestricted double width = 0;
  5764. unrestricted double height = 0;
  5765. unsigned long color = 0; // in nscolor format
  5766. WireframeRectType type;
  5767. Node? node;
  5768. };
  5769. [GenerateInit]
  5770. dictionary Wireframe {
  5771. unsigned long canvasBackground = 0; // in nscolor format
  5772. sequence<WireframeTaggedRect> rects;
  5773. unsigned long version = 1; // Increment when the wireframe structure changes in backwards-incompatible ways
  5774. };
  5775. partial interface Document {
  5776. [ChromeOnly]
  5777. Wireframe? getWireframe(optional boolean aIncludeNodes = false);
  5778. };
  5779. partial interface Document {
  5780. // Returns true if the document is the current active document in a browsing
  5781. // context which isn't in bfcache.
  5782. [ChromeOnly]
  5783. boolean isActive();
  5784. };
  5785. Document includes NonElementParentNode;
  5786. /**
  5787. * Extension to add the fragmentDirective property.
  5788. * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
  5789. */
  5790. partial interface Document {
  5791. [Pref="dom.text_fragments.enabled", Exposed=Window, SameObject]
  5792. readonly attribute FragmentDirective fragmentDirective;
  5793. };
  5794. /* ---------------------- DocumentFragment ----------------------------- */
  5795. /* ./webidl/DocumentFragment.webidl */
  5796. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5797. /* This Source Code Form is subject to the terms of the Mozilla Public
  5798. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5799. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5800. *
  5801. * The origin of this IDL file is
  5802. * https://dom.spec.whatwg.org/#documentfragment
  5803. *
  5804. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  5805. * liability, trademark and document use rules apply.
  5806. */
  5807. [Exposed=Window]
  5808. interface DocumentFragment : Node {
  5809. [Throws]
  5810. constructor();
  5811. };
  5812. DocumentFragment includes ParentNode;
  5813. DocumentFragment includes NonElementParentNode;
  5814. /* ---------------------- DocumentOrShadowRoot ----------------------------- */
  5815. /* ./webidl/DocumentOrShadowRoot.webidl */
  5816. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5817. /* This Source Code Form is subject to the terms of the Mozilla Public
  5818. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5819. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5820. *
  5821. * The origin of this IDL file is
  5822. * https://dom.spec.whatwg.org/#documentorshadowroot
  5823. * http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
  5824. * https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
  5825. */
  5826. interface mixin DocumentOrShadowRoot {
  5827. // Not implemented yet: bug 1430308.
  5828. // Selection? getSelection();
  5829. Element? elementFromPoint(float x, float y);
  5830. sequence<Element> elementsFromPoint(float x, float y);
  5831. // TODO: Avoid making these ChromeOnly, see:
  5832. // https://github.com/w3c/csswg-drafts/issues/556
  5833. [ChromeOnly]
  5834. Node? nodeFromPoint(float x, float y);
  5835. [ChromeOnly]
  5836. sequence<Node> nodesFromPoint(float x, float y);
  5837. // Not implemented yet: bug 1430307.
  5838. // CaretPosition? caretPositionFromPoint (float x, float y);
  5839. readonly attribute Element? activeElement;
  5840. readonly attribute StyleSheetList styleSheets;
  5841. readonly attribute Element? pointerLockElement;
  5842. [LegacyLenientSetter]
  5843. readonly attribute Element? fullscreenElement;
  5844. [BinaryName="fullscreenElement"]
  5845. readonly attribute Element? mozFullScreenElement;
  5846. };
  5847. // https://drafts.csswg.org/web-animations-1/#extensions-to-the-documentorshadowroot-interface-mixin
  5848. partial interface mixin DocumentOrShadowRoot {
  5849. sequence<Animation> getAnimations();
  5850. };
  5851. // https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
  5852. partial interface mixin DocumentOrShadowRoot {
  5853. // We are using [Pure, Cached, Frozen] sequence until `FrozenArray` is implemented.
  5854. // See https://bugzilla.mozilla.org/show_bug.cgi?id=1236777 for more details.
  5855. attribute ObservableArray<CSSStyleSheet> adoptedStyleSheets;
  5856. };
  5857. /* ---------------------- DocumentTimeline ----------------------------- */
  5858. /* ./webidl/DocumentTimeline.webidl */
  5859. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5860. /* This Source Code Form is subject to the terms of the Mozilla Public
  5861. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5862. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5863. *
  5864. * The origin of this IDL file is
  5865. * https://drafts.csswg.org/web-animations/#documenttimeline
  5866. *
  5867. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  5868. * liability, trademark and document use rules apply.
  5869. */
  5870. dictionary DocumentTimelineOptions {
  5871. DOMHighResTimeStamp originTime = 0;
  5872. };
  5873. [Func="Document::AreWebAnimationsTimelinesEnabled",
  5874. Exposed=Window]
  5875. interface DocumentTimeline : AnimationTimeline {
  5876. [Throws]
  5877. constructor(optional DocumentTimelineOptions options = {});
  5878. };
  5879. /* ---------------------- DocumentType ----------------------------- */
  5880. /* ./webidl/DocumentType.webidl */
  5881. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5882. /* This Source Code Form is subject to the terms of the Mozilla Public
  5883. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5884. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5885. *
  5886. * The origin of this IDL file is
  5887. * http://dom.spec.whatwg.org/#documenttype
  5888. *
  5889. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  5890. * liability, trademark and document use rules apply.
  5891. */
  5892. [Exposed=Window]
  5893. interface DocumentType : Node {
  5894. readonly attribute DOMString name;
  5895. readonly attribute DOMString publicId;
  5896. readonly attribute DOMString systemId;
  5897. };
  5898. DocumentType includes ChildNode;
  5899. /* ---------------------- DOMException ----------------------------- */
  5900. /* ./webidl/DOMException.webidl */
  5901. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5902. /* This Source Code Form is subject to the terms of the Mozilla Public
  5903. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5904. * You can obtain one at http://mozilla.org/MPL/2.0/.
  5905. *
  5906. * The origin of this IDL file is
  5907. * https://webidl.spec.whatwg.org/#idl-DOMException
  5908. *
  5909. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  5910. * liability, trademark and document use rules apply.
  5911. */
  5912. // This is the WebIDL version of nsIException. This is mostly legacy stuff.
  5913. interface StackFrame;
  5914. interface mixin ExceptionMembers
  5915. {
  5916. // The nsresult associated with this exception.
  5917. readonly attribute unsigned long result;
  5918. // Filename location. This is the location that caused the
  5919. // error, which may or may not be a source file location.
  5920. // For example, standard language errors would generally have
  5921. // the same location as their top stack entry. File
  5922. // parsers may put the location of the file they were parsing,
  5923. // etc.
  5924. // null indicates "no data"
  5925. readonly attribute DOMString filename;
  5926. // Valid line numbers begin at '1'. '0' indicates unknown.
  5927. readonly attribute unsigned long lineNumber;
  5928. // Valid column numbers begin at 0.
  5929. // We don't have an unambiguous indicator for unknown.
  5930. readonly attribute unsigned long columnNumber;
  5931. // A stack trace, if available. nsIStackFrame does not have classinfo so
  5932. // this was only ever usefully available to chrome JS.
  5933. [ChromeOnly, Exposed=Window]
  5934. readonly attribute StackFrame? location;
  5935. // Arbitary data for the implementation.
  5936. [Exposed=Window]
  5937. readonly attribute nsISupports? data;
  5938. // Formatted exception stack
  5939. [Replaceable]
  5940. readonly attribute DOMString stack;
  5941. };
  5942. [LegacyNoInterfaceObject, Exposed=(Window,Worker)]
  5943. interface Exception {
  5944. // The name of the error code (ie, a string repr of |result|).
  5945. readonly attribute DOMString name;
  5946. // A custom message set by the thrower.
  5947. [BinaryName="messageMoz"]
  5948. readonly attribute DOMString message;
  5949. // A generic formatter - make it suitable to print, etc.
  5950. stringifier;
  5951. };
  5952. Exception includes ExceptionMembers;
  5953. // XXXkhuey this is an 'exception', not an interface, but we don't have any
  5954. // parser or codegen mechanisms for dealing with exceptions.
  5955. [ExceptionClass,
  5956. Exposed=(Window, Worker),
  5957. Serializable]
  5958. interface DOMException {
  5959. constructor(optional DOMString message = "", optional DOMString name);
  5960. // The name of the error code (ie, a string repr of |result|).
  5961. readonly attribute DOMString name;
  5962. // A custom message set by the thrower.
  5963. [BinaryName="messageMoz"]
  5964. readonly attribute DOMString message;
  5965. readonly attribute unsigned short code;
  5966. const unsigned short INDEX_SIZE_ERR = 1;
  5967. const unsigned short DOMSTRING_SIZE_ERR = 2; // historical
  5968. const unsigned short HIERARCHY_REQUEST_ERR = 3;
  5969. const unsigned short WRONG_DOCUMENT_ERR = 4;
  5970. const unsigned short INVALID_CHARACTER_ERR = 5;
  5971. const unsigned short NO_DATA_ALLOWED_ERR = 6; // historical
  5972. const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
  5973. const unsigned short NOT_FOUND_ERR = 8;
  5974. const unsigned short NOT_SUPPORTED_ERR = 9;
  5975. const unsigned short INUSE_ATTRIBUTE_ERR = 10; // historical
  5976. const unsigned short INVALID_STATE_ERR = 11;
  5977. const unsigned short SYNTAX_ERR = 12;
  5978. const unsigned short INVALID_MODIFICATION_ERR = 13;
  5979. const unsigned short NAMESPACE_ERR = 14;
  5980. const unsigned short INVALID_ACCESS_ERR = 15;
  5981. const unsigned short VALIDATION_ERR = 16; // historical
  5982. const unsigned short TYPE_MISMATCH_ERR = 17; // historical; use JavaScript's TypeError instead
  5983. const unsigned short SECURITY_ERR = 18;
  5984. const unsigned short NETWORK_ERR = 19;
  5985. const unsigned short ABORT_ERR = 20;
  5986. const unsigned short URL_MISMATCH_ERR = 21;
  5987. const unsigned short QUOTA_EXCEEDED_ERR = 22;
  5988. const unsigned short TIMEOUT_ERR = 23;
  5989. const unsigned short INVALID_NODE_TYPE_ERR = 24;
  5990. const unsigned short DATA_CLONE_ERR = 25;
  5991. };
  5992. // XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave
  5993. // the prototype chain sane.
  5994. DOMException includes ExceptionMembers;
  5995. /* ---------------------- DOMImplementation ----------------------------- */
  5996. /* ./webidl/DOMImplementation.webidl */
  5997. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  5998. /* This Source Code Form is subject to the terms of the Mozilla Public
  5999. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6000. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6001. *
  6002. * The origin of this IDL file is
  6003. * http://dom.spec.whatwg.org/#interface-domimplementation
  6004. *
  6005. * Copyright:
  6006. * To the extent possible under law, the editors have waived all copyright and
  6007. * related or neighboring rights to this work.
  6008. */
  6009. [Exposed=Window]
  6010. interface DOMImplementation {
  6011. boolean hasFeature();
  6012. [Throws]
  6013. DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
  6014. DOMString systemId);
  6015. [Throws]
  6016. Document createDocument(DOMString? namespace,
  6017. [LegacyNullToEmptyString] DOMString qualifiedName,
  6018. optional DocumentType? doctype = null);
  6019. [Throws]
  6020. Document createHTMLDocument(optional DOMString title);
  6021. };
  6022. /* ---------------------- DOMLocalization ----------------------------- */
  6023. /* ./webidl/DOMLocalization.webidl */
  6024. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6025. /* This Source Code Form is subject to the terms of the Mozilla Public
  6026. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6027. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6028. /**
  6029. * DOMLocalization is an extension of the Fluent Localization API.
  6030. *
  6031. * DOMLocalization adds a state for storing `roots` - DOM elements
  6032. * which translation status is controlled by the DOMLocalization
  6033. * instance and monitored for mutations.
  6034. * DOMLocalization also adds methods dedicated to DOM manipulation.
  6035. *
  6036. * Methods:
  6037. * - connectRoot - add a root
  6038. * - disconnectRoot - remove a root
  6039. * - pauseObserving - pause observing of roots
  6040. * - resumeObserving - resume observing of roots
  6041. * - setAttributes - set l10n attributes of an element
  6042. * - getAttributes - retrieve l10n attributes of an element
  6043. * - translateFragment - translate a DOM fragment
  6044. * - translateElements - translate a list of DOM elements
  6045. * - translateRoots - translate all attached roots
  6046. *
  6047. */
  6048. [Func="IsChromeOrUAWidget", Exposed=Window]
  6049. interface DOMLocalization : Localization {
  6050. /**
  6051. * Constructor arguments:
  6052. * - aResourceids - a list of localization resource URIs
  6053. * which will provide messages for this
  6054. * Localization instance.
  6055. * - aSync - Specifies if the initial state of the DOMLocalization
  6056. * and the underlying Localization API is synchronous.
  6057. * This enables a number of synchronous methods on the
  6058. * Localization API and uses it for `TranslateElements`
  6059. * making the method return a synchronusly resolved promise.
  6060. * - aRegistry - optional custom L10nRegistry to be used by this Localization instance.
  6061. * - aLocales - custom set of locales to be used for this Localization.
  6062. */
  6063. [Throws]
  6064. constructor(sequence<L10nResourceId> aResourceIds,
  6065. optional boolean aSync = false,
  6066. optional L10nRegistry aRegistry,
  6067. optional sequence<UTF8String> aLocales);
  6068. /**
  6069. * Adds a node to nodes observed for localization
  6070. * related changes.
  6071. */
  6072. undefined connectRoot(Node aElement);
  6073. /**
  6074. * Removes a node from nodes observed for localization
  6075. * related changes.
  6076. */
  6077. undefined disconnectRoot(Node aElement);
  6078. /**
  6079. * Pauses the MutationObserver set to observe
  6080. * localization related DOM mutations.
  6081. */
  6082. undefined pauseObserving();
  6083. /**
  6084. * Resumes the MutationObserver set to observe
  6085. * localization related DOM mutations.
  6086. */
  6087. undefined resumeObserving();
  6088. /**
  6089. * A helper function which allows the user to set localization-specific attributes
  6090. * on an element.
  6091. * This method lives on `document.l10n` for compatibility reasons with the
  6092. * JS FluentDOM implementation. We may consider moving it onto Element.
  6093. *
  6094. * Example:
  6095. * document.l10n.setAttributes(h1, "key1", { emailCount: 5 });
  6096. *
  6097. * <h1 data-l10n-id="key1" data-l10n-args="{\"emailCount\": 5}"/>
  6098. */
  6099. [Throws] undefined setAttributes(Element aElement, DOMString aId, optional object? aArgs);
  6100. /**
  6101. * A helper function which allows the user to retrieve a set of localization-specific
  6102. * attributes from an element.
  6103. * This method lives on `document.l10n` for compatibility reasons with the
  6104. * JS FluentDOM implementation. We may consider moving it onto Element.
  6105. *
  6106. * Example:
  6107. * let l10nAttrs = document.l10n.getAttributes(h1);
  6108. * assert.deepEqual(l10nAttrs, {id: "key1", args: { emailCount: 5});
  6109. */
  6110. [Throws] L10nIdArgs getAttributes(Element aElement);
  6111. /**
  6112. * A helper function which allows the user to set the l10n args for an element. This
  6113. * is similar to the setAttributes method, but does not require the l10n ID.
  6114. *
  6115. * Example:
  6116. *
  6117. * <h1 data-l10n-id="key1" />
  6118. *
  6119. * document.l10n.setArgs(h1, { emailCount: 5 });
  6120. *
  6121. * <h1 data-l10n-id="key1" data-l10n-args="{\"emailCount\": 5}" />
  6122. *
  6123. * document.l10n.setArgs(h1);
  6124. *
  6125. * <h1 data-l10n-id="key1" />
  6126. */
  6127. [Throws] undefined setArgs(Element aElement, optional object? aArgs);
  6128. /**
  6129. * Triggers translation of a subtree rooted at aNode.
  6130. *
  6131. * The method finds all translatable descendants of the argument and
  6132. * localizes them.
  6133. *
  6134. * This method is mainly useful to trigger translation not covered by the
  6135. * DOMLocalization's MutationObserver - for example before it gets attached
  6136. * to the tree.
  6137. * In such cases, when the already-translated fragment gets
  6138. * injected into the observed root, one should `pauseObserving`,
  6139. * then append the fragment, and finally `resumeObserving`.
  6140. *
  6141. * Example:
  6142. * await document.l10n.translatFragment(frag);
  6143. * root.pauseObserving();
  6144. * parent.appendChild(frag);
  6145. * root.resumeObserving();
  6146. */
  6147. [NewObject] Promise<any> translateFragment(Node aNode);
  6148. /**
  6149. * Triggers translation of a list of Elements using the localization context.
  6150. *
  6151. * The method only translates the elements directly passed to the method,
  6152. * not any descendant nodes.
  6153. *
  6154. * This method is mainly useful to trigger translation not covered by the
  6155. * DOMLocalization's MutationObserver - for example before it gets attached
  6156. * to the tree.
  6157. * In such cases, when the already-translated fragment gets
  6158. * injected into the observed root, one should `pauseObserving`,
  6159. * then append the fragment, and finally `resumeObserving`.
  6160. *
  6161. * Example:
  6162. * await document.l10n.translateElements([elem1, elem2]);
  6163. * root.pauseObserving();
  6164. * parent.appendChild(elem1);
  6165. * root.resumeObserving();
  6166. * alert(elem2.textContent);
  6167. */
  6168. [NewObject] Promise<undefined> translateElements(sequence<Element> aElements);
  6169. /**
  6170. * Triggers translation of all attached roots and sets their
  6171. * locale info and directionality attributes.
  6172. *
  6173. * Example:
  6174. * await document.l10n.translateRoots();
  6175. */
  6176. [NewObject] Promise<undefined> translateRoots();
  6177. };
  6178. /* ---------------------- DOMMatrix ----------------------------- */
  6179. /* ./webidl/DOMMatrix.webidl */
  6180. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6181. /* This Source Code Form is subject to the terms of the Mozilla Public
  6182. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6183. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6184. *
  6185. * The origin of this IDL file is
  6186. * https://drafts.fxtf.org/geometry/
  6187. *
  6188. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6189. * liability, trademark and document use rules apply.
  6190. */
  6191. [Exposed=(Window,Worker),
  6192. Serializable]
  6193. interface DOMMatrixReadOnly {
  6194. [Throws]
  6195. constructor(optional (UTF8String or sequence<unrestricted double> or DOMMatrixReadOnly) init);
  6196. [NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
  6197. [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
  6198. [NewObject, Throws] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);
  6199. // These attributes are simple aliases for certain elements of the 4x4 matrix
  6200. readonly attribute unrestricted double a;
  6201. readonly attribute unrestricted double b;
  6202. readonly attribute unrestricted double c;
  6203. readonly attribute unrestricted double d;
  6204. readonly attribute unrestricted double e;
  6205. readonly attribute unrestricted double f;
  6206. readonly attribute unrestricted double m11;
  6207. readonly attribute unrestricted double m12;
  6208. readonly attribute unrestricted double m13;
  6209. readonly attribute unrestricted double m14;
  6210. readonly attribute unrestricted double m21;
  6211. readonly attribute unrestricted double m22;
  6212. readonly attribute unrestricted double m23;
  6213. readonly attribute unrestricted double m24;
  6214. readonly attribute unrestricted double m31;
  6215. readonly attribute unrestricted double m32;
  6216. readonly attribute unrestricted double m33;
  6217. readonly attribute unrestricted double m34;
  6218. readonly attribute unrestricted double m41;
  6219. readonly attribute unrestricted double m42;
  6220. readonly attribute unrestricted double m43;
  6221. readonly attribute unrestricted double m44;
  6222. // Immutable transform methods
  6223. DOMMatrix translate(optional unrestricted double tx = 0,
  6224. optional unrestricted double ty = 0,
  6225. optional unrestricted double tz = 0);
  6226. [NewObject] DOMMatrix scale(optional unrestricted double scaleX = 1,
  6227. optional unrestricted double scaleY,
  6228. optional unrestricted double scaleZ = 1,
  6229. optional unrestricted double originX = 0,
  6230. optional unrestricted double originY = 0,
  6231. optional unrestricted double originZ = 0);
  6232. [NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
  6233. optional unrestricted double scaleY = 1);
  6234. DOMMatrix scale3d(optional unrestricted double scale = 1,
  6235. optional unrestricted double originX = 0,
  6236. optional unrestricted double originY = 0,
  6237. optional unrestricted double originZ = 0);
  6238. [NewObject] DOMMatrix rotate(optional unrestricted double rotX = 0,
  6239. optional unrestricted double rotY,
  6240. optional unrestricted double rotZ);
  6241. [NewObject] DOMMatrix rotateFromVector(optional unrestricted double x = 0,
  6242. optional unrestricted double y = 0);
  6243. [NewObject] DOMMatrix rotateAxisAngle(optional unrestricted double x = 0,
  6244. optional unrestricted double y = 0,
  6245. optional unrestricted double z = 0,
  6246. optional unrestricted double angle = 0);
  6247. DOMMatrix skewX(optional unrestricted double sx = 0);
  6248. DOMMatrix skewY(optional unrestricted double sy = 0);
  6249. [NewObject, Throws] DOMMatrix multiply(optional DOMMatrixInit other = {});
  6250. DOMMatrix flipX();
  6251. DOMMatrix flipY();
  6252. DOMMatrix inverse();
  6253. // Helper methods
  6254. readonly attribute boolean is2D;
  6255. readonly attribute boolean isIdentity;
  6256. DOMPoint transformPoint(optional DOMPointInit point = {});
  6257. [Throws] Float32Array toFloat32Array();
  6258. [Throws] Float64Array toFloat64Array();
  6259. [Exposed=Window, Throws] stringifier;
  6260. [Default] object toJSON();
  6261. };
  6262. [Exposed=(Window,Worker),
  6263. Serializable,
  6264. LegacyWindowAlias=WebKitCSSMatrix]
  6265. interface DOMMatrix : DOMMatrixReadOnly {
  6266. [Throws]
  6267. constructor(optional (UTF8String or sequence<unrestricted double> or DOMMatrixReadOnly) init);
  6268. [NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
  6269. [NewObject, Throws] static DOMMatrix fromFloat32Array(Float32Array array32);
  6270. [NewObject, Throws] static DOMMatrix fromFloat64Array(Float64Array array64);
  6271. // These attributes are simple aliases for certain elements of the 4x4 matrix
  6272. inherit attribute unrestricted double a;
  6273. inherit attribute unrestricted double b;
  6274. inherit attribute unrestricted double c;
  6275. inherit attribute unrestricted double d;
  6276. inherit attribute unrestricted double e;
  6277. inherit attribute unrestricted double f;
  6278. inherit attribute unrestricted double m11;
  6279. inherit attribute unrestricted double m12;
  6280. inherit attribute unrestricted double m13;
  6281. inherit attribute unrestricted double m14;
  6282. inherit attribute unrestricted double m21;
  6283. inherit attribute unrestricted double m22;
  6284. inherit attribute unrestricted double m23;
  6285. inherit attribute unrestricted double m24;
  6286. inherit attribute unrestricted double m31;
  6287. inherit attribute unrestricted double m32;
  6288. inherit attribute unrestricted double m33;
  6289. inherit attribute unrestricted double m34;
  6290. inherit attribute unrestricted double m41;
  6291. inherit attribute unrestricted double m42;
  6292. inherit attribute unrestricted double m43;
  6293. inherit attribute unrestricted double m44;
  6294. // Mutable transform methods
  6295. [Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
  6296. [Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
  6297. DOMMatrix translateSelf(optional unrestricted double tx = 0,
  6298. optional unrestricted double ty = 0,
  6299. optional unrestricted double tz = 0);
  6300. DOMMatrix scaleSelf(optional unrestricted double scaleX = 1,
  6301. optional unrestricted double scaleY,
  6302. optional unrestricted double scaleZ = 1,
  6303. optional unrestricted double originX = 0,
  6304. optional unrestricted double originY = 0,
  6305. optional unrestricted double originZ = 0);
  6306. DOMMatrix scale3dSelf(optional unrestricted double scale = 1,
  6307. optional unrestricted double originX = 0,
  6308. optional unrestricted double originY = 0,
  6309. optional unrestricted double originZ = 0);
  6310. DOMMatrix rotateSelf(optional unrestricted double rotX = 0,
  6311. optional unrestricted double rotY,
  6312. optional unrestricted double rotZ);
  6313. DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0,
  6314. optional unrestricted double y = 0);
  6315. DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0,
  6316. optional unrestricted double y = 0,
  6317. optional unrestricted double z = 0,
  6318. optional unrestricted double angle = 0);
  6319. DOMMatrix skewXSelf(optional unrestricted double sx = 0);
  6320. DOMMatrix skewYSelf(optional unrestricted double sy = 0);
  6321. DOMMatrix invertSelf();
  6322. [Exposed=Window, Throws] DOMMatrix setMatrixValue(UTF8String transformList);
  6323. };
  6324. dictionary DOMMatrix2DInit {
  6325. unrestricted double a;
  6326. unrestricted double b;
  6327. unrestricted double c;
  6328. unrestricted double d;
  6329. unrestricted double e;
  6330. unrestricted double f;
  6331. unrestricted double m11;
  6332. unrestricted double m12;
  6333. unrestricted double m21;
  6334. unrestricted double m22;
  6335. unrestricted double m41;
  6336. unrestricted double m42;
  6337. };
  6338. dictionary DOMMatrixInit : DOMMatrix2DInit {
  6339. unrestricted double m13 = 0;
  6340. unrestricted double m14 = 0;
  6341. unrestricted double m23 = 0;
  6342. unrestricted double m24 = 0;
  6343. unrestricted double m31 = 0;
  6344. unrestricted double m32 = 0;
  6345. unrestricted double m33 = 1;
  6346. unrestricted double m34 = 0;
  6347. unrestricted double m43 = 0;
  6348. unrestricted double m44 = 1;
  6349. boolean is2D;
  6350. };
  6351. /* ---------------------- DOMParser ----------------------------- */
  6352. /* ./webidl/DOMParser.webidl */
  6353. /* This Source Code Form is subject to the terms of the Mozilla Public
  6354. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6355. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6356. *
  6357. * The origin of this IDL file is
  6358. * http://domparsing.spec.whatwg.org/#the-domparser-interface
  6359. */
  6360. interface Principal;
  6361. interface URI;
  6362. interface InputStream;
  6363. enum SupportedType {
  6364. "text/html",
  6365. "text/xml",
  6366. "application/xml",
  6367. "application/xhtml+xml",
  6368. "image/svg+xml"
  6369. };
  6370. [Exposed=Window]
  6371. interface DOMParser {
  6372. [Throws]
  6373. constructor();
  6374. [NewObject, Throws, UseCounter]
  6375. Document parseFromString(DOMString str, SupportedType type);
  6376. [NewObject, ChromeOnly, Throws]
  6377. Document parseFromSafeString(DOMString str, SupportedType type);
  6378. // Mozilla-specific stuff
  6379. [NewObject, Throws, ChromeOnly]
  6380. Document parseFromBuffer(sequence<octet> buf, SupportedType type);
  6381. [NewObject, Throws, ChromeOnly]
  6382. Document parseFromBuffer(Uint8Array buf, SupportedType type);
  6383. [NewObject, Throws, ChromeOnly]
  6384. Document parseFromStream(InputStream stream, DOMString? charset,
  6385. long contentLength, SupportedType type);
  6386. // Can be used to allow a DOMParser to parse XUL/XBL no matter what
  6387. // principal it's using for the document.
  6388. [ChromeOnly]
  6389. undefined forceEnableXULXBL();
  6390. // Can be used to allow a DOMParser to load DTDs from URLs that
  6391. // normally would not be allowed based on the document principal.
  6392. [Func="IsChromeOrUAWidget"]
  6393. undefined forceEnableDTD();
  6394. };
  6395. /* ---------------------- DOMPoint ----------------------------- */
  6396. /* ./webidl/DOMPoint.webidl */
  6397. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6398. /* This Source Code Form is subject to the terms of the Mozilla Public
  6399. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6400. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6401. *
  6402. * The origin of this IDL file is
  6403. * https://drafts.fxtf.org/geometry/
  6404. *
  6405. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6406. * liability, trademark and document use rules apply.
  6407. */
  6408. [Exposed=(Window,Worker),
  6409. Serializable]
  6410. interface DOMPointReadOnly {
  6411. constructor(optional unrestricted double x = 0,
  6412. optional unrestricted double y = 0,
  6413. optional unrestricted double z = 0,
  6414. optional unrestricted double w = 1);
  6415. [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});
  6416. readonly attribute unrestricted double x;
  6417. readonly attribute unrestricted double y;
  6418. readonly attribute unrestricted double z;
  6419. readonly attribute unrestricted double w;
  6420. [NewObject, Throws] DOMPoint matrixTransform(optional DOMMatrixInit matrix = {});
  6421. [Default] object toJSON();
  6422. };
  6423. [Exposed=(Window,Worker),
  6424. Serializable]
  6425. interface DOMPoint : DOMPointReadOnly {
  6426. constructor(optional unrestricted double x = 0,
  6427. optional unrestricted double y = 0,
  6428. optional unrestricted double z = 0,
  6429. optional unrestricted double w = 1);
  6430. [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});
  6431. inherit attribute unrestricted double x;
  6432. inherit attribute unrestricted double y;
  6433. inherit attribute unrestricted double z;
  6434. inherit attribute unrestricted double w;
  6435. };
  6436. dictionary DOMPointInit {
  6437. unrestricted double x = 0;
  6438. unrestricted double y = 0;
  6439. unrestricted double z = 0;
  6440. unrestricted double w = 1;
  6441. };
  6442. /* ---------------------- DOMQuad ----------------------------- */
  6443. /* ./webidl/DOMQuad.webidl */
  6444. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6445. /* This Source Code Form is subject to the terms of the Mozilla Public
  6446. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6447. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6448. *
  6449. * The origin of this IDL file is
  6450. * https://drafts.fxtf.org/geometry/
  6451. *
  6452. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6453. * liability, trademark and document use rules apply.
  6454. */
  6455. [Exposed=(Window,Worker),
  6456. Serializable]
  6457. interface DOMQuad {
  6458. constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
  6459. optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {});
  6460. constructor(DOMRectReadOnly rect);
  6461. [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
  6462. [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});
  6463. [SameObject] readonly attribute DOMPoint p1;
  6464. [SameObject] readonly attribute DOMPoint p2;
  6465. [SameObject] readonly attribute DOMPoint p3;
  6466. [SameObject] readonly attribute DOMPoint p4;
  6467. [NewObject] DOMRectReadOnly getBounds();
  6468. [Default] object toJSON();
  6469. };
  6470. dictionary DOMQuadInit {
  6471. DOMPointInit p1 = {};
  6472. DOMPointInit p2 = {};
  6473. DOMPointInit p3 = {};
  6474. DOMPointInit p4 = {};
  6475. };
  6476. /* ---------------------- DOMRect ----------------------------- */
  6477. /* ./webidl/DOMRect.webidl */
  6478. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6479. /* This Source Code Form is subject to the terms of the Mozilla Public
  6480. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6481. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6482. *
  6483. * The origin of this IDL file is
  6484. * https://drafts.fxtf.org/geometry/
  6485. *
  6486. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6487. * liability, trademark and document use rules apply.
  6488. */
  6489. [Exposed=(Window,Worker),
  6490. Serializable]
  6491. interface DOMRect : DOMRectReadOnly {
  6492. constructor(optional unrestricted double x = 0,
  6493. optional unrestricted double y = 0,
  6494. optional unrestricted double width = 0,
  6495. optional unrestricted double height = 0);
  6496. [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});
  6497. inherit attribute unrestricted double x;
  6498. inherit attribute unrestricted double y;
  6499. inherit attribute unrestricted double width;
  6500. inherit attribute unrestricted double height;
  6501. };
  6502. [ProbablyShortLivingWrapper,
  6503. Exposed=(Window,Worker),
  6504. Serializable]
  6505. interface DOMRectReadOnly {
  6506. constructor(optional unrestricted double x = 0,
  6507. optional unrestricted double y = 0,
  6508. optional unrestricted double width = 0,
  6509. optional unrestricted double height = 0);
  6510. [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
  6511. readonly attribute unrestricted double x;
  6512. readonly attribute unrestricted double y;
  6513. readonly attribute unrestricted double width;
  6514. readonly attribute unrestricted double height;
  6515. readonly attribute unrestricted double top;
  6516. readonly attribute unrestricted double right;
  6517. readonly attribute unrestricted double bottom;
  6518. readonly attribute unrestricted double left;
  6519. [Default] object toJSON();
  6520. };
  6521. dictionary DOMRectInit {
  6522. unrestricted double x = 0;
  6523. unrestricted double y = 0;
  6524. unrestricted double width = 0;
  6525. unrestricted double height = 0;
  6526. };
  6527. /* ---------------------- DOMRectList ----------------------------- */
  6528. /* ./webidl/DOMRectList.webidl */
  6529. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6530. /* This Source Code Form is subject to the terms of the Mozilla Public
  6531. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6532. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6533. */
  6534. [Exposed=Window]
  6535. interface DOMRectList {
  6536. readonly attribute unsigned long length;
  6537. getter DOMRect? item(unsigned long index);
  6538. };
  6539. /* ---------------------- DOMStringList ----------------------------- */
  6540. /* ./webidl/DOMStringList.webidl */
  6541. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6542. /* This Source Code Form is subject to the terms of the Mozilla Public
  6543. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6544. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6545. *
  6546. * The origin of this IDL file is
  6547. * http://www.w3.org/TR/2012/WD-dom-20120105/
  6548. *
  6549. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6550. * liability, trademark and document use rules apply.
  6551. */
  6552. [Exposed=(Window,Worker)]
  6553. interface DOMStringList {
  6554. readonly attribute unsigned long length;
  6555. getter DOMString? item(unsigned long index);
  6556. boolean contains(DOMString string);
  6557. };
  6558. /* ---------------------- DOMStringMap ----------------------------- */
  6559. /* ./webidl/DOMStringMap.webidl */
  6560. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6561. /* This Source Code Form is subject to the terms of the Mozilla Public
  6562. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6563. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6564. *
  6565. * The origin of this IDL file is
  6566. * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#domstringmap-0
  6567. *
  6568. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  6569. * Opera Software ASA. You are granted a license to use, reproduce
  6570. * and create derivative works of this document.
  6571. */
  6572. [LegacyOverrideBuiltIns,
  6573. Exposed=Window]
  6574. interface DOMStringMap {
  6575. getter DOMString (DOMString name);
  6576. [CEReactions, Throws]
  6577. setter undefined (DOMString name, DOMString value);
  6578. [CEReactions]
  6579. deleter undefined (DOMString name);
  6580. };
  6581. /* ---------------------- DOMTokenList ----------------------------- */
  6582. /* ./webidl/DOMTokenList.webidl */
  6583. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6584. /* This Source Code Form is subject to the terms of the Mozilla Public
  6585. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6586. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6587. *
  6588. * The origin of this IDL file is
  6589. * https://dom.spec.whatwg.org/#interface-domtokenlist
  6590. *
  6591. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6592. * liability, trademark and document use rules apply.
  6593. */
  6594. [Exposed=Window]
  6595. interface DOMTokenList {
  6596. [Pure]
  6597. readonly attribute unsigned long length;
  6598. [Pure]
  6599. getter DOMString? item(unsigned long index);
  6600. [Pure]
  6601. boolean contains(DOMString token);
  6602. [CEReactions, Throws]
  6603. undefined add(DOMString... tokens);
  6604. [CEReactions, Throws]
  6605. undefined remove(DOMString... tokens);
  6606. [CEReactions, Throws]
  6607. boolean replace(DOMString token, DOMString newToken);
  6608. [CEReactions, Throws]
  6609. boolean toggle(DOMString token, optional boolean force);
  6610. [Throws]
  6611. boolean supports(DOMString token);
  6612. [CEReactions, SetterThrows, Pure]
  6613. stringifier attribute DOMString value;
  6614. iterable<DOMString?>;
  6615. };
  6616. /* ---------------------- DragEvent ----------------------------- */
  6617. /* ./webidl/DragEvent.webidl */
  6618. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6619. /* This Source Code Form is subject to the terms of the Mozilla Public
  6620. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6621. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6622. *
  6623. * The origin of this IDL file is
  6624. * https://html.spec.whatwg.org/multipage/#dragevent
  6625. */
  6626. [Exposed=Window]
  6627. interface DragEvent : MouseEvent
  6628. {
  6629. constructor(DOMString type, optional DragEventInit eventInitDict = {});
  6630. readonly attribute DataTransfer? dataTransfer;
  6631. undefined initDragEvent(DOMString type,
  6632. optional boolean canBubble = false,
  6633. optional boolean cancelable = false,
  6634. optional Window? aView = null,
  6635. optional long aDetail = 0,
  6636. optional long aScreenX = 0,
  6637. optional long aScreenY = 0,
  6638. optional long aClientX = 0,
  6639. optional long aClientY = 0,
  6640. optional boolean aCtrlKey = false,
  6641. optional boolean aAltKey = false,
  6642. optional boolean aShiftKey = false,
  6643. optional boolean aMetaKey = false,
  6644. optional unsigned short aButton = 0,
  6645. optional EventTarget? aRelatedTarget = null,
  6646. optional DataTransfer? aDataTransfer = null);
  6647. };
  6648. dictionary DragEventInit : MouseEventInit
  6649. {
  6650. DataTransfer? dataTransfer = null;
  6651. };
  6652. /* ---------------------- DynamicsCompressorNode ----------------------------- */
  6653. /* ./webidl/DynamicsCompressorNode.webidl */
  6654. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6655. /* This Source Code Form is subject to the terms of the Mozilla Public
  6656. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6657. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6658. *
  6659. * The origin of this IDL file is
  6660. * https://webaudio.github.io/web-audio-api/
  6661. *
  6662. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6663. * liability, trademark and document use rules apply.
  6664. */
  6665. dictionary DynamicsCompressorOptions : AudioNodeOptions {
  6666. float attack = 0.003;
  6667. float knee = 30;
  6668. float ratio = 12;
  6669. float release = 0.25;
  6670. float threshold = -24;
  6671. };
  6672. [Pref="dom.webaudio.enabled",
  6673. Exposed=Window]
  6674. interface DynamicsCompressorNode : AudioNode {
  6675. [Throws]
  6676. constructor(BaseAudioContext context,
  6677. optional DynamicsCompressorOptions options = {});
  6678. readonly attribute AudioParam threshold; // in Decibels
  6679. readonly attribute AudioParam knee; // in Decibels
  6680. readonly attribute AudioParam ratio; // unit-less
  6681. readonly attribute float reduction; // in Decibels
  6682. readonly attribute AudioParam attack; // in Seconds
  6683. [BinaryName="getRelease"]
  6684. readonly attribute AudioParam release; // in Seconds
  6685. };
  6686. // Mozilla extension
  6687. DynamicsCompressorNode includes AudioNodePassThrough;
  6688. /* ---------------------- Element ----------------------------- */
  6689. /* ./webidl/Element.webidl */
  6690. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  6691. /* This Source Code Form is subject to the terms of the Mozilla Public
  6692. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  6693. * You can obtain one at http://mozilla.org/MPL/2.0/.
  6694. *
  6695. * The origin of this IDL file is
  6696. * https://dom.spec.whatwg.org/#interface-element
  6697. * https://domparsing.spec.whatwg.org/
  6698. * https://drafts.csswg.org/cssom-view/
  6699. *
  6700. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  6701. * liability, trademark and document use rules apply.
  6702. */
  6703. interface nsIScreen;
  6704. [Exposed=Window,
  6705. InstrumentedProps=(computedStyleMap,onmousewheel,scrollIntoViewIfNeeded)]
  6706. interface Element : Node {
  6707. [Constant]
  6708. readonly attribute DOMString? namespaceURI;
  6709. [Constant]
  6710. readonly attribute DOMString? prefix;
  6711. [Constant]
  6712. readonly attribute DOMString localName;
  6713. // Not [Constant] because it depends on which document we're in
  6714. [Pure]
  6715. readonly attribute DOMString tagName;
  6716. [CEReactions, Pure]
  6717. attribute DOMString id;
  6718. [CEReactions, Pure]
  6719. attribute DOMString className;
  6720. [Constant, PutForwards=value]
  6721. readonly attribute DOMTokenList classList;
  6722. // https://drafts.csswg.org/css-shadow-parts/#idl
  6723. [SameObject, PutForwards=value]
  6724. readonly attribute DOMTokenList part;
  6725. [SameObject]
  6726. readonly attribute NamedNodeMap attributes;
  6727. [Pure]
  6728. sequence<DOMString> getAttributeNames();
  6729. [Pure]
  6730. DOMString? getAttribute(DOMString name);
  6731. [Pure]
  6732. DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
  6733. [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
  6734. boolean toggleAttribute(DOMString name, optional boolean force);
  6735. [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
  6736. undefined setAttribute(DOMString name, DOMString value);
  6737. [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
  6738. undefined setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
  6739. [CEReactions, Throws]
  6740. undefined removeAttribute(DOMString name);
  6741. [CEReactions, Throws]
  6742. undefined removeAttributeNS(DOMString? namespace, DOMString localName);
  6743. [Pure]
  6744. boolean hasAttribute(DOMString name);
  6745. [Pure]
  6746. boolean hasAttributeNS(DOMString? namespace, DOMString localName);
  6747. [Pure]
  6748. boolean hasAttributes();
  6749. [Throws, Pure]
  6750. Element? closest(UTF8String selector);
  6751. [Throws, Pure]
  6752. boolean matches(UTF8String selector);
  6753. [Throws, Pure, BinaryName="matches"]
  6754. boolean webkitMatchesSelector(UTF8String selector);
  6755. [Pure]
  6756. HTMLCollection getElementsByTagName(DOMString localName);
  6757. [Throws, Pure]
  6758. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  6759. [Pure]
  6760. HTMLCollection getElementsByClassName(DOMString classNames);
  6761. [CEReactions, Throws]
  6762. Element? insertAdjacentElement(DOMString where, Element element); // historical
  6763. [Throws]
  6764. undefined insertAdjacentText(DOMString where, DOMString data); // historical
  6765. /**
  6766. * The ratio of font-size-inflated text font size to computed font
  6767. * size for this element. This will query the element for its primary frame,
  6768. * and then use this to get font size inflation information about the frame.
  6769. * This will be 1.0 if font size inflation is not enabled, and -1.0 if an
  6770. * error occurred during the retrieval of the font size inflation.
  6771. *
  6772. * @note The font size inflation ratio that is returned is actually the
  6773. * font size inflation data for the element's _primary frame_, not the
  6774. * element itself, but for most purposes, this should be sufficient.
  6775. */
  6776. [ChromeOnly]
  6777. readonly attribute float fontSizeInflation;
  6778. /**
  6779. * Returns the pseudo-element string if this element represents a
  6780. * pseudo-element, or null otherwise.
  6781. */
  6782. [ChromeOnly]
  6783. readonly attribute DOMString? implementedPseudoElement;
  6784. // Selectors API
  6785. /**
  6786. * Returns whether this element would be selected by the given selector
  6787. * string.
  6788. *
  6789. * https://dom.spec.whatwg.org/#dom-element-matches
  6790. */
  6791. [Throws, Pure, BinaryName="matches"]
  6792. boolean mozMatchesSelector(UTF8String selector);
  6793. // Pointer events methods.
  6794. [UseCounter, Throws]
  6795. undefined setPointerCapture(long pointerId);
  6796. [UseCounter, Throws]
  6797. undefined releasePointerCapture(long pointerId);
  6798. boolean hasPointerCapture(long pointerId);
  6799. // Proprietary extensions
  6800. /**
  6801. * Set this during a mousedown event to grab and retarget all mouse events
  6802. * to this element until the mouse button is released or releaseCapture is
  6803. * called. If retargetToElement is true, then all events are targetted at
  6804. * this element. If false, events can also fire at descendants of this
  6805. * element.
  6806. *
  6807. */
  6808. [Deprecated=ElementSetCapture, Pref="dom.mouse_capture.enabled"]
  6809. undefined setCapture(optional boolean retargetToElement = false);
  6810. /**
  6811. * If this element has captured the mouse, release the capture. If another
  6812. * element has captured the mouse, this method has no effect.
  6813. */
  6814. [Deprecated=ElementReleaseCapture, Pref="dom.mouse_capture.enabled"]
  6815. undefined releaseCapture();
  6816. /*
  6817. * Chrome-only version of setCapture that works outside of a mousedown event.
  6818. */
  6819. [ChromeOnly]
  6820. undefined setCaptureAlways(optional boolean retargetToElement = false);
  6821. // Mozilla extensions
  6822. // Obsolete methods.
  6823. Attr? getAttributeNode(DOMString name);
  6824. [CEReactions, Throws]
  6825. Attr? setAttributeNode(Attr newAttr);
  6826. [CEReactions, Throws]
  6827. Attr? removeAttributeNode(Attr oldAttr);
  6828. Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
  6829. [CEReactions, Throws]
  6830. Attr? setAttributeNodeNS(Attr newAttr);
  6831. [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
  6832. DOMMatrixReadOnly getTransformToAncestor(Element ancestor);
  6833. [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
  6834. DOMMatrixReadOnly getTransformToParent();
  6835. [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
  6836. DOMMatrixReadOnly getTransformToViewport();
  6837. };
  6838. // https://html.spec.whatwg.org/#focus-management-apis
  6839. dictionary FocusOptions {
  6840. boolean preventScroll = false;
  6841. boolean focusVisible;
  6842. };
  6843. interface mixin HTMLOrForeignElement {
  6844. [SameObject] readonly attribute DOMStringMap dataset;
  6845. // See bug 1389421
  6846. // attribute DOMString nonce; // intentionally no [CEReactions]
  6847. [CEReactions, SetterThrows, Pure] attribute boolean autofocus;
  6848. [CEReactions, SetterThrows, Pure] attribute long tabIndex;
  6849. [Throws, NeedsCallerType] undefined focus(optional FocusOptions options = {});
  6850. [Throws] undefined blur();
  6851. };
  6852. // https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-mixin
  6853. interface mixin ElementCSSInlineStyle {
  6854. [SameObject, PutForwards=cssText]
  6855. readonly attribute CSSStyleDeclaration style;
  6856. };
  6857. // https://drafts.csswg.org/cssom-view/
  6858. enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
  6859. dictionary ScrollIntoViewOptions : ScrollOptions {
  6860. ScrollLogicalPosition block = "start";
  6861. ScrollLogicalPosition inline = "nearest";
  6862. };
  6863. dictionary CheckVisibilityOptions {
  6864. boolean checkOpacity = false;
  6865. boolean checkVisibilityCSS = false;
  6866. boolean contentVisibilityAuto = false;
  6867. boolean opacityProperty = false;
  6868. boolean visibilityProperty = false;
  6869. [ChromeOnly] boolean flush = true;
  6870. };
  6871. // https://drafts.csswg.org/cssom-view/#extensions-to-the-element-interface
  6872. partial interface Element {
  6873. DOMRectList getClientRects();
  6874. DOMRect getBoundingClientRect();
  6875. boolean checkVisibility(optional CheckVisibilityOptions options = {});
  6876. // scrolling
  6877. undefined scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg = {});
  6878. // None of the CSSOM attributes are [Pure], because they flush
  6879. attribute long scrollTop; // scroll on setting
  6880. attribute long scrollLeft; // scroll on setting
  6881. readonly attribute long scrollWidth;
  6882. readonly attribute long scrollHeight;
  6883. [BinaryName="scrollTo"]
  6884. undefined scroll(unrestricted double x, unrestricted double y);
  6885. [BinaryName="scrollTo"]
  6886. undefined scroll(optional ScrollToOptions options = {});
  6887. undefined scrollTo(unrestricted double x, unrestricted double y);
  6888. undefined scrollTo(optional ScrollToOptions options = {});
  6889. undefined scrollBy(unrestricted double x, unrestricted double y);
  6890. undefined scrollBy(optional ScrollToOptions options = {});
  6891. // mozScrollSnap is used by chrome to perform scroll snapping after the
  6892. // user performs actions that may affect scroll position
  6893. // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
  6894. // as an extension to the ScrollOptions dictionary. See bug 1137937.
  6895. [ChromeOnly] undefined mozScrollSnap();
  6896. readonly attribute long clientTop;
  6897. readonly attribute long clientLeft;
  6898. readonly attribute long clientWidth;
  6899. readonly attribute long clientHeight;
  6900. // Return the screen coordinates of the element, in CSS pixels relative to
  6901. // the window's screen.
  6902. [ChromeOnly] readonly attribute long screenX;
  6903. [ChromeOnly] readonly attribute long screenY;
  6904. [ChromeOnly] readonly attribute nsIScreen? screen;
  6905. // Mozilla specific stuff
  6906. /* The minimum/maximum offset that the element can be scrolled to
  6907. (i.e., the value that scrollLeft/scrollTop would be clamped to if they were
  6908. set to arbitrarily large values. */
  6909. [ChromeOnly] readonly attribute long scrollTopMin;
  6910. readonly attribute long scrollTopMax;
  6911. [ChromeOnly] readonly attribute long scrollLeftMin;
  6912. readonly attribute long scrollLeftMax;
  6913. [Pref="layout.css.zoom.enabled"] readonly attribute double currentCSSZoom;
  6914. };
  6915. // http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
  6916. partial interface Element {
  6917. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, Pure, SetterThrows, GetterCanOOM]
  6918. attribute [LegacyNullToEmptyString] DOMString innerHTML;
  6919. [CEReactions, Pure, SetterThrows]
  6920. attribute [LegacyNullToEmptyString] DOMString outerHTML;
  6921. [CEReactions, Throws]
  6922. undefined insertAdjacentHTML(DOMString position, DOMString text);
  6923. };
  6924. // https://dom.spec.whatwg.org/#dictdef-shadowrootinit
  6925. dictionary ShadowRootInit {
  6926. required ShadowRootMode mode;
  6927. boolean delegatesFocus = false;
  6928. SlotAssignmentMode slotAssignment = "named";
  6929. [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  6930. boolean clonable = false;
  6931. };
  6932. // https://dom.spec.whatwg.org/#element
  6933. partial interface Element {
  6934. // Shadow DOM v1
  6935. [Throws, UseCounter]
  6936. ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
  6937. [BinaryName="shadowRootByMode"]
  6938. readonly attribute ShadowRoot? shadowRoot;
  6939. [Func="Document::IsCallerChromeOrAddon", BinaryName="shadowRoot"]
  6940. readonly attribute ShadowRoot? openOrClosedShadowRoot;
  6941. [BinaryName="assignedSlotByMode"]
  6942. readonly attribute HTMLSlotElement? assignedSlot;
  6943. [ChromeOnly, BinaryName="assignedSlot"]
  6944. readonly attribute HTMLSlotElement? openOrClosedAssignedSlot;
  6945. [CEReactions, Unscopable, SetterThrows]
  6946. attribute DOMString slot;
  6947. };
  6948. Element includes ChildNode;
  6949. Element includes NonDocumentTypeChildNode;
  6950. Element includes ParentNode;
  6951. Element includes Animatable;
  6952. Element includes GeometryUtils;
  6953. Element includes ARIAMixin;
  6954. // https://fullscreen.spec.whatwg.org/#api
  6955. partial interface Element {
  6956. [NewObject, NeedsCallerType]
  6957. Promise<undefined> requestFullscreen();
  6958. [NewObject, BinaryName="requestFullscreen", NeedsCallerType, Deprecated="MozRequestFullScreenDeprecatedPrefix"]
  6959. Promise<undefined> mozRequestFullScreen();
  6960. // Events handlers
  6961. attribute EventHandler onfullscreenchange;
  6962. attribute EventHandler onfullscreenerror;
  6963. };
  6964. // https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
  6965. partial interface Element {
  6966. [NeedsCallerType, Pref="dom.pointer-lock.enabled"]
  6967. undefined requestPointerLock();
  6968. };
  6969. // Mozilla-specific additions to support devtools
  6970. partial interface Element {
  6971. // Support reporting of Flexbox properties
  6972. /**
  6973. * If this element has a display:flex or display:inline-flex style,
  6974. * this property returns an object with computed values for flex
  6975. * properties, as well as a property that exposes the flex lines
  6976. * in this container.
  6977. */
  6978. [ChromeOnly, Pure]
  6979. Flex? getAsFlexContainer();
  6980. // Support reporting of Grid properties
  6981. /**
  6982. * If this element has a display:grid or display:inline-grid style,
  6983. * this property returns an object with computed values for grid
  6984. * tracks and lines.
  6985. */
  6986. [ChromeOnly, Pure]
  6987. sequence<Grid> getGridFragments();
  6988. /**
  6989. * Returns whether there are any grid fragments on this element.
  6990. */
  6991. [ChromeOnly, Pure]
  6992. boolean hasGridFragments();
  6993. /**
  6994. * Returns a sequence of all the descendent elements of this element
  6995. * that have display:grid or display:inline-grid style and generate
  6996. * a frame.
  6997. */
  6998. [ChromeOnly, Pure]
  6999. sequence<Element> getElementsWithGrid();
  7000. /**
  7001. * Set attribute on the Element with a customized Content-Security-Policy
  7002. * appropriate to devtools, which includes:
  7003. * style-src 'unsafe-inline'
  7004. */
  7005. [ChromeOnly, CEReactions, Throws]
  7006. undefined setAttributeDevtools(DOMString name, DOMString value);
  7007. [ChromeOnly, CEReactions, Throws]
  7008. undefined setAttributeDevtoolsNS(DOMString? namespace, DOMString name, DOMString value);
  7009. /**
  7010. * Provide a direct way to determine if this Element has visible
  7011. * scrollbars. Flushes layout.
  7012. */
  7013. [ChromeOnly]
  7014. readonly attribute boolean hasVisibleScrollbars;
  7015. };
  7016. // These variables are used in vtt.js, they are used for positioning vtt cues.
  7017. partial interface Element {
  7018. // These two attributes are a double version of the clientHeight and the
  7019. // clientWidth.
  7020. [ChromeOnly]
  7021. readonly attribute double clientHeightDouble;
  7022. [ChromeOnly]
  7023. readonly attribute double clientWidthDouble;
  7024. // This attribute returns the block size of the first line box under the different
  7025. // writing directions. If the direction is horizontal, it represents box's
  7026. // height. If the direction is vertical, it represents box's width.
  7027. [ChromeOnly]
  7028. readonly attribute double firstLineBoxBSize;
  7029. };
  7030. // Sanitizer API, https://wicg.github.io/sanitizer-api/
  7031. dictionary SetHTMLOptions {
  7032. SanitizerConfig sanitizer;
  7033. };
  7034. partial interface Element {
  7035. [SecureContext, UseCounter, Throws, Pref="dom.security.setHTML.enabled"]
  7036. undefined setHTML(DOMString aInnerHTML, optional SetHTMLOptions options = {});
  7037. };
  7038. partial interface Element {
  7039. // https://html.spec.whatwg.org/#dom-element-sethtmlunsafe
  7040. [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  7041. undefined setHTMLUnsafe(DOMString html);
  7042. };
  7043. /* ---------------------- ElementInternals ----------------------------- */
  7044. /* ./webidl/ElementInternals.webidl */
  7045. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7046. /* This Source Code Form is subject to the terms of the Mozilla Public
  7047. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7048. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7049. *
  7050. * The origin of this IDL file is
  7051. * https://html.spec.whatwg.org/#elementinternals
  7052. */
  7053. [Exposed=Window]
  7054. interface ElementInternals {
  7055. // Shadow root access
  7056. readonly attribute ShadowRoot? shadowRoot;
  7057. // Form-associated custom elements
  7058. [Throws]
  7059. undefined setFormValue((File or USVString or FormData)? value,
  7060. optional (File or USVString or FormData)? state);
  7061. [Throws]
  7062. readonly attribute HTMLFormElement? form;
  7063. [Throws]
  7064. undefined setValidity(optional ValidityStateFlags flags = {},
  7065. optional DOMString message,
  7066. optional HTMLElement anchor);
  7067. [Throws]
  7068. readonly attribute boolean willValidate;
  7069. [Throws]
  7070. readonly attribute ValidityState validity;
  7071. [Throws]
  7072. readonly attribute DOMString validationMessage;
  7073. [Throws]
  7074. boolean checkValidity();
  7075. [Throws]
  7076. boolean reportValidity();
  7077. [Throws]
  7078. readonly attribute NodeList labels;
  7079. [Pref="dom.element.customstateset.enabled", SameObject] readonly attribute CustomStateSet states;
  7080. };
  7081. [Pref="dom.element.customstateset.enabled", Exposed=Window]
  7082. interface CustomStateSet {
  7083. setlike<DOMString>;
  7084. };
  7085. partial interface CustomStateSet {
  7086. // Setlike methods need to be overriden.
  7087. [Throws]
  7088. undefined add(DOMString state);
  7089. [Throws]
  7090. boolean delete(DOMString state);
  7091. [Throws]
  7092. undefined clear();
  7093. };
  7094. partial interface ElementInternals {
  7095. [ChromeOnly, Throws]
  7096. readonly attribute HTMLElement? validationAnchor;
  7097. };
  7098. ElementInternals includes ARIAMixin;
  7099. dictionary ValidityStateFlags {
  7100. boolean valueMissing = false;
  7101. boolean typeMismatch = false;
  7102. boolean patternMismatch = false;
  7103. boolean tooLong = false;
  7104. boolean tooShort = false;
  7105. boolean rangeUnderflow = false;
  7106. boolean rangeOverflow = false;
  7107. boolean stepMismatch = false;
  7108. boolean badInput = false;
  7109. boolean customError = false;
  7110. };
  7111. /* ---------------------- EncodedAudioChunk ----------------------------- */
  7112. /* ./webidl/EncodedAudioChunk.webidl */
  7113. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7114. /* This Source Code Form is subject to the terms of the Mozilla Public
  7115. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7116. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7117. *
  7118. * The origin of this IDL file is
  7119. * https://w3c.github.io/webcodecs/#encodedaudiochunk
  7120. */
  7121. // [Serializable] is implemented without adding attribute here.
  7122. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
  7123. interface EncodedAudioChunk {
  7124. [Throws]
  7125. constructor(EncodedAudioChunkInit init);
  7126. readonly attribute EncodedAudioChunkType type;
  7127. readonly attribute long long timestamp; // microseconds
  7128. readonly attribute unsigned long long? duration; // microseconds
  7129. readonly attribute unsigned long byteLength;
  7130. [Throws]
  7131. undefined copyTo(
  7132. // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)`
  7133. ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination);
  7134. };
  7135. dictionary EncodedAudioChunkInit {
  7136. required EncodedAudioChunkType type;
  7137. required [EnforceRange] long long timestamp; // microseconds
  7138. [EnforceRange] unsigned long long duration; // microseconds
  7139. // bug 1696216: Should be AllowSharedBufferSource
  7140. required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
  7141. sequence<ArrayBuffer> transfer = [];
  7142. };
  7143. enum EncodedAudioChunkType {
  7144. "key",
  7145. "delta"
  7146. };
  7147. /* ---------------------- EncodedVideoChunk ----------------------------- */
  7148. /* ./webidl/EncodedVideoChunk.webidl */
  7149. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7150. /* This Source Code Form is subject to the terms of the Mozilla Public
  7151. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7152. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7153. *
  7154. * The origin of this IDL file is
  7155. * https://w3c.github.io/webcodecs/#encodedvideochunk
  7156. */
  7157. // [Serializable] is implemented without adding attribute here.
  7158. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
  7159. interface EncodedVideoChunk {
  7160. [Throws]
  7161. constructor(EncodedVideoChunkInit init);
  7162. readonly attribute EncodedVideoChunkType type;
  7163. readonly attribute long long timestamp; // microseconds
  7164. readonly attribute unsigned long long? duration; // microseconds
  7165. readonly attribute unsigned long byteLength;
  7166. // bug 1696216: Should be `copyTo([AllowShared] BufferSource destination)`
  7167. [Throws]
  7168. undefined copyTo(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination);
  7169. };
  7170. dictionary EncodedVideoChunkInit {
  7171. required EncodedVideoChunkType type;
  7172. required [EnforceRange] long long timestamp; // microseconds
  7173. [EnforceRange] unsigned long long duration; // microseconds
  7174. // bug 1696216: Should be `required BufferSource data`
  7175. required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
  7176. };
  7177. enum EncodedVideoChunkType {
  7178. "key",
  7179. "delta",
  7180. };
  7181. /* ---------------------- ErrorEvent ----------------------------- */
  7182. /* ./webidl/ErrorEvent.webidl */
  7183. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7184. /* This Source Code Form is subject to the terms of the Mozilla Public
  7185. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7186. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7187. *
  7188. * The origin of this IDL file is
  7189. * https://html.spec.whatwg.org/multipage/#the-errorevent-interface
  7190. */
  7191. [Exposed=(Window,Worker)]
  7192. interface ErrorEvent : Event
  7193. {
  7194. constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
  7195. readonly attribute DOMString message;
  7196. readonly attribute DOMString filename;
  7197. readonly attribute unsigned long lineno;
  7198. readonly attribute unsigned long colno;
  7199. readonly attribute any error;
  7200. };
  7201. dictionary ErrorEventInit : EventInit
  7202. {
  7203. DOMString message = "";
  7204. DOMString filename = "";
  7205. unsigned long lineno = 0;
  7206. unsigned long colno = 0;
  7207. any error;
  7208. };
  7209. /* ---------------------- Event ----------------------------- */
  7210. /* ./webidl/Event.webidl */
  7211. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7212. /* This Source Code Form is subject to the terms of the Mozilla Public
  7213. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7214. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7215. *
  7216. * The origin of this IDL file is
  7217. * http://www.w3.org/TR/2012/WD-dom-20120105/
  7218. *
  7219. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  7220. * liability, trademark and document use rules apply.
  7221. */
  7222. [Exposed=(Window,Worker,AudioWorklet), ProbablyShortLivingWrapper]
  7223. interface Event {
  7224. constructor(DOMString type, optional EventInit eventInitDict = {});
  7225. [Pure]
  7226. readonly attribute DOMString type;
  7227. [Pure, BindingAlias="srcElement"]
  7228. readonly attribute EventTarget? target;
  7229. [Pure]
  7230. readonly attribute EventTarget? currentTarget;
  7231. sequence<EventTarget> composedPath();
  7232. const unsigned short NONE = 0;
  7233. const unsigned short CAPTURING_PHASE = 1;
  7234. const unsigned short AT_TARGET = 2;
  7235. const unsigned short BUBBLING_PHASE = 3;
  7236. [Pure]
  7237. readonly attribute unsigned short eventPhase;
  7238. undefined stopPropagation();
  7239. undefined stopImmediatePropagation();
  7240. [Pure]
  7241. readonly attribute boolean bubbles;
  7242. [Pure]
  7243. readonly attribute boolean cancelable;
  7244. [NeedsCallerType]
  7245. attribute boolean returnValue;
  7246. [NeedsCallerType]
  7247. undefined preventDefault();
  7248. [Pure, NeedsCallerType]
  7249. readonly attribute boolean defaultPrevented;
  7250. [ChromeOnly, Pure]
  7251. readonly attribute boolean defaultPreventedByChrome;
  7252. [ChromeOnly, Pure]
  7253. readonly attribute boolean defaultPreventedByContent;
  7254. [Pure]
  7255. readonly attribute boolean composed;
  7256. [LegacyUnforgeable, Pure]
  7257. readonly attribute boolean isTrusted;
  7258. [Pure]
  7259. readonly attribute DOMHighResTimeStamp timeStamp;
  7260. undefined initEvent(DOMString type,
  7261. optional boolean bubbles = false,
  7262. optional boolean cancelable = false);
  7263. attribute boolean cancelBubble;
  7264. };
  7265. // Mozilla specific legacy stuff.
  7266. partial interface Event {
  7267. const long ALT_MASK = 0x00000001;
  7268. const long CONTROL_MASK = 0x00000002;
  7269. const long SHIFT_MASK = 0x00000004;
  7270. const long META_MASK = 0x00000008;
  7271. /** The original target of the event, before any retargetings. */
  7272. readonly attribute EventTarget? originalTarget;
  7273. /**
  7274. * The explicit original target of the event. If the event was retargeted
  7275. * for some reason other than an anonymous boundary crossing, this will be set
  7276. * to the target before the retargeting occurs. For example, mouse events
  7277. * are retargeted to their parent node when they happen over text nodes (bug
  7278. * 185889), and in that case .target will show the parent and
  7279. * .explicitOriginalTarget will show the text node.
  7280. * .explicitOriginalTarget differs from .originalTarget in that it will never
  7281. * contain anonymous content.
  7282. */
  7283. readonly attribute EventTarget? explicitOriginalTarget;
  7284. [ChromeOnly] readonly attribute EventTarget? composedTarget;
  7285. [ChromeOnly] undefined preventMultipleActions();
  7286. [ChromeOnly] readonly attribute boolean multipleActionsPrevented;
  7287. [ChromeOnly] readonly attribute boolean isSynthesized;
  7288. /**
  7289. * When the event target is a remote browser, calling this will fire an
  7290. * reply event in the chrome process.
  7291. */
  7292. [ChromeOnly] undefined requestReplyFromRemoteContent();
  7293. /**
  7294. * Returns true when the event shouldn't be handled by chrome.
  7295. */
  7296. [ChromeOnly] readonly attribute boolean isWaitingReplyFromRemoteContent;
  7297. /**
  7298. * Returns true when the event is a reply event from a remote process.
  7299. */
  7300. [ChromeOnly] readonly attribute boolean isReplyEventFromRemoteContent;
  7301. };
  7302. dictionary EventInit {
  7303. boolean bubbles = false;
  7304. boolean cancelable = false;
  7305. boolean composed = false;
  7306. };
  7307. /* ---------------------- EventHandler ----------------------------- */
  7308. /* ./webidl/EventHandler.webidl */
  7309. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7310. /* This Source Code Form is subject to the terms of the Mozilla Public
  7311. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7312. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7313. *
  7314. * The origin of this IDL file is
  7315. * http://www.whatwg.org/specs/web-apps/current-work/#eventhandler
  7316. *
  7317. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  7318. * Opera Software ASA. You are granted a license to use, reproduce
  7319. * and create derivative works of this document.
  7320. */
  7321. [LegacyTreatNonObjectAsNull]
  7322. callback EventHandlerNonNull = any (Event event);
  7323. typedef EventHandlerNonNull? EventHandler;
  7324. [LegacyTreatNonObjectAsNull]
  7325. callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
  7326. typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
  7327. [LegacyTreatNonObjectAsNull]
  7328. callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
  7329. typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
  7330. interface mixin GlobalEventHandlers {
  7331. attribute EventHandler onabort;
  7332. attribute EventHandler onblur;
  7333. // We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
  7334. // below.
  7335. // attribute OnErrorEventHandler onerror;
  7336. attribute EventHandler onfocus;
  7337. attribute EventHandler oncancel;
  7338. attribute EventHandler onauxclick;
  7339. attribute EventHandler onbeforeinput;
  7340. [Pref="dom.element.popover.enabled"]
  7341. attribute EventHandler onbeforetoggle;
  7342. attribute EventHandler oncanplay;
  7343. attribute EventHandler oncanplaythrough;
  7344. attribute EventHandler onchange;
  7345. attribute EventHandler onclick;
  7346. attribute EventHandler onclose;
  7347. attribute EventHandler oncontextlost;
  7348. attribute EventHandler oncontextmenu;
  7349. attribute EventHandler oncontextrestored;
  7350. attribute EventHandler oncopy;
  7351. attribute EventHandler oncuechange;
  7352. attribute EventHandler oncut;
  7353. attribute EventHandler ondblclick;
  7354. attribute EventHandler ondrag;
  7355. attribute EventHandler ondragend;
  7356. attribute EventHandler ondragenter;
  7357. [Func="Event::IsDragExitEnabled"]
  7358. attribute EventHandler ondragexit;
  7359. attribute EventHandler ondragleave;
  7360. attribute EventHandler ondragover;
  7361. attribute EventHandler ondragstart;
  7362. attribute EventHandler ondrop;
  7363. attribute EventHandler ondurationchange;
  7364. attribute EventHandler onemptied;
  7365. attribute EventHandler onended;
  7366. attribute EventHandler onformdata;
  7367. attribute EventHandler oninput;
  7368. attribute EventHandler oninvalid;
  7369. attribute EventHandler onkeydown;
  7370. attribute EventHandler onkeypress;
  7371. attribute EventHandler onkeyup;
  7372. attribute EventHandler onload;
  7373. attribute EventHandler onloadeddata;
  7374. attribute EventHandler onloadedmetadata;
  7375. attribute EventHandler onloadstart;
  7376. attribute EventHandler onmousedown;
  7377. [LegacyLenientThis] attribute EventHandler onmouseenter;
  7378. [LegacyLenientThis] attribute EventHandler onmouseleave;
  7379. attribute EventHandler onmousemove;
  7380. attribute EventHandler onmouseout;
  7381. attribute EventHandler onmouseover;
  7382. attribute EventHandler onmouseup;
  7383. attribute EventHandler onwheel;
  7384. attribute EventHandler onpaste;
  7385. attribute EventHandler onpause;
  7386. attribute EventHandler onplay;
  7387. attribute EventHandler onplaying;
  7388. attribute EventHandler onprogress;
  7389. attribute EventHandler onratechange;
  7390. attribute EventHandler onreset;
  7391. attribute EventHandler onresize;
  7392. attribute EventHandler onscroll;
  7393. attribute EventHandler onscrollend;
  7394. attribute EventHandler onsecuritypolicyviolation;
  7395. attribute EventHandler onseeked;
  7396. attribute EventHandler onseeking;
  7397. attribute EventHandler onselect;
  7398. attribute EventHandler onslotchange;
  7399. //(Not implemented)attribute EventHandler onsort;
  7400. attribute EventHandler onstalled;
  7401. attribute EventHandler onsubmit;
  7402. attribute EventHandler onsuspend;
  7403. attribute EventHandler ontimeupdate;
  7404. attribute EventHandler onvolumechange;
  7405. attribute EventHandler onwaiting;
  7406. attribute EventHandler onselectstart;
  7407. attribute EventHandler onselectionchange;
  7408. attribute EventHandler ontoggle;
  7409. // Pointer events handlers
  7410. attribute EventHandler onpointercancel;
  7411. attribute EventHandler onpointerdown;
  7412. attribute EventHandler onpointerup;
  7413. attribute EventHandler onpointermove;
  7414. attribute EventHandler onpointerout;
  7415. attribute EventHandler onpointerover;
  7416. attribute EventHandler onpointerenter;
  7417. attribute EventHandler onpointerleave;
  7418. attribute EventHandler ongotpointercapture;
  7419. attribute EventHandler onlostpointercapture;
  7420. // Mozilla-specific handlers. Unprefixed handlers live in
  7421. // Document rather than here.
  7422. [Deprecated="MozfullscreenchangeDeprecatedPrefix"]
  7423. attribute EventHandler onmozfullscreenchange;
  7424. [Deprecated="MozfullscreenerrorDeprecatedPrefix"]
  7425. attribute EventHandler onmozfullscreenerror;
  7426. // CSS-Animation and CSS-Transition handlers.
  7427. attribute EventHandler onanimationcancel;
  7428. attribute EventHandler onanimationend;
  7429. attribute EventHandler onanimationiteration;
  7430. attribute EventHandler onanimationstart;
  7431. attribute EventHandler ontransitioncancel;
  7432. attribute EventHandler ontransitionend;
  7433. attribute EventHandler ontransitionrun;
  7434. attribute EventHandler ontransitionstart;
  7435. // CSS-Animation and CSS-Transition legacy handlers.
  7436. // This handler isn't standard.
  7437. [BinaryName="onwebkitAnimationEnd"]
  7438. attribute EventHandler onwebkitanimationend;
  7439. [BinaryName="onwebkitAnimationIteration"]
  7440. attribute EventHandler onwebkitanimationiteration;
  7441. [BinaryName="onwebkitAnimationStart"]
  7442. attribute EventHandler onwebkitanimationstart;
  7443. [BinaryName="onwebkitTransitionEnd"]
  7444. attribute EventHandler onwebkittransitionend;
  7445. };
  7446. interface mixin WindowEventHandlers {
  7447. attribute EventHandler onafterprint;
  7448. attribute EventHandler onbeforeprint;
  7449. attribute OnBeforeUnloadEventHandler onbeforeunload;
  7450. attribute EventHandler onhashchange;
  7451. attribute EventHandler onlanguagechange;
  7452. attribute EventHandler onmessage;
  7453. attribute EventHandler onmessageerror;
  7454. attribute EventHandler onoffline;
  7455. attribute EventHandler ononline;
  7456. attribute EventHandler onpagehide;
  7457. attribute EventHandler onpageshow;
  7458. attribute EventHandler onpopstate;
  7459. attribute EventHandler onrejectionhandled;
  7460. attribute EventHandler onstorage;
  7461. attribute EventHandler onunhandledrejection;
  7462. attribute EventHandler onunload;
  7463. };
  7464. // https://w3c.github.io/gamepad/#extensions-to-the-windoweventhandlers-interface-mixin
  7465. partial interface mixin WindowEventHandlers {
  7466. attribute EventHandler ongamepadconnected;
  7467. attribute EventHandler ongamepaddisconnected;
  7468. };
  7469. // The spec has |attribute OnErrorEventHandler onerror;| on
  7470. // GlobalEventHandlers, and calls the handler differently depending on
  7471. // whether an ErrorEvent was fired. We don't do that, and until we do we'll
  7472. // need to distinguish between onerror on Window or on nodes.
  7473. interface mixin OnErrorEventHandlerForNodes {
  7474. attribute EventHandler onerror;
  7475. };
  7476. interface mixin OnErrorEventHandlerForWindow {
  7477. attribute OnErrorEventHandler onerror;
  7478. };
  7479. /* ---------------------- EventListener ----------------------------- */
  7480. /* ./webidl/EventListener.webidl */
  7481. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7482. /* This Source Code Form is subject to the terms of the Mozilla Public
  7483. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7484. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7485. *
  7486. * The origin of this IDL file is
  7487. * http://www.w3.org/TR/2012/WD-dom-20120105/
  7488. *
  7489. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  7490. * liability, trademark and document use rules apply.
  7491. */
  7492. [Exposed=Window]
  7493. callback interface EventListener {
  7494. undefined handleEvent(Event event);
  7495. };
  7496. /* ---------------------- EventSource ----------------------------- */
  7497. /* ./webidl/EventSource.webidl */
  7498. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7499. /* This Source Code Form is subject to the terms of the Mozilla Public
  7500. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7501. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7502. *
  7503. * The origin of this IDL file is
  7504. * https://html.spec.whatwg.org/multipage/comms.html#the-eventsource-interface
  7505. *
  7506. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  7507. * Opera Software ASA. You are granted a license to use, reproduce
  7508. * and create derivative works of this document.
  7509. */
  7510. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  7511. interface EventSource : EventTarget {
  7512. [Throws]
  7513. constructor(USVString url, optional EventSourceInit eventSourceInitDict = {});
  7514. [Constant]
  7515. readonly attribute DOMString url;
  7516. [Constant]
  7517. readonly attribute boolean withCredentials;
  7518. // ready state
  7519. const unsigned short CONNECTING = 0;
  7520. const unsigned short OPEN = 1;
  7521. const unsigned short CLOSED = 2;
  7522. readonly attribute unsigned short readyState;
  7523. // networking
  7524. attribute EventHandler onopen;
  7525. attribute EventHandler onmessage;
  7526. attribute EventHandler onerror;
  7527. undefined close();
  7528. };
  7529. dictionary EventSourceInit {
  7530. boolean withCredentials = false;
  7531. };
  7532. /* ---------------------- EventTarget ----------------------------- */
  7533. /* ./webidl/EventTarget.webidl */
  7534. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7535. /* This Source Code Form is subject to the terms of the Mozilla Public
  7536. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7537. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7538. *
  7539. * The origin of this IDL file is
  7540. * http://www.w3.org/TR/2012/WD-dom-20120105/
  7541. *
  7542. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  7543. * liability, trademark and document use rules apply.
  7544. */
  7545. dictionary EventListenerOptions {
  7546. boolean capture = false;
  7547. /* Setting to true make the listener be added to the system group. */
  7548. [Func="ThreadSafeIsChromeOrUAWidget"]
  7549. boolean mozSystemGroup = false;
  7550. };
  7551. dictionary AddEventListenerOptions : EventListenerOptions {
  7552. boolean passive;
  7553. boolean once = false;
  7554. AbortSignal signal;
  7555. [ChromeOnly]
  7556. boolean wantUntrusted;
  7557. };
  7558. [Exposed=*]
  7559. interface EventTarget {
  7560. [Throws]
  7561. constructor();
  7562. /* Passing null for wantsUntrusted means "default behavior", which
  7563. differs in content and chrome. In content that default boolean
  7564. value is true, while in chrome the default boolean value is
  7565. false. */
  7566. [Throws]
  7567. undefined addEventListener(DOMString type,
  7568. EventListener? listener,
  7569. optional (AddEventListenerOptions or boolean) options = {},
  7570. optional boolean? wantsUntrusted = null);
  7571. [Throws]
  7572. undefined removeEventListener(DOMString type,
  7573. EventListener? listener,
  7574. optional (EventListenerOptions or boolean) options = {});
  7575. [Throws, NeedsCallerType]
  7576. boolean dispatchEvent(Event event);
  7577. };
  7578. // Mozilla extensions for use by JS-implemented event targets to
  7579. // implement on* properties.
  7580. partial interface EventTarget {
  7581. // The use of [TreatNonCallableAsNull] here is a bit of a hack: it just makes
  7582. // the codegen check whether the type involved is either
  7583. // [TreatNonCallableAsNull] or [TreatNonObjectAsNull] and if it is handle it
  7584. // accordingly. In particular, it will NOT actually treat a non-null
  7585. // non-callable object as null here.
  7586. [ChromeOnly, Throws]
  7587. undefined setEventHandler(DOMString type,
  7588. [TreatNonCallableAsNull] EventHandler handler);
  7589. [ChromeOnly]
  7590. EventHandler getEventHandler(DOMString type);
  7591. };
  7592. // Mozilla extension to make firing events on event targets from
  7593. // chrome easier. This returns the window which can be used to create
  7594. // events to fire at this EventTarget, or null if there isn't one.
  7595. partial interface EventTarget {
  7596. [ChromeOnly, Exposed=Window, BinaryName="ownerGlobalForBindings"]
  7597. readonly attribute WindowProxy? ownerGlobal;
  7598. };
  7599. /* ---------------------- ExtendableEvent ----------------------------- */
  7600. /* ./webidl/ExtendableEvent.webidl */
  7601. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7602. /* This Source Code Form is subject to the terms of the Mozilla Public
  7603. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7604. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7605. *
  7606. * For more information on this interface, please see
  7607. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  7608. */
  7609. [Exposed=ServiceWorker]
  7610. interface ExtendableEvent : Event {
  7611. constructor(DOMString type, optional ExtendableEventInit eventInitDict = {});
  7612. // https://github.com/slightlyoff/ServiceWorker/issues/261
  7613. [Throws]
  7614. undefined waitUntil(Promise<any> p);
  7615. };
  7616. dictionary ExtendableEventInit : EventInit {
  7617. // Defined for the forward compatibility across the derived events
  7618. };
  7619. /* ---------------------- ExtendableMessageEvent ----------------------------- */
  7620. /* ./webidl/ExtendableMessageEvent.webidl */
  7621. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7622. /* This Source Code Form is subject to the terms of the Mozilla Public
  7623. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7624. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7625. *
  7626. * For more information on this interface, please see
  7627. * https://w3c.github.io/ServiceWorker/#extendablemessage-event-section
  7628. */
  7629. [Exposed=(ServiceWorker)]
  7630. interface ExtendableMessageEvent : ExtendableEvent {
  7631. constructor(DOMString type,
  7632. optional ExtendableMessageEventInit eventInitDict = {});
  7633. /**
  7634. * Custom data associated with this event.
  7635. */
  7636. [GetterThrows]
  7637. readonly attribute any data;
  7638. /**
  7639. * The origin of the site from which this event originated.
  7640. */
  7641. readonly attribute DOMString origin;
  7642. /**
  7643. * The last event ID string of the event source.
  7644. */
  7645. readonly attribute DOMString lastEventId;
  7646. /**
  7647. * The client, service worker or port which originated this event.
  7648. */
  7649. readonly attribute (Client or ServiceWorker or MessagePort)? source;
  7650. [Constant, Cached, Frozen]
  7651. readonly attribute sequence<MessagePort> ports;
  7652. };
  7653. dictionary ExtendableMessageEventInit : ExtendableEventInit {
  7654. any data = null;
  7655. DOMString origin = "";
  7656. DOMString lastEventId = "";
  7657. (Client or ServiceWorker or MessagePort)? source = null;
  7658. sequence<MessagePort> ports = [];
  7659. };
  7660. /* ---------------------- ExtensionAlarms ----------------------------- */
  7661. /* ./webidl/ExtensionAlarms.webidl */
  7662. /*
  7663. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  7664. *
  7665. * The content of this file has been generated based on the WebExtensions API
  7666. * JSONSchema using the following command:
  7667. *
  7668. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  7669. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- alarms
  7670. *
  7671. * More info about generating webidl API bindings for WebExtensions API at:
  7672. *
  7673. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7674. *
  7675. * A short summary of the special setup used by these WebIDL files (meant to aid
  7676. * webidl peers reviews and sign-offs) is available in the following section:
  7677. *
  7678. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7679. */
  7680. /* This Source Code Form is subject to the terms of the Mozilla Public
  7681. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7682. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7683. *
  7684. * You are granted a license to use, reproduce and create derivative works of
  7685. * this document.
  7686. */
  7687. // WebIDL definition for the "alarms" WebExtensions API
  7688. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7689. interface ExtensionAlarms {
  7690. // API methods.
  7691. [Throws, WebExtensionStub="NoReturn"]
  7692. undefined create(DOMString name, any alarmInfo);
  7693. [Throws, WebExtensionStub="NoReturn"]
  7694. undefined create(any alarmInfo);
  7695. [Throws, WebExtensionStub="Async"]
  7696. any get(DOMString name, optional Function callback);
  7697. [Throws, WebExtensionStub="Async"]
  7698. any get(optional Function callback);
  7699. [Throws, WebExtensionStub="Async"]
  7700. any getAll(optional Function callback);
  7701. [Throws, WebExtensionStub="Async"]
  7702. any clear(DOMString name, optional Function callback);
  7703. [Throws, WebExtensionStub="Async"]
  7704. any clear(optional Function callback);
  7705. [Throws, WebExtensionStub="Async"]
  7706. any clearAll(optional Function callback);
  7707. // API events.
  7708. [Replaceable, SameObject]
  7709. readonly attribute ExtensionEventManager onAlarm;
  7710. };
  7711. /* ---------------------- ExtensionBrowser ----------------------------- */
  7712. /* ./webidl/ExtensionBrowser.webidl */
  7713. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7714. /* This Source Code Form is subject to the terms of the Mozilla Public
  7715. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7716. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7717. *
  7718. * You are granted a license to use, reproduce and create derivative works of
  7719. * this document.
  7720. *
  7721. * This IDL file is related to interface mixin for the additional globals that should be
  7722. * available in windows and service workers allowed to access the WebExtensions API and
  7723. * the WebExtensions browser API namespace.
  7724. *
  7725. * More info about generating webidl API bindings for WebExtensions API at:
  7726. *
  7727. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7728. *
  7729. * A short summary of the special setup used by these WebIDL files (meant to aid
  7730. * webidl peers reviews and sign-offs) is available in the following section:
  7731. *
  7732. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7733. */
  7734. // WebExtensions API interface mixin (used to include ExtensionBrowser interface
  7735. // in the ServiceWorkerGlobalScope and Window).
  7736. [Exposed=(ServiceWorker)]
  7737. interface mixin ExtensionGlobalsMixin {
  7738. [Replaceable, SameObject, BinaryName="AcquireExtensionBrowser",
  7739. BindingAlias="chrome", Func="extensions::ExtensionAPIAllowed"]
  7740. readonly attribute ExtensionBrowser browser;
  7741. };
  7742. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7743. interface ExtensionBrowser {
  7744. // A mock API only exposed in tests to unit test the internals
  7745. // meant to be reused by the real WebExtensions API bindings
  7746. // in xpcshell tests.
  7747. [Replaceable, SameObject, BinaryName="GetExtensionMockAPI",
  7748. Func="mozilla::extensions::ExtensionMockAPI::IsAllowed",
  7749. Pref="extensions.webidl-api.expose_mock_interface"]
  7750. readonly attribute ExtensionMockAPI mockExtensionAPI;
  7751. // `browser.alarms` API namespace
  7752. [Replaceable, SameObject, BinaryName="GetExtensionAlarms",
  7753. Func="mozilla::extensions::ExtensionAlarms::IsAllowed"]
  7754. readonly attribute ExtensionAlarms alarms;
  7755. // `browser.browserSettings` API namespace
  7756. [Replaceable, SameObject, BinaryName="GetExtensionBrowserSettings",
  7757. Func="mozilla::extensions::ExtensionBrowserSettings::IsAllowed"]
  7758. readonly attribute ExtensionBrowserSettings browserSettings;
  7759. // `browser.dns` API namespace
  7760. [Replaceable, SameObject, BinaryName="GetExtensionDns",
  7761. Func="mozilla::extensions::ExtensionDns::IsAllowed"]
  7762. readonly attribute ExtensionDns dns;
  7763. // `browser.proxy` API namespace
  7764. [Replaceable, SameObject, BinaryName="GetExtensionProxy",
  7765. Func="mozilla::extensions::ExtensionProxy::IsAllowed"]
  7766. readonly attribute ExtensionProxy proxy;
  7767. // `browser.runtime` API namespace
  7768. [Replaceable, SameObject, BinaryName="GetExtensionRuntime",
  7769. Func="mozilla::extensions::ExtensionRuntime::IsAllowed"]
  7770. readonly attribute ExtensionRuntime runtime;
  7771. // `browser.scripting` API namespace
  7772. [Replaceable, SameObject, BinaryName="GetExtensionScripting",
  7773. Func="mozilla::extensions::ExtensionScripting::IsAllowed"]
  7774. readonly attribute ExtensionScripting scripting;
  7775. // `browser.test` API namespace, available in tests.
  7776. [Replaceable, SameObject, BinaryName="GetExtensionTest",
  7777. Func="mozilla::extensions::ExtensionTest::IsAllowed"]
  7778. readonly attribute ExtensionTest test;
  7779. };
  7780. /* ---------------------- ExtensionBrowserSettings ----------------------------- */
  7781. /* ./webidl/ExtensionBrowserSettings.webidl */
  7782. /*
  7783. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  7784. *
  7785. * The content of this file has been generated based on the WebExtensions API
  7786. * JSONSchema using the following command:
  7787. *
  7788. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  7789. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- browserSettings
  7790. *
  7791. * More info about generating webidl API bindings for WebExtensions API at:
  7792. *
  7793. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7794. *
  7795. * A short summary of the special setup used by these WebIDL files (meant to aid
  7796. * webidl peers reviews and sign-offs) is available in the following section:
  7797. *
  7798. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7799. */
  7800. /* This Source Code Form is subject to the terms of the Mozilla Public
  7801. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7802. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7803. *
  7804. * You are granted a license to use, reproduce and create derivative works of
  7805. * this document.
  7806. */
  7807. // WebIDL definition for the "browserSettings" WebExtensions API
  7808. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7809. interface ExtensionBrowserSettings {
  7810. // API properties.
  7811. [Replaceable]
  7812. readonly attribute ExtensionSetting allowPopupsForUserEvents;
  7813. [Replaceable]
  7814. readonly attribute ExtensionSetting cacheEnabled;
  7815. [Replaceable]
  7816. readonly attribute ExtensionSetting closeTabsByDoubleClick;
  7817. [Replaceable]
  7818. readonly attribute ExtensionSetting contextMenuShowEvent;
  7819. [Replaceable]
  7820. readonly attribute ExtensionSetting ftpProtocolEnabled;
  7821. [Replaceable]
  7822. readonly attribute ExtensionSetting homepageOverride;
  7823. [Replaceable]
  7824. readonly attribute ExtensionSetting imageAnimationBehavior;
  7825. [Replaceable]
  7826. readonly attribute ExtensionSetting newTabPageOverride;
  7827. [Replaceable]
  7828. readonly attribute ExtensionSetting newTabPosition;
  7829. [Replaceable]
  7830. readonly attribute ExtensionSetting openBookmarksInNewTabs;
  7831. [Replaceable]
  7832. readonly attribute ExtensionSetting openSearchResultsInNewTabs;
  7833. [Replaceable]
  7834. readonly attribute ExtensionSetting openUrlbarResultsInNewTabs;
  7835. [Replaceable]
  7836. readonly attribute ExtensionSetting webNotificationsDisabled;
  7837. [Replaceable]
  7838. readonly attribute ExtensionSetting overrideDocumentColors;
  7839. [Replaceable]
  7840. readonly attribute ExtensionSetting overrideContentColorScheme;
  7841. [Replaceable]
  7842. readonly attribute ExtensionSetting useDocumentFonts;
  7843. [Replaceable]
  7844. readonly attribute ExtensionSetting zoomFullPage;
  7845. [Replaceable]
  7846. readonly attribute ExtensionSetting zoomSiteSpecific;
  7847. // API child namespaces.
  7848. [Replaceable, SameObject,
  7849. BinaryName="GetExtensionBrowserSettingsColorManagement",
  7850. Func="mozilla::extensions::ExtensionBrowserSettingsColorManagement::IsAllowed"]
  7851. readonly attribute ExtensionBrowserSettingsColorManagement colorManagement;
  7852. };
  7853. /* ---------------------- ExtensionBrowserSettingsColorManagement ----------------------------- */
  7854. /* ./webidl/ExtensionBrowserSettingsColorManagement.webidl */
  7855. /*
  7856. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  7857. *
  7858. * The content of this file has been generated based on the WebExtensions API
  7859. * JSONSchema using the following command:
  7860. *
  7861. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  7862. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- browserSettings.colorManagement
  7863. *
  7864. * More info about generating webidl API bindings for WebExtensions API at:
  7865. *
  7866. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7867. *
  7868. * A short summary of the special setup used by these WebIDL files (meant to aid
  7869. * webidl peers reviews and sign-offs) is available in the following section:
  7870. *
  7871. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7872. */
  7873. /* This Source Code Form is subject to the terms of the Mozilla Public
  7874. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7875. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7876. *
  7877. * You are granted a license to use, reproduce and create derivative works of
  7878. * this document.
  7879. */
  7880. // WebIDL definition for the "browserSettings.colorManagement" WebExtensions API
  7881. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7882. interface ExtensionBrowserSettingsColorManagement {
  7883. // API properties.
  7884. [Replaceable]
  7885. readonly attribute ExtensionSetting mode;
  7886. [Replaceable]
  7887. readonly attribute ExtensionSetting useNativeSRGB;
  7888. [Replaceable]
  7889. readonly attribute ExtensionSetting useWebRenderCompositor;
  7890. };
  7891. /* ---------------------- ExtensionDns ----------------------------- */
  7892. /* ./webidl/ExtensionDns.webidl */
  7893. /*
  7894. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  7895. *
  7896. * The content of this file has been generated based on the WebExtensions API
  7897. * JSONSchema using the following command:
  7898. *
  7899. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  7900. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- dns
  7901. *
  7902. * More info about generating webidl API bindings for WebExtensions API at:
  7903. *
  7904. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7905. *
  7906. * A short summary of the special setup used by these WebIDL files (meant to aid
  7907. * webidl peers reviews and sign-offs) is available in the following section:
  7908. *
  7909. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7910. */
  7911. /* This Source Code Form is subject to the terms of the Mozilla Public
  7912. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7913. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7914. *
  7915. * You are granted a license to use, reproduce and create derivative works of
  7916. * this document.
  7917. */
  7918. // WebIDL definition for the "dns" WebExtensions API
  7919. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7920. interface ExtensionDns {
  7921. // API methods.
  7922. [Throws, WebExtensionStub="AsyncAmbiguous"]
  7923. any resolve(any... args);
  7924. };
  7925. /* ---------------------- ExtensionEventManager ----------------------------- */
  7926. /* ./webidl/ExtensionEventManager.webidl */
  7927. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  7928. /* This Source Code Form is subject to the terms of the Mozilla Public
  7929. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7930. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7931. *
  7932. * You are granted a license to use, reproduce and create derivative works of
  7933. * this document.
  7934. *
  7935. * This IDL file is related to the WebExtensions API object.
  7936. *
  7937. * More info about generating webidl API bindings for WebExtensions API at:
  7938. *
  7939. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7940. *
  7941. * A short summary of the special setup used by these WebIDL files (meant to aid
  7942. * webidl peers reviews and sign-offs) is available in the following section:
  7943. *
  7944. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7945. */
  7946. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7947. interface ExtensionEventManager {
  7948. [Throws]
  7949. undefined addListener(Function callback, optional object listenerOptions);
  7950. [Throws]
  7951. undefined removeListener(Function callback);
  7952. [Throws]
  7953. boolean hasListener(Function callback);
  7954. [Throws]
  7955. boolean hasListeners();
  7956. };
  7957. /* ---------------------- ExtensionMockAPI ----------------------------- */
  7958. /* ./webidl/ExtensionMockAPI.webidl */
  7959. /* This Source Code Form is subject to the terms of the Mozilla Public
  7960. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7961. * You can obtain one at http://mozilla.org/MPL/2.0/.
  7962. *
  7963. * You are granted a license to use, reproduce and create derivative works of
  7964. * this document.
  7965. *
  7966. * This IDL file is related to the WebExtensions API object only used in
  7967. * unit tests.
  7968. *
  7969. * More info about generating webidl API bindings for WebExtensions API at:
  7970. *
  7971. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  7972. *
  7973. * A short summary of the special setup used by these WebIDL files (meant to aid
  7974. * webidl peers reviews and sign-offs) is available in the following section:
  7975. *
  7976. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  7977. */
  7978. // WebIDL definition for the "mockExtensionAPI" WebExtensions API,
  7979. // only available in tests and locked behind an about:config preference
  7980. // ("extensions.webidl-api.expose_mock_interface").
  7981. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  7982. interface ExtensionMockAPI {
  7983. // Test API methods scenarios.
  7984. [Throws, WebExtensionStub]
  7985. any methodSyncWithReturn(any... args);
  7986. [Throws, WebExtensionStub="NoReturn"]
  7987. undefined methodNoReturn(any... args);
  7988. [Throws, WebExtensionStub="Async"]
  7989. any methodAsync(any arg0, optional Function cb);
  7990. [Throws, WebExtensionStub="AsyncAmbiguous"]
  7991. any methodAmbiguousArgsAsync(any... args);
  7992. [Throws, WebExtensionStub="ReturnsPort"]
  7993. ExtensionPort methodReturnsPort(DOMString testName);
  7994. // Test API properties.
  7995. [Replaceable]
  7996. readonly attribute any propertyAsErrorObject;
  7997. [Replaceable]
  7998. readonly attribute DOMString propertyAsString;
  7999. // Test API events.
  8000. [Replaceable, SameObject]
  8001. readonly attribute ExtensionEventManager onTestEvent;
  8002. };
  8003. /* ---------------------- ExtensionPort ----------------------------- */
  8004. /* ./webidl/ExtensionPort.webidl */
  8005. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8006. /* This Source Code Form is subject to the terms of the Mozilla Public
  8007. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8008. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8009. *
  8010. * You are granted a license to use, reproduce and create derivative works of
  8011. * this document.
  8012. *
  8013. * This IDL file is related to the WebExtensions browser.runtime's Port.
  8014. *
  8015. * More info about generating webidl API bindings for WebExtensions API at:
  8016. *
  8017. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8018. *
  8019. * A short summary of the special setup used by these WebIDL files (meant to aid
  8020. * webidl peers reviews and sign-offs) is available in the following section:
  8021. *
  8022. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  8023. */
  8024. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8025. interface ExtensionPort {
  8026. [Replaceable]
  8027. readonly attribute DOMString name;
  8028. [Replaceable]
  8029. readonly attribute any sender;
  8030. [Replaceable]
  8031. readonly attribute any error;
  8032. [Throws, WebExtensionStub="NoReturn"]
  8033. undefined disconnect();
  8034. [Throws, WebExtensionStub="NoReturn"]
  8035. undefined postMessage(any message);
  8036. [Replaceable, SameObject]
  8037. readonly attribute ExtensionEventManager onDisconnect;
  8038. [Replaceable, SameObject]
  8039. readonly attribute ExtensionEventManager onMessage;
  8040. };
  8041. // Dictionary used by ExtensionAPIRequestForwarder and ExtensionCallabck to receive from the
  8042. // mozIExtensionAPIRequestHandler an internal description of a runtime.Port (and then used in
  8043. // the webidl implementation to create an ExtensionPort instance).
  8044. [GenerateInit]
  8045. dictionary ExtensionPortDescriptor {
  8046. required DOMString portId;
  8047. DOMString name = "";
  8048. };
  8049. /* ---------------------- ExtensionProxy ----------------------------- */
  8050. /* ./webidl/ExtensionProxy.webidl */
  8051. /*
  8052. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  8053. *
  8054. * The content of this file has been generated based on the WebExtensions API
  8055. * JSONSchema using the following command:
  8056. *
  8057. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  8058. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- proxy
  8059. *
  8060. * More info about generating webidl API bindings for WebExtensions API at:
  8061. *
  8062. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8063. */
  8064. /* This Source Code Form is subject to the terms of the Mozilla Public
  8065. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8066. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8067. *
  8068. * You are granted a license to use, reproduce and create derivative works of
  8069. * this document.
  8070. */
  8071. // WebIDL definition for the "proxy" WebExtensions API
  8072. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8073. interface ExtensionProxy {
  8074. // API events.
  8075. [Replaceable, SameObject]
  8076. readonly attribute ExtensionEventManager onRequest;
  8077. [Replaceable, SameObject]
  8078. readonly attribute ExtensionEventManager onError;
  8079. // API properties.
  8080. [Replaceable]
  8081. readonly attribute ExtensionSetting settings;
  8082. };
  8083. /* ---------------------- ExtensionRuntime ----------------------------- */
  8084. /* ./webidl/ExtensionRuntime.webidl */
  8085. /*
  8086. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  8087. *
  8088. * The content of this file has been generated based on the WebExtensions API
  8089. * JSONSchema using the following command:
  8090. *
  8091. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  8092. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- runtime
  8093. *
  8094. * More info about generating webidl API bindings for WebExtensions API at:
  8095. *
  8096. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8097. *
  8098. * A short summary of the special setup used by these WebIDL files (meant to aid
  8099. * webidl peers reviews and sign-offs) is available in the following section:
  8100. *
  8101. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  8102. */
  8103. /* This Source Code Form is subject to the terms of the Mozilla Public
  8104. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8105. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8106. *
  8107. * You are granted a license to use, reproduce and create derivative works of
  8108. * this document.
  8109. */
  8110. // WebIDL definition for the "runtime" WebExtensions API
  8111. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8112. interface ExtensionRuntime {
  8113. // API methods.
  8114. [Throws, WebExtensionStub="Async"]
  8115. any openOptionsPage(optional Function callback);
  8116. [Throws, WebExtensionStub]
  8117. any getManifest();
  8118. [Throws, WebExtensionStub="ReturnsString"]
  8119. DOMString getURL(DOMString path);
  8120. [Throws, WebExtensionStub="Async"]
  8121. any setUninstallURL(DOMString url, optional Function callback);
  8122. [Throws, WebExtensionStub="Async"]
  8123. any setUninstallURL(optional Function callback);
  8124. [Throws, WebExtensionStub="NoReturn"]
  8125. undefined reload();
  8126. [Throws, WebExtensionStub="ReturnsPort"]
  8127. ExtensionPort connect(DOMString extensionId, any connectInfo);
  8128. [Throws, WebExtensionStub="ReturnsPort"]
  8129. ExtensionPort connect(any connectInfo);
  8130. [Throws, WebExtensionStub="ReturnsPort"]
  8131. ExtensionPort connect();
  8132. [Throws, WebExtensionStub="ReturnsPort"]
  8133. ExtensionPort connectNative(DOMString application);
  8134. [Throws, WebExtensionStub="AsyncAmbiguous"]
  8135. any sendMessage(any... args);
  8136. [Throws, WebExtensionStub="Async"]
  8137. any sendNativeMessage(DOMString application, any message, optional Function responseCallback);
  8138. [Throws, WebExtensionStub="Async"]
  8139. any getBrowserInfo(optional Function callback);
  8140. [Throws, WebExtensionStub="Async"]
  8141. any getPlatformInfo(optional Function callback);
  8142. // API events.
  8143. [Replaceable, SameObject]
  8144. readonly attribute ExtensionEventManager onStartup;
  8145. [Replaceable, SameObject]
  8146. readonly attribute ExtensionEventManager onInstalled;
  8147. [Replaceable, SameObject]
  8148. readonly attribute ExtensionEventManager onUpdateAvailable;
  8149. [Replaceable, SameObject]
  8150. readonly attribute ExtensionEventManager onConnect;
  8151. [Replaceable, SameObject]
  8152. readonly attribute ExtensionEventManager onConnectExternal;
  8153. [Replaceable, SameObject]
  8154. readonly attribute ExtensionEventManager onMessage;
  8155. [Replaceable, SameObject]
  8156. readonly attribute ExtensionEventManager onMessageExternal;
  8157. // API properties.
  8158. [Replaceable]
  8159. readonly attribute any lastError;
  8160. [Replaceable]
  8161. readonly attribute DOMString id;
  8162. };
  8163. /* ---------------------- ExtensionScripting ----------------------------- */
  8164. /* ./webidl/ExtensionScripting.webidl */
  8165. /*
  8166. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  8167. *
  8168. * The content of this file has been generated based on the WebExtensions API
  8169. * JSONSchema using the following command:
  8170. *
  8171. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  8172. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- scripting
  8173. *
  8174. * More info about generating webidl API bindings for WebExtensions API at:
  8175. *
  8176. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8177. *
  8178. * A short summary of the special setup used by these WebIDL files (meant to aid
  8179. * webidl peers reviews and sign-offs) is available in the following section:
  8180. *
  8181. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  8182. */
  8183. /* This Source Code Form is subject to the terms of the Mozilla Public
  8184. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8185. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8186. *
  8187. * You are granted a license to use, reproduce and create derivative works of
  8188. * this document.
  8189. */
  8190. // WebIDL definition for the "scripting" WebExtensions API
  8191. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8192. interface ExtensionScripting {
  8193. // API methods.
  8194. [Throws, WebExtensionStub="NotImplementedAsync"]
  8195. any executeScript(any injection, optional Function callback);
  8196. [Throws, WebExtensionStub="Async"]
  8197. any insertCSS(any injection, optional Function callback);
  8198. [Throws, WebExtensionStub="Async"]
  8199. any removeCSS(any injection, optional Function callback);
  8200. [Throws, WebExtensionStub="Async"]
  8201. any registerContentScripts(any scripts, optional Function callback);
  8202. [Throws, WebExtensionStub="AsyncAmbiguous"]
  8203. any getRegisteredContentScripts(any... args);
  8204. [Throws, WebExtensionStub="AsyncAmbiguous"]
  8205. any unregisterContentScripts(any... args);
  8206. [Throws, WebExtensionStub="Async"]
  8207. any updateContentScripts(any scripts, optional Function callback);
  8208. };
  8209. /* ---------------------- ExtensionSetting ----------------------------- */
  8210. /* ./webidl/ExtensionSetting.webidl */
  8211. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8212. /* This Source Code Form is subject to the terms of the Mozilla Public
  8213. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8214. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8215. *
  8216. * You are granted a license to use, reproduce and create derivative works of
  8217. * this document.
  8218. *
  8219. * This IDL file is related to the WebExtensions API object.
  8220. *
  8221. * The ExtensionSetting interface is used by the API namespace that expose
  8222. * settings API sub-namespaces (in particular browserSettings, proxy,
  8223. * captivePortal and privacy WebExtensions APIs).
  8224. *
  8225. * More info about generating webidl API bindings for WebExtensions API at:
  8226. *
  8227. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8228. *
  8229. * A short summary of the special setup used by these WebIDL files (meant to aid
  8230. * webidl peers reviews and sign-offs) is available in the following section:
  8231. *
  8232. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  8233. */
  8234. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8235. interface ExtensionSetting {
  8236. // API methods.
  8237. [Throws, WebExtensionStub="Async"]
  8238. any get(object details, optional Function callback);
  8239. [Throws, WebExtensionStub="Async"]
  8240. any set(object details, optional Function callback);
  8241. [Throws, WebExtensionStub="Async"]
  8242. any clear(object details, optional Function callback);
  8243. // API events.
  8244. [Replaceable, SameObject]
  8245. readonly attribute ExtensionEventManager onChange;
  8246. };
  8247. /* ---------------------- ExtensionTest ----------------------------- */
  8248. /* ./webidl/ExtensionTest.webidl */
  8249. /*
  8250. * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
  8251. *
  8252. * The content of this file has been generated based on the WebExtensions API
  8253. * JSONSchema using the following command:
  8254. *
  8255. * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
  8256. * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- test
  8257. *
  8258. * More info about generating webidl API bindings for WebExtensions API at:
  8259. *
  8260. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
  8261. *
  8262. * A short summary of the special setup used by these WebIDL files (meant to aid
  8263. * webidl peers reviews and sign-offs) is available in the following section:
  8264. *
  8265. * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
  8266. */
  8267. /* This Source Code Form is subject to the terms of the Mozilla Public
  8268. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8269. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8270. *
  8271. * You are granted a license to use, reproduce and create derivative works of
  8272. * this document.
  8273. */
  8274. // WebIDL definition for the "test" WebExtensions API
  8275. [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
  8276. interface ExtensionTest {
  8277. // API methods.
  8278. [Throws, WebExtensionStub="NotImplementedNoReturn"]
  8279. undefined withHandlingUserInput(Function callback);
  8280. [Throws, WebExtensionStub="NoReturn"]
  8281. undefined notifyFail(DOMString message);
  8282. [Throws, WebExtensionStub="NoReturn"]
  8283. undefined notifyPass(DOMString message);
  8284. [Throws, WebExtensionStub="NoReturn"]
  8285. undefined notifyPass();
  8286. [Throws, WebExtensionStub="NoReturn"]
  8287. undefined log(DOMString message);
  8288. [Throws, WebExtensionStub="NoReturn"]
  8289. undefined sendMessage(any... args);
  8290. [Throws, WebExtensionStub="NoReturn"]
  8291. undefined fail(any message);
  8292. [Throws, WebExtensionStub="NoReturn"]
  8293. undefined fail();
  8294. [Throws, WebExtensionStub="NoReturn"]
  8295. undefined succeed(any message);
  8296. [Throws, WebExtensionStub="NoReturn"]
  8297. undefined succeed();
  8298. [Throws, WebExtensionStub="NoReturn"]
  8299. undefined assertTrue(any... args);
  8300. [Throws, WebExtensionStub="NoReturn"]
  8301. undefined assertFalse(any... args);
  8302. [Throws, WebExtensionStub="NoReturn"]
  8303. undefined assertDeepEq(any... args);
  8304. [Throws, WebExtensionStub="AssertEq"]
  8305. undefined assertEq(any... args);
  8306. [Throws]
  8307. any assertRejects(Promise<any> promise, any expectedError, DOMString message, optional Function callback);
  8308. [Throws]
  8309. any assertRejects(Promise<any> promise, any expectedError, optional Function callback);
  8310. [Throws]
  8311. undefined assertThrows(Function func, any expectedError, DOMString message);
  8312. [Throws]
  8313. undefined assertThrows(Function func, any expectedError);
  8314. // API events.
  8315. [Replaceable, SameObject]
  8316. readonly attribute ExtensionEventManager onMessage;
  8317. };
  8318. /* ---------------------- External ----------------------------- */
  8319. /* ./webidl/External.webidl */
  8320. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8321. /* This Source Code Form is subject to the terms of the Mozilla Public
  8322. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8323. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8324. */
  8325. [LegacyNoInterfaceObject, Exposed=Window]
  8326. interface External {
  8327. [Deprecated="External_AddSearchProvider"]
  8328. undefined AddSearchProvider();
  8329. undefined IsSearchProviderInstalled();
  8330. };
  8331. /* ---------------------- FailedCertSecurityInfo ----------------------------- */
  8332. /* ./webidl/FailedCertSecurityInfo.webidl */
  8333. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8334. /* This Source Code Form is subject to the terms of the Mozilla Public
  8335. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8336. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8337. */
  8338. /**
  8339. * This dictionary is used for exposing failed channel certificate information
  8340. * to about:certerror to display information.
  8341. */
  8342. enum OverridableErrorCategory {
  8343. "unset",
  8344. "trust-error",
  8345. "domain-mismatch",
  8346. "expired-or-not-yet-valid",
  8347. };
  8348. dictionary FailedCertSecurityInfo {
  8349. DOMString errorCodeString = "";
  8350. OverridableErrorCategory overridableErrorCategory = "unset";
  8351. DOMTimeStamp validNotBefore = 0;
  8352. DOMTimeStamp validNotAfter = 0;
  8353. DOMString issuerCommonName = "";
  8354. DOMTimeStamp certValidityRangeNotAfter = 0;
  8355. DOMTimeStamp certValidityRangeNotBefore = 0;
  8356. DOMString errorMessage = "";
  8357. boolean hasHSTS = true;
  8358. boolean hasHPKP = true;
  8359. sequence<DOMString> certChainStrings;
  8360. };
  8361. /* ---------------------- FakePluginTagInit ----------------------------- */
  8362. /* ./webidl/FakePluginTagInit.webidl */
  8363. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8364. /* This Source Code Form is subject to the terms of the Mozilla Public
  8365. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8366. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8367. */
  8368. /**
  8369. * A fake plugin is fundamentally identified by its handlerURI.
  8370. *
  8371. * In addition to that, a fake plugin registration needs to provide at least one
  8372. * FakePluginMimeEntry so we'll know what types(s) the plugin is registered for.
  8373. * Other information is optional, though having usable niceName is highly
  8374. * recommended.
  8375. */
  8376. [GenerateInit]
  8377. dictionary FakePluginTagInit {
  8378. required DOMString handlerURI;
  8379. required sequence<FakePluginMimeEntry> mimeEntries;
  8380. // The niceName should really be provided, and be unique, if possible; it can
  8381. // be used as a key to persist state for this plug-in.
  8382. DOMString niceName = "";
  8383. // Other things can be provided but don't really matter that much.
  8384. DOMString fullPath = "";
  8385. DOMString name = "";
  8386. DOMString description = "";
  8387. DOMString fileName = "";
  8388. DOMString version = "";
  8389. /**
  8390. * Optional script to run in a sandbox when instantiating a plugin. The script
  8391. * runs in a sandbox with system principal in the process that contains the
  8392. * element that instantiates the plugin (ie the EMBED or OBJECT element). The
  8393. * sandbox global has a 'pluginElement' property that the script can use to
  8394. * access the element that instantiates the plugin.
  8395. */
  8396. DOMString sandboxScript = "";
  8397. };
  8398. /**
  8399. * A single MIME entry for the fake plugin.
  8400. */
  8401. dictionary FakePluginMimeEntry {
  8402. required DOMString type;
  8403. DOMString description = "";
  8404. DOMString extension = "";
  8405. };
  8406. /* ---------------------- FeaturePolicy ----------------------------- */
  8407. /* ./webidl/FeaturePolicy.webidl */
  8408. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8409. /* This Source Code Form is subject to the terms of the Mozilla Public
  8410. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8411. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8412. *
  8413. * For more information on this interface, please see
  8414. * https://w3c.github.io/webappsec-feature-policy/#idl-index
  8415. */
  8416. [LegacyNoInterfaceObject,
  8417. Exposed=Window]
  8418. interface FeaturePolicy {
  8419. boolean allowsFeature(DOMString feature, optional DOMString origin);
  8420. sequence<DOMString> features();
  8421. sequence<DOMString> allowedFeatures();
  8422. sequence<DOMString> getAllowlistForFeature(DOMString feature);
  8423. };
  8424. [Pref="dom.reporting.featurePolicy.enabled",
  8425. Exposed=Window]
  8426. interface FeaturePolicyViolationReportBody : ReportBody {
  8427. readonly attribute DOMString featureId;
  8428. readonly attribute DOMString? sourceFile;
  8429. readonly attribute long? lineNumber;
  8430. readonly attribute long? columnNumber;
  8431. readonly attribute DOMString disposition;
  8432. };
  8433. /* ---------------------- Fetch ----------------------------- */
  8434. /* ./webidl/Fetch.webidl */
  8435. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8436. /* This Source Code Form is subject to the terms of the Mozilla Public
  8437. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8438. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8439. *
  8440. * The origin of this IDL file is
  8441. * http://fetch.spec.whatwg.org/
  8442. */
  8443. typedef object JSON;
  8444. typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) XMLHttpRequestBodyInit;
  8445. /* no support for request body streams yet */
  8446. typedef XMLHttpRequestBodyInit BodyInit;
  8447. interface mixin Body {
  8448. readonly attribute boolean bodyUsed;
  8449. [NewObject]
  8450. Promise<ArrayBuffer> arrayBuffer();
  8451. [NewObject]
  8452. Promise<Blob> blob();
  8453. [NewObject]
  8454. Promise<FormData> formData();
  8455. [NewObject]
  8456. Promise<JSON> json();
  8457. [NewObject]
  8458. Promise<USVString> text();
  8459. };
  8460. // These are helper dictionaries for the parsing of a
  8461. // getReader().read().then(data) parsing.
  8462. // See more about how these 2 helpers are used in
  8463. // dom/fetch/FetchStreamReader.cpp
  8464. [GenerateInit]
  8465. dictionary FetchReadableStreamReadDataDone {
  8466. boolean done = false;
  8467. };
  8468. [GenerateInit]
  8469. dictionary FetchReadableStreamReadDataArray {
  8470. Uint8Array value;
  8471. };
  8472. /* ---------------------- FetchEvent ----------------------------- */
  8473. /* ./webidl/FetchEvent.webidl */
  8474. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8475. /* This Source Code Form is subject to the terms of the Mozilla Public
  8476. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8477. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8478. *
  8479. * For more information on this interface, please see
  8480. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  8481. */
  8482. [Func="ServiceWorkerVisible",
  8483. Exposed=(ServiceWorker)]
  8484. interface FetchEvent : ExtendableEvent {
  8485. constructor(DOMString type, FetchEventInit eventInitDict);
  8486. [SameObject, BinaryName="request_"] readonly attribute Request request;
  8487. [Pref="dom.serviceWorkers.navigationPreload.enabled"]
  8488. readonly attribute Promise<any> preloadResponse;
  8489. readonly attribute DOMString clientId;
  8490. readonly attribute DOMString resultingClientId;
  8491. readonly attribute Promise<undefined> handled;
  8492. [Throws]
  8493. undefined respondWith(Promise<Response> r);
  8494. };
  8495. dictionary FetchEventInit : EventInit {
  8496. required Request request;
  8497. DOMString clientId = "";
  8498. DOMString resultingClientId = "";
  8499. };
  8500. /* ---------------------- FetchObserver ----------------------------- */
  8501. /* ./webidl/FetchObserver.webidl */
  8502. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8503. /* This Source Code Form is subject to the terms of the Mozilla Public
  8504. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8505. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8506. */
  8507. [Exposed=Window]
  8508. callback interface ObserverCallback {
  8509. undefined handleEvent(FetchObserver observer);
  8510. };
  8511. enum FetchState {
  8512. // Pending states
  8513. "requesting", "responding",
  8514. // Final states
  8515. "aborted", "errored", "complete"
  8516. };
  8517. [Exposed=(Window,Worker),
  8518. Pref="dom.fetchObserver.enabled"]
  8519. interface FetchObserver : EventTarget {
  8520. readonly attribute FetchState state;
  8521. // Events
  8522. attribute EventHandler onstatechange;
  8523. attribute EventHandler onrequestprogress;
  8524. attribute EventHandler onresponseprogress;
  8525. };
  8526. /* ---------------------- File ----------------------------- */
  8527. /* ./webidl/File.webidl */
  8528. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8529. /* This Source Code Form is subject to the terms of the Mozilla Public
  8530. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8531. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8532. *
  8533. * The origin of this IDL file is
  8534. * https://w3c.github.io/FileAPI/#file
  8535. * https://wicg.github.io/entries-api
  8536. */
  8537. interface nsIFile;
  8538. [Exposed=(Window,Worker)]
  8539. interface File : Blob {
  8540. [Throws]
  8541. constructor(sequence<BlobPart> fileBits,
  8542. USVString fileName, optional FilePropertyBag options = {});
  8543. readonly attribute DOMString name;
  8544. [GetterThrows]
  8545. readonly attribute long long lastModified;
  8546. };
  8547. dictionary FilePropertyBag : BlobPropertyBag {
  8548. long long lastModified;
  8549. };
  8550. dictionary ChromeFilePropertyBag : FilePropertyBag {
  8551. DOMString name = "";
  8552. boolean existenceCheck = true;
  8553. };
  8554. // https://wicg.github.io/entries-api
  8555. partial interface File {
  8556. [BinaryName="relativePath", Pref="dom.webkitBlink.dirPicker.enabled"]
  8557. readonly attribute USVString webkitRelativePath;
  8558. };
  8559. // Mozilla extensions
  8560. partial interface File {
  8561. [GetterThrows, ChromeOnly, NeedsCallerType]
  8562. readonly attribute DOMString mozFullPath;
  8563. };
  8564. // Mozilla extensions
  8565. // These 2 methods can be used only in these conditions:
  8566. // - the main-thread
  8567. // - parent process OR file process OR, only for testing, with pref
  8568. // `dom.file.createInChild' set to true.
  8569. [Exposed=(Window)]
  8570. partial interface File {
  8571. [ChromeOnly, NewObject, NeedsCallerType]
  8572. static Promise<File> createFromNsIFile(nsIFile file,
  8573. optional ChromeFilePropertyBag options = {});
  8574. [ChromeOnly, NewObject, NeedsCallerType]
  8575. static Promise<File> createFromFileName(USVString fileName,
  8576. optional ChromeFilePropertyBag options = {});
  8577. };
  8578. /* ---------------------- FileList ----------------------------- */
  8579. /* ./webidl/FileList.webidl */
  8580. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8581. /* This Source Code Form is subject to the terms of the Mozilla Public
  8582. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8583. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8584. *
  8585. * The origin of this IDL file is
  8586. * http://dev.w3.org/2006/webapi/FileAPI/
  8587. *
  8588. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  8589. * liability, trademark and document use rules apply.
  8590. */
  8591. [Exposed=(Window,Worker)]
  8592. interface FileList {
  8593. getter File? item(unsigned long index);
  8594. readonly attribute unsigned long length;
  8595. };
  8596. /* ---------------------- FileMode ----------------------------- */
  8597. /* ./webidl/FileMode.webidl */
  8598. /* This Source Code Form is subject to the terms of the Mozilla Public
  8599. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8600. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8601. enum FileMode { "readonly", "readwrite" };
  8602. /* ---------------------- FileReader ----------------------------- */
  8603. /* ./webidl/FileReader.webidl */
  8604. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8605. /* This Source Code Form is subject to the terms of the Mozilla Public
  8606. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8607. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8608. *
  8609. * The origin of this IDL file is
  8610. * https://w3c.github.io/FileAPI/#APIASynch
  8611. *
  8612. * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  8613. * liability, trademark and document use rules apply.
  8614. */
  8615. [Exposed=(Window,Worker)]
  8616. interface FileReader : EventTarget {
  8617. constructor();
  8618. // async read methods
  8619. [Throws]
  8620. undefined readAsArrayBuffer(Blob blob);
  8621. [Throws]
  8622. undefined readAsBinaryString(Blob filedata);
  8623. [Throws]
  8624. undefined readAsText(Blob blob, optional DOMString label);
  8625. [Throws]
  8626. undefined readAsDataURL(Blob blob);
  8627. undefined abort();
  8628. // states
  8629. const unsigned short EMPTY = 0;
  8630. const unsigned short LOADING = 1;
  8631. const unsigned short DONE = 2;
  8632. readonly attribute unsigned short readyState;
  8633. readonly attribute (DOMString or ArrayBuffer)? result;
  8634. readonly attribute DOMException? error;
  8635. // event handler attributes
  8636. attribute EventHandler onloadstart;
  8637. attribute EventHandler onprogress;
  8638. attribute EventHandler onload;
  8639. attribute EventHandler onabort;
  8640. attribute EventHandler onerror;
  8641. attribute EventHandler onloadend;
  8642. };
  8643. /* ---------------------- FileReaderSync ----------------------------- */
  8644. /* ./webidl/FileReaderSync.webidl */
  8645. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8646. /* This Source Code Form is subject to the terms of the Mozilla Public
  8647. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8648. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8649. *
  8650. * The origin of this IDL file is
  8651. * http://dev.w3.org/2006/webapi/FileAPI/
  8652. *
  8653. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  8654. * liability, trademark and document use rules apply.
  8655. */
  8656. [Exposed=(DedicatedWorker,SharedWorker)]
  8657. interface FileReaderSync {
  8658. constructor();
  8659. // Synchronously return strings
  8660. [Throws]
  8661. ArrayBuffer readAsArrayBuffer(Blob blob);
  8662. [Throws]
  8663. DOMString readAsBinaryString(Blob blob);
  8664. [Throws]
  8665. DOMString readAsText(Blob blob, optional DOMString encoding);
  8666. [Throws]
  8667. DOMString readAsDataURL(Blob blob);
  8668. };
  8669. /* ---------------------- FileSystem ----------------------------- */
  8670. /* ./webidl/FileSystem.webidl */
  8671. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8672. /* This Source Code Form is subject to the terms of the Mozilla Public
  8673. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8674. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8675. *
  8676. * https://wicg.github.io/entries-api/#idl-index
  8677. */
  8678. dictionary FileSystemFlags {
  8679. boolean create = false;
  8680. boolean exclusive = false;
  8681. };
  8682. callback FileSystemEntryCallback = undefined (FileSystemEntry entry);
  8683. callback ErrorCallback = undefined (DOMException err);
  8684. [Exposed=Window]
  8685. interface FileSystem {
  8686. readonly attribute USVString name;
  8687. readonly attribute FileSystemDirectoryEntry root;
  8688. };
  8689. /* ---------------------- FileSystemDirectoryEntry ----------------------------- */
  8690. /* ./webidl/FileSystemDirectoryEntry.webidl */
  8691. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8692. /* This Source Code Form is subject to the terms of the Mozilla Public
  8693. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8694. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8695. *
  8696. * https://wicg.github.io/entries-api/#idl-index
  8697. */
  8698. [Exposed=Window]
  8699. interface FileSystemDirectoryEntry : FileSystemEntry {
  8700. FileSystemDirectoryReader createReader();
  8701. undefined getFile(optional USVString? path,
  8702. optional FileSystemFlags options = {},
  8703. optional FileSystemEntryCallback successCallback,
  8704. optional ErrorCallback errorCallback);
  8705. undefined getDirectory(optional USVString? path,
  8706. optional FileSystemFlags options = {},
  8707. optional FileSystemEntryCallback successCallback,
  8708. optional ErrorCallback errorCallback);
  8709. };
  8710. /* ---------------------- FileSystemDirectoryHandle ----------------------------- */
  8711. /* ./webidl/FileSystemDirectoryHandle.webidl */
  8712. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8713. /* This Source Code Form is subject to the terms of the Mozilla Public
  8714. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8715. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8716. dictionary FileSystemGetFileOptions {
  8717. boolean create = false;
  8718. };
  8719. dictionary FileSystemGetDirectoryOptions {
  8720. boolean create = false;
  8721. };
  8722. dictionary FileSystemRemoveOptions {
  8723. boolean recursive = false;
  8724. };
  8725. [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
  8726. interface FileSystemDirectoryHandle : FileSystemHandle {
  8727. async iterable<USVString, FileSystemHandle>;
  8728. [NewObject]
  8729. Promise<FileSystemFileHandle> getFileHandle(USVString name, optional FileSystemGetFileOptions options = {});
  8730. [NewObject]
  8731. Promise<FileSystemDirectoryHandle> getDirectoryHandle(USVString name, optional FileSystemGetDirectoryOptions options = {});
  8732. [NewObject]
  8733. Promise<undefined> removeEntry(USVString name, optional FileSystemRemoveOptions options = {});
  8734. [NewObject]
  8735. Promise<sequence<USVString>?> resolve(FileSystemHandle possibleDescendant);
  8736. };
  8737. /* ---------------------- FileSystemDirectoryIterator ----------------------------- */
  8738. /* ./webidl/FileSystemDirectoryIterator.webidl */
  8739. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8740. /* This Source Code Form is subject to the terms of the Mozilla Public
  8741. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8742. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8743. // To implement FileSystemDirectoryHandle's async iteration until we can use
  8744. // a natively supported `async iterable`.
  8745. [Exposed=(Window,Worker), SecureContext, LegacyNoInterfaceObject]
  8746. interface FileSystemDirectoryIterator {
  8747. [NewObject]
  8748. Promise<any> next();
  8749. };
  8750. /* ---------------------- FileSystemDirectoryReader ----------------------------- */
  8751. /* ./webidl/FileSystemDirectoryReader.webidl */
  8752. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8753. /* This Source Code Form is subject to the terms of the Mozilla Public
  8754. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8755. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8756. *
  8757. * https://wicg.github.io/entries-api/#idl-index
  8758. */
  8759. callback FileSystemEntriesCallback = undefined (sequence<FileSystemEntry> entries);
  8760. [Exposed=Window]
  8761. interface FileSystemDirectoryReader {
  8762. // readEntries can be called just once. The second time it returns no data.
  8763. [Throws]
  8764. undefined readEntries(FileSystemEntriesCallback successCallback,
  8765. optional ErrorCallback errorCallback);
  8766. };
  8767. /* ---------------------- FileSystemEntry ----------------------------- */
  8768. /* ./webidl/FileSystemEntry.webidl */
  8769. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8770. /* This Source Code Form is subject to the terms of the Mozilla Public
  8771. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8772. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8773. *
  8774. * https://wicg.github.io/entries-api/#idl-index
  8775. */
  8776. [Exposed=Window]
  8777. interface FileSystemEntry {
  8778. readonly attribute boolean isFile;
  8779. readonly attribute boolean isDirectory;
  8780. [GetterThrows]
  8781. readonly attribute USVString name;
  8782. [GetterThrows]
  8783. readonly attribute USVString fullPath;
  8784. readonly attribute FileSystem filesystem;
  8785. undefined getParent(optional FileSystemEntryCallback successCallback,
  8786. optional ErrorCallback errorCallback);
  8787. };
  8788. /* ---------------------- FileSystemFileEntry ----------------------------- */
  8789. /* ./webidl/FileSystemFileEntry.webidl */
  8790. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8791. /* This Source Code Form is subject to the terms of the Mozilla Public
  8792. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8793. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8794. *
  8795. * https://wicg.github.io/entries-api/#idl-index
  8796. */
  8797. callback FileCallback = undefined (File file);
  8798. [Exposed=Window]
  8799. interface FileSystemFileEntry : FileSystemEntry {
  8800. [BinaryName="GetFile"]
  8801. undefined file (FileCallback successCallback,
  8802. optional ErrorCallback errorCallback);
  8803. };
  8804. /* ---------------------- FileSystemFileHandle ----------------------------- */
  8805. /* ./webidl/FileSystemFileHandle.webidl */
  8806. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8807. /* This Source Code Form is subject to the terms of the Mozilla Public
  8808. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8809. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8810. dictionary FileSystemCreateWritableOptions {
  8811. boolean keepExistingData = false;
  8812. };
  8813. [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
  8814. interface FileSystemFileHandle : FileSystemHandle {
  8815. [NewObject]
  8816. Promise<File> getFile();
  8817. [NewObject]
  8818. Promise<FileSystemWritableFileStream> createWritable(optional FileSystemCreateWritableOptions options = {});
  8819. [Exposed=DedicatedWorker, NewObject]
  8820. Promise<FileSystemSyncAccessHandle> createSyncAccessHandle();
  8821. };
  8822. /* ---------------------- FileSystemHandle ----------------------------- */
  8823. /* ./webidl/FileSystemHandle.webidl */
  8824. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8825. /* This Source Code Form is subject to the terms of the Mozilla Public
  8826. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8827. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8828. enum FileSystemHandleKind {
  8829. "file",
  8830. "directory",
  8831. };
  8832. [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
  8833. interface FileSystemHandle {
  8834. readonly attribute FileSystemHandleKind kind;
  8835. readonly attribute USVString name;
  8836. /* https://whatpr.org/fs/10.html#api-filesystemhandle */
  8837. [NewObject]
  8838. Promise<undefined> move(USVString name);
  8839. [NewObject]
  8840. Promise<undefined> move(FileSystemDirectoryHandle parent);
  8841. [NewObject]
  8842. Promise<undefined> move(FileSystemDirectoryHandle parent, USVString name);
  8843. [NewObject]
  8844. Promise<boolean> isSameEntry(FileSystemHandle other);
  8845. };
  8846. /* ---------------------- FileSystemSyncAccessHandle ----------------------------- */
  8847. /* ./webidl/FileSystemSyncAccessHandle.webidl */
  8848. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8849. /* This Source Code Form is subject to the terms of the Mozilla Public
  8850. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8851. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8852. dictionary FileSystemReadWriteOptions {
  8853. [EnforceRange] unsigned long long at;
  8854. };
  8855. [Exposed=(DedicatedWorker), SecureContext, Pref="dom.fs.enabled"]
  8856. interface FileSystemSyncAccessHandle {
  8857. // TODO: Use `[AllowShared] BufferSource data` once it works (bug 1696216)
  8858. [Throws] unsigned long long read(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
  8859. [Throws] unsigned long long write(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
  8860. [Throws] undefined truncate([EnforceRange] unsigned long long size);
  8861. [Throws] unsigned long long getSize();
  8862. [Throws] undefined flush();
  8863. undefined close();
  8864. };
  8865. /* ---------------------- FileSystemWritableFileStream ----------------------------- */
  8866. /* ./webidl/FileSystemWritableFileStream.webidl */
  8867. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8868. /* This Source Code Form is subject to the terms of the Mozilla Public
  8869. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8870. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8871. enum WriteCommandType {
  8872. "write",
  8873. "seek",
  8874. "truncate"
  8875. };
  8876. [GenerateConversionToJS]
  8877. dictionary WriteParams {
  8878. required WriteCommandType type;
  8879. unsigned long long? size;
  8880. unsigned long long? position;
  8881. (BufferSource or Blob or UTF8String)? data;
  8882. };
  8883. typedef (BufferSource or Blob or UTF8String or WriteParams) FileSystemWriteChunkType;
  8884. [Exposed=(Window,Worker), SecureContext, Pref="dom.fs.enabled"]
  8885. interface FileSystemWritableFileStream : WritableStream {
  8886. [NewObject, Throws]
  8887. Promise<undefined> write(FileSystemWriteChunkType data);
  8888. [NewObject]
  8889. Promise<undefined> seek(unsigned long long position);
  8890. [NewObject]
  8891. Promise<undefined> truncate(unsigned long long size);
  8892. };
  8893. /* ---------------------- FinalizationRegistry ----------------------------- */
  8894. /* ./webidl/FinalizationRegistry.webidl */
  8895. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8896. /* This Source Code Form is subject to the terms of the Mozilla Public
  8897. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8898. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8899. *
  8900. * This IDL file contains a callback used to integrate JS FinalizationRegistry
  8901. * objects with the browser.
  8902. */
  8903. callback FinalizationRegistryCleanupCallback = undefined();
  8904. /* ---------------------- FocusEvent ----------------------------- */
  8905. /* ./webidl/FocusEvent.webidl */
  8906. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8907. /* This Source Code Form is subject to the terms of the Mozilla Public
  8908. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8909. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8910. *
  8911. * For more information on this interface please see
  8912. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  8913. *
  8914. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  8915. * liability, trademark and document use rules apply.
  8916. */
  8917. [Exposed=Window]
  8918. interface FocusEvent : UIEvent {
  8919. constructor(DOMString typeArg,
  8920. optional FocusEventInit focusEventInitDict = {});
  8921. // Introduced in DOM Level 3:
  8922. readonly attribute EventTarget? relatedTarget;
  8923. };
  8924. dictionary FocusEventInit : UIEventInit {
  8925. EventTarget? relatedTarget = null;
  8926. };
  8927. /* ---------------------- FontFace ----------------------------- */
  8928. /* ./webidl/FontFace.webidl */
  8929. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8930. /* This Source Code Form is subject to the terms of the Mozilla Public
  8931. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8932. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8933. *
  8934. * The origin of this IDL file is
  8935. * http://dev.w3.org/csswg/css-font-loading/#fontface-interface
  8936. *
  8937. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  8938. * liability, trademark and document use rules apply.
  8939. */
  8940. typedef (ArrayBuffer or ArrayBufferView) BinaryData;
  8941. dictionary FontFaceDescriptors {
  8942. UTF8String style = "normal";
  8943. UTF8String weight = "normal";
  8944. UTF8String stretch = "normal";
  8945. UTF8String unicodeRange = "U+0-10FFFF";
  8946. UTF8String variant = "normal";
  8947. UTF8String featureSettings = "normal";
  8948. [Pref="layout.css.font-variations.enabled"] UTF8String variationSettings = "normal";
  8949. UTF8String display = "auto";
  8950. UTF8String ascentOverride = "normal";
  8951. UTF8String descentOverride = "normal";
  8952. UTF8String lineGapOverride = "normal";
  8953. [Pref="layout.css.size-adjust.enabled"] UTF8String sizeAdjust = "100%";
  8954. };
  8955. enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
  8956. [Exposed=(Window,Worker)]
  8957. interface FontFace {
  8958. [Throws]
  8959. constructor(UTF8String family,
  8960. (UTF8String or BinaryData) source,
  8961. optional FontFaceDescriptors descriptors = {});
  8962. [SetterThrows] attribute UTF8String family;
  8963. [SetterThrows] attribute UTF8String style;
  8964. [SetterThrows] attribute UTF8String weight;
  8965. [SetterThrows] attribute UTF8String stretch;
  8966. [SetterThrows] attribute UTF8String unicodeRange;
  8967. [SetterThrows] attribute UTF8String variant;
  8968. [SetterThrows] attribute UTF8String featureSettings;
  8969. [SetterThrows, Pref="layout.css.font-variations.enabled"] attribute UTF8String variationSettings;
  8970. [SetterThrows] attribute UTF8String display;
  8971. [SetterThrows] attribute UTF8String ascentOverride;
  8972. [SetterThrows] attribute UTF8String descentOverride;
  8973. [SetterThrows] attribute UTF8String lineGapOverride;
  8974. [SetterThrows, Pref="layout.css.size-adjust.enabled"] attribute UTF8String sizeAdjust;
  8975. readonly attribute FontFaceLoadStatus status;
  8976. [Throws]
  8977. Promise<FontFace> load();
  8978. [Throws]
  8979. readonly attribute Promise<FontFace> loaded;
  8980. };
  8981. /* ---------------------- FontFaceSet ----------------------------- */
  8982. /* ./webidl/FontFaceSet.webidl */
  8983. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  8984. /* This Source Code Form is subject to the terms of the Mozilla Public
  8985. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  8986. * You can obtain one at http://mozilla.org/MPL/2.0/.
  8987. *
  8988. * The origin of this IDL file is
  8989. * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
  8990. *
  8991. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  8992. * liability, trademark and document use rules apply.
  8993. */
  8994. // To implement FontFaceSet's iterator until we can use setlike.
  8995. dictionary FontFaceSetIteratorResult
  8996. {
  8997. required any value;
  8998. required boolean done;
  8999. };
  9000. // To implement FontFaceSet's iterator until we can use setlike.
  9001. [LegacyNoInterfaceObject,
  9002. Exposed=(Window,Worker)]
  9003. interface FontFaceSetIterator {
  9004. [Throws] FontFaceSetIteratorResult next();
  9005. };
  9006. callback FontFaceSetForEachCallback = undefined (FontFace value, FontFace key, FontFaceSet set);
  9007. enum FontFaceSetLoadStatus { "loading", "loaded" };
  9008. [Exposed=(Window,Worker)]
  9009. interface FontFaceSet : EventTarget {
  9010. // Bug 1072762 is for the FontFaceSet constructor.
  9011. // constructor(sequence<FontFace> initialFaces);
  9012. // Emulate setlike behavior until we can use that directly.
  9013. readonly attribute unsigned long size;
  9014. [Throws] undefined add(FontFace font);
  9015. boolean has(FontFace font);
  9016. boolean delete(FontFace font);
  9017. undefined clear();
  9018. [NewObject] FontFaceSetIterator entries();
  9019. // Iterator keys();
  9020. [NewObject, Alias=keys, Alias="@@iterator"] FontFaceSetIterator values();
  9021. [Throws] undefined forEach(FontFaceSetForEachCallback cb, optional any thisArg);
  9022. // -- events for when loading state changes
  9023. attribute EventHandler onloading;
  9024. attribute EventHandler onloadingdone;
  9025. attribute EventHandler onloadingerror;
  9026. // check and start loads if appropriate
  9027. // and fulfill promise when all loads complete
  9028. [NewObject] Promise<sequence<FontFace>> load(UTF8String font, optional DOMString text = " ");
  9029. // return whether all fonts in the fontlist are loaded
  9030. // (does not initiate load if not available)
  9031. [Throws] boolean check(UTF8String font, optional DOMString text = " ");
  9032. // async notification that font loading and layout operations are done
  9033. [Throws] readonly attribute Promise<undefined> ready;
  9034. // loading state, "loading" while one or more fonts loading, "loaded" otherwise
  9035. readonly attribute FontFaceSetLoadStatus status;
  9036. };
  9037. /* ---------------------- FontFaceSetLoadEvent ----------------------------- */
  9038. /* ./webidl/FontFaceSetLoadEvent.webidl */
  9039. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9040. /* This Source Code Form is subject to the terms of the Mozilla Public
  9041. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9042. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9043. *
  9044. * The origin of this IDL file is
  9045. * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
  9046. *
  9047. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  9048. * liability, trademark and document use rules apply.
  9049. */
  9050. dictionary FontFaceSetLoadEventInit : EventInit {
  9051. sequence<FontFace> fontfaces = [];
  9052. };
  9053. [Exposed=(Window,Worker)]
  9054. interface FontFaceSetLoadEvent : Event {
  9055. constructor(DOMString type,
  9056. optional FontFaceSetLoadEventInit eventInitDict = {});
  9057. [Cached, Constant, Frozen] readonly attribute sequence<FontFace> fontfaces;
  9058. };
  9059. /* ---------------------- FontFaceSource ----------------------------- */
  9060. /* ./webidl/FontFaceSource.webidl */
  9061. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9062. /* This Source Code Form is subject to the terms of the Mozilla Public
  9063. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9064. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9065. *
  9066. * The origin of this IDL file is
  9067. * http://dev.w3.org/csswg/css-font-loading/#font-face-source
  9068. *
  9069. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  9070. * liability, trademark and document use rules apply.
  9071. */
  9072. interface mixin FontFaceSource {
  9073. [Throws]
  9074. readonly attribute FontFaceSet fonts;
  9075. };
  9076. /* ---------------------- FormData ----------------------------- */
  9077. /* ./webidl/FormData.webidl */
  9078. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9079. /* This Source Code Form is subject to the terms of the Mozilla Public
  9080. * License, v. 2.0. If a copy of the MPL was not distributed with this
  9081. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9082. *
  9083. * The origin of this IDL file is
  9084. * http://xhr.spec.whatwg.org
  9085. */
  9086. typedef (Blob or Directory or USVString) FormDataEntryValue;
  9087. [Exposed=(Window,Worker)]
  9088. interface FormData {
  9089. [Throws]
  9090. constructor(optional HTMLFormElement form, optional HTMLElement? submitter = null);
  9091. [Throws]
  9092. undefined append(USVString name, Blob value, optional USVString filename);
  9093. [Throws]
  9094. undefined append(USVString name, USVString value);
  9095. undefined delete(USVString name);
  9096. FormDataEntryValue? get(USVString name);
  9097. sequence<FormDataEntryValue> getAll(USVString name);
  9098. boolean has(USVString name);
  9099. [Throws]
  9100. undefined set(USVString name, Blob value, optional USVString filename);
  9101. [Throws]
  9102. undefined set(USVString name, USVString value);
  9103. iterable<USVString, FormDataEntryValue>;
  9104. };
  9105. /* ---------------------- FormDataEvent ----------------------------- */
  9106. /* ./webidl/FormDataEvent.webidl */
  9107. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9108. /* This Source Code Form is subject to the terms of the Mozilla Public
  9109. * License, v. 2.0. If a copy of the MPL was not distributed with this
  9110. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9111. *
  9112. * The origin of this IDL file is
  9113. * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-formdataevent-interface
  9114. */
  9115. [Exposed=Window]
  9116. interface FormDataEvent : Event {
  9117. constructor(DOMString type, optional FormDataEventInit eventInitDict = {});
  9118. // C++ can't deal with a method called FormData() in the generated code
  9119. [BinaryName="GetFormData"]
  9120. readonly attribute FormData formData;
  9121. };
  9122. dictionary FormDataEventInit : EventInit {
  9123. required FormData formData;
  9124. };
  9125. /* ---------------------- FragmentDirective ----------------------------- */
  9126. /* ./webidl/FragmentDirective.webidl */
  9127. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9128. /* This Source Code Form is subject to the terms of the Mozilla Public
  9129. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9130. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9131. *
  9132. * The origin of this IDL file is
  9133. * https://wicg.github.io/scroll-to-text-fragment/
  9134. */
  9135. [Exposed=Window, Pref="dom.text_fragments.enabled"]
  9136. interface FragmentDirective {
  9137. };
  9138. /* ---------------------- FrameCrashedEvent ----------------------------- */
  9139. /* ./webidl/FrameCrashedEvent.webidl */
  9140. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9141. /* This Source Code Form is subject to the terms of the Mozilla Public
  9142. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9143. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9144. */
  9145. [ChromeOnly,
  9146. Exposed=Window]
  9147. interface FrameCrashedEvent : Event
  9148. {
  9149. constructor(DOMString type,
  9150. optional FrameCrashedEventInit eventInitDict = {});
  9151. /**
  9152. * The browsingContextId of the frame that crashed.
  9153. */
  9154. readonly attribute unsigned long long browsingContextId;
  9155. /**
  9156. * True if the top-most frame crashed.
  9157. */
  9158. readonly attribute boolean isTopFrame;
  9159. /**
  9160. * Internal process identifier of the frame that crashed. This will be
  9161. * 0 if this identifier is not known, for example a process that failed
  9162. * to start.
  9163. */
  9164. readonly attribute unsigned long long childID;
  9165. };
  9166. dictionary FrameCrashedEventInit : EventInit
  9167. {
  9168. unsigned long long browsingContextId = 0;
  9169. boolean isTopFrame = true;
  9170. unsigned long long childID = 0;
  9171. };
  9172. /* ---------------------- Function ----------------------------- */
  9173. /* ./webidl/Function.webidl */
  9174. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9175. /* This Source Code Form is subject to the terms of the Mozilla Public
  9176. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9177. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9178. *
  9179. * The origin of this IDL file is
  9180. * http://www.whatwg.org/specs/web-apps/current-work/#functiocn
  9181. *
  9182. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  9183. * Opera Software ASA. You are granted a license to use, reproduce
  9184. * and create derivative works of this document.
  9185. */
  9186. callback Function = any(any... arguments);
  9187. callback VoidFunction = undefined ();
  9188. /* ---------------------- FuzzingFunctions ----------------------------- */
  9189. /* ./webidl/FuzzingFunctions.webidl */
  9190. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9191. /* This Source Code Form is subject to the terms of the Mozilla Public
  9192. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9193. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9194. */
  9195. /*
  9196. * Various functions useful for automated fuzzing that are enabled
  9197. * only in --enable-fuzzing builds, because they may be dangerous to
  9198. * enable on untrusted pages.
  9199. */
  9200. [Pref="fuzzing.enabled",
  9201. Exposed=Window]
  9202. namespace FuzzingFunctions {
  9203. /**
  9204. * Synchronously perform a garbage collection.
  9205. */
  9206. undefined garbageCollect();
  9207. /**
  9208. * Synchronously perform a compacting garbage collection.
  9209. */
  9210. undefined garbageCollectCompacting();
  9211. /**
  9212. * Trigger a forced crash.
  9213. */
  9214. undefined crash(optional DOMString reason = "");
  9215. /**
  9216. * Synchronously perform a cycle collection.
  9217. */
  9218. undefined cycleCollect();
  9219. /**
  9220. * Send a memory pressure event, causes shrinking GC, cycle collection and
  9221. * other actions.
  9222. */
  9223. undefined memoryPressure();
  9224. /**
  9225. * Enable accessibility.
  9226. */
  9227. [Throws]
  9228. undefined enableAccessibility();
  9229. /**
  9230. * Send IPC fuzzing ready event to parent.
  9231. */
  9232. undefined signalIPCReady();
  9233. /**
  9234. * synthesizeKeyboardEvents() synthesizes a set of "keydown",
  9235. * "keypress" (only when it's necessary) and "keyup" events in top DOM window
  9236. * in current process (and the synthesized events will be retargeted to
  9237. * focused window/document/element). I.e, this is currently not dispatched
  9238. * via the main process if you call this in a content process. Therefore, in
  9239. * the case, some default action handlers which are only in the main process
  9240. * will never run. Note that this does not allow to synthesize keyboard
  9241. * events if this is called from a keyboard event or composition event
  9242. * listener.
  9243. *
  9244. * @param aKeyValue If you want to synthesize non-printable key
  9245. * events, you need to set one of key values
  9246. * defined by "UI Events KeyboardEvent key Values".
  9247. * You can check our current support values in
  9248. * dom/events/KeyNameList.h
  9249. * If you want to synthesize printable key events,
  9250. * you can set any string value including empty
  9251. * string.
  9252. * Note that |key| value in aDictionary is always
  9253. * ignored.
  9254. * @param aDictionary If you want to synthesize simple key press
  9255. * without any modifiers, you can omit this.
  9256. * Otherwise, specify this with proper values.
  9257. * If |code| is omitted or empty string, this
  9258. * guesses proper code value in US-English
  9259. * keyboard. Otherwise, the value must be empty
  9260. * string or known code value defined by "UI Events
  9261. * KeyboardEvent code Values". You can check our
  9262. * current support values in
  9263. * dom/events/PhysicalKeyCodeNameList.h.
  9264. * If |keyCode| is omitted or 0, this guesses
  9265. * proper keyCode value in US-English keyboard.
  9266. * If |location| is omitted or 0, this assumes
  9267. * that left modifier key is pressed if aKeyValue
  9268. * is one of such modifier keys.
  9269. * |key|, |isComposing|, |charCode| and |which|
  9270. * are always ignored.
  9271. * Modifier states like |shiftKey|, |altKey|,
  9272. * |modifierAltGraph|, |modifierCapsLock| and
  9273. * |modifierNumLock| are not adjusted for
  9274. * aKeyValue. Please specify them manually if
  9275. * necessary.
  9276. * Note that this API does not allow to dispatch
  9277. * known key events with empty |code| value and
  9278. * 0 |keyCode| value since it's unsual situation
  9279. * especially 0 |keyCode| value with known key.
  9280. * Note that when you specify only one of |code|
  9281. * and |keyCode| value, the other will be guessed
  9282. * from US-English keyboard layout. So, if you
  9283. * want to emulate key press with another keyboard
  9284. * layout, you should specify both values.
  9285. *
  9286. * For example:
  9287. * // Synthesize "Tab" key events.
  9288. * synthesizeKeyboardEvents("Tab");
  9289. * // Synthesize Shift + Tab key events.
  9290. * synthesizeKeyboardEvents("Tab", { shiftKey: true });
  9291. * // Synthesize Control + A key events.
  9292. * synthesizeKeyboardEvents("a", { controlKey: true });
  9293. * // Synthesize Control + Shift + A key events.
  9294. * synthesizeKeyboardEvents("A", { controlKey: true,
  9295. * shitKey: true });
  9296. * // Synthesize "Enter" key on numpad.
  9297. * synthesizeKeyboardEvents("Enter", { code: "NumpadEnter" });
  9298. * // Synthesize right "Shift" key.
  9299. * synthesizeKeyboardEvents("Shift", { code: "ShiftRight" });
  9300. * // Synthesize "1" on numpad.
  9301. * synthesizeKeyboardEvents("1", { code: "Numpad1",
  9302. * modifierNumLock: true });
  9303. * // Synthesize "End" on numpad.
  9304. * synthesizeKeyboardEvents("End", { code: "Numpad1" });
  9305. * // Synthesize "%" key of US-English keyboard layout.
  9306. * synthesizeKeyboardEvents("%", { shiftKey: true });
  9307. * // Synthesize "*" key of Japanese keyboard layout.
  9308. * synthesizeKeyboardEvents("*", { code: "Quote",
  9309. * shiftKey: true,
  9310. * keyCode: KeyboardEvent.DOM_VK_COLON });
  9311. */
  9312. [Throws]
  9313. undefined synthesizeKeyboardEvents(DOMString aKeyValue,
  9314. optional KeyboardEventInit aDictionary = {});
  9315. };
  9316. /* ---------------------- GainNode ----------------------------- */
  9317. /* ./webidl/GainNode.webidl */
  9318. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9319. /* This Source Code Form is subject to the terms of the Mozilla Public
  9320. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9321. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9322. *
  9323. * The origin of this IDL file is
  9324. * https://webaudio.github.io/web-audio-api/
  9325. *
  9326. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9327. * liability, trademark and document use rules apply.
  9328. */
  9329. dictionary GainOptions : AudioNodeOptions {
  9330. float gain = 1.0;
  9331. };
  9332. [Pref="dom.webaudio.enabled",
  9333. Exposed=Window]
  9334. interface GainNode : AudioNode {
  9335. [Throws]
  9336. constructor(BaseAudioContext context, optional GainOptions options = {});
  9337. readonly attribute AudioParam gain;
  9338. };
  9339. // Mozilla extension
  9340. GainNode includes AudioNodePassThrough;
  9341. /* ---------------------- Gamepad ----------------------------- */
  9342. /* ./webidl/Gamepad.webidl */
  9343. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9344. /* This Source Code Form is subject to the terms of the Mozilla Public
  9345. * License, v. 2.0. If a copy of the MPL was not distributed with this
  9346. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9347. *
  9348. * The origin of this IDL file is
  9349. * https://w3c.github.io/gamepad/
  9350. * https://w3c.github.io/gamepad/extensions.html
  9351. * https://w3c.github.io/webvr/spec/1.1/#interface-gamepad
  9352. */
  9353. [Pref="dom.gamepad.enabled",
  9354. Exposed=Window]
  9355. interface GamepadButton {
  9356. readonly attribute boolean pressed;
  9357. readonly attribute boolean touched;
  9358. readonly attribute double value;
  9359. };
  9360. enum GamepadHand {
  9361. "",
  9362. "left",
  9363. "right"
  9364. };
  9365. /**
  9366. * https://www.w3.org/TR/gamepad/#gamepadmappingtype-enum
  9367. * https://immersive-web.github.io/webxr-gamepads-module/#enumdef-gamepadmappingtype
  9368. */
  9369. enum GamepadMappingType {
  9370. "",
  9371. "standard",
  9372. "xr-standard"
  9373. };
  9374. [Pref="dom.gamepad.enabled",
  9375. Exposed=Window]
  9376. interface Gamepad {
  9377. /**
  9378. * An identifier, unique per type of device.
  9379. */
  9380. readonly attribute DOMString id;
  9381. /**
  9382. * The game port index for the device. Unique per device
  9383. * attached to this system.
  9384. */
  9385. readonly attribute long index;
  9386. /**
  9387. * The mapping in use for this device. The empty string
  9388. * indicates that no mapping is in use.
  9389. */
  9390. readonly attribute GamepadMappingType mapping;
  9391. /**
  9392. * The hand in use for this device. The empty string
  9393. * indicates that unknown, both hands, or not applicable
  9394. */
  9395. [Pref="dom.gamepad.extensions.enabled"]
  9396. readonly attribute GamepadHand hand;
  9397. /**
  9398. * The displayId in use for as an association point in the VRDisplay API
  9399. * to identify which VRDisplay that the gamepad is associated with.
  9400. */
  9401. [Pref="dom.vr.enabled"]
  9402. readonly attribute unsigned long displayId;
  9403. /**
  9404. * true if this gamepad is currently connected to the system.
  9405. */
  9406. readonly attribute boolean connected;
  9407. /**
  9408. * The current state of all buttons on the device, an
  9409. * array of GamepadButton.
  9410. */
  9411. [Pure, Cached, Frozen]
  9412. readonly attribute sequence<GamepadButton> buttons;
  9413. /**
  9414. * The current position of all axes on the device, an
  9415. * array of doubles.
  9416. */
  9417. [Pure, Cached, Frozen]
  9418. readonly attribute sequence<double> axes;
  9419. /**
  9420. * Timestamp from when the data of this device was last updated.
  9421. */
  9422. readonly attribute DOMHighResTimeStamp timestamp;
  9423. /**
  9424. * The current pose of the device, a GamepadPose.
  9425. */
  9426. [Pref="dom.gamepad.extensions.enabled"]
  9427. readonly attribute GamepadPose? pose;
  9428. /**
  9429. * The current haptic actuator of the device, an array of
  9430. * GamepadHapticActuator.
  9431. */
  9432. [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled"]
  9433. readonly attribute sequence<GamepadHapticActuator> hapticActuators;
  9434. [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled", Pref="dom.gamepad.extensions.lightindicator"]
  9435. readonly attribute sequence<GamepadLightIndicator> lightIndicators;
  9436. [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled", Pref="dom.gamepad.extensions.multitouch"]
  9437. readonly attribute sequence<GamepadTouch> touchEvents;
  9438. };
  9439. /* ---------------------- GamepadAxisMoveEvent ----------------------------- */
  9440. /* ./webidl/GamepadAxisMoveEvent.webidl */
  9441. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9442. /* This Source Code Form is subject to the terms of the Mozilla Public
  9443. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9444. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9445. */
  9446. [Pref="dom.gamepad.non_standard_events.enabled",
  9447. Exposed=Window]
  9448. interface GamepadAxisMoveEvent : GamepadEvent
  9449. {
  9450. constructor(DOMString type,
  9451. optional GamepadAxisMoveEventInit eventInitDict = {});
  9452. readonly attribute unsigned long axis;
  9453. readonly attribute double value;
  9454. };
  9455. dictionary GamepadAxisMoveEventInit : GamepadEventInit
  9456. {
  9457. unsigned long axis = 0;
  9458. double value = 0;
  9459. };
  9460. /* ---------------------- GamepadButtonEvent ----------------------------- */
  9461. /* ./webidl/GamepadButtonEvent.webidl */
  9462. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9463. /* This Source Code Form is subject to the terms of the Mozilla Public
  9464. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9465. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9466. */
  9467. [Pref="dom.gamepad.non_standard_events.enabled",
  9468. Exposed=Window]
  9469. interface GamepadButtonEvent : GamepadEvent
  9470. {
  9471. constructor(DOMString type,
  9472. optional GamepadButtonEventInit eventInitDict = {});
  9473. readonly attribute unsigned long button;
  9474. };
  9475. dictionary GamepadButtonEventInit : GamepadEventInit
  9476. {
  9477. unsigned long button = 0;
  9478. };
  9479. /* ---------------------- GamepadEvent ----------------------------- */
  9480. /* ./webidl/GamepadEvent.webidl */
  9481. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9482. /* This Source Code Form is subject to the terms of the Mozilla Public
  9483. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9484. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9485. *
  9486. * The origin of this IDL file is
  9487. * https://w3c.github.io/gamepad/#gamepadevent-interface
  9488. */
  9489. [Pref="dom.gamepad.enabled",
  9490. Exposed=Window]
  9491. interface GamepadEvent : Event
  9492. {
  9493. constructor(DOMString type, optional GamepadEventInit eventInitDict = {});
  9494. readonly attribute Gamepad? gamepad;
  9495. };
  9496. dictionary GamepadEventInit : EventInit
  9497. {
  9498. Gamepad? gamepad = null;
  9499. };
  9500. /* ---------------------- GamepadHapticActuator ----------------------------- */
  9501. /* ./webidl/GamepadHapticActuator.webidl */
  9502. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9503. /* This Source Code Form is subject to the terms of the Mozilla Public
  9504. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9505. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9506. *
  9507. * The origin of this IDL file is
  9508. * https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface
  9509. */
  9510. enum GamepadHapticActuatorType {
  9511. "vibration"
  9512. };
  9513. [Pref="dom.gamepad.extensions.enabled",
  9514. HeaderFile="mozilla/dom/GamepadHapticActuator.h",
  9515. Exposed=Window]
  9516. interface GamepadHapticActuator
  9517. {
  9518. readonly attribute GamepadHapticActuatorType type;
  9519. [Throws, NewObject]
  9520. Promise<boolean> pulse(double value, double duration);
  9521. };
  9522. /* ---------------------- GamepadLightIndicator ----------------------------- */
  9523. /* ./webidl/GamepadLightIndicator.webidl */
  9524. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9525. /* This Source Code Form is subject to the terms of the Mozilla Public
  9526. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9527. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9528. *
  9529. * The origin of this IDL file is
  9530. * https://github.com/knyg/gamepad/blob/lightindicator/extensions.html
  9531. */
  9532. enum GamepadLightIndicatorType {
  9533. "on-off",
  9534. "rgb"
  9535. };
  9536. dictionary GamepadLightColor {
  9537. required octet red;
  9538. required octet green;
  9539. required octet blue;
  9540. };
  9541. [Pref="dom.gamepad.extensions.lightindicator",
  9542. Exposed=Window]
  9543. interface GamepadLightIndicator
  9544. {
  9545. readonly attribute GamepadLightIndicatorType type;
  9546. [Throws, NewObject]
  9547. Promise<boolean> setColor(GamepadLightColor color);
  9548. };
  9549. /* ---------------------- GamepadPose ----------------------------- */
  9550. /* ./webidl/GamepadPose.webidl */
  9551. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9552. /* This Source Code Form is subject to the terms of the Mozilla Public
  9553. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9554. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9555. *
  9556. * The origin of this IDL file is
  9557. * https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
  9558. */
  9559. [Pref="dom.gamepad.extensions.enabled",
  9560. Exposed=Window]
  9561. interface GamepadPose
  9562. {
  9563. readonly attribute boolean hasOrientation;
  9564. readonly attribute boolean hasPosition;
  9565. /**
  9566. * position, linearVelocity, and linearAcceleration are 3-component vectors.
  9567. * position is relative to a sitting space. Transforming this point with
  9568. * VRStageParameters.sittingToStandingTransform converts this to standing space.
  9569. */
  9570. [Constant, Throws] readonly attribute Float32Array? position;
  9571. [Constant, Throws] readonly attribute Float32Array? linearVelocity;
  9572. [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
  9573. /* orientation is a 4-entry array representing the components of a quaternion. */
  9574. [Constant, Throws] readonly attribute Float32Array? orientation;
  9575. /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
  9576. [Constant, Throws] readonly attribute Float32Array? angularVelocity;
  9577. [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
  9578. };
  9579. /* ---------------------- GamepadServiceTest ----------------------------- */
  9580. /* ./webidl/GamepadServiceTest.webidl */
  9581. /* This Source Code Form is subject to the terms of the Mozilla Public
  9582. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9583. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  9584. [Pref="dom.gamepad.test.enabled",
  9585. Exposed=Window]
  9586. interface GamepadServiceTest
  9587. {
  9588. readonly attribute GamepadMappingType noMapping;
  9589. readonly attribute GamepadMappingType standardMapping;
  9590. readonly attribute GamepadHand noHand;
  9591. readonly attribute GamepadHand leftHand;
  9592. readonly attribute GamepadHand rightHand;
  9593. [NewObject]
  9594. Promise<unsigned long> addGamepad(DOMString id,
  9595. GamepadMappingType mapping,
  9596. GamepadHand hand,
  9597. unsigned long numButtons,
  9598. unsigned long numAxes,
  9599. unsigned long numHaptics,
  9600. unsigned long numLightIndicator,
  9601. unsigned long numTouchEvents);
  9602. [NewObject]
  9603. Promise<unsigned long> removeGamepad(unsigned long index);
  9604. [NewObject]
  9605. Promise<unsigned long> newButtonEvent(unsigned long index,
  9606. unsigned long button,
  9607. boolean pressed,
  9608. boolean touched);
  9609. [NewObject]
  9610. Promise<unsigned long> newButtonValueEvent(unsigned long index,
  9611. unsigned long button,
  9612. boolean pressed,
  9613. boolean touched,
  9614. double value);
  9615. [NewObject]
  9616. Promise<unsigned long> newAxisMoveEvent(unsigned long index,
  9617. unsigned long axis,
  9618. double value);
  9619. [NewObject]
  9620. Promise<unsigned long> newPoseMove(unsigned long index,
  9621. Float32Array? orient,
  9622. Float32Array? pos,
  9623. Float32Array? angVelocity,
  9624. Float32Array? angAcceleration,
  9625. Float32Array? linVelocity,
  9626. Float32Array? linAcceleration);
  9627. [NewObject]
  9628. Promise<unsigned long> newTouch(unsigned long index, unsigned long aTouchArrayIndex,
  9629. unsigned long touchId, octet surfaceId,
  9630. Float32Array position, Float32Array? surfaceDimension);
  9631. };
  9632. /* ---------------------- GamepadTouch ----------------------------- */
  9633. /* ./webidl/GamepadTouch.webidl */
  9634. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9635. /* This Source Code Form is subject to the terms of the Mozilla Public
  9636. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9637. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9638. *
  9639. * The origin of this IDL file is
  9640. * https://github.com/knyg/gamepad/blob/multitouch/extensions.html
  9641. */
  9642. [Pref="dom.gamepad.extensions.multitouch",
  9643. Exposed=Window]
  9644. interface GamepadTouch {
  9645. readonly attribute unsigned long touchId;
  9646. readonly attribute octet surfaceId;
  9647. [Constant, Throws] readonly attribute Float32Array position;
  9648. [Constant, Throws] readonly attribute Uint32Array? surfaceDimensions;
  9649. };
  9650. /* ---------------------- GenericTransformStream ----------------------------- */
  9651. /* ./webidl/GenericTransformStream.webidl */
  9652. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9653. /* This Source Code Form is subject to the terms of the Mozilla Public
  9654. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9655. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9656. *
  9657. * The origin of this IDL file is
  9658. * https://streams.spec.whatwg.org/#other-specs-ts-wrapping
  9659. */
  9660. interface mixin GenericTransformStream {
  9661. readonly attribute ReadableStream readable;
  9662. readonly attribute WritableStream writable;
  9663. };
  9664. /* ---------------------- Geolocation ----------------------------- */
  9665. /* ./webidl/Geolocation.webidl */
  9666. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9667. /* This Source Code Form is subject to the terms of the Mozilla Public
  9668. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9669. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9670. *
  9671. * The origin of this IDL file is
  9672. * http://www.w3.org/TR/geolocation-API
  9673. *
  9674. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9675. * liability, trademark and document use rules apply.
  9676. */
  9677. dictionary PositionOptions {
  9678. boolean enableHighAccuracy = false;
  9679. [Clamp] unsigned long timeout = 0x7fffffff;
  9680. [Clamp] unsigned long maximumAge = 0;
  9681. };
  9682. [Exposed=Window]
  9683. interface Geolocation {
  9684. [Throws, NeedsCallerType]
  9685. undefined getCurrentPosition(PositionCallback successCallback,
  9686. optional PositionErrorCallback? errorCallback = null,
  9687. optional PositionOptions options = {});
  9688. [Throws, NeedsCallerType]
  9689. long watchPosition(PositionCallback successCallback,
  9690. optional PositionErrorCallback? errorCallback = null,
  9691. optional PositionOptions options = {});
  9692. undefined clearWatch(long watchId);
  9693. };
  9694. callback PositionCallback = undefined (GeolocationPosition position);
  9695. callback PositionErrorCallback = undefined (GeolocationPositionError positionError);
  9696. /* ---------------------- GeolocationCoordinates ----------------------------- */
  9697. /* ./webidl/GeolocationCoordinates.webidl */
  9698. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9699. /* This Source Code Form is subject to the terms of the Mozilla Public
  9700. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9701. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9702. *
  9703. * The origin of this IDL file is
  9704. * http://www.w3.org/TR/geolocation-API
  9705. *
  9706. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9707. * liability, trademark and document use rules apply.
  9708. */
  9709. [Exposed=Window, SecureContext]
  9710. interface GeolocationCoordinates {
  9711. readonly attribute double latitude;
  9712. readonly attribute double longitude;
  9713. readonly attribute double? altitude;
  9714. readonly attribute double accuracy;
  9715. readonly attribute double? altitudeAccuracy;
  9716. readonly attribute double? heading;
  9717. readonly attribute double? speed;
  9718. };
  9719. /* ---------------------- GeolocationPosition ----------------------------- */
  9720. /* ./webidl/GeolocationPosition.webidl */
  9721. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9722. /* This Source Code Form is subject to the terms of the Mozilla Public
  9723. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9724. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9725. *
  9726. * The origin of this IDL file is
  9727. * http://www.w3.org/TR/geolocation-API
  9728. *
  9729. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9730. * liability, trademark and document use rules apply.
  9731. */
  9732. [Exposed=Window, SecureContext]
  9733. interface GeolocationPosition {
  9734. readonly attribute GeolocationCoordinates coords;
  9735. readonly attribute EpochTimeStamp timestamp;
  9736. };
  9737. /* ---------------------- GeolocationPositionError ----------------------------- */
  9738. /* ./webidl/GeolocationPositionError.webidl */
  9739. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9740. /* This Source Code Form is subject to the terms of the Mozilla Public
  9741. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9742. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9743. *
  9744. * The origin of this IDL file is
  9745. * http://www.w3.org/TR/geolocation-API
  9746. *
  9747. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9748. * liability, trademark and document use rules apply.
  9749. */
  9750. [Exposed=Window]
  9751. interface GeolocationPositionError {
  9752. const unsigned short PERMISSION_DENIED = 1;
  9753. const unsigned short POSITION_UNAVAILABLE = 2;
  9754. const unsigned short TIMEOUT = 3;
  9755. readonly attribute unsigned short code;
  9756. readonly attribute DOMString message;
  9757. };
  9758. /* ---------------------- GeometryUtils ----------------------------- */
  9759. /* ./webidl/GeometryUtils.webidl */
  9760. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9761. /* This Source Code Form is subject to the terms of the Mozilla Public
  9762. * License, v. 2.0. If a copy of the MPL was not distributed with this
  9763. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9764. *
  9765. * The origin of this IDL file is
  9766. * http://dev.w3.org/csswg/cssom-view/
  9767. *
  9768. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  9769. * liability, trademark and document use rules apply.
  9770. */
  9771. enum CSSBoxType { "margin", "border", "padding", "content" };
  9772. dictionary BoxQuadOptions {
  9773. CSSBoxType box = "border";
  9774. GeometryNode relativeTo;
  9775. [ChromeOnly]
  9776. boolean createFramesForSuppressedWhitespace = true;
  9777. };
  9778. dictionary ConvertCoordinateOptions {
  9779. CSSBoxType fromBox = "border";
  9780. CSSBoxType toBox = "border";
  9781. };
  9782. interface mixin GeometryUtils {
  9783. [Throws, Func="nsINode::HasBoxQuadsSupport", NeedsCallerType]
  9784. sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options = {});
  9785. /* getBoxQuadsFromWindowOrigin is similar to getBoxQuads, but the
  9786. * returned quads are further translated relative to the window
  9787. * origin -- which is not the layout origin. Further translation
  9788. * must be done to bring the quads into layout space. Typically,
  9789. * this will be done by performing another call from the top level
  9790. * browser process, requesting the quad of the top level content
  9791. * document itself. The position of this quad can then be used as
  9792. * the offset into layout space, and subtracted from the original
  9793. * returned quads. If options.relativeTo is supplied, this method
  9794. * will throw.
  9795. */
  9796. [ChromeOnly, Throws, Func="nsINode::HasBoxQuadsSupport"]
  9797. sequence<DOMQuad> getBoxQuadsFromWindowOrigin(optional BoxQuadOptions options = {});
  9798. [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
  9799. DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options = {});
  9800. [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
  9801. DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options = {});
  9802. [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
  9803. DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options = {});
  9804. };
  9805. // PseudoElement includes GeometryUtils;
  9806. typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;
  9807. /* ---------------------- GetUserMediaRequest ----------------------------- */
  9808. /* ./webidl/GetUserMediaRequest.webidl */
  9809. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9810. /* This Source Code Form is subject to the terms of the Mozilla Public
  9811. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9812. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9813. *
  9814. * This is an internal IDL file
  9815. */
  9816. interface nsIMediaDevice;
  9817. // For gUM request start (getUserMedia:request) notification,
  9818. // rawID, mediaSource and audioOutputOptions won't be set.
  9819. // For selectAudioOutput request start (getUserMedia:request) notification,
  9820. // rawID, mediaSource and constraints won't be set.
  9821. // For gUM request stop (recording-device-stopped) notification due to page
  9822. // reload, only windowID will be set.
  9823. // For gUM request stop (recording-device-stopped) notification due to track
  9824. // stop, only type, windowID, rawID and mediaSource will be set
  9825. enum GetUserMediaRequestType {
  9826. "getusermedia",
  9827. "selectaudiooutput",
  9828. "recording-device-stopped"
  9829. };
  9830. [LegacyNoInterfaceObject,
  9831. Exposed=Window]
  9832. interface GetUserMediaRequest {
  9833. readonly attribute GetUserMediaRequestType type;
  9834. readonly attribute unsigned long long windowID;
  9835. readonly attribute unsigned long long innerWindowID;
  9836. readonly attribute DOMString callID;
  9837. readonly attribute DOMString rawID;
  9838. readonly attribute DOMString mediaSource;
  9839. // The set of devices to consider
  9840. [Constant, Cached, Frozen]
  9841. readonly attribute sequence<nsIMediaDevice> devices;
  9842. MediaStreamConstraints getConstraints();
  9843. AudioOutputOptions getAudioOutputOptions();
  9844. readonly attribute boolean isSecure;
  9845. readonly attribute boolean isHandlingUserInput;
  9846. };
  9847. /* ---------------------- Glean ----------------------------- */
  9848. /* ./webidl/Glean.webidl */
  9849. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9850. /* This Source Code Form is subject to the terms of the Mozilla Public
  9851. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9852. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9853. */
  9854. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9855. interface GleanCategory {
  9856. /**
  9857. * Get a metric by name.
  9858. *
  9859. * Returns an object of the corresponding metric type,
  9860. * with only the allowed functions available.
  9861. */
  9862. getter GleanMetric (DOMString identifier);
  9863. };
  9864. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9865. interface GleanImpl {
  9866. /**
  9867. * Get a metric category by name.
  9868. *
  9869. * Returns an object for further metric lookup.
  9870. */
  9871. getter GleanCategory (DOMString identifier);
  9872. };
  9873. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9874. interface GleanLabeled {
  9875. /**
  9876. * Get a specific metric for a given label.
  9877. *
  9878. * If a set of acceptable labels were specified in the `metrics.yaml` file,
  9879. * and the given label is not in the set, it will be recorded under the
  9880. * special `OTHER_LABEL` label.
  9881. *
  9882. * If a set of acceptable labels was not specified in the `metrics.yaml` file,
  9883. * only the first 16 unique labels will be used.
  9884. * After that, any additional labels will be recorded under the special
  9885. * `OTHER_LABEL` label.
  9886. */
  9887. getter GleanMetric (DOMString identifier);
  9888. };
  9889. /* ---------------------- GleanMetrics ----------------------------- */
  9890. /* ./webidl/GleanMetrics.webidl */
  9891. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  9892. /* This Source Code Form is subject to the terms of the Mozilla Public
  9893. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  9894. * You can obtain one at http://mozilla.org/MPL/2.0/.
  9895. */
  9896. // The definitions in this file are not sorted.
  9897. // Please add new ones to the bottom.
  9898. /**
  9899. * Base interface for all metric types to make typing more expressive.
  9900. */
  9901. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9902. interface GleanMetric {};
  9903. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9904. interface GleanBoolean : GleanMetric {
  9905. /**
  9906. * Set to the specified boolean value.
  9907. *
  9908. * @param value the value to set.
  9909. */
  9910. undefined set(boolean value);
  9911. /**
  9912. * **Test-only API**
  9913. *
  9914. * Gets the currently stored value as a boolean.
  9915. *
  9916. * This function will attempt to await the last parent-process task (if any)
  9917. * writing to the the metric's storage engine before returning a value.
  9918. * This function will not wait for data from child processes.
  9919. *
  9920. * This doesn't clear the stored value.
  9921. * Parent process only. Panics in child processes.
  9922. *
  9923. * @param aPingName The (optional) name of the ping to retrieve the metric
  9924. * for. Defaults to the first value in `send_in_pings`.
  9925. *
  9926. * @return value of the stored metric, or null if there is no value.
  9927. */
  9928. [Throws, ChromeOnly]
  9929. boolean? testGetValue(optional UTF8String aPingName = "");
  9930. };
  9931. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9932. interface GleanDatetime : GleanMetric {
  9933. /**
  9934. * Set the datetime to the provided value, or the local now.
  9935. * The internal value will store the local timezone.
  9936. *
  9937. * Note: The metric's time_unit affects the resolution of the value, not the
  9938. * unit of this function's parameter (which is always PRTime/nanos).
  9939. *
  9940. * @param aValue The (optional) time value as PRTime (nanoseconds since epoch).
  9941. * Defaults to local now.
  9942. */
  9943. undefined set(optional long long aValue);
  9944. /**
  9945. * **Test-only API**
  9946. *
  9947. * Gets the currently stored value as a Date.
  9948. *
  9949. * This function will attempt to await the last parent-process task (if any)
  9950. * writing to the the metric's storage engine before returning a value.
  9951. * This function will not wait for data from child processes.
  9952. *
  9953. * This doesn't clear the stored value.
  9954. * Parent process only. Panics in child processes.
  9955. *
  9956. * @param aPingName The (optional) name of the ping to retrieve the metric
  9957. * for. Defaults to the first value in `send_in_pings`.
  9958. *
  9959. * @return value of the stored metric as a JS Date with timezone,
  9960. * or null if there is no value.
  9961. */
  9962. [Throws, ChromeOnly]
  9963. any testGetValue(optional UTF8String aPingName = "");
  9964. };
  9965. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9966. interface GleanCounter : GleanMetric {
  9967. /*
  9968. * Increases the counter by `amount`.
  9969. *
  9970. * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
  9971. */
  9972. undefined add(optional long aAmount = 1);
  9973. /**
  9974. * **Test-only API**
  9975. *
  9976. * Gets the currently stored value as an integer.
  9977. *
  9978. * This function will attempt to await the last parent-process task (if any)
  9979. * writing to the the metric's storage engine before returning a value.
  9980. * This function will not wait for data from child processes.
  9981. *
  9982. * This doesn't clear the stored value.
  9983. * Parent process only. Panics in child processes.
  9984. *
  9985. * @param aPingName The (optional) name of the ping to retrieve the metric
  9986. * for. Defaults to the first value in `send_in_pings`.
  9987. *
  9988. * @return value of the stored metric, or null if there is no value.
  9989. */
  9990. [Throws, ChromeOnly]
  9991. long? testGetValue(optional UTF8String aPingName = "");
  9992. };
  9993. dictionary GleanDistributionData {
  9994. required unsigned long long sum;
  9995. required unsigned long long count;
  9996. required record<UTF8String, unsigned long long> values;
  9997. };
  9998. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  9999. interface GleanTimingDistribution : GleanMetric {
  10000. /**
  10001. * Starts tracking time for the provided metric.
  10002. *
  10003. * @returns A unique timer id for the new timer
  10004. */
  10005. unsigned long long start();
  10006. /**
  10007. * Stops tracking time for the provided metric and timer id.
  10008. *
  10009. * Adds a count to the corresponding bucket in the timing distribution.
  10010. * This will record an error if no `start` was called for this TimerId or
  10011. * if this TimerId was used to call `cancel`.
  10012. *
  10013. * @param aId The TimerId associated with this timing. This allows for
  10014. * concurrent timing of events associated with different ids.
  10015. */
  10016. undefined stopAndAccumulate(unsigned long long aId);
  10017. /**
  10018. * Aborts a previous `start` call. No error is recorded if no `start` was
  10019. * called. (But then where did you get that id from?)
  10020. *
  10021. * @param aId The TimerID whose `start` you wish to abort.
  10022. */
  10023. undefined cancel(unsigned long long aId);
  10024. /**
  10025. * **Test-only API**
  10026. *
  10027. * Gets the currently stored value.
  10028. *
  10029. * This function will attempt to await the last parent-process task (if any)
  10030. * writing to the the metric's storage engine before returning a value.
  10031. * This function will not wait for data from child processes.
  10032. *
  10033. * This doesn't clear the stored value.
  10034. * Parent process only. Panics in child processes.
  10035. *
  10036. * @param aPingName The (optional) name of the ping to retrieve the metric
  10037. * for. Defaults to the first value in `send_in_pings`.
  10038. *
  10039. * @return value of the stored metric, or null if there is no value.
  10040. */
  10041. [Throws, ChromeOnly]
  10042. GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
  10043. /**
  10044. * **Test-only API**
  10045. *
  10046. * Accumulates a raw numeric sample of milliseconds.
  10047. *
  10048. * @param aSample The sample, in milliseconds, to add.
  10049. */
  10050. [ChromeOnly]
  10051. undefined testAccumulateRawMillis(unsigned long long aSample);
  10052. };
  10053. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10054. interface GleanMemoryDistribution : GleanMetric {
  10055. /**
  10056. * Accumulates the provided signed sample in the metric.
  10057. *
  10058. * @param aSample The sample to be recorded by the metric. The sample is
  10059. * assumed to be in the confgured memory unit of the metric.
  10060. *
  10061. * Notes: Values bigger than 1 Terabyte (2^40 bytes) are truncated and an
  10062. * InvalidValue error is recorded.
  10063. */
  10064. undefined accumulate(unsigned long long aSample);
  10065. /**
  10066. * **Test-only API**
  10067. *
  10068. * Gets the currently stored value as a DistributionData.
  10069. *
  10070. * This function will attempt to await the last parent-process task (if any)
  10071. * writing to the the metric's storage engine before returning a value.
  10072. * This function will not wait for data from child processes.
  10073. *
  10074. * This doesn't clear the stored value.
  10075. * Parent process only. Panics in child processes.
  10076. *
  10077. * @param aPingName The (optional) name of the ping to retrieve the metric
  10078. * for. Defaults to the first value in `send_in_pings`.
  10079. *
  10080. * @return value of the stored metric, or null if there is no value.
  10081. */
  10082. [Throws, ChromeOnly]
  10083. GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
  10084. };
  10085. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10086. interface GleanCustomDistribution : GleanMetric {
  10087. /**
  10088. * Accumulates the provided signed samples in the metric.
  10089. *
  10090. * @param aSamples - The vector holding the samples to be recorded by the metric.
  10091. *
  10092. * Notes: Discards any negative value in `samples`
  10093. * and report an `ErrorType::InvalidValue` for each of them.
  10094. */
  10095. undefined accumulateSamples(sequence<long long> aSamples);
  10096. /**
  10097. * Accumulates the provided single signed sample in the metric.
  10098. *
  10099. * @param aSample - The sample to be recorded by the metric.
  10100. *
  10101. * Notes: Discards any negative value of `sample` and reports an
  10102. * `ErrorType::InvalidValue`.
  10103. */
  10104. undefined accumulateSingleSample(long long aSample);
  10105. /**
  10106. * **Test-only API**
  10107. *
  10108. * Gets the currently stored value as a DistributionData.
  10109. *
  10110. * This function will attempt to await the last parent-process task (if any)
  10111. * writing to the the metric's storage engine before returning a value.
  10112. * This function will not wait for data from child processes.
  10113. *
  10114. * This doesn't clear the stored value.
  10115. * Parent process only. Panics in child processes.
  10116. *
  10117. * @param aPingName The (optional) name of the ping to retrieve the metric
  10118. * for. Defaults to the first value in `send_in_pings`.
  10119. *
  10120. * @return value of the stored metric, or null if there is no value.
  10121. */
  10122. [Throws, ChromeOnly]
  10123. GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
  10124. };
  10125. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10126. interface GleanString : GleanMetric {
  10127. /**
  10128. * Set the string to the provided value.
  10129. *
  10130. * @param aValue The string to set the metric to.
  10131. */
  10132. undefined set(UTF8String? aValue);
  10133. /**
  10134. * **Test-only API**
  10135. *
  10136. * Gets the currently stored value as a string.
  10137. *
  10138. * This function will attempt to await the last parent-process task (if any)
  10139. * writing to the the metric's storage engine before returning a value.
  10140. * This function will not wait for data from child processes.
  10141. *
  10142. * This doesn't clear the stored value.
  10143. * Parent process only. Panics in child processes.
  10144. *
  10145. * @param aPingName The (optional) name of the ping to retrieve the metric
  10146. * for. Defaults to the first value in `send_in_pings`.
  10147. *
  10148. * @return value of the stored metric, or null if there is no value.
  10149. */
  10150. [Throws, ChromeOnly]
  10151. UTF8String? testGetValue(optional UTF8String aPingName = "");
  10152. };
  10153. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10154. interface GleanStringList : GleanMetric {
  10155. /**
  10156. * Adds a new string to the list.
  10157. *
  10158. * Truncates the value and logs an error if it is longer than 100 bytes.
  10159. *
  10160. * @param value The string to add.
  10161. */
  10162. undefined add(UTF8String value);
  10163. /**
  10164. * Sets the string_list to the provided list of strings.
  10165. *
  10166. * Truncates the list and logs an error if longer than 100 items.
  10167. * Truncates any item longer than 100 bytes and logs an error.
  10168. *
  10169. * @param aValue The list of strings to set the metric to.
  10170. */
  10171. undefined set(sequence<UTF8String> aValue);
  10172. /**
  10173. * **Test-only API**
  10174. *
  10175. * Gets the currently stored value.
  10176. *
  10177. * This function will attempt to await the last parent-process task (if any)
  10178. * writing to the the metric's storage engine before returning a value.
  10179. * This function will not wait for data from child processes.
  10180. *
  10181. * This doesn't clear the stored value.
  10182. * Parent process only. Panics in child processes.
  10183. *
  10184. * @param aPingName The (optional) name of the ping to retrieve the metric
  10185. * for. Defaults to the first value in `send_in_pings`.
  10186. *
  10187. * @return value of the stored metric, or null if there is no value.
  10188. */
  10189. [Throws, ChromeOnly]
  10190. sequence<UTF8String>? testGetValue(optional UTF8String aPingName = "");
  10191. };
  10192. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10193. interface GleanTimespan : GleanMetric {
  10194. /**
  10195. * Start tracking time for the provided metric.
  10196. *
  10197. * This records an error if it’s already tracking time (i.e. start was already
  10198. * called with no corresponding [stop]): in that case the original
  10199. * start time will be preserved.
  10200. */
  10201. undefined start();
  10202. /**
  10203. * Stop tracking time for the provided metric.
  10204. *
  10205. * Sets the metric to the elapsed time, but does not overwrite an already
  10206. * existing value.
  10207. * This will record an error if no [start] was called or there is an already
  10208. * existing value.
  10209. */
  10210. undefined stop();
  10211. /**
  10212. * Aborts a previous start.
  10213. *
  10214. * Does not record an error if there was no previous call to start.
  10215. */
  10216. undefined cancel();
  10217. /**
  10218. * Explicitly sets the timespan value.
  10219. *
  10220. * This API should only be used if you cannot make use of
  10221. * `start`/`stop`/`cancel`.
  10222. *
  10223. * @param aDuration The duration of this timespan, in units matching the
  10224. * `time_unit` of this metric's definition.
  10225. */
  10226. undefined setRaw(unsigned long aDuration);
  10227. /**
  10228. * **Test-only API**
  10229. *
  10230. * Gets the currently stored value.
  10231. *
  10232. * This function will attempt to await the last parent-process task (if any)
  10233. * writing to the the metric's storage engine before returning a value.
  10234. * This function will not wait for data from child processes.
  10235. *
  10236. * This doesn't clear the stored value.
  10237. * Parent process only. Panics in child processes.
  10238. *
  10239. * @param aPingName The (optional) name of the ping to retrieve the metric
  10240. * for. Defaults to the first value in `send_in_pings`.
  10241. *
  10242. * @return value of the stored metric, or null if there is no value.
  10243. */
  10244. [Throws, ChromeOnly]
  10245. unsigned long long? testGetValue(optional UTF8String aPingName = "");
  10246. };
  10247. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10248. interface GleanUuid : GleanMetric {
  10249. /**
  10250. * Set to the specified value.
  10251. *
  10252. * @param aValue The UUID to set the metric to.
  10253. */
  10254. undefined set(UTF8String aValue);
  10255. /**
  10256. * Generate a new random UUID and set the metric to it.
  10257. */
  10258. undefined generateAndSet();
  10259. /**
  10260. * **Test-only API**
  10261. *
  10262. * Gets the currently stored value.
  10263. *
  10264. * This function will attempt to await the last parent-process task (if any)
  10265. * writing to the the metric's storage engine before returning a value.
  10266. * This function will not wait for data from child processes.
  10267. *
  10268. * This doesn't clear the stored value.
  10269. * Parent process only. Panics in child processes.
  10270. *
  10271. * @param aPingName The (optional) name of the ping to retrieve the metric
  10272. * for. Defaults to the first value in `send_in_pings`.
  10273. *
  10274. * @return value of the stored metric, or null if there is no value.
  10275. */
  10276. [Throws, ChromeOnly]
  10277. UTF8String? testGetValue(optional UTF8String aPingName = "");
  10278. };
  10279. dictionary GleanEventRecord {
  10280. required unsigned long long timestamp;
  10281. required UTF8String category;
  10282. required UTF8String name;
  10283. record<UTF8String, UTF8String> extra;
  10284. };
  10285. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10286. interface GleanEvent : GleanMetric {
  10287. /*
  10288. * Record an event.
  10289. *
  10290. * @param aExtra An (optional) map of extra values.
  10291. */
  10292. undefined _record(optional record<UTF8String, UTF8String?> aExtra);
  10293. /**
  10294. * **Test-only API**
  10295. *
  10296. * Gets the currently stored value.
  10297. *
  10298. * This function will attempt to await the last parent-process task (if any)
  10299. * writing to the the metric's storage engine before returning a value.
  10300. * This function will not wait for data from child processes.
  10301. *
  10302. * This doesn't clear the stored value.
  10303. * Parent process only. Panics in child processes.
  10304. *
  10305. * @param aPingName The (optional) name of the ping to retrieve the metric
  10306. * for. Defaults to the first value in `send_in_pings`.
  10307. *
  10308. * @return value of the stored metric, or null if there is no value.
  10309. *
  10310. * The difference between event timestamps is in milliseconds
  10311. * See https://mozilla.github.io/glean/book/user/metrics/event.html for further details.
  10312. * Due to limitations of numbers in JavaScript, the timestamp will only be accurate up until 2^53.
  10313. * (This is probably not an issue with the current clock implementation. Probably.)
  10314. */
  10315. [Throws, ChromeOnly]
  10316. sequence<GleanEventRecord>? testGetValue(optional UTF8String aPingName = "");
  10317. };
  10318. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10319. interface GleanQuantity : GleanMetric {
  10320. /**
  10321. * Set to the specified value.
  10322. *
  10323. * @param aValue The value to set the metric to.
  10324. */
  10325. undefined set(long long aValue);
  10326. /**
  10327. * **Test-only API**
  10328. *
  10329. * Gets the currently stored value.
  10330. *
  10331. * This function will attempt to await the last parent-process task (if any)
  10332. * writing to the the metric's storage engine before returning a value.
  10333. * This function will not wait for data from child processes.
  10334. *
  10335. * This doesn't clear the stored value.
  10336. * Parent process only. Panics in child processes.
  10337. *
  10338. * @param aPingName The (optional) name of the ping to retrieve the metric
  10339. * for. Defaults to the first value in `send_in_pings`.
  10340. *
  10341. * @return value of the stored metric, or null if there is no value.
  10342. */
  10343. [Throws, ChromeOnly]
  10344. long long? testGetValue(optional UTF8String aPingName = "");
  10345. };
  10346. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10347. interface GleanDenominator : GleanMetric {
  10348. /*
  10349. * Increases the counter by `aAmount`.
  10350. *
  10351. * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
  10352. */
  10353. undefined add(optional long aAmount = 1);
  10354. /**
  10355. * **Test-only API**
  10356. *
  10357. * Gets the currently stored value as an integer.
  10358. *
  10359. * This function will attempt to await the last parent-process task (if any)
  10360. * writing to the the metric's storage engine before returning a value.
  10361. * This function will not wait for data from child processes.
  10362. *
  10363. * This doesn't clear the stored value.
  10364. * Parent process only. Panics in child processes.
  10365. *
  10366. * @param aPingName The (optional) name of the ping to retrieve the metric
  10367. * for. Defaults to the first value in `send_in_pings`.
  10368. *
  10369. * @return value of the stored metric, or null if there is no value.
  10370. */
  10371. [Throws, ChromeOnly]
  10372. long? testGetValue(optional UTF8String aPingName = "");
  10373. };
  10374. dictionary GleanRateData {
  10375. required long numerator;
  10376. required long denominator;
  10377. };
  10378. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10379. interface GleanNumerator : GleanMetric {
  10380. /*
  10381. * Increases the numerator by `aAmount`.
  10382. *
  10383. * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
  10384. */
  10385. undefined addToNumerator(optional long aAmount = 1);
  10386. /**
  10387. * **Test-only API**
  10388. *
  10389. * Gets the currently stored value in the form {numerator: n, denominator: d}
  10390. *
  10391. * This function will attempt to await the last parent-process task (if any)
  10392. * writing to the the metric's storage engine before returning a value.
  10393. * This function will not wait for data from child processes.
  10394. *
  10395. * This doesn't clear the stored value.
  10396. * Parent process only. Panics in child processes.
  10397. *
  10398. * @param aPingName The (optional) name of the ping to retrieve the metric
  10399. * for. Defaults to the first value in `send_in_pings`.
  10400. *
  10401. * @return value of the stored metric, or null if there is no value.
  10402. */
  10403. [Throws, ChromeOnly]
  10404. GleanRateData? testGetValue(optional UTF8String aPingName = "");
  10405. };
  10406. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10407. interface GleanRate : GleanMetric {
  10408. /*
  10409. * Increases the numerator by `amount`.
  10410. *
  10411. * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
  10412. */
  10413. undefined addToNumerator(optional long aAmount = 1);
  10414. /*
  10415. * Increases the denominator by `amount`.
  10416. *
  10417. * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
  10418. */
  10419. undefined addToDenominator(optional long aAmount = 1);
  10420. /**
  10421. * **Test-only API**
  10422. *
  10423. * Gets the currently stored value in the form {numerator: n, denominator: d}
  10424. *
  10425. * This function will attempt to await the last parent-process task (if any)
  10426. * writing to the the metric's storage engine before returning a value.
  10427. * This function will not wait for data from child processes.
  10428. *
  10429. * This doesn't clear the stored value.
  10430. * Parent process only. Panics in child processes.
  10431. *
  10432. * @param aPingName The (optional) name of the ping to retrieve the metric
  10433. * for. Defaults to the first value in `send_in_pings`.
  10434. *
  10435. * @return value of the stored metric, or null if there is no value.
  10436. */
  10437. [Throws, ChromeOnly]
  10438. GleanRateData? testGetValue(optional UTF8String aPingName = "");
  10439. };
  10440. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10441. interface GleanUrl : GleanMetric {
  10442. /**
  10443. * Set to the specified value.
  10444. *
  10445. * @param aValue The stringified URL to set the metric to.
  10446. */
  10447. undefined set(UTF8String aValue);
  10448. /**
  10449. * **Test-only API**
  10450. *
  10451. * Gets the currently stored value.
  10452. *
  10453. * This function will attempt to await the last parent-process task (if any)
  10454. * writing to the the metric's storage engine before returning a value.
  10455. * This function will not wait for data from child processes.
  10456. *
  10457. * This doesn't clear the stored value.
  10458. * Parent process only. Panics in child processes.
  10459. *
  10460. * @param aPingName The (optional) name of the ping to retrieve the metric
  10461. * for. Defaults to the first value in `send_in_pings`.
  10462. *
  10463. * @return value of the stored metric, or null if there is no value.
  10464. */
  10465. [Throws, ChromeOnly]
  10466. UTF8String? testGetValue(optional UTF8String aPingName = "");
  10467. };
  10468. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10469. interface GleanText : GleanMetric {
  10470. /**
  10471. * Set to the provided value.
  10472. *
  10473. * @param aValue The text to set the metric to.
  10474. */
  10475. undefined set(UTF8String aValue);
  10476. /**
  10477. * **Test-only API**
  10478. *
  10479. * Gets the currently stored value as a string.
  10480. *
  10481. * This function will attempt to await the last parent-process task (if any)
  10482. * writing to the the metric's storage engine before returning a value.
  10483. * This function will not wait for data from child processes.
  10484. *
  10485. * This doesn't clear the stored value.
  10486. * Parent process only. Panics in child processes.
  10487. *
  10488. * @param aPingName The (optional) name of the ping to retrieve the metric
  10489. * for. Defaults to the first value in `send_in_pings`.
  10490. *
  10491. * @return value of the stored metric, or null if there is no value.
  10492. */
  10493. [Throws, ChromeOnly]
  10494. UTF8String? testGetValue(optional UTF8String aPingName = "");
  10495. };
  10496. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10497. interface GleanObject : GleanMetric {
  10498. /**
  10499. * Set to the specified object.
  10500. *
  10501. * The structure of the metric is validated against the predefined structure.
  10502. *
  10503. * @param object The object to set the metric to.
  10504. */
  10505. undefined set(object value);
  10506. /**
  10507. * **Test-only API**
  10508. *
  10509. * Gets the currently stored value as an object.
  10510. *
  10511. * This function will attempt to await the last parent-process task (if any)
  10512. * writing to the the metric's storage engine before returning a value.
  10513. * This function will not wait for data from child processes.
  10514. *
  10515. * This doesn't clear the stored value.
  10516. * Parent process only. Panics in child processes.
  10517. *
  10518. * @param aPingName The (optional) name of the ping to retrieve the metric
  10519. * for. Defaults to the first value in `send_in_pings`.
  10520. *
  10521. * @return value of the stored metric, or undefined if there is no value.
  10522. */
  10523. [Throws, ChromeOnly]
  10524. object? testGetValue(optional UTF8String aPingName = "");
  10525. };
  10526. /* ---------------------- GleanPings ----------------------------- */
  10527. /* ./webidl/GleanPings.webidl */
  10528. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10529. /* This Source Code Form is subject to the terms of the Mozilla Public
  10530. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10531. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10532. */
  10533. interface nsIGleanPing;
  10534. [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
  10535. interface GleanPingsImpl {
  10536. /**
  10537. * Get a ping by name.
  10538. */
  10539. getter nsIGleanPing (DOMString identifier);
  10540. };
  10541. /* ---------------------- GPUUncapturedErrorEvent ----------------------------- */
  10542. /* ./webidl/GPUUncapturedErrorEvent.webidl */
  10543. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  10544. /* This Source Code Form is subject to the terms of the Mozilla Public
  10545. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10546. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10547. *
  10548. * The origin of this IDL file is
  10549. * https://gpuweb.github.io/gpuweb/
  10550. */
  10551. dictionary GPUUncapturedErrorEventInit : EventInit {
  10552. required GPUError error;
  10553. };
  10554. [Func="mozilla::webgpu::Instance::PrefEnabled",
  10555. Exposed=(Window, DedicatedWorker), SecureContext]
  10556. interface GPUUncapturedErrorEvent: Event {
  10557. constructor(DOMString type, GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict);
  10558. readonly attribute GPUError error;
  10559. };
  10560. /* ---------------------- HashChangeEvent ----------------------------- */
  10561. /* ./webidl/HashChangeEvent.webidl */
  10562. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10563. /* This Source Code Form is subject to the terms of the Mozilla Public
  10564. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10565. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10566. *
  10567. * The origin of this IDL file is
  10568. * https://html.spec.whatwg.org/multipage/#the-hashchangeevent-interface
  10569. */
  10570. [LegacyEventInit,
  10571. Exposed=Window]
  10572. interface HashChangeEvent : Event
  10573. {
  10574. constructor(DOMString type, optional HashChangeEventInit eventInitDict = {});
  10575. readonly attribute DOMString oldURL;
  10576. readonly attribute DOMString newURL;
  10577. undefined initHashChangeEvent(DOMString typeArg,
  10578. optional boolean canBubbleArg = false,
  10579. optional boolean cancelableArg = false,
  10580. optional DOMString oldURLArg = "",
  10581. optional DOMString newURLArg = "");
  10582. };
  10583. dictionary HashChangeEventInit : EventInit
  10584. {
  10585. DOMString oldURL = "";
  10586. DOMString newURL = "";
  10587. };
  10588. /* ---------------------- Headers ----------------------------- */
  10589. /* ./webidl/Headers.webidl */
  10590. /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10591. /* vim: set ts=8 sts=2 et sw=2 tw=80: */
  10592. /* This Source Code Form is subject to the terms of the Mozilla Public
  10593. * License, v. 2.0. If a copy of the MPL was not distributed with this
  10594. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  10595. *
  10596. * The origin of this IDL file is
  10597. * http://fetch.spec.whatwg.org/#headers-class
  10598. */
  10599. typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
  10600. enum HeadersGuardEnum {
  10601. "none",
  10602. "request",
  10603. "request-no-cors",
  10604. "response",
  10605. "immutable"
  10606. };
  10607. [Exposed=(Window,Worker)]
  10608. interface Headers {
  10609. [Throws]
  10610. constructor(optional HeadersInit init);
  10611. [Throws] undefined append(ByteString name, ByteString value);
  10612. [Throws] undefined delete(ByteString name);
  10613. [Throws] ByteString? get(ByteString name);
  10614. sequence<ByteString> getSetCookie();
  10615. [Throws] boolean has(ByteString name);
  10616. [Throws] undefined set(ByteString name, ByteString value);
  10617. iterable<ByteString, ByteString>;
  10618. // Used to test different guard states from mochitest.
  10619. // Note: Must be set prior to populating headers or will throw.
  10620. [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;
  10621. };
  10622. /* ---------------------- Highlight ----------------------------- */
  10623. /* ./webidl/Highlight.webidl */
  10624. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10625. /* This Source Code Form is subject to the terms of the Mozilla Public
  10626. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10627. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10628. *
  10629. * The origin of this IDL file is
  10630. * https://drafts.csswg.org/css-highlight-api-1/
  10631. *
  10632. * Copyright © 2021 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  10633. * liability, trademark and document use rules apply.
  10634. */
  10635. /**
  10636. * Enum defining the available highlight types.
  10637. * See https://drafts.csswg.org/css-highlight-api-1/#enumdef-highlighttype
  10638. */
  10639. enum HighlightType {
  10640. "highlight",
  10641. "spelling-error",
  10642. "grammar-error"
  10643. };
  10644. /**
  10645. * Definition of a highlight object, consisting of a set of ranges,
  10646. * a priority and a highlight type.
  10647. *
  10648. * See https://drafts.csswg.org/css-highlight-api-1/#highlight
  10649. */
  10650. [Pref="dom.customHighlightAPI.enabled", Exposed=Window]
  10651. interface Highlight {
  10652. [Throws]
  10653. constructor(AbstractRange... initialRanges);
  10654. setlike<AbstractRange>;
  10655. attribute long priority;
  10656. attribute HighlightType type;
  10657. };
  10658. partial interface Highlight {
  10659. // Setlike methods need to be overridden.
  10660. // Iterating a setlike is not possible from C++ yet.
  10661. // Therefore a separate data structure must be held and kept in sync.
  10662. [Throws]
  10663. undefined add(AbstractRange range);
  10664. [Throws]
  10665. undefined clear();
  10666. [Throws]
  10667. boolean delete(AbstractRange range);
  10668. };
  10669. /**
  10670. * Registry object that contains all Highlights associated with a Document.
  10671. *
  10672. * See https://drafts.csswg.org/css-highlight-api-1/#highlightregistry
  10673. */
  10674. [Pref="dom.customHighlightAPI.enabled", Exposed=Window]
  10675. interface HighlightRegistry {
  10676. maplike<DOMString, Highlight>;
  10677. };
  10678. partial interface HighlightRegistry {
  10679. // Maplike interface methods need to be overridden.
  10680. // Iterating a maplike is not possible from C++ yet.
  10681. // Therefore, a separate data structure must be held and kept in sync.
  10682. [Throws]
  10683. undefined set(DOMString key, Highlight value);
  10684. [Throws]
  10685. undefined clear();
  10686. [Throws]
  10687. boolean delete(DOMString key);
  10688. };
  10689. /* ---------------------- History ----------------------------- */
  10690. /* ./webidl/History.webidl */
  10691. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10692. /* This Source Code Form is subject to the terms of the Mozilla Public
  10693. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10694. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10695. *
  10696. * The origin of this IDL file is
  10697. * http://www.whatwg.org/specs/web-apps/current-work/#the-history-interface
  10698. *
  10699. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10700. * Opera Software ASA. You are granted a license to use, reproduce
  10701. * and create derivative works of this document.
  10702. */
  10703. enum ScrollRestoration { "auto", "manual" };
  10704. [Exposed=Window]
  10705. interface History {
  10706. [Throws]
  10707. readonly attribute unsigned long length;
  10708. [Throws]
  10709. attribute ScrollRestoration scrollRestoration;
  10710. [Throws]
  10711. readonly attribute any state;
  10712. [Throws, NeedsSubjectPrincipal]
  10713. undefined go(optional long delta = 0);
  10714. [Throws, NeedsCallerType]
  10715. undefined back();
  10716. [Throws, NeedsCallerType]
  10717. undefined forward();
  10718. [Throws, NeedsCallerType]
  10719. undefined pushState(any data, DOMString title, optional DOMString? url = null);
  10720. [Throws, NeedsCallerType]
  10721. undefined replaceState(any data, DOMString title, optional DOMString? url = null);
  10722. };
  10723. /* ---------------------- HTMLAllCollection ----------------------------- */
  10724. /* ./webidl/HTMLAllCollection.webidl */
  10725. /* This Source Code Form is subject to the terms of the Mozilla Public
  10726. * License, v. 2.0. If a copy of the MPL was not distributed with this
  10727. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  10728. /* Emulates undefined through Codegen.py. */
  10729. [LegacyUnenumerableNamedProperties,
  10730. Exposed=Window]
  10731. interface HTMLAllCollection {
  10732. readonly attribute unsigned long length;
  10733. getter Element (unsigned long index);
  10734. getter (HTMLCollection or Element)? namedItem(DOMString name);
  10735. (HTMLCollection or Element)? item(optional DOMString nameOrIndex);
  10736. legacycaller (HTMLCollection or Element)? (optional DOMString nameOrIndex);
  10737. };
  10738. /* ---------------------- HTMLAnchorElement ----------------------------- */
  10739. /* ./webidl/HTMLAnchorElement.webidl */
  10740. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10741. /* This Source Code Form is subject to the terms of the Mozilla Public
  10742. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10743. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10744. *
  10745. * The origin of this IDL file is
  10746. * http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
  10747. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10748. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10749. * Opera Software ASA. You are granted a license to use, reproduce
  10750. * and create derivative works of this document.
  10751. */
  10752. // http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
  10753. [Exposed=Window]
  10754. interface HTMLAnchorElement : HTMLElement {
  10755. [HTMLConstructor] constructor();
  10756. [CEReactions, SetterThrows]
  10757. attribute DOMString target;
  10758. [CEReactions, SetterThrows]
  10759. attribute DOMString download;
  10760. [CEReactions, SetterThrows]
  10761. attribute DOMString ping;
  10762. [CEReactions, SetterThrows]
  10763. attribute DOMString rel;
  10764. [CEReactions, SetterThrows]
  10765. attribute DOMString referrerPolicy;
  10766. [PutForwards=value]
  10767. readonly attribute DOMTokenList relList;
  10768. [CEReactions, SetterThrows]
  10769. attribute DOMString hreflang;
  10770. [CEReactions, SetterThrows]
  10771. attribute DOMString type;
  10772. [CEReactions, Throws]
  10773. attribute DOMString text;
  10774. };
  10775. HTMLAnchorElement includes HTMLHyperlinkElementUtils;
  10776. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10777. partial interface HTMLAnchorElement {
  10778. [CEReactions, SetterThrows]
  10779. attribute DOMString coords;
  10780. [CEReactions, SetterThrows]
  10781. attribute DOMString charset;
  10782. [CEReactions, SetterThrows]
  10783. attribute DOMString name;
  10784. [CEReactions, SetterThrows]
  10785. attribute DOMString rev;
  10786. [CEReactions, SetterThrows]
  10787. attribute DOMString shape;
  10788. };
  10789. /* ---------------------- HTMLAreaElement ----------------------------- */
  10790. /* ./webidl/HTMLAreaElement.webidl */
  10791. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10792. /* This Source Code Form is subject to the terms of the Mozilla Public
  10793. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10794. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10795. *
  10796. * The origin of this IDL file is
  10797. * http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
  10798. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10799. &
  10800. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10801. * Opera Software ASA. You are granted a license to use, reproduce
  10802. * and create derivative works of this document.
  10803. */
  10804. // http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
  10805. [Exposed=Window]
  10806. interface HTMLAreaElement : HTMLElement {
  10807. [HTMLConstructor] constructor();
  10808. [CEReactions, SetterThrows]
  10809. attribute DOMString alt;
  10810. [CEReactions, SetterThrows]
  10811. attribute DOMString coords;
  10812. [CEReactions, SetterThrows]
  10813. attribute DOMString shape;
  10814. [CEReactions, SetterThrows]
  10815. attribute DOMString target;
  10816. [CEReactions, SetterThrows]
  10817. attribute DOMString download;
  10818. [CEReactions, SetterThrows]
  10819. attribute DOMString ping;
  10820. [CEReactions, SetterThrows]
  10821. attribute DOMString rel;
  10822. [CEReactions, SetterThrows]
  10823. attribute DOMString referrerPolicy;
  10824. [PutForwards=value]
  10825. readonly attribute DOMTokenList relList;
  10826. };
  10827. HTMLAreaElement includes HTMLHyperlinkElementUtils;
  10828. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10829. partial interface HTMLAreaElement {
  10830. [CEReactions, SetterThrows]
  10831. attribute boolean noHref;
  10832. };
  10833. /* ---------------------- HTMLAudioElement ----------------------------- */
  10834. /* ./webidl/HTMLAudioElement.webidl */
  10835. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10836. /* This Source Code Form is subject to the terms of the Mozilla Public
  10837. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10838. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10839. *
  10840. * The origin of this IDL file is
  10841. * http://www.whatwg.org/specs/web-apps/current-work/#the-audio-element
  10842. *
  10843. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10844. * Opera Software ASA. You are granted a license to use, reproduce
  10845. * and create derivative works of this document.
  10846. */
  10847. [LegacyFactoryFunction=Audio(optional DOMString src),
  10848. Exposed=Window]
  10849. interface HTMLAudioElement : HTMLMediaElement {
  10850. [HTMLConstructor] constructor();
  10851. };
  10852. /* ---------------------- HTMLBaseElement ----------------------------- */
  10853. /* ./webidl/HTMLBaseElement.webidl */
  10854. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10855. /* This Source Code Form is subject to the terms of the Mozilla Public
  10856. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10857. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10858. *
  10859. * The origin of this IDL file is
  10860. * http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
  10861. *
  10862. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10863. * Opera Software ASA. You are granted a license to use, reproduce
  10864. * and create derivative works of this document.
  10865. */
  10866. // http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
  10867. [Exposed=Window]
  10868. interface HTMLBaseElement : HTMLElement {
  10869. [HTMLConstructor] constructor();
  10870. [CEReactions, SetterThrows, Pure]
  10871. attribute DOMString href;
  10872. [CEReactions, SetterThrows, Pure]
  10873. attribute DOMString target;
  10874. };
  10875. /* ---------------------- HTMLBodyElement ----------------------------- */
  10876. /* ./webidl/HTMLBodyElement.webidl */
  10877. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10878. /* This Source Code Form is subject to the terms of the Mozilla Public
  10879. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10880. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10881. *
  10882. * The origin of this IDL file is
  10883. * http://www.whatwg.org/specs/web-apps/current-work/
  10884. *
  10885. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10886. * Opera Software ASA. You are granted a license to use, reproduce
  10887. * and create derivative works of this document.
  10888. */
  10889. [Exposed=Window]
  10890. interface HTMLBodyElement : HTMLElement {
  10891. [HTMLConstructor] constructor();
  10892. };
  10893. partial interface HTMLBodyElement {
  10894. [CEReactions, SetterThrows]
  10895. attribute [LegacyNullToEmptyString] DOMString text;
  10896. [CEReactions, SetterThrows]
  10897. attribute [LegacyNullToEmptyString] DOMString link;
  10898. [CEReactions, SetterThrows]
  10899. attribute [LegacyNullToEmptyString] DOMString vLink;
  10900. [CEReactions, SetterThrows]
  10901. attribute [LegacyNullToEmptyString] DOMString aLink;
  10902. [CEReactions, SetterThrows]
  10903. attribute [LegacyNullToEmptyString] DOMString bgColor;
  10904. [CEReactions, SetterThrows]
  10905. attribute DOMString background;
  10906. };
  10907. HTMLBodyElement includes WindowEventHandlers;
  10908. /* ---------------------- HTMLBRElement ----------------------------- */
  10909. /* ./webidl/HTMLBRElement.webidl */
  10910. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10911. /* This Source Code Form is subject to the terms of the Mozilla Public
  10912. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10913. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10914. *
  10915. * The origin of this IDL file is
  10916. * http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
  10917. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10918. *
  10919. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10920. * Opera Software ASA. You are granted a license to use, reproduce
  10921. * and create derivative works of this document.
  10922. */
  10923. // http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
  10924. [Exposed=Window]
  10925. interface HTMLBRElement : HTMLElement {
  10926. [HTMLConstructor] constructor();
  10927. };
  10928. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  10929. partial interface HTMLBRElement {
  10930. [CEReactions, SetterThrows]
  10931. attribute DOMString clear;
  10932. };
  10933. // Mozilla extensions
  10934. partial interface HTMLBRElement {
  10935. // Set to true if the <br> element is created by editor for placing caret
  10936. // at proper position in empty editor.
  10937. [ChromeOnly]
  10938. readonly attribute boolean isPaddingForEmptyEditor;
  10939. // Set to true if the <br> element is created by editor for placing caret
  10940. // at proper position making last empty line in a block element in HTML
  10941. // editor or <textarea> element visible.
  10942. [ChromeOnly]
  10943. readonly attribute boolean isPaddingForEmptyLastLine;
  10944. };
  10945. /* ---------------------- HTMLButtonElement ----------------------------- */
  10946. /* ./webidl/HTMLButtonElement.webidl */
  10947. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10948. /* This Source Code Form is subject to the terms of the Mozilla Public
  10949. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  10950. * You can obtain one at http://mozilla.org/MPL/2.0/.
  10951. *
  10952. * The origin of this IDL file is
  10953. * http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
  10954. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  10955. * Opera Software ASA. You are granted a license to use, reproduce
  10956. * and create derivative works of this document.
  10957. */
  10958. // http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
  10959. [Exposed=Window,
  10960. InstrumentedProps=(popoverTargetAction,popoverTargetElement)]
  10961. interface HTMLButtonElement : HTMLElement {
  10962. [HTMLConstructor] constructor();
  10963. [CEReactions, SetterThrows, Pure]
  10964. attribute boolean disabled;
  10965. [Pure]
  10966. readonly attribute HTMLFormElement? form;
  10967. [CEReactions, SetterThrows, Pure]
  10968. attribute DOMString formAction;
  10969. [CEReactions, SetterThrows, Pure]
  10970. attribute DOMString formEnctype;
  10971. [CEReactions, SetterThrows, Pure]
  10972. attribute DOMString formMethod;
  10973. [CEReactions, SetterThrows, Pure]
  10974. attribute boolean formNoValidate;
  10975. [CEReactions, SetterThrows, Pure]
  10976. attribute DOMString formTarget;
  10977. [CEReactions, SetterThrows, Pure]
  10978. attribute DOMString name;
  10979. [CEReactions, SetterThrows, Pure]
  10980. attribute DOMString type;
  10981. [CEReactions, SetterThrows, Pure]
  10982. attribute DOMString value;
  10983. readonly attribute boolean willValidate;
  10984. readonly attribute ValidityState validity;
  10985. [Throws]
  10986. readonly attribute DOMString validationMessage;
  10987. boolean checkValidity();
  10988. boolean reportValidity();
  10989. undefined setCustomValidity(DOMString error);
  10990. readonly attribute NodeList labels;
  10991. };
  10992. HTMLButtonElement includes PopoverInvokerElement;
  10993. HTMLButtonElement includes InvokerElement;
  10994. /* ---------------------- HTMLCanvasElement ----------------------------- */
  10995. /* ./webidl/HTMLCanvasElement.webidl */
  10996. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  10997. /* This Source Code Form is subject to the terms of the Mozilla Public
  10998. * License, v. 2.0. If a copy of the MPL was not distributed with this
  10999. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  11000. *
  11001. * The origin of this IDL file is
  11002. * http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element
  11003. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11004. * Opera Software ASA. You are granted a license to use, reproduce
  11005. * and create derivative works of this document.
  11006. */
  11007. interface nsISupports;
  11008. typedef (HTMLCanvasElement or OffscreenCanvas) CanvasSource;
  11009. [Exposed=Window]
  11010. interface HTMLCanvasElement : HTMLElement {
  11011. [HTMLConstructor] constructor();
  11012. [CEReactions, Pure, SetterThrows]
  11013. attribute unsigned long width;
  11014. [CEReactions, Pure, SetterThrows]
  11015. attribute unsigned long height;
  11016. [Throws]
  11017. nsISupports? getContext(DOMString contextId, optional any contextOptions = null);
  11018. [Throws, NeedsSubjectPrincipal]
  11019. DOMString toDataURL(optional DOMString type = "",
  11020. optional any encoderOptions);
  11021. [Throws, NeedsSubjectPrincipal]
  11022. undefined toBlob(BlobCallback callback,
  11023. optional DOMString type = "",
  11024. optional any encoderOptions);
  11025. };
  11026. // Mozilla specific bits
  11027. partial interface HTMLCanvasElement {
  11028. [Pure, SetterThrows]
  11029. attribute boolean mozOpaque;
  11030. attribute PrintCallback? mozPrintCallback;
  11031. [Throws, NeedsSubjectPrincipal]
  11032. CanvasCaptureMediaStream captureStream(optional double frameRate);
  11033. };
  11034. // For OffscreenCanvas
  11035. // Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
  11036. partial interface HTMLCanvasElement {
  11037. [Pref="gfx.offscreencanvas.enabled", Throws]
  11038. OffscreenCanvas transferControlToOffscreen();
  11039. };
  11040. [ChromeOnly,
  11041. Exposed=Window]
  11042. interface MozCanvasPrintState
  11043. {
  11044. // A canvas rendering context.
  11045. readonly attribute nsISupports context;
  11046. // To be called when rendering to the context is done.
  11047. undefined done();
  11048. };
  11049. callback PrintCallback = undefined(MozCanvasPrintState ctx);
  11050. callback BlobCallback = undefined(Blob? blob);
  11051. /* ---------------------- HTMLCollection ----------------------------- */
  11052. /* ./webidl/HTMLCollection.webidl */
  11053. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11054. /* This Source Code Form is subject to the terms of the Mozilla Public
  11055. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11056. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11057. *
  11058. * The origin of this IDL file is
  11059. * http://www.w3.org/TR/2012/WD-dom-20120105/
  11060. *
  11061. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  11062. * liability, trademark and document use rules apply.
  11063. */
  11064. [LegacyUnenumerableNamedProperties,
  11065. Exposed=Window]
  11066. interface HTMLCollection {
  11067. readonly attribute unsigned long length;
  11068. getter Element? item(unsigned long index);
  11069. getter Element? namedItem(DOMString name);
  11070. };
  11071. /* ---------------------- HTMLDataElement ----------------------------- */
  11072. /* ./webidl/HTMLDataElement.webidl */
  11073. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11074. /* This Source Code Form is subject to the terms of the Mozilla Public
  11075. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11076. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11077. *
  11078. * The origin of this IDL file is
  11079. * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element
  11080. */
  11081. [Exposed=Window]
  11082. interface HTMLDataElement : HTMLElement {
  11083. [HTMLConstructor] constructor();
  11084. [CEReactions, SetterThrows]
  11085. attribute DOMString value;
  11086. };
  11087. /* ---------------------- HTMLDataListElement ----------------------------- */
  11088. /* ./webidl/HTMLDataListElement.webidl */
  11089. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11090. /* This Source Code Form is subject to the terms of the Mozilla Public
  11091. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11092. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11093. *
  11094. * The origin of this IDL file is
  11095. * http://www.whatwg.org/specs/web-apps/current-work/
  11096. *
  11097. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11098. * Opera Software ASA. You are granted a license to use, reproduce
  11099. * and create derivative works of this document.
  11100. */
  11101. [Exposed=Window]
  11102. interface HTMLDataListElement : HTMLElement {
  11103. [HTMLConstructor] constructor();
  11104. readonly attribute HTMLCollection options;
  11105. };
  11106. /* ---------------------- HTMLDetailsElement ----------------------------- */
  11107. /* ./webidl/HTMLDetailsElement.webidl */
  11108. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11109. /* This Source Code Form is subject to the terms of the Mozilla Public
  11110. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11111. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11112. *
  11113. * The origin of this IDL file is
  11114. * https://html.spec.whatwg.org/multipage/forms.html#the-details-element
  11115. *
  11116. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11117. * Opera Software ASA. You are granted a license to use, reproduce
  11118. * and create derivative works of this document.
  11119. */
  11120. [Exposed=Window]
  11121. interface HTMLDetailsElement : HTMLElement {
  11122. [HTMLConstructor] constructor();
  11123. [CEReactions, SetterThrows]
  11124. attribute boolean open;
  11125. };
  11126. /* ---------------------- HTMLDialogElement ----------------------------- */
  11127. /* ./webidl/HTMLDialogElement.webidl */
  11128. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11129. /* This Source Code Form is subject to the terms of the Mozilla Public
  11130. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11131. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11132. *
  11133. * The origin of this IDL file is
  11134. * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
  11135. *
  11136. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11137. * Opera Software ASA. You are granted a license to use, reproduce
  11138. * and create derivative works of this document.
  11139. */
  11140. [Exposed=Window]
  11141. interface HTMLDialogElement : HTMLElement {
  11142. [HTMLConstructor] constructor();
  11143. [CEReactions, SetterThrows]
  11144. attribute boolean open;
  11145. attribute DOMString returnValue;
  11146. [CEReactions, Throws, UseCounter]
  11147. undefined show();
  11148. [CEReactions, Throws]
  11149. undefined showModal();
  11150. [CEReactions]
  11151. undefined close(optional DOMString returnValue);
  11152. };
  11153. /* ---------------------- HTMLDirectoryElement ----------------------------- */
  11154. /* ./webidl/HTMLDirectoryElement.webidl */
  11155. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11156. /* This Source Code Form is subject to the terms of the Mozilla Public
  11157. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11158. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11159. *
  11160. * The origin of this IDL file is
  11161. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11162. *
  11163. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11164. * Opera Software ASA. You are granted a license to use, reproduce
  11165. * and create derivative works of this document.
  11166. */
  11167. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11168. [Exposed=Window]
  11169. interface HTMLDirectoryElement : HTMLElement {
  11170. [HTMLConstructor] constructor();
  11171. [CEReactions, SetterThrows, Pure]
  11172. attribute boolean compact;
  11173. };
  11174. /* ---------------------- HTMLDivElement ----------------------------- */
  11175. /* ./webidl/HTMLDivElement.webidl */
  11176. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11177. /* This Source Code Form is subject to the terms of the Mozilla Public
  11178. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11179. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11180. *
  11181. * The origin of this IDL file is
  11182. * http://www.whatwg.org/specs/web-apps/current-work/
  11183. *
  11184. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11185. * Opera Software ASA. You are granted a license to use, reproduce
  11186. * and create derivative works of this document.
  11187. */
  11188. [Exposed=Window, ProbablyShortLivingWrapper]
  11189. interface HTMLDivElement : HTMLElement {
  11190. [HTMLConstructor] constructor();
  11191. };
  11192. partial interface HTMLDivElement {
  11193. [CEReactions, SetterThrows]
  11194. attribute DOMString align;
  11195. };
  11196. /* ---------------------- HTMLDListElement ----------------------------- */
  11197. /* ./webidl/HTMLDListElement.webidl */
  11198. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11199. /* This Source Code Form is subject to the terms of the Mozilla Public
  11200. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11201. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11202. *
  11203. * The origin of this IDL file is
  11204. * http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
  11205. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11206. *
  11207. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11208. * Opera Software ASA. You are granted a license to use, reproduce
  11209. * and create derivative works of this document.
  11210. */
  11211. // http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
  11212. [Exposed=Window]
  11213. interface HTMLDListElement : HTMLElement {
  11214. [HTMLConstructor] constructor();
  11215. };
  11216. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11217. partial interface HTMLDListElement {
  11218. [CEReactions, SetterThrows]
  11219. attribute boolean compact;
  11220. };
  11221. /* ---------------------- HTMLDocument ----------------------------- */
  11222. /* ./webidl/HTMLDocument.webidl */
  11223. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11224. /* This Source Code Form is subject to the terms of the Mozilla Public
  11225. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11226. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11227. */
  11228. [LegacyOverrideBuiltIns,
  11229. Exposed=Window]
  11230. interface HTMLDocument : Document {
  11231. // DOM tree accessors
  11232. [Throws]
  11233. getter object (DOMString name);
  11234. };
  11235. /* ---------------------- HTMLElement ----------------------------- */
  11236. /* ./webidl/HTMLElement.webidl */
  11237. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11238. /* This Source Code Form is subject to the terms of the Mozilla Public
  11239. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11240. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11241. *
  11242. * The origin of this IDL file is
  11243. * http://www.whatwg.org/specs/web-apps/current-work/ and
  11244. * http://dev.w3.org/csswg/cssom-view/
  11245. *
  11246. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11247. * Opera Software ASA. You are granted a license to use, reproduce
  11248. * and create derivative works of this document.
  11249. */
  11250. [Exposed=Window,
  11251. InstrumentedProps=(attributeStyleMap,hidePopover,popover,showPopover,togglePopover)]
  11252. interface HTMLElement : Element {
  11253. [HTMLConstructor] constructor();
  11254. // metadata attributes
  11255. [CEReactions]
  11256. attribute DOMString title;
  11257. [CEReactions]
  11258. attribute DOMString lang;
  11259. [CEReactions, SetterThrows, Pure]
  11260. attribute boolean translate;
  11261. [CEReactions, SetterThrows, Pure]
  11262. attribute DOMString dir;
  11263. [CEReactions, GetterThrows, Pure]
  11264. attribute [LegacyNullToEmptyString] DOMString innerText;
  11265. [CEReactions, GetterThrows, SetterThrows, Pure]
  11266. attribute [LegacyNullToEmptyString] DOMString outerText;
  11267. // user interaction
  11268. [CEReactions, SetterThrows, Pure]
  11269. attribute boolean hidden;
  11270. [CEReactions, SetterThrows, Pure]
  11271. attribute boolean inert;
  11272. [NeedsCallerType]
  11273. undefined click();
  11274. [CEReactions, SetterThrows, Pure]
  11275. attribute DOMString accessKey;
  11276. [Pure]
  11277. readonly attribute DOMString accessKeyLabel;
  11278. [CEReactions, SetterThrows, Pure]
  11279. attribute boolean draggable;
  11280. //[PutForwards=value] readonly attribute DOMTokenList dropzone;
  11281. [CEReactions, SetterThrows, Pure]
  11282. attribute DOMString contentEditable;
  11283. [Pure]
  11284. readonly attribute boolean isContentEditable;
  11285. [CEReactions, SetterThrows, Pure, Pref="dom.element.popover.enabled"]
  11286. attribute DOMString? popover;
  11287. [CEReactions, SetterThrows, Pure]
  11288. attribute boolean spellcheck;
  11289. [CEReactions, Pure, SetterThrows]
  11290. attribute DOMString inputMode;
  11291. [CEReactions, Pure, SetterThrows]
  11292. attribute DOMString enterKeyHint;
  11293. [CEReactions, Pure, SetterThrows]
  11294. attribute DOMString autocapitalize;
  11295. attribute DOMString nonce;
  11296. // command API
  11297. //readonly attribute DOMString? commandType;
  11298. //readonly attribute DOMString? commandLabel;
  11299. //readonly attribute DOMString? commandIcon;
  11300. //readonly attribute boolean? commandHidden;
  11301. //readonly attribute boolean? commandDisabled;
  11302. //readonly attribute boolean? commandChecked;
  11303. // https://html.spec.whatwg.org/multipage/custom-elements.html#dom-attachinternals
  11304. [Throws]
  11305. ElementInternals attachInternals();
  11306. [Throws, Pref="dom.element.popover.enabled"]
  11307. undefined showPopover();
  11308. [Throws, Pref="dom.element.popover.enabled"]
  11309. undefined hidePopover();
  11310. [Throws, Pref="dom.element.popover.enabled"]
  11311. boolean togglePopover(optional boolean force);
  11312. };
  11313. // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
  11314. partial interface HTMLElement {
  11315. // CSSOM things are not [Pure] because they can flush
  11316. readonly attribute Element? offsetParent;
  11317. readonly attribute long offsetTop;
  11318. readonly attribute long offsetLeft;
  11319. readonly attribute long offsetWidth;
  11320. readonly attribute long offsetHeight;
  11321. };
  11322. partial interface HTMLElement {
  11323. [ChromeOnly]
  11324. readonly attribute ElementInternals? internals;
  11325. [ChromeOnly]
  11326. readonly attribute boolean isFormAssociatedCustomElements;
  11327. };
  11328. interface mixin TouchEventHandlers {
  11329. [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  11330. attribute EventHandler ontouchstart;
  11331. [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  11332. attribute EventHandler ontouchend;
  11333. [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  11334. attribute EventHandler ontouchmove;
  11335. [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
  11336. attribute EventHandler ontouchcancel;
  11337. };
  11338. HTMLElement includes GlobalEventHandlers;
  11339. HTMLElement includes HTMLOrForeignElement;
  11340. HTMLElement includes ElementCSSInlineStyle;
  11341. HTMLElement includes TouchEventHandlers;
  11342. HTMLElement includes OnErrorEventHandlerForNodes;
  11343. [Exposed=Window]
  11344. interface HTMLUnknownElement : HTMLElement {};
  11345. /* ---------------------- HTMLEmbedElement ----------------------------- */
  11346. /* ./webidl/HTMLEmbedElement.webidl */
  11347. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11348. /* This Source Code Form is subject to the terms of the Mozilla Public
  11349. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11350. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11351. *
  11352. * The origin of this IDL file is
  11353. * http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
  11354. * http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
  11355. *
  11356. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11357. * Opera Software ASA. You are granted a license to use, reproduce
  11358. * and create derivative works of this document.
  11359. */
  11360. // http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
  11361. [Exposed=Window]
  11362. interface HTMLEmbedElement : HTMLElement {
  11363. [HTMLConstructor] constructor();
  11364. [CEReactions, Pure, SetterThrows]
  11365. attribute DOMString src;
  11366. [CEReactions, Pure, SetterThrows]
  11367. attribute DOMString type;
  11368. [CEReactions, Pure, SetterThrows]
  11369. attribute DOMString width;
  11370. [CEReactions, Pure, SetterThrows]
  11371. attribute DOMString height;
  11372. };
  11373. // http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
  11374. partial interface HTMLEmbedElement {
  11375. [CEReactions, Pure, SetterThrows]
  11376. attribute DOMString align;
  11377. [CEReactions, Pure, SetterThrows]
  11378. attribute DOMString name;
  11379. };
  11380. partial interface HTMLEmbedElement {
  11381. // GetSVGDocument
  11382. [NeedsSubjectPrincipal]
  11383. Document? getSVGDocument();
  11384. };
  11385. HTMLEmbedElement includes MozFrameLoaderOwner;
  11386. HTMLEmbedElement includes MozObjectLoadingContent;
  11387. /* ---------------------- HTMLFieldSetElement ----------------------------- */
  11388. /* ./webidl/HTMLFieldSetElement.webidl */
  11389. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11390. /* This Source Code Form is subject to the terms of the Mozilla Public
  11391. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11392. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11393. *
  11394. * The origin of this IDL file is
  11395. * http://www.whatwg.org/specs/web-apps/current-work/#the-fieldset-element
  11396. *
  11397. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11398. * Opera Software ASA. You are granted a license to use, reproduce
  11399. * and create derivative works of this document.
  11400. */
  11401. [Exposed=Window]
  11402. interface HTMLFieldSetElement : HTMLElement {
  11403. [HTMLConstructor] constructor();
  11404. [CEReactions, SetterThrows]
  11405. attribute boolean disabled;
  11406. readonly attribute HTMLFormElement? form;
  11407. [CEReactions, SetterThrows]
  11408. attribute DOMString name;
  11409. readonly attribute DOMString type;
  11410. readonly attribute HTMLCollection elements;
  11411. readonly attribute boolean willValidate;
  11412. readonly attribute ValidityState validity;
  11413. [Throws]
  11414. readonly attribute DOMString validationMessage;
  11415. boolean checkValidity();
  11416. boolean reportValidity();
  11417. undefined setCustomValidity(DOMString error);
  11418. };
  11419. /* ---------------------- HTMLFontElement ----------------------------- */
  11420. /* ./webidl/HTMLFontElement.webidl */
  11421. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11422. /* This Source Code Form is subject to the terms of the Mozilla Public
  11423. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11424. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11425. *
  11426. * The origin of this IDL file is
  11427. * http://www.whatwg.org/specs/web-apps/current-work/
  11428. *
  11429. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11430. * Opera Software ASA. You are granted a license to use, reproduce
  11431. * and create derivative works of this document.
  11432. */
  11433. [Exposed=Window]
  11434. interface HTMLFontElement : HTMLElement {
  11435. [HTMLConstructor] constructor();
  11436. [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString color;
  11437. [CEReactions, SetterThrows] attribute DOMString face;
  11438. [CEReactions, SetterThrows] attribute DOMString size;
  11439. };
  11440. /* ---------------------- HTMLFormControlsCollection ----------------------------- */
  11441. /* ./webidl/HTMLFormControlsCollection.webidl */
  11442. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11443. /* This Source Code Form is subject to the terms of the Mozilla Public
  11444. * License, v. 2.0. If a copy of the MPL was not distributed with this
  11445. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  11446. *
  11447. * The origin of this IDL file is
  11448. * http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection
  11449. *
  11450. * © Copyright 2004-2013 Apple Computer, Inc., Mozilla Foundation, and
  11451. * Opera Software ASA. You are granted a license to use, reproduce
  11452. * and create derivative works of this document.
  11453. */
  11454. [Exposed=Window]
  11455. interface HTMLFormControlsCollection : HTMLCollection {
  11456. // inherits length and item()
  11457. /* legacycaller */ getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
  11458. };
  11459. /* ---------------------- HTMLFormElement ----------------------------- */
  11460. /* ./webidl/HTMLFormElement.webidl */
  11461. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11462. /* This Source Code Form is subject to the terms of the Mozilla Public
  11463. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11464. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11465. *
  11466. * The origin of this IDL file is
  11467. * http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement
  11468. *
  11469. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11470. * Opera Software ASA. You are granted a license to use, reproduce
  11471. * and create derivative works of this document.
  11472. */
  11473. [LegacyOverrideBuiltIns, LegacyUnenumerableNamedProperties,
  11474. Exposed=Window]
  11475. interface HTMLFormElement : HTMLElement {
  11476. [HTMLConstructor] constructor();
  11477. [CEReactions, Pure, SetterThrows]
  11478. attribute DOMString acceptCharset;
  11479. [CEReactions, Pure, SetterThrows]
  11480. attribute DOMString action;
  11481. [CEReactions, Pure, SetterThrows]
  11482. attribute DOMString autocomplete;
  11483. [CEReactions, Pure, SetterThrows]
  11484. attribute DOMString enctype;
  11485. [CEReactions, Pure, SetterThrows]
  11486. attribute DOMString encoding;
  11487. [CEReactions, Pure, SetterThrows]
  11488. attribute DOMString method;
  11489. [CEReactions, Pure, SetterThrows]
  11490. attribute DOMString name;
  11491. [CEReactions, Pure, SetterThrows]
  11492. attribute boolean noValidate;
  11493. [CEReactions, Pure, SetterThrows]
  11494. attribute DOMString target;
  11495. [CEReactions, Pure, SetterThrows]
  11496. attribute DOMString rel;
  11497. [PutForwards=value]
  11498. readonly attribute DOMTokenList relList;
  11499. [SameObject]
  11500. readonly attribute HTMLFormControlsCollection elements;
  11501. [Pure]
  11502. readonly attribute long length;
  11503. getter Element (unsigned long index);
  11504. // TODO this should be: getter (RadioNodeList or HTMLInputElement or HTMLImageElement) (DOMString name);
  11505. getter nsISupports (DOMString name);
  11506. [Throws]
  11507. undefined submit();
  11508. [Throws]
  11509. undefined requestSubmit(optional HTMLElement? submitter = null);
  11510. [CEReactions]
  11511. undefined reset();
  11512. boolean checkValidity();
  11513. boolean reportValidity();
  11514. };
  11515. /* ---------------------- HTMLFrameElement ----------------------------- */
  11516. /* ./webidl/HTMLFrameElement.webidl */
  11517. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11518. /* This Source Code Form is subject to the terms of the Mozilla Public
  11519. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11520. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11521. *
  11522. * The origin of this IDL file is
  11523. * http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
  11524. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11525. * Opera Software ASA. You are granted a license to use, reproduce
  11526. * and create derivative works of this document.
  11527. */
  11528. // http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
  11529. [Exposed=Window]
  11530. interface HTMLFrameElement : HTMLElement {
  11531. [HTMLConstructor] constructor();
  11532. [CEReactions, SetterThrows]
  11533. attribute DOMString name;
  11534. [CEReactions, SetterThrows]
  11535. attribute DOMString scrolling;
  11536. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  11537. attribute DOMString src;
  11538. [CEReactions, SetterThrows]
  11539. attribute DOMString frameBorder;
  11540. [CEReactions, SetterThrows]
  11541. attribute DOMString longDesc;
  11542. [CEReactions, SetterThrows]
  11543. attribute boolean noResize;
  11544. [NeedsSubjectPrincipal]
  11545. readonly attribute Document? contentDocument;
  11546. readonly attribute WindowProxy? contentWindow;
  11547. [CEReactions, SetterThrows]
  11548. attribute [LegacyNullToEmptyString] DOMString marginHeight;
  11549. [CEReactions, SetterThrows]
  11550. attribute [LegacyNullToEmptyString] DOMString marginWidth;
  11551. };
  11552. HTMLFrameElement includes MozFrameLoaderOwner;
  11553. /* ---------------------- HTMLFrameSetElement ----------------------------- */
  11554. /* ./webidl/HTMLFrameSetElement.webidl */
  11555. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11556. /* This Source Code Form is subject to the terms of the Mozilla Public
  11557. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11558. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11559. *
  11560. * The origin of this IDL file is
  11561. * http://www.whatwg.org/specs/web-apps/current-work/
  11562. *
  11563. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11564. * Opera Software ASA. You are granted a license to use, reproduce
  11565. * and create derivative works of this document.
  11566. */
  11567. [Exposed=Window]
  11568. interface HTMLFrameSetElement : HTMLElement {
  11569. [HTMLConstructor] constructor();
  11570. [CEReactions, SetterThrows]
  11571. attribute DOMString cols;
  11572. [CEReactions, SetterThrows]
  11573. attribute DOMString rows;
  11574. };
  11575. HTMLFrameSetElement includes WindowEventHandlers;
  11576. /* ---------------------- HTMLHeadElement ----------------------------- */
  11577. /* ./webidl/HTMLHeadElement.webidl */
  11578. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11579. /* This Source Code Form is subject to the terms of the Mozilla Public
  11580. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11581. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11582. *
  11583. * The origin of this IDL file is
  11584. * http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
  11585. *
  11586. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11587. * Opera Software ASA. You are granted a license to use, reproduce
  11588. * and create derivative works of this document.
  11589. */
  11590. // http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
  11591. [Exposed=Window]
  11592. interface HTMLHeadElement : HTMLElement {
  11593. [HTMLConstructor] constructor();
  11594. };
  11595. /* ---------------------- HTMLHeadingElement ----------------------------- */
  11596. /* ./webidl/HTMLHeadingElement.webidl */
  11597. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11598. /* This Source Code Form is subject to the terms of the Mozilla Public
  11599. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11600. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11601. *
  11602. * The origin of this IDL file is
  11603. * http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
  11604. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11605. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11606. * Opera Software ASA. You are granted a license to use, reproduce
  11607. * and create derivative works of this document.
  11608. */
  11609. // http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
  11610. [Exposed=Window]
  11611. interface HTMLHeadingElement : HTMLElement {
  11612. [HTMLConstructor] constructor();
  11613. };
  11614. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11615. partial interface HTMLHeadingElement {
  11616. [CEReactions, SetterThrows]
  11617. attribute DOMString align;
  11618. };
  11619. /* ---------------------- HTMLHRElement ----------------------------- */
  11620. /* ./webidl/HTMLHRElement.webidl */
  11621. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11622. /* This Source Code Form is subject to the terms of the Mozilla Public
  11623. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11624. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11625. *
  11626. * The origin of this IDL file is
  11627. * http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
  11628. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11629. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11630. * Opera Software ASA. You are granted a license to use, reproduce
  11631. * and create derivative works of this document.
  11632. */
  11633. // http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
  11634. [Exposed=Window]
  11635. interface HTMLHRElement : HTMLElement {
  11636. [HTMLConstructor] constructor();
  11637. };
  11638. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11639. partial interface HTMLHRElement {
  11640. [CEReactions, SetterThrows]
  11641. attribute DOMString align;
  11642. [CEReactions, SetterThrows]
  11643. attribute DOMString color;
  11644. [CEReactions, SetterThrows]
  11645. attribute boolean noShade;
  11646. [CEReactions, SetterThrows]
  11647. attribute DOMString size;
  11648. [CEReactions, SetterThrows]
  11649. attribute DOMString width;
  11650. };
  11651. /* ---------------------- HTMLHtmlElement ----------------------------- */
  11652. /* ./webidl/HTMLHtmlElement.webidl */
  11653. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11654. /* This Source Code Form is subject to the terms of the Mozilla Public
  11655. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11656. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11657. *
  11658. * The origin of this IDL file is
  11659. * http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
  11660. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11661. *
  11662. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11663. * Opera Software ASA. You are granted a license to use, reproduce
  11664. * and create derivative works of this document.
  11665. */
  11666. // http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
  11667. [Exposed=Window]
  11668. interface HTMLHtmlElement : HTMLElement {
  11669. [HTMLConstructor] constructor();
  11670. };
  11671. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11672. partial interface HTMLHtmlElement {
  11673. [CEReactions, SetterThrows, Pure]
  11674. attribute DOMString version;
  11675. };
  11676. /* ---------------------- HTMLHyperlinkElementUtils ----------------------------- */
  11677. /* ./webidl/HTMLHyperlinkElementUtils.webidl */
  11678. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11679. /* This Source Code Form is subject to the terms of the Mozilla Public
  11680. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11681. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11682. *
  11683. * The origin of this IDL file is
  11684. * https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
  11685. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11686. * Opera Software ASA. You are granted a license to use, reproduce
  11687. * and create derivative works of this document.
  11688. */
  11689. interface mixin HTMLHyperlinkElementUtils {
  11690. [CEReactions, SetterThrows]
  11691. stringifier attribute USVString href;
  11692. readonly attribute USVString origin;
  11693. [CEReactions]
  11694. attribute USVString protocol;
  11695. [CEReactions]
  11696. attribute USVString username;
  11697. [CEReactions]
  11698. attribute USVString password;
  11699. [CEReactions]
  11700. attribute USVString host;
  11701. [CEReactions]
  11702. attribute USVString hostname;
  11703. [CEReactions]
  11704. attribute USVString port;
  11705. [CEReactions]
  11706. attribute USVString pathname;
  11707. [CEReactions]
  11708. attribute USVString search;
  11709. [CEReactions]
  11710. attribute USVString hash;
  11711. };
  11712. /* ---------------------- HTMLIFrameElement ----------------------------- */
  11713. /* ./webidl/HTMLIFrameElement.webidl */
  11714. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11715. /* This Source Code Form is subject to the terms of the Mozilla Public
  11716. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11717. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11718. *
  11719. * The origin of this IDL file is
  11720. * http://www.whatwg.org/specs/web-apps/current-work/#the-iframe-element
  11721. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11722. * https://wicg.github.io/feature-policy/#policy
  11723. *
  11724. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11725. * Opera Software ASA. You are granted a license to use, reproduce
  11726. * and create derivative works of this document.
  11727. */
  11728. [Exposed=Window]
  11729. interface HTMLIFrameElement : HTMLElement {
  11730. [HTMLConstructor] constructor();
  11731. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
  11732. attribute DOMString src;
  11733. [CEReactions, SetterThrows, Pure]
  11734. attribute DOMString srcdoc;
  11735. [CEReactions, SetterThrows, Pure]
  11736. attribute DOMString name;
  11737. [PutForwards=value] readonly attribute DOMTokenList sandbox;
  11738. // attribute boolean seamless;
  11739. [CEReactions, SetterThrows, Pure]
  11740. attribute boolean allowFullscreen;
  11741. [CEReactions, SetterThrows, Pure]
  11742. attribute DOMString width;
  11743. [CEReactions, SetterThrows, Pure]
  11744. attribute DOMString height;
  11745. [CEReactions, SetterThrows, Pure]
  11746. attribute DOMString referrerPolicy;
  11747. [CEReactions, SetterThrows, Pure, Pref="dom.iframe-lazy-loading.enabled"]
  11748. attribute DOMString loading;
  11749. [NeedsSubjectPrincipal]
  11750. readonly attribute Document? contentDocument;
  11751. readonly attribute WindowProxy? contentWindow;
  11752. };
  11753. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11754. partial interface HTMLIFrameElement {
  11755. [CEReactions, SetterThrows, Pure]
  11756. attribute DOMString align;
  11757. [CEReactions, SetterThrows, Pure]
  11758. attribute DOMString scrolling;
  11759. [CEReactions, SetterThrows, Pure]
  11760. attribute DOMString frameBorder;
  11761. [CEReactions, SetterThrows, Pure]
  11762. attribute DOMString longDesc;
  11763. [CEReactions, SetterThrows, Pure]
  11764. attribute [LegacyNullToEmptyString] DOMString marginHeight;
  11765. [CEReactions, SetterThrows, Pure]
  11766. attribute [LegacyNullToEmptyString] DOMString marginWidth;
  11767. };
  11768. partial interface HTMLIFrameElement {
  11769. // GetSVGDocument
  11770. [NeedsSubjectPrincipal]
  11771. Document? getSVGDocument();
  11772. };
  11773. HTMLIFrameElement includes MozFrameLoaderOwner;
  11774. // https://w3c.github.io/webappsec-feature-policy/#idl-index
  11775. partial interface HTMLIFrameElement {
  11776. [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
  11777. readonly attribute FeaturePolicy featurePolicy;
  11778. [CEReactions, SetterThrows, Pure]
  11779. attribute DOMString allow;
  11780. };
  11781. /* ---------------------- HTMLImageElement ----------------------------- */
  11782. /* ./webidl/HTMLImageElement.webidl */
  11783. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11784. /* This Source Code Form is subject to the terms of the Mozilla Public
  11785. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11786. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11787. *
  11788. * The origin of this IDL file is
  11789. * http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement
  11790. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11791. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11792. * Opera Software ASA. You are granted a license to use, reproduce
  11793. * and create derivative works of this document.
  11794. */
  11795. interface imgINotificationObserver;
  11796. interface imgIRequest;
  11797. interface URI;
  11798. interface nsIStreamListener;
  11799. [LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height),
  11800. Exposed=Window]
  11801. interface HTMLImageElement : HTMLElement {
  11802. [HTMLConstructor] constructor();
  11803. [CEReactions, SetterThrows]
  11804. attribute DOMString alt;
  11805. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  11806. attribute DOMString src;
  11807. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  11808. attribute DOMString srcset;
  11809. [CEReactions, SetterThrows]
  11810. attribute DOMString? crossOrigin;
  11811. [CEReactions, SetterThrows]
  11812. attribute DOMString useMap;
  11813. [CEReactions, SetterThrows]
  11814. attribute DOMString referrerPolicy;
  11815. [CEReactions, SetterThrows]
  11816. attribute boolean isMap;
  11817. [CEReactions, SetterThrows]
  11818. attribute unsigned long width;
  11819. [CEReactions, SetterThrows]
  11820. attribute unsigned long height;
  11821. [CEReactions, SetterThrows]
  11822. attribute DOMString decoding;
  11823. [CEReactions, SetterThrows]
  11824. attribute DOMString loading;
  11825. [Pref="network.fetchpriority.enabled", CEReactions]
  11826. attribute DOMString fetchPriority;
  11827. readonly attribute unsigned long naturalWidth;
  11828. readonly attribute unsigned long naturalHeight;
  11829. readonly attribute boolean complete;
  11830. [NewObject]
  11831. Promise<undefined> decode();
  11832. [NewObject, ChromeOnly]
  11833. Promise<sequence<ImageText>> recognizeCurrentImageText();
  11834. };
  11835. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11836. partial interface HTMLImageElement {
  11837. [CEReactions, SetterThrows]
  11838. attribute DOMString name;
  11839. [CEReactions, SetterThrows]
  11840. attribute DOMString align;
  11841. [CEReactions, SetterThrows]
  11842. attribute unsigned long hspace;
  11843. [CEReactions, SetterThrows]
  11844. attribute unsigned long vspace;
  11845. [CEReactions, SetterThrows]
  11846. attribute DOMString longDesc;
  11847. [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString border;
  11848. };
  11849. // [Update me: not in whatwg spec yet]
  11850. // http://picture.responsiveimages.org/#the-img-element
  11851. partial interface HTMLImageElement {
  11852. [CEReactions, SetterThrows]
  11853. attribute DOMString sizes;
  11854. readonly attribute DOMString currentSrc;
  11855. };
  11856. // Mozilla extensions.
  11857. partial interface HTMLImageElement {
  11858. [CEReactions, SetterThrows]
  11859. attribute DOMString lowsrc;
  11860. // These attributes are offsets from the closest view (to mimic
  11861. // NS4's "offset-from-layer" behavior).
  11862. readonly attribute long x;
  11863. readonly attribute long y;
  11864. };
  11865. interface mixin MozImageLoadingContent {
  11866. // Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
  11867. // to update this list if nsIImageLoadingContent changes.
  11868. [ChromeOnly]
  11869. const long UNKNOWN_REQUEST = -1;
  11870. [ChromeOnly]
  11871. const long CURRENT_REQUEST = 0;
  11872. [ChromeOnly]
  11873. const long PENDING_REQUEST = 1;
  11874. [ChromeOnly]
  11875. attribute boolean loadingEnabled;
  11876. /**
  11877. * Same as addNativeObserver but intended for scripted observers or observers
  11878. * from another or without a document.
  11879. */
  11880. [ChromeOnly]
  11881. undefined addObserver(imgINotificationObserver aObserver);
  11882. /**
  11883. * Same as removeNativeObserver but intended for scripted observers or
  11884. * observers from another or without a document.
  11885. */
  11886. [ChromeOnly]
  11887. undefined removeObserver(imgINotificationObserver aObserver);
  11888. [ChromeOnly,Throws]
  11889. imgIRequest? getRequest(long aRequestType);
  11890. [ChromeOnly,Throws]
  11891. long getRequestType(imgIRequest aRequest);
  11892. [ChromeOnly]
  11893. readonly attribute URI? currentURI;
  11894. // Gets the final URI of the current request, if available.
  11895. // Otherwise, returns null.
  11896. [ChromeOnly]
  11897. readonly attribute URI? currentRequestFinalURI;
  11898. /**
  11899. * forceReload forces reloading of the image pointed to by currentURI
  11900. *
  11901. * @param aNotify request should notify
  11902. * @throws NS_ERROR_NOT_AVAILABLE if there is no current URI to reload
  11903. */
  11904. [ChromeOnly,Throws]
  11905. undefined forceReload(optional boolean aNotify = true);
  11906. };
  11907. HTMLImageElement includes MozImageLoadingContent;
  11908. /* ---------------------- HTMLInputElement ----------------------------- */
  11909. /* ./webidl/HTMLInputElement.webidl */
  11910. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  11911. /* This Source Code Form is subject to the terms of the Mozilla Public
  11912. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  11913. * You can obtain one at http://mozilla.org/MPL/2.0/.
  11914. *
  11915. * The origin of this IDL file is
  11916. * http://www.whatwg.org/specs/web-apps/current-work/#the-input-element
  11917. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  11918. * https://wicg.github.io/entries-api/#idl-index
  11919. *
  11920. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  11921. * Opera Software ASA. You are granted a license to use, reproduce
  11922. * and create derivative works of this document.
  11923. */
  11924. enum SelectionMode {
  11925. "select",
  11926. "start",
  11927. "end",
  11928. "preserve",
  11929. };
  11930. interface XULControllers;
  11931. [Exposed=Window,
  11932. InstrumentedProps=(capture,
  11933. incremental,
  11934. onsearch,
  11935. popoverTargetAction,
  11936. popoverTargetElement,
  11937. webkitEntries,
  11938. webkitdirectory)]
  11939. interface HTMLInputElement : HTMLElement {
  11940. [HTMLConstructor] constructor();
  11941. [CEReactions, Pure, SetterThrows]
  11942. attribute DOMString accept;
  11943. [CEReactions, Pure, SetterThrows]
  11944. attribute DOMString alt;
  11945. [CEReactions, Pure, SetterThrows]
  11946. attribute DOMString autocomplete;
  11947. [CEReactions, Pure, SetterThrows, Pref="dom.capture.enabled"]
  11948. attribute DOMString capture;
  11949. [CEReactions, Pure, SetterThrows]
  11950. attribute boolean defaultChecked;
  11951. [Pure]
  11952. attribute boolean checked;
  11953. [CEReactions, Pure, SetterThrows]
  11954. attribute DOMString dirName;
  11955. [CEReactions, Pure, SetterThrows]
  11956. attribute boolean disabled;
  11957. readonly attribute HTMLFormElement? form;
  11958. [Pure]
  11959. attribute FileList? files;
  11960. [CEReactions, Pure, SetterThrows]
  11961. attribute DOMString formAction;
  11962. [CEReactions, Pure, SetterThrows]
  11963. attribute DOMString formEnctype;
  11964. [CEReactions, Pure, SetterThrows]
  11965. attribute DOMString formMethod;
  11966. [CEReactions, Pure, SetterThrows]
  11967. attribute boolean formNoValidate;
  11968. [CEReactions, Pure, SetterThrows]
  11969. attribute DOMString formTarget;
  11970. [CEReactions, Pure, SetterThrows]
  11971. attribute unsigned long height;
  11972. [Pure]
  11973. attribute boolean indeterminate;
  11974. [Pure]
  11975. readonly attribute HTMLDataListElement? list;
  11976. [CEReactions, Pure, SetterThrows]
  11977. attribute DOMString max;
  11978. [CEReactions, Pure, SetterThrows]
  11979. attribute long maxLength;
  11980. [CEReactions, Pure, SetterThrows]
  11981. attribute DOMString min;
  11982. [CEReactions, Pure, SetterThrows]
  11983. attribute long minLength;
  11984. [CEReactions, Pure, SetterThrows]
  11985. attribute boolean multiple;
  11986. [CEReactions, Pure, SetterThrows]
  11987. attribute DOMString name;
  11988. [CEReactions, Pure, SetterThrows]
  11989. attribute DOMString pattern;
  11990. [CEReactions, Pure, SetterThrows]
  11991. attribute DOMString placeholder;
  11992. [CEReactions, Pure, SetterThrows]
  11993. attribute boolean readOnly;
  11994. [CEReactions, Pure, SetterThrows]
  11995. attribute boolean required;
  11996. [CEReactions, Pure, SetterThrows]
  11997. attribute unsigned long size;
  11998. [CEReactions, Pure, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  11999. attribute DOMString src;
  12000. [CEReactions, Pure, SetterThrows]
  12001. attribute DOMString step;
  12002. [CEReactions, Pure, SetterThrows]
  12003. attribute DOMString type;
  12004. [CEReactions, Pure, SetterThrows]
  12005. attribute DOMString defaultValue;
  12006. [CEReactions, Pure, SetterThrows, NeedsCallerType]
  12007. attribute [LegacyNullToEmptyString] DOMString value;
  12008. [Throws]
  12009. attribute object? valueAsDate;
  12010. [Pure, SetterThrows]
  12011. attribute unrestricted double valueAsNumber;
  12012. [CEReactions, SetterThrows]
  12013. attribute unsigned long width;
  12014. [Throws]
  12015. undefined stepUp(optional long n = 1);
  12016. [Throws]
  12017. undefined stepDown(optional long n = 1);
  12018. [Pure]
  12019. readonly attribute boolean willValidate;
  12020. [Pure]
  12021. readonly attribute ValidityState validity;
  12022. [Throws]
  12023. readonly attribute DOMString validationMessage;
  12024. boolean checkValidity();
  12025. boolean reportValidity();
  12026. undefined setCustomValidity(DOMString error);
  12027. readonly attribute NodeList? labels;
  12028. undefined select();
  12029. [Throws]
  12030. attribute unsigned long? selectionStart;
  12031. [Throws]
  12032. attribute unsigned long? selectionEnd;
  12033. [Throws]
  12034. attribute DOMString? selectionDirection;
  12035. [Throws]
  12036. undefined setRangeText(DOMString replacement);
  12037. [Throws]
  12038. undefined setRangeText(DOMString replacement, unsigned long start,
  12039. unsigned long end, optional SelectionMode selectionMode = "preserve");
  12040. [Throws]
  12041. undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
  12042. [Throws]
  12043. undefined showPicker();
  12044. // also has obsolete members
  12045. };
  12046. partial interface HTMLInputElement {
  12047. [CEReactions, Pure, SetterThrows]
  12048. attribute DOMString align;
  12049. [CEReactions, Pure, SetterThrows]
  12050. attribute DOMString useMap;
  12051. };
  12052. // Mozilla extensions
  12053. partial interface HTMLInputElement {
  12054. [GetterThrows, ChromeOnly]
  12055. readonly attribute XULControllers? controllers;
  12056. // Binaryname because we have a FragmentOrElement function named "TextLength()".
  12057. [NeedsCallerType, BinaryName="inputTextLength"]
  12058. readonly attribute long textLength;
  12059. [Throws, ChromeOnly]
  12060. sequence<DOMString> mozGetFileNameArray();
  12061. [ChromeOnly, Throws]
  12062. undefined mozSetFileNameArray(sequence<DOMString> fileNames);
  12063. [ChromeOnly]
  12064. undefined mozSetFileArray(sequence<File> files);
  12065. // This method is meant to use for testing only.
  12066. [ChromeOnly, Throws]
  12067. undefined mozSetDirectory(DOMString directoryPath);
  12068. // This method is meant to use for testing only.
  12069. [ChromeOnly]
  12070. undefined mozSetDndFilesAndDirectories(sequence<(File or Directory)> list);
  12071. // This method is meant to use for testing only.
  12072. [ChromeOnly, NewObject]
  12073. Promise<sequence<(File or Directory)>> getFilesAndDirectories();
  12074. boolean mozIsTextField(boolean aExcludePassword);
  12075. [ChromeOnly]
  12076. readonly attribute boolean hasBeenTypePassword;
  12077. [ChromeOnly]
  12078. attribute DOMString previewValue;
  12079. // Last value entered by the user, not by a script.
  12080. // NOTE(emilio): As of right now some execCommand triggered changes might be
  12081. // considered interactive.
  12082. [ChromeOnly]
  12083. readonly attribute DOMString lastInteractiveValue;
  12084. [ChromeOnly]
  12085. // This function will return null if @autocomplete is not defined for the
  12086. // current @type
  12087. AutocompleteInfo? getAutocompleteInfo();
  12088. [ChromeOnly]
  12089. // The reveal password state for a type=password control.
  12090. attribute boolean revealPassword;
  12091. };
  12092. interface mixin MozEditableElement {
  12093. // Returns an nsIEditor instance which is associated with the element.
  12094. // If the element can be associated with an editor but not yet created,
  12095. // this creates new one automatically.
  12096. [Pure, ChromeOnly, BinaryName="editorForBindings"]
  12097. readonly attribute nsIEditor? editor;
  12098. // Returns true if an nsIEditor instance has already been associated with
  12099. // the element.
  12100. [Pure, ChromeOnly]
  12101. readonly attribute boolean hasEditor;
  12102. // This is set to true if "input" event should be fired with InputEvent on
  12103. // the element. Otherwise, i.e., if "input" event should be fired with
  12104. // Event, set to false.
  12105. [ChromeOnly]
  12106. readonly attribute boolean isInputEventTarget;
  12107. // This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
  12108. // of the value change is closer to the normal user input, so 'change' event
  12109. // for example will be dispatched when focusing out the element.
  12110. [Func="IsChromeOrUAWidget", NeedsSubjectPrincipal]
  12111. undefined setUserInput(DOMString input);
  12112. };
  12113. HTMLInputElement includes MozEditableElement;
  12114. HTMLInputElement includes MozImageLoadingContent;
  12115. HTMLInputElement includes PopoverInvokerElement;
  12116. HTMLInputElement includes InvokerElement;
  12117. // https://wicg.github.io/entries-api/#idl-index
  12118. partial interface HTMLInputElement {
  12119. [Pref="dom.webkitBlink.filesystem.enabled", Frozen, Cached, Pure]
  12120. readonly attribute sequence<FileSystemEntry> webkitEntries;
  12121. [Pref="dom.webkitBlink.dirPicker.enabled", BinaryName="WebkitDirectoryAttr", SetterThrows]
  12122. attribute boolean webkitdirectory;
  12123. };
  12124. dictionary DateTimeValue {
  12125. long hour;
  12126. long minute;
  12127. long year;
  12128. long month;
  12129. long day;
  12130. };
  12131. partial interface HTMLInputElement {
  12132. [ChromeOnly]
  12133. DateTimeValue getDateTimeInputBoxValue();
  12134. [ChromeOnly]
  12135. readonly attribute Element? dateTimeBoxElement;
  12136. [ChromeOnly, BinaryName="getMinimumAsDouble"]
  12137. double getMinimum();
  12138. [ChromeOnly, BinaryName="getMaximumAsDouble"]
  12139. double getMaximum();
  12140. [Func="IsChromeOrUAWidget"]
  12141. undefined openDateTimePicker(optional DateTimeValue initialValue = {});
  12142. [Func="IsChromeOrUAWidget"]
  12143. undefined updateDateTimePicker(optional DateTimeValue value = {});
  12144. [Func="IsChromeOrUAWidget"]
  12145. undefined closeDateTimePicker();
  12146. [Func="IsChromeOrUAWidget"]
  12147. undefined setFocusState(boolean aIsFocused);
  12148. [Func="IsChromeOrUAWidget"]
  12149. undefined updateValidityState();
  12150. [Func="IsChromeOrUAWidget", BinaryName="getStepAsDouble"]
  12151. double getStep();
  12152. [Func="IsChromeOrUAWidget", BinaryName="getStepBaseAsDouble"]
  12153. double getStepBase();
  12154. };
  12155. /* ---------------------- HTMLLabelElement ----------------------------- */
  12156. /* ./webidl/HTMLLabelElement.webidl */
  12157. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12158. /* This Source Code Form is subject to the terms of the Mozilla Public
  12159. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12160. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12161. *
  12162. * The origin of this IDL file is
  12163. * http://www.whatwg.org/specs/web-apps/current-work/
  12164. *
  12165. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12166. * Opera Software ASA. You are granted a license to use, reproduce
  12167. * and create derivative works of this document.
  12168. */
  12169. [Exposed=Window]
  12170. interface HTMLLabelElement : HTMLElement {
  12171. [HTMLConstructor] constructor();
  12172. readonly attribute HTMLFormElement? form;
  12173. [CEReactions]
  12174. attribute DOMString htmlFor;
  12175. readonly attribute HTMLElement? control;
  12176. };
  12177. /* ---------------------- HTMLLegendElement ----------------------------- */
  12178. /* ./webidl/HTMLLegendElement.webidl */
  12179. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12180. /* This Source Code Form is subject to the terms of the Mozilla Public
  12181. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12182. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12183. *
  12184. * The origin of this IDL file is
  12185. * http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
  12186. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12187. *
  12188. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12189. * Opera Software ASA. You are granted a license to use, reproduce
  12190. * and create derivative works of this document.
  12191. */
  12192. // http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
  12193. [Exposed=Window]
  12194. interface HTMLLegendElement : HTMLElement {
  12195. [HTMLConstructor] constructor();
  12196. readonly attribute HTMLFormElement? form;
  12197. };
  12198. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12199. partial interface HTMLLegendElement {
  12200. [CEReactions, SetterThrows]
  12201. attribute DOMString align;
  12202. };
  12203. /* ---------------------- HTMLLIElement ----------------------------- */
  12204. /* ./webidl/HTMLLIElement.webidl */
  12205. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12206. /* This Source Code Form is subject to the terms of the Mozilla Public
  12207. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12208. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12209. *
  12210. * The origin of this IDL file is
  12211. * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
  12212. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12213. *
  12214. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12215. * Opera Software ASA. You are granted a license to use, reproduce
  12216. * and create derivative works of this document.
  12217. */
  12218. // http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
  12219. [Exposed=Window]
  12220. interface HTMLLIElement : HTMLElement {
  12221. [HTMLConstructor] constructor();
  12222. [CEReactions, SetterThrows, Pure]
  12223. attribute long value;
  12224. };
  12225. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12226. partial interface HTMLLIElement {
  12227. [CEReactions, SetterThrows, Pure]
  12228. attribute DOMString type;
  12229. };
  12230. /* ---------------------- HTMLLinkElement ----------------------------- */
  12231. /* ./webidl/HTMLLinkElement.webidl */
  12232. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12233. /* This Source Code Form is subject to the terms of the Mozilla Public
  12234. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12235. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12236. *
  12237. * The origin of this IDL file is
  12238. * http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
  12239. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12240. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12241. * Opera Software ASA. You are granted a license to use, reproduce
  12242. * and create derivative works of this document.
  12243. */
  12244. // https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
  12245. [Exposed=Window]
  12246. interface HTMLLinkElement : HTMLElement {
  12247. [HTMLConstructor] constructor();
  12248. [CEReactions, SetterThrows, Pure]
  12249. attribute boolean disabled;
  12250. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
  12251. attribute DOMString href;
  12252. [CEReactions, SetterThrows, Pure]
  12253. attribute DOMString? crossOrigin;
  12254. [CEReactions, SetterThrows, Pure]
  12255. attribute DOMString rel;
  12256. [PutForwards=value]
  12257. readonly attribute DOMTokenList relList;
  12258. [CEReactions, SetterThrows, Pure]
  12259. attribute DOMString media;
  12260. [CEReactions, SetterThrows, Pure]
  12261. attribute DOMString hreflang;
  12262. [CEReactions, SetterThrows, Pure]
  12263. attribute DOMString type;
  12264. [CEReactions, SetterThrows, Pure]
  12265. attribute DOMString referrerPolicy;
  12266. [PutForwards=value] readonly attribute DOMTokenList sizes;
  12267. [CEReactions, SetterThrows, Pure]
  12268. attribute USVString imageSrcset;
  12269. [CEReactions, SetterThrows, Pure]
  12270. attribute USVString imageSizes;
  12271. [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
  12272. readonly attribute DOMTokenList blocking;
  12273. [Pref="network.fetchpriority.enabled", CEReactions]
  12274. attribute DOMString fetchPriority;
  12275. };
  12276. HTMLLinkElement includes LinkStyle;
  12277. // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
  12278. partial interface HTMLLinkElement {
  12279. [CEReactions, SetterThrows, Pure]
  12280. attribute DOMString charset;
  12281. [CEReactions, SetterThrows, Pure]
  12282. attribute DOMString rev;
  12283. [CEReactions, SetterThrows, Pure]
  12284. attribute DOMString target;
  12285. };
  12286. // https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
  12287. partial interface HTMLLinkElement {
  12288. [CEReactions, SetterThrows]
  12289. attribute DOMString integrity;
  12290. };
  12291. // https://html.spec.whatwg.org/multipage/links.html#link-type-preload
  12292. partial interface HTMLLinkElement {
  12293. [SetterThrows, Pure]
  12294. attribute DOMString as;
  12295. };
  12296. /* ---------------------- HTMLMapElement ----------------------------- */
  12297. /* ./webidl/HTMLMapElement.webidl */
  12298. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12299. /* This Source Code Form is subject to the terms of the Mozilla Public
  12300. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12301. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12302. *
  12303. * The origin of this IDL file is
  12304. * http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
  12305. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12306. * Opera Software ASA. You are granted a license to use, reproduce
  12307. * and create derivative works of this document.
  12308. */
  12309. // http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
  12310. [Exposed=Window]
  12311. interface HTMLMapElement : HTMLElement {
  12312. [HTMLConstructor] constructor();
  12313. [CEReactions, SetterThrows, Pure]
  12314. attribute DOMString name;
  12315. [Constant]
  12316. readonly attribute HTMLCollection areas;
  12317. // Not supported yet.
  12318. //readonly attribute HTMLCollection images;
  12319. };
  12320. /* ---------------------- HTMLMarqueeElement ----------------------------- */
  12321. /* ./webidl/HTMLMarqueeElement.webidl */
  12322. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12323. /* This Source Code Form is subject to the terms of the Mozilla Public
  12324. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12325. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12326. *
  12327. * The origin of this IDL file is
  12328. * https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
  12329. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12330. * Opera Software ASA. You are granted a license to use, reproduce
  12331. * and create derivative works of this document.
  12332. */
  12333. // https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
  12334. [Exposed=Window]
  12335. interface HTMLMarqueeElement : HTMLElement {
  12336. [HTMLConstructor] constructor();
  12337. [CEReactions, SetterThrows] attribute DOMString behavior;
  12338. [CEReactions, SetterThrows] attribute DOMString bgColor;
  12339. [CEReactions, SetterThrows] attribute DOMString direction;
  12340. [CEReactions, SetterThrows] attribute DOMString height;
  12341. [CEReactions, SetterThrows] attribute unsigned long hspace;
  12342. [CEReactions, SetterThrows] attribute long loop;
  12343. [CEReactions, SetterThrows] attribute unsigned long scrollAmount;
  12344. [CEReactions, SetterThrows] attribute unsigned long scrollDelay;
  12345. [CEReactions, SetterThrows] attribute boolean trueSpeed;
  12346. [CEReactions, SetterThrows] attribute unsigned long vspace;
  12347. [CEReactions, SetterThrows] attribute DOMString width;
  12348. attribute EventHandler onbounce;
  12349. attribute EventHandler onfinish;
  12350. attribute EventHandler onstart;
  12351. undefined start();
  12352. undefined stop();
  12353. };
  12354. /* ---------------------- HTMLMediaElement ----------------------------- */
  12355. /* ./webidl/HTMLMediaElement.webidl */
  12356. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12357. /* This Source Code Form is subject to the terms of the Mozilla Public
  12358. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12359. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12360. *
  12361. * The origin of this IDL file is
  12362. * http://www.whatwg.org/specs/web-apps/current-work/#media-elements
  12363. *
  12364. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12365. * Opera Software ASA. You are granted a license to use, reproduce
  12366. * and create derivative works of this document.
  12367. */
  12368. [Exposed=Window,
  12369. InstrumentedProps=(disableRemotePlayback,remote)]
  12370. interface HTMLMediaElement : HTMLElement {
  12371. // error state
  12372. readonly attribute MediaError? error;
  12373. // network state
  12374. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  12375. attribute DOMString src;
  12376. readonly attribute DOMString currentSrc;
  12377. [CEReactions, SetterThrows]
  12378. attribute DOMString? crossOrigin;
  12379. const unsigned short NETWORK_EMPTY = 0;
  12380. const unsigned short NETWORK_IDLE = 1;
  12381. const unsigned short NETWORK_LOADING = 2;
  12382. const unsigned short NETWORK_NO_SOURCE = 3;
  12383. readonly attribute unsigned short networkState;
  12384. [CEReactions, SetterThrows]
  12385. attribute DOMString preload;
  12386. [NewObject]
  12387. readonly attribute TimeRanges buffered;
  12388. undefined load();
  12389. DOMString canPlayType(DOMString type);
  12390. // ready state
  12391. const unsigned short HAVE_NOTHING = 0;
  12392. const unsigned short HAVE_METADATA = 1;
  12393. const unsigned short HAVE_CURRENT_DATA = 2;
  12394. const unsigned short HAVE_FUTURE_DATA = 3;
  12395. const unsigned short HAVE_ENOUGH_DATA = 4;
  12396. readonly attribute unsigned short readyState;
  12397. readonly attribute boolean seeking;
  12398. // playback state
  12399. [SetterThrows]
  12400. attribute double currentTime;
  12401. [Throws]
  12402. undefined fastSeek(double time);
  12403. readonly attribute unrestricted double duration;
  12404. [ChromeOnly]
  12405. readonly attribute boolean isEncrypted;
  12406. // TODO: Bug 847376 - readonly attribute any startDate;
  12407. readonly attribute boolean paused;
  12408. [SetterThrows]
  12409. attribute double defaultPlaybackRate;
  12410. [SetterThrows]
  12411. attribute double playbackRate;
  12412. [NewObject]
  12413. readonly attribute TimeRanges played;
  12414. [NewObject]
  12415. readonly attribute TimeRanges seekable;
  12416. readonly attribute boolean ended;
  12417. [CEReactions, SetterThrows]
  12418. attribute boolean autoplay;
  12419. [CEReactions, SetterThrows]
  12420. attribute boolean loop;
  12421. [NewObject]
  12422. Promise<undefined> play();
  12423. [Throws]
  12424. undefined pause();
  12425. // TODO: Bug 847377 - mediaGroup and MediaController
  12426. // media controller
  12427. // attribute DOMString mediaGroup;
  12428. // attribute MediaController? controller;
  12429. // controls
  12430. [CEReactions, SetterThrows]
  12431. attribute boolean controls;
  12432. [SetterThrows]
  12433. attribute double volume;
  12434. attribute boolean muted;
  12435. [CEReactions, SetterThrows]
  12436. attribute boolean defaultMuted;
  12437. // TODO: Bug 847379
  12438. // tracks
  12439. [Pref="media.track.enabled"]
  12440. readonly attribute AudioTrackList audioTracks;
  12441. [Pref="media.track.enabled"]
  12442. readonly attribute VideoTrackList videoTracks;
  12443. readonly attribute TextTrackList? textTracks;
  12444. TextTrack addTextTrack(TextTrackKind kind,
  12445. optional DOMString label = "",
  12446. optional DOMString language = "");
  12447. };
  12448. // Mozilla extensions:
  12449. partial interface HTMLMediaElement {
  12450. [Func="HasDebuggerOrTabsPrivilege"]
  12451. readonly attribute MediaSource? mozMediaSourceObject;
  12452. [Func="HasDebuggerOrTabsPrivilege", NewObject]
  12453. Promise<HTMLMediaElementDebugInfo> mozRequestDebugInfo();
  12454. [Func="HasDebuggerOrTabsPrivilege", NewObject]
  12455. static undefined mozEnableDebugLog();
  12456. [Func="HasDebuggerOrTabsPrivilege", NewObject]
  12457. Promise<DOMString> mozRequestDebugLog();
  12458. attribute MediaStream? srcObject;
  12459. attribute boolean preservesPitch;
  12460. // NB: for internal use with the video controls:
  12461. [Func="IsChromeOrUAWidget"] attribute boolean mozAllowCasting;
  12462. [Func="IsChromeOrUAWidget"] attribute boolean mozIsCasting;
  12463. // Mozilla extension: stream capture
  12464. [Throws]
  12465. MediaStream mozCaptureStream();
  12466. [Throws]
  12467. MediaStream mozCaptureStreamUntilEnded();
  12468. readonly attribute boolean mozAudioCaptured;
  12469. // Mozilla extension: return embedded metadata from the stream as a
  12470. // JSObject with key:value pairs for each tag. This can be used by
  12471. // player interfaces to display the song title, artist, etc.
  12472. [Throws]
  12473. object? mozGetMetadata();
  12474. // Mozilla extension: provides access to the fragment end time if
  12475. // the media element has a fragment URI for the currentSrc, otherwise
  12476. // it is equal to the media duration.
  12477. readonly attribute double mozFragmentEnd;
  12478. };
  12479. // Encrypted Media Extensions
  12480. partial interface HTMLMediaElement {
  12481. readonly attribute MediaKeys? mediaKeys;
  12482. // undefined, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
  12483. [NewObject]
  12484. Promise<undefined> setMediaKeys(MediaKeys? mediaKeys);
  12485. attribute EventHandler onencrypted;
  12486. attribute EventHandler onwaitingforkey;
  12487. };
  12488. /**
  12489. * These attributes are general testing attributes and they should only be used
  12490. * in tests.
  12491. */
  12492. partial interface HTMLMediaElement {
  12493. [Pref="media.useAudioChannelService.testing"]
  12494. readonly attribute double computedVolume;
  12495. [Pref="media.useAudioChannelService.testing"]
  12496. readonly attribute boolean computedMuted;
  12497. // Return true if the media is suspended because its document is inactive or
  12498. // the docshell is inactive and explicitly being set to prohibit all media
  12499. // from playing.
  12500. [ChromeOnly]
  12501. readonly attribute boolean isSuspendedByInactiveDocOrDocShell;
  12502. };
  12503. /*
  12504. * HTMLMediaElement::seekToNextFrame() is a Mozilla experimental feature.
  12505. *
  12506. * The SeekToNextFrame() method provides a way to access a video element's video
  12507. * frames one by one without going through the realtime playback. So, it lets
  12508. * authors use "frame" as unit to access the video element's underlying data,
  12509. * instead of "time".
  12510. *
  12511. * The SeekToNextFrame() is a kind of seek operation, so normally, once it is
  12512. * invoked, a "seeking" event is dispatched. However, if the media source has no
  12513. * video data or is not seekable, the operation is ignored without filing the
  12514. * "seeking" event.
  12515. *
  12516. * Once the SeekToNextFrame() is done, a "seeked" event should always be filed
  12517. * and a "ended" event might also be filed depends on where the media element's
  12518. * position before seeking was. There are two cases:
  12519. * Assume the media source has n+1 video frames where n is a non-negative
  12520. * integers and the frame sequence is indexed from zero.
  12521. * (1) If the currentTime is at anywhere smaller than the n-th frame's beginning
  12522. * time, say the currentTime is now pointing to a position which is smaller
  12523. * than the x-th frame's beginning time and larger or equal to the (x-1)-th
  12524. * frame's beginning time, where x belongs to [1, n], then the
  12525. * SeekToNextFrame() operation seeks the media to the x-th frame, sets the
  12526. * media's currentTime to the x-th frame's beginning time and dispatches a
  12527. * "seeked" event.
  12528. * (2) Otherwise, if the currentTime is larger or equal to the n-th frame's
  12529. * beginning time, then the SeekToNextFrame() operation sets the media's
  12530. * currentTime to the duration of the media source and dispatches a "seeked"
  12531. * event and an "ended" event.
  12532. */
  12533. partial interface HTMLMediaElement {
  12534. [NewObject, Pref="media.seekToNextFrame.enabled"]
  12535. Promise<undefined> seekToNextFrame();
  12536. };
  12537. /* Internal testing only API */
  12538. partial interface HTMLMediaElement {
  12539. // These APIs are used to simulate visibility changes to help debug and write
  12540. // tests about suspend-video-decoding.
  12541. // - SetVisible() is for simulating visibility changes.
  12542. // - HasSuspendTaint() is for querying that the element's decoder cannot suspend
  12543. // video decoding because it has been tainted by an operation, such as
  12544. // drawImage().
  12545. // - isInViewPort is a boolean value which indicate whether media element is
  12546. // in view port.
  12547. // - isVideoDecodingSuspended() is used to know whether video decoding has
  12548. // suspended.
  12549. [Pref="media.test.video-suspend"]
  12550. undefined setVisible(boolean aVisible);
  12551. [Pref="media.test.video-suspend"]
  12552. boolean hasSuspendTaint();
  12553. [ChromeOnly]
  12554. readonly attribute boolean isInViewPort;
  12555. [ChromeOnly]
  12556. readonly attribute boolean isVideoDecodingSuspended;
  12557. [ChromeOnly]
  12558. readonly attribute double totalVideoPlayTime;
  12559. [ChromeOnly]
  12560. readonly attribute double totalVideoHDRPlayTime;
  12561. [ChromeOnly]
  12562. readonly attribute double visiblePlayTime;
  12563. [ChromeOnly]
  12564. readonly attribute double invisiblePlayTime;
  12565. [ChromeOnly]
  12566. readonly attribute double videoDecodeSuspendedTime;
  12567. [ChromeOnly]
  12568. readonly attribute double totalAudioPlayTime;
  12569. [ChromeOnly]
  12570. readonly attribute double audiblePlayTime;
  12571. [ChromeOnly]
  12572. readonly attribute double inaudiblePlayTime;
  12573. [ChromeOnly]
  12574. readonly attribute double mutedPlayTime;
  12575. // These APIs are used for decoder doctor tests.
  12576. [ChromeOnly]
  12577. undefined setFormatDiagnosticsReportForMimeType(DOMString mimeType, DecoderDoctorReportType error);
  12578. [Throws, ChromeOnly]
  12579. undefined setDecodeError(DOMString error);
  12580. [ChromeOnly]
  12581. undefined setAudioSinkFailedStartup();
  12582. };
  12583. /* Audio Output Devices API
  12584. * https://w3c.github.io/mediacapture-output/
  12585. */
  12586. partial interface HTMLMediaElement {
  12587. [SecureContext, Pref="media.setsinkid.enabled"]
  12588. readonly attribute DOMString sinkId;
  12589. [NewObject, SecureContext, Pref="media.setsinkid.enabled"]
  12590. Promise<undefined> setSinkId(DOMString sinkId);
  12591. };
  12592. /*
  12593. * API that exposes whether a call to HTMLMediaElement.play() would be
  12594. * blocked by autoplay policies; whether the promise returned by play()
  12595. * would be rejected with NotAllowedError.
  12596. */
  12597. partial interface HTMLMediaElement {
  12598. [Pref="media.allowed-to-play.enabled"]
  12599. readonly attribute boolean allowedToPlay;
  12600. };
  12601. /* ---------------------- HTMLMenuElement ----------------------------- */
  12602. /* ./webidl/HTMLMenuElement.webidl */
  12603. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12604. /* This Source Code Form is subject to the terms of the Mozilla Public
  12605. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12606. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12607. *
  12608. * The origin of this IDL file is
  12609. * https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element
  12610. * https://html.spec.whatwg.org/multipage/obsolete.html#HTMLMenuElement-partial
  12611. *
  12612. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12613. * Opera Software ASA. You are granted a license to use, reproduce
  12614. * and create derivative works of this document.
  12615. */
  12616. // https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element
  12617. [Exposed=Window]
  12618. interface HTMLMenuElement : HTMLElement {
  12619. [HTMLConstructor] constructor();
  12620. };
  12621. // https://html.spec.whatwg.org/multipage/obsolete.html#HTMLMenuElement-partial
  12622. partial interface HTMLMenuElement {
  12623. [CEReactions, SetterThrows]
  12624. attribute boolean compact;
  12625. };
  12626. /* ---------------------- HTMLMetaElement ----------------------------- */
  12627. /* ./webidl/HTMLMetaElement.webidl */
  12628. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12629. /* This Source Code Form is subject to the terms of the Mozilla Public
  12630. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12631. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12632. *
  12633. * The origin of this IDL file is
  12634. * http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
  12635. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12636. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12637. * Opera Software ASA. You are granted a license to use, reproduce
  12638. * and create derivative works of this document.
  12639. */
  12640. // https://html.spec.whatwg.org/#the-meta-element
  12641. [Exposed=Window]
  12642. interface HTMLMetaElement : HTMLElement {
  12643. [HTMLConstructor] constructor();
  12644. [CEReactions, SetterThrows, Pure]
  12645. attribute DOMString name;
  12646. [CEReactions, SetterThrows, Pure]
  12647. attribute DOMString httpEquiv;
  12648. [CEReactions, SetterThrows, Pure]
  12649. attribute DOMString content;
  12650. [CEReactions, SetterThrows, Pure]
  12651. attribute DOMString media;
  12652. };
  12653. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12654. partial interface HTMLMetaElement {
  12655. [CEReactions, SetterThrows, Pure]
  12656. attribute DOMString scheme;
  12657. };
  12658. /* ---------------------- HTMLMeterElement ----------------------------- */
  12659. /* ./webidl/HTMLMeterElement.webidl */
  12660. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12661. /* This Source Code Form is subject to the terms of the Mozilla Public
  12662. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12663. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12664. *
  12665. * The origin of this IDL file is
  12666. * http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
  12667. *
  12668. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12669. * Opera Software ASA. You are granted a license to use, reproduce
  12670. * and create derivative works of this document.
  12671. */
  12672. // http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
  12673. [Exposed=Window]
  12674. interface HTMLMeterElement : HTMLElement {
  12675. [HTMLConstructor] constructor();
  12676. [CEReactions, SetterThrows]
  12677. attribute double value;
  12678. [CEReactions, SetterThrows]
  12679. attribute double min;
  12680. [CEReactions, SetterThrows]
  12681. attribute double max;
  12682. [CEReactions, SetterThrows]
  12683. attribute double low;
  12684. [CEReactions, SetterThrows]
  12685. attribute double high;
  12686. [CEReactions, SetterThrows]
  12687. attribute double optimum;
  12688. readonly attribute NodeList labels;
  12689. };
  12690. /* ---------------------- HTMLModElement ----------------------------- */
  12691. /* ./webidl/HTMLModElement.webidl */
  12692. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12693. /* This Source Code Form is subject to the terms of the Mozilla Public
  12694. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12695. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12696. *
  12697. * The origin of this IDL file is
  12698. * http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
  12699. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12700. * Opera Software ASA. You are granted a license to use, reproduce
  12701. * and create derivative works of this document.
  12702. */
  12703. // http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
  12704. [Exposed=Window]
  12705. interface HTMLModElement : HTMLElement {
  12706. [HTMLConstructor] constructor();
  12707. [CEReactions, SetterThrows, Pure]
  12708. attribute DOMString cite;
  12709. [CEReactions, SetterThrows, Pure]
  12710. attribute DOMString dateTime;
  12711. };
  12712. /* ---------------------- HTMLObjectElement ----------------------------- */
  12713. /* ./webidl/HTMLObjectElement.webidl */
  12714. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12715. /* This Source Code Form is subject to the terms of the Mozilla Public
  12716. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12717. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12718. *
  12719. * The origin of this IDL file is
  12720. * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
  12721. * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
  12722. *
  12723. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12724. * Opera Software ASA. You are granted a license to use, reproduce
  12725. * and create derivative works of this document.
  12726. */
  12727. // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
  12728. [Exposed=Window]
  12729. interface HTMLObjectElement : HTMLElement {
  12730. [HTMLConstructor] constructor();
  12731. [CEReactions, Pure, SetterThrows]
  12732. attribute DOMString data;
  12733. [CEReactions, Pure, SetterThrows]
  12734. attribute DOMString type;
  12735. [CEReactions, Pure, SetterThrows]
  12736. attribute DOMString name;
  12737. [CEReactions, Pure, SetterThrows]
  12738. attribute DOMString useMap;
  12739. [Pure]
  12740. readonly attribute HTMLFormElement? form;
  12741. [CEReactions, Pure, SetterThrows]
  12742. attribute DOMString width;
  12743. [CEReactions, Pure, SetterThrows]
  12744. attribute DOMString height;
  12745. // Not pure: can trigger about:blank instantiation
  12746. [NeedsSubjectPrincipal]
  12747. readonly attribute Document? contentDocument;
  12748. // Not pure: can trigger about:blank instantiation
  12749. [NeedsSubjectPrincipal]
  12750. readonly attribute WindowProxy? contentWindow;
  12751. readonly attribute boolean willValidate;
  12752. readonly attribute ValidityState validity;
  12753. [Throws]
  12754. readonly attribute DOMString validationMessage;
  12755. boolean checkValidity();
  12756. boolean reportValidity();
  12757. undefined setCustomValidity(DOMString error);
  12758. };
  12759. // http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
  12760. partial interface HTMLObjectElement {
  12761. [CEReactions, Pure, SetterThrows]
  12762. attribute DOMString align;
  12763. [CEReactions, Pure, SetterThrows]
  12764. attribute DOMString archive;
  12765. [CEReactions, Pure, SetterThrows]
  12766. attribute DOMString code;
  12767. [CEReactions, Pure, SetterThrows]
  12768. attribute boolean declare;
  12769. [CEReactions, Pure, SetterThrows]
  12770. attribute unsigned long hspace;
  12771. [CEReactions, Pure, SetterThrows]
  12772. attribute DOMString standby;
  12773. [CEReactions, Pure, SetterThrows]
  12774. attribute unsigned long vspace;
  12775. [CEReactions, Pure, SetterThrows]
  12776. attribute DOMString codeBase;
  12777. [CEReactions, Pure, SetterThrows]
  12778. attribute DOMString codeType;
  12779. [CEReactions, Pure, SetterThrows]
  12780. attribute [LegacyNullToEmptyString] DOMString border;
  12781. };
  12782. partial interface HTMLObjectElement {
  12783. // GetSVGDocument
  12784. [NeedsSubjectPrincipal]
  12785. Document? getSVGDocument();
  12786. };
  12787. interface mixin MozObjectLoadingContent {
  12788. // Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please
  12789. // make sure to update this list if nsIObjectLoadingContent changes. Also,
  12790. // make sure everything on here is [ChromeOnly].
  12791. [ChromeOnly]
  12792. const unsigned long TYPE_LOADING = 0;
  12793. [ChromeOnly]
  12794. const unsigned long TYPE_DOCUMENT = 1;
  12795. [ChromeOnly]
  12796. const unsigned long TYPE_FALLBACK = 2;
  12797. /**
  12798. * The actual mime type (the one we got back from the network
  12799. * request) for the element.
  12800. */
  12801. [ChromeOnly]
  12802. readonly attribute DOMString actualType;
  12803. /**
  12804. * Gets the type of the content that's currently loaded. See
  12805. * the constants above for the list of possible values.
  12806. */
  12807. [ChromeOnly]
  12808. readonly attribute unsigned long displayedType;
  12809. /**
  12810. * The URL of the data/src loaded in the object. This may be null (i.e.
  12811. * an <embed> with no src).
  12812. */
  12813. [ChromeOnly]
  12814. readonly attribute URI? srcURI;
  12815. };
  12816. HTMLObjectElement includes MozFrameLoaderOwner;
  12817. HTMLObjectElement includes MozObjectLoadingContent;
  12818. /* ---------------------- HTMLOListElement ----------------------------- */
  12819. /* ./webidl/HTMLOListElement.webidl */
  12820. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12821. /* This Source Code Form is subject to the terms of the Mozilla Public
  12822. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12823. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12824. *
  12825. * The origin of this IDL file is
  12826. * http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
  12827. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12828. *
  12829. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12830. * Opera Software ASA. You are granted a license to use, reproduce
  12831. * and create derivative works of this document.
  12832. */
  12833. // http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
  12834. [Exposed=Window]
  12835. interface HTMLOListElement : HTMLElement {
  12836. [HTMLConstructor] constructor();
  12837. [CEReactions, SetterThrows]
  12838. attribute boolean reversed;
  12839. [CEReactions, SetterThrows]
  12840. attribute long start;
  12841. [CEReactions, SetterThrows]
  12842. attribute DOMString type;
  12843. };
  12844. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12845. partial interface HTMLOListElement {
  12846. [CEReactions, SetterThrows]
  12847. attribute boolean compact;
  12848. };
  12849. /* ---------------------- HTMLOptGroupElement ----------------------------- */
  12850. /* ./webidl/HTMLOptGroupElement.webidl */
  12851. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12852. /* This Source Code Form is subject to the terms of the Mozilla Public
  12853. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12854. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12855. *
  12856. * The origin of this IDL file is
  12857. * http://www.whatwg.org/specs/web-apps/current-work/#the-optgroup-element
  12858. *
  12859. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12860. * Opera Software ASA. You are granted a license to use, reproduce
  12861. * and create derivative works of this document.
  12862. */
  12863. [Exposed=Window]
  12864. interface HTMLOptGroupElement : HTMLElement {
  12865. [HTMLConstructor] constructor();
  12866. [CEReactions, SetterThrows]
  12867. attribute boolean disabled;
  12868. [CEReactions, SetterThrows]
  12869. attribute DOMString label;
  12870. };
  12871. /* ---------------------- HTMLOptionElement ----------------------------- */
  12872. /* ./webidl/HTMLOptionElement.webidl */
  12873. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12874. /* This Source Code Form is subject to the terms of the Mozilla Public
  12875. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12876. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12877. *
  12878. * The origin of this IDL file is
  12879. * http://www.whatwg.org/specs/web-apps/current-work/#the-option-element
  12880. *
  12881. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12882. * Opera Software ASA. You are granted a license to use, reproduce
  12883. * and create derivative works of this document.
  12884. */
  12885. [LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false),
  12886. Exposed=Window]
  12887. interface HTMLOptionElement : HTMLElement {
  12888. [HTMLConstructor] constructor();
  12889. [CEReactions, SetterThrows]
  12890. attribute boolean disabled;
  12891. readonly attribute HTMLFormElement? form;
  12892. [CEReactions, SetterThrows]
  12893. attribute DOMString label;
  12894. [CEReactions, SetterThrows]
  12895. attribute boolean defaultSelected;
  12896. attribute boolean selected;
  12897. [CEReactions, SetterThrows]
  12898. attribute DOMString value;
  12899. [CEReactions, SetterThrows]
  12900. attribute DOMString text;
  12901. readonly attribute long index;
  12902. };
  12903. /* ---------------------- HTMLOptionsCollection ----------------------------- */
  12904. /* ./webidl/HTMLOptionsCollection.webidl */
  12905. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12906. /* This Source Code Form is subject to the terms of the Mozilla Public
  12907. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12908. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12909. *
  12910. * The origin of this IDL file is
  12911. * http://www.w3.org/TR/2012/WD-html5-20120329/
  12912. *
  12913. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  12914. * liability, trademark and document use rules apply.
  12915. */
  12916. [Exposed=Window]
  12917. interface HTMLOptionsCollection : HTMLCollection {
  12918. [CEReactions, SetterThrows]
  12919. attribute unsigned long length;
  12920. [CEReactions, Throws]
  12921. setter undefined (unsigned long index, HTMLOptionElement? option);
  12922. [CEReactions, Throws]
  12923. undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
  12924. [CEReactions]
  12925. undefined remove(long index);
  12926. attribute long selectedIndex;
  12927. };
  12928. /* ---------------------- HTMLOutputElement ----------------------------- */
  12929. /* ./webidl/HTMLOutputElement.webidl */
  12930. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12931. /* This Source Code Form is subject to the terms of the Mozilla Public
  12932. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12933. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12934. *
  12935. * The origin of this IDL file is
  12936. * http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
  12937. *
  12938. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12939. * Opera Software ASA. You are granted a license to use, reproduce
  12940. * and create derivative works of this document.
  12941. */
  12942. // http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
  12943. [Exposed=Window]
  12944. interface HTMLOutputElement : HTMLElement {
  12945. [HTMLConstructor] constructor();
  12946. [PutForwards=value, Constant]
  12947. readonly attribute DOMTokenList htmlFor;
  12948. readonly attribute HTMLFormElement? form;
  12949. [CEReactions, SetterThrows, Pure]
  12950. attribute DOMString name;
  12951. [Constant]
  12952. readonly attribute DOMString type;
  12953. [CEReactions, SetterThrows, Pure]
  12954. attribute DOMString defaultValue;
  12955. [CEReactions, SetterThrows, Pure]
  12956. attribute DOMString value;
  12957. readonly attribute boolean willValidate;
  12958. readonly attribute ValidityState validity;
  12959. [Throws]
  12960. readonly attribute DOMString validationMessage;
  12961. boolean checkValidity();
  12962. boolean reportValidity();
  12963. undefined setCustomValidity(DOMString error);
  12964. readonly attribute NodeList labels;
  12965. };
  12966. /* ---------------------- HTMLParagraphElement ----------------------------- */
  12967. /* ./webidl/HTMLParagraphElement.webidl */
  12968. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12969. /* This Source Code Form is subject to the terms of the Mozilla Public
  12970. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12971. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12972. *
  12973. * The origin of this IDL file is
  12974. * http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
  12975. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12976. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  12977. * Opera Software ASA. You are granted a license to use, reproduce
  12978. * and create derivative works of this document.
  12979. */
  12980. // http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
  12981. [Exposed=Window]
  12982. interface HTMLParagraphElement : HTMLElement {
  12983. [HTMLConstructor] constructor();
  12984. };
  12985. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  12986. partial interface HTMLParagraphElement {
  12987. [CEReactions, SetterThrows]
  12988. attribute DOMString align;
  12989. };
  12990. /* ---------------------- HTMLParamElement ----------------------------- */
  12991. /* ./webidl/HTMLParamElement.webidl */
  12992. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  12993. /* This Source Code Form is subject to the terms of the Mozilla Public
  12994. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  12995. * You can obtain one at http://mozilla.org/MPL/2.0/.
  12996. *
  12997. * The origin of this IDL file is
  12998. * http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
  12999. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13000. *
  13001. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13002. * Opera Software ASA. You are granted a license to use, reproduce
  13003. * and create derivative works of this document.
  13004. */
  13005. // http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
  13006. [Exposed=Window]
  13007. interface HTMLParamElement : HTMLElement {
  13008. [HTMLConstructor] constructor();
  13009. [CEReactions, SetterThrows, Pure]
  13010. attribute DOMString name;
  13011. [CEReactions, SetterThrows, Pure]
  13012. attribute DOMString value;
  13013. };
  13014. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13015. partial interface HTMLParamElement {
  13016. [CEReactions, SetterThrows, Pure]
  13017. attribute DOMString type;
  13018. [CEReactions, SetterThrows, Pure]
  13019. attribute DOMString valueType;
  13020. };
  13021. /* ---------------------- HTMLPictureElement ----------------------------- */
  13022. /* ./webidl/HTMLPictureElement.webidl */
  13023. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13024. /* This Source Code Form is subject to the terms of the Mozilla Public
  13025. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13026. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13027. */
  13028. [Exposed=Window]
  13029. interface HTMLPictureElement : HTMLElement {
  13030. [HTMLConstructor] constructor();
  13031. };
  13032. /* ---------------------- HTMLPreElement ----------------------------- */
  13033. /* ./webidl/HTMLPreElement.webidl */
  13034. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13035. /* This Source Code Form is subject to the terms of the Mozilla Public
  13036. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13037. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13038. *
  13039. * The origin of this IDL file is
  13040. * http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
  13041. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13042. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13043. * Opera Software ASA. You are granted a license to use, reproduce
  13044. * and create derivative works of this document.
  13045. */
  13046. // http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
  13047. [Exposed=Window]
  13048. interface HTMLPreElement : HTMLElement {
  13049. [HTMLConstructor] constructor();
  13050. };
  13051. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13052. partial interface HTMLPreElement {
  13053. [CEReactions, SetterThrows]
  13054. attribute long width;
  13055. };
  13056. /* ---------------------- HTMLProgressElement ----------------------------- */
  13057. /* ./webidl/HTMLProgressElement.webidl */
  13058. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13059. /* This Source Code Form is subject to the terms of the Mozilla Public
  13060. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13061. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13062. *
  13063. * The origin of this IDL file is
  13064. * http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
  13065. *
  13066. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13067. * Opera Software ASA. You are granted a license to use, reproduce
  13068. * and create derivative works of this document.
  13069. */
  13070. [Exposed=Window]
  13071. interface HTMLProgressElement : HTMLElement {
  13072. [HTMLConstructor] constructor();
  13073. [CEReactions, SetterThrows]
  13074. attribute double value;
  13075. [CEReactions, SetterThrows]
  13076. attribute double max;
  13077. readonly attribute double position;
  13078. readonly attribute NodeList labels;
  13079. };
  13080. /* ---------------------- HTMLQuoteElement ----------------------------- */
  13081. /* ./webidl/HTMLQuoteElement.webidl */
  13082. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13083. /* This Source Code Form is subject to the terms of the Mozilla Public
  13084. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13085. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13086. *
  13087. * The origin of this IDL file is
  13088. * http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
  13089. *
  13090. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13091. * Opera Software ASA. You are granted a license to use, reproduce
  13092. * and create derivative works of this document.
  13093. */
  13094. // http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
  13095. [Exposed=Window]
  13096. interface HTMLQuoteElement : HTMLElement {
  13097. [HTMLConstructor] constructor();
  13098. [CEReactions, SetterThrows, Pure]
  13099. attribute DOMString cite;
  13100. };
  13101. /* ---------------------- HTMLScriptElement ----------------------------- */
  13102. /* ./webidl/HTMLScriptElement.webidl */
  13103. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13104. /* This Source Code Form is subject to the terms of the Mozilla Public
  13105. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13106. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13107. *
  13108. * The origin of this IDL file is
  13109. * http://www.whatwg.org/specs/web-apps/current-work/#the-script-element
  13110. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13111. */
  13112. [Exposed=Window]
  13113. interface HTMLScriptElement : HTMLElement {
  13114. [HTMLConstructor] constructor();
  13115. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  13116. attribute DOMString src;
  13117. [CEReactions, SetterThrows]
  13118. attribute DOMString type;
  13119. [CEReactions, SetterThrows]
  13120. attribute boolean noModule;
  13121. [CEReactions, SetterThrows]
  13122. attribute DOMString charset;
  13123. [CEReactions, SetterThrows]
  13124. attribute boolean async;
  13125. [CEReactions, SetterThrows]
  13126. attribute boolean defer;
  13127. [CEReactions, SetterThrows]
  13128. attribute DOMString? crossOrigin;
  13129. [CEReactions, SetterThrows]
  13130. attribute DOMString referrerPolicy;
  13131. [CEReactions, Throws]
  13132. attribute DOMString text;
  13133. [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
  13134. readonly attribute DOMTokenList blocking;
  13135. [Pref="network.fetchpriority.enabled", CEReactions]
  13136. attribute DOMString fetchPriority;
  13137. static boolean supports(DOMString type);
  13138. };
  13139. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13140. partial interface HTMLScriptElement {
  13141. [CEReactions, SetterThrows]
  13142. attribute DOMString event;
  13143. [CEReactions, SetterThrows]
  13144. attribute DOMString htmlFor;
  13145. };
  13146. // https://w3c.github.io/webappsec/specs/subresourceintegrity/#htmlscriptelement-1
  13147. partial interface HTMLScriptElement {
  13148. [CEReactions, SetterThrows]
  13149. attribute DOMString integrity;
  13150. };
  13151. /* ---------------------- HTMLSelectElement ----------------------------- */
  13152. /* ./webidl/HTMLSelectElement.webidl */
  13153. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13154. /* This Source Code Form is subject to the terms of the Mozilla Public
  13155. * License, v. 2.0. If a copy of the MPL was not distributed with this
  13156. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  13157. *
  13158. * The origin of this IDL file is
  13159. * http://www.whatwg.org/html/#the-select-element
  13160. */
  13161. [Exposed=Window]
  13162. interface HTMLSelectElement : HTMLElement {
  13163. [HTMLConstructor] constructor();
  13164. [CEReactions, SetterThrows, Pure]
  13165. attribute DOMString autocomplete;
  13166. [CEReactions, SetterThrows, Pure]
  13167. attribute boolean disabled;
  13168. [Pure]
  13169. readonly attribute HTMLFormElement? form;
  13170. [CEReactions, SetterThrows, Pure]
  13171. attribute boolean multiple;
  13172. [CEReactions, SetterThrows, Pure]
  13173. attribute DOMString name;
  13174. [CEReactions, SetterThrows, Pure]
  13175. attribute boolean required;
  13176. [CEReactions, SetterThrows, Pure]
  13177. attribute unsigned long size;
  13178. [Pure]
  13179. readonly attribute DOMString type;
  13180. [Constant]
  13181. readonly attribute HTMLOptionsCollection options;
  13182. [CEReactions, SetterThrows, Pure]
  13183. attribute unsigned long length;
  13184. getter Element? item(unsigned long index);
  13185. HTMLOptionElement? namedItem(DOMString name);
  13186. [CEReactions, Throws]
  13187. undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
  13188. [CEReactions]
  13189. undefined remove(long index);
  13190. [CEReactions, Throws]
  13191. setter undefined (unsigned long index, HTMLOptionElement? option);
  13192. readonly attribute HTMLCollection selectedOptions;
  13193. [Pure]
  13194. attribute long selectedIndex;
  13195. [Pure]
  13196. attribute DOMString value;
  13197. readonly attribute boolean willValidate;
  13198. readonly attribute ValidityState validity;
  13199. [Throws]
  13200. readonly attribute DOMString validationMessage;
  13201. boolean checkValidity();
  13202. boolean reportValidity();
  13203. undefined setCustomValidity(DOMString error);
  13204. [Throws, Pref="dom.select.showPicker.enabled"]
  13205. undefined showPicker();
  13206. readonly attribute NodeList labels;
  13207. // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
  13208. [CEReactions]
  13209. undefined remove();
  13210. };
  13211. // Chrome only interface
  13212. partial interface HTMLSelectElement {
  13213. [ChromeOnly]
  13214. undefined userFinishedInteracting(boolean changed);
  13215. [ChromeOnly, Pure]
  13216. readonly attribute boolean isCombobox;
  13217. [ChromeOnly]
  13218. attribute boolean openInParentProcess;
  13219. [ChromeOnly]
  13220. AutocompleteInfo getAutocompleteInfo();
  13221. [ChromeOnly]
  13222. attribute DOMString previewValue;
  13223. };
  13224. /* ---------------------- HTMLSlotElement ----------------------------- */
  13225. /* ./webidl/HTMLSlotElement.webidl */
  13226. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13227. /* This Source Code Form is subject to the terms of the Mozilla Public
  13228. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13229. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13230. *
  13231. * The origin of this IDL file is
  13232. * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
  13233. *
  13234. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13235. * Opera Software ASA. You are granted a license to use, reproduce
  13236. * and create derivative works of this document.
  13237. */
  13238. [Exposed=Window]
  13239. interface HTMLSlotElement : HTMLElement {
  13240. [HTMLConstructor] constructor();
  13241. [CEReactions, SetterThrows] attribute DOMString name;
  13242. sequence<Node> assignedNodes(optional AssignedNodesOptions options = {});
  13243. sequence<Element> assignedElements(optional AssignedNodesOptions options = {});
  13244. undefined assign((Element or Text)... nodes);
  13245. };
  13246. dictionary AssignedNodesOptions {
  13247. boolean flatten = false;
  13248. };
  13249. /* ---------------------- HTMLSourceElement ----------------------------- */
  13250. /* ./webidl/HTMLSourceElement.webidl */
  13251. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13252. /* This Source Code Form is subject to the terms of the Mozilla Public
  13253. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13254. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13255. *
  13256. * The origin of this IDL file is
  13257. * http://www.whatwg.org/specs/web-apps/current-work/#the-source-element
  13258. *
  13259. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13260. * Opera Software ASA. You are granted a license to use, reproduce
  13261. * and create derivative works of this document.
  13262. */
  13263. [Exposed=Window]
  13264. interface HTMLSourceElement : HTMLElement {
  13265. [HTMLConstructor] constructor();
  13266. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  13267. attribute DOMString src;
  13268. [CEReactions, SetterThrows]
  13269. attribute DOMString type;
  13270. };
  13271. partial interface HTMLSourceElement {
  13272. [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
  13273. attribute DOMString srcset;
  13274. [CEReactions, SetterThrows]
  13275. attribute DOMString sizes;
  13276. [CEReactions, SetterThrows]
  13277. attribute DOMString media;
  13278. [CEReactions, SetterThrows]
  13279. attribute unsigned long width;
  13280. [CEReactions, SetterThrows]
  13281. attribute unsigned long height;
  13282. };
  13283. /* ---------------------- HTMLSpanElement ----------------------------- */
  13284. /* ./webidl/HTMLSpanElement.webidl */
  13285. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13286. /* This Source Code Form is subject to the terms of the Mozilla Public
  13287. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13288. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13289. *
  13290. * The origin of this IDL file is
  13291. * http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
  13292. *
  13293. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13294. * Opera Software ASA. You are granted a license to use, reproduce
  13295. * and create derivative works of this document.
  13296. */
  13297. // http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
  13298. [Exposed=Window, ProbablyShortLivingWrapper]
  13299. interface HTMLSpanElement : HTMLElement {
  13300. [HTMLConstructor] constructor();
  13301. };
  13302. /* ---------------------- HTMLStyleElement ----------------------------- */
  13303. /* ./webidl/HTMLStyleElement.webidl */
  13304. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13305. /* This Source Code Form is subject to the terms of the Mozilla Public
  13306. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13307. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13308. *
  13309. * The origin of this IDL file is
  13310. * http://www.whatwg.org/specs/web-apps/current-work/#the-style-element
  13311. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13312. */
  13313. [Exposed=Window]
  13314. interface HTMLStyleElement : HTMLElement {
  13315. [HTMLConstructor] constructor();
  13316. [Pure]
  13317. attribute boolean disabled;
  13318. [CEReactions, SetterThrows, Pure]
  13319. attribute DOMString media;
  13320. [CEReactions, SetterThrows, Pure]
  13321. attribute DOMString type;
  13322. [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
  13323. readonly attribute DOMTokenList blocking;
  13324. };
  13325. HTMLStyleElement includes LinkStyle;
  13326. // Mozilla-specific additions to support devtools
  13327. partial interface HTMLStyleElement {
  13328. /**
  13329. * Mark this style element with a devtools-specific principal that
  13330. * skips Content Security Policy unsafe-inline checks. This triggering
  13331. * principal will be overwritten by any callers that set textContent
  13332. * or innerHTML on this element.
  13333. */
  13334. [ChromeOnly]
  13335. undefined setDevtoolsAsTriggeringPrincipal();
  13336. };
  13337. /* ---------------------- HTMLTableCaptionElement ----------------------------- */
  13338. /* ./webidl/HTMLTableCaptionElement.webidl */
  13339. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13340. /* This Source Code Form is subject to the terms of the Mozilla Public
  13341. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13342. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13343. *
  13344. * The origin of this IDL file is
  13345. * http://www.whatwg.org/specs/web-apps/current-work/
  13346. *
  13347. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13348. * Opera Software ASA. You are granted a license to use, reproduce
  13349. * and create derivative works of this document.
  13350. */
  13351. [Exposed=Window]
  13352. interface HTMLTableCaptionElement : HTMLElement {
  13353. [HTMLConstructor] constructor();
  13354. };
  13355. partial interface HTMLTableCaptionElement {
  13356. [CEReactions, SetterThrows]
  13357. attribute DOMString align;
  13358. };
  13359. /* ---------------------- HTMLTableCellElement ----------------------------- */
  13360. /* ./webidl/HTMLTableCellElement.webidl */
  13361. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13362. /* This Source Code Form is subject to the terms of the Mozilla Public
  13363. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13364. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13365. *
  13366. * The origin of this IDL file is
  13367. * http://www.whatwg.org/specs/web-apps/current-work/
  13368. *
  13369. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13370. * Opera Software ASA. You are granted a license to use, reproduce
  13371. * and create derivative works of this document.
  13372. */
  13373. [Exposed=Window]
  13374. interface HTMLTableCellElement : HTMLElement {
  13375. [HTMLConstructor] constructor();
  13376. [CEReactions, SetterThrows]
  13377. attribute unsigned long colSpan;
  13378. [CEReactions, SetterThrows]
  13379. attribute unsigned long rowSpan;
  13380. //[PutForwards=value] readonly attribute DOMTokenList headers;
  13381. [CEReactions, SetterThrows]
  13382. attribute DOMString headers;
  13383. readonly attribute long cellIndex;
  13384. // Mozilla-specific extensions
  13385. [CEReactions, SetterThrows]
  13386. attribute DOMString abbr;
  13387. [CEReactions, SetterThrows]
  13388. attribute DOMString scope;
  13389. };
  13390. partial interface HTMLTableCellElement {
  13391. [CEReactions, SetterThrows]
  13392. attribute DOMString align;
  13393. [CEReactions, SetterThrows]
  13394. attribute DOMString axis;
  13395. [CEReactions, SetterThrows]
  13396. attribute DOMString height;
  13397. [CEReactions, SetterThrows]
  13398. attribute DOMString width;
  13399. [CEReactions, SetterThrows]
  13400. attribute DOMString ch;
  13401. [CEReactions, SetterThrows]
  13402. attribute DOMString chOff;
  13403. [CEReactions, SetterThrows]
  13404. attribute boolean noWrap;
  13405. [CEReactions, SetterThrows]
  13406. attribute DOMString vAlign;
  13407. [CEReactions, SetterThrows]
  13408. attribute [LegacyNullToEmptyString] DOMString bgColor;
  13409. };
  13410. /* ---------------------- HTMLTableColElement ----------------------------- */
  13411. /* ./webidl/HTMLTableColElement.webidl */
  13412. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13413. /* This Source Code Form is subject to the terms of the Mozilla Public
  13414. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13415. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13416. *
  13417. * The origin of this IDL file is
  13418. * http://www.whatwg.org/specs/web-apps/current-work/
  13419. *
  13420. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13421. * Opera Software ASA. You are granted a license to use, reproduce
  13422. * and create derivative works of this document.
  13423. */
  13424. [Exposed=Window]
  13425. interface HTMLTableColElement : HTMLElement {
  13426. [HTMLConstructor] constructor();
  13427. [CEReactions, SetterThrows]
  13428. attribute unsigned long span;
  13429. };
  13430. partial interface HTMLTableColElement {
  13431. [CEReactions, SetterThrows]
  13432. attribute DOMString align;
  13433. [CEReactions, SetterThrows]
  13434. attribute DOMString ch;
  13435. [CEReactions, SetterThrows]
  13436. attribute DOMString chOff;
  13437. [CEReactions, SetterThrows]
  13438. attribute DOMString vAlign;
  13439. [CEReactions, SetterThrows]
  13440. attribute DOMString width;
  13441. };
  13442. /* ---------------------- HTMLTableElement ----------------------------- */
  13443. /* ./webidl/HTMLTableElement.webidl */
  13444. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13445. /* This Source Code Form is subject to the terms of the Mozilla Public
  13446. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13447. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13448. *
  13449. * The origin of this IDL file is
  13450. * http://www.whatwg.org/specs/web-apps/current-work/
  13451. *
  13452. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13453. * Opera Software ASA. You are granted a license to use, reproduce
  13454. * and create derivative works of this document.
  13455. */
  13456. [Exposed=Window]
  13457. interface HTMLTableElement : HTMLElement {
  13458. [HTMLConstructor] constructor();
  13459. [CEReactions, SetterThrows]
  13460. attribute HTMLTableCaptionElement? caption;
  13461. HTMLElement createCaption();
  13462. [CEReactions]
  13463. undefined deleteCaption();
  13464. [CEReactions, SetterThrows]
  13465. attribute HTMLTableSectionElement? tHead;
  13466. HTMLElement createTHead();
  13467. [CEReactions]
  13468. undefined deleteTHead();
  13469. [CEReactions, SetterThrows]
  13470. attribute HTMLTableSectionElement? tFoot;
  13471. HTMLElement createTFoot();
  13472. [CEReactions]
  13473. undefined deleteTFoot();
  13474. readonly attribute HTMLCollection tBodies;
  13475. HTMLElement createTBody();
  13476. readonly attribute HTMLCollection rows;
  13477. [Throws]
  13478. HTMLElement insertRow(optional long index = -1);
  13479. [CEReactions, Throws]
  13480. undefined deleteRow(long index);
  13481. // attribute boolean sortable;
  13482. //undefined stopSorting();
  13483. };
  13484. partial interface HTMLTableElement {
  13485. [CEReactions, SetterThrows]
  13486. attribute DOMString align;
  13487. [CEReactions, SetterThrows]
  13488. attribute DOMString border;
  13489. [CEReactions, SetterThrows]
  13490. attribute DOMString frame;
  13491. [CEReactions, SetterThrows]
  13492. attribute DOMString rules;
  13493. [CEReactions, SetterThrows]
  13494. attribute DOMString summary;
  13495. [CEReactions, SetterThrows]
  13496. attribute DOMString width;
  13497. [CEReactions, SetterThrows]
  13498. attribute [LegacyNullToEmptyString] DOMString bgColor;
  13499. [CEReactions, SetterThrows]
  13500. attribute [LegacyNullToEmptyString] DOMString cellPadding;
  13501. [CEReactions, SetterThrows]
  13502. attribute [LegacyNullToEmptyString] DOMString cellSpacing;
  13503. };
  13504. /* ---------------------- HTMLTableRowElement ----------------------------- */
  13505. /* ./webidl/HTMLTableRowElement.webidl */
  13506. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13507. /* This Source Code Form is subject to the terms of the Mozilla Public
  13508. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13509. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13510. *
  13511. * The origin of this IDL file is
  13512. * http://www.whatwg.org/specs/web-apps/current-work/
  13513. *
  13514. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13515. * Opera Software ASA. You are granted a license to use, reproduce
  13516. * and create derivative works of this document.
  13517. */
  13518. [Exposed=Window]
  13519. interface HTMLTableRowElement : HTMLElement {
  13520. [HTMLConstructor] constructor();
  13521. readonly attribute long rowIndex;
  13522. readonly attribute long sectionRowIndex;
  13523. readonly attribute HTMLCollection cells;
  13524. [Throws]
  13525. HTMLElement insertCell(optional long index = -1);
  13526. [CEReactions, Throws]
  13527. undefined deleteCell(long index);
  13528. };
  13529. partial interface HTMLTableRowElement {
  13530. [CEReactions, SetterThrows]
  13531. attribute DOMString align;
  13532. [CEReactions, SetterThrows]
  13533. attribute DOMString ch;
  13534. [CEReactions, SetterThrows]
  13535. attribute DOMString chOff;
  13536. [CEReactions, SetterThrows]
  13537. attribute DOMString vAlign;
  13538. [CEReactions, SetterThrows]
  13539. attribute [LegacyNullToEmptyString] DOMString bgColor;
  13540. };
  13541. /* ---------------------- HTMLTableSectionElement ----------------------------- */
  13542. /* ./webidl/HTMLTableSectionElement.webidl */
  13543. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13544. /* This Source Code Form is subject to the terms of the Mozilla Public
  13545. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13546. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13547. *
  13548. * The origin of this IDL file is
  13549. * http://www.whatwg.org/specs/web-apps/current-work/
  13550. *
  13551. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13552. * Opera Software ASA. You are granted a license to use, reproduce
  13553. * and create derivative works of this document.
  13554. */
  13555. [Exposed=Window]
  13556. interface HTMLTableSectionElement : HTMLElement {
  13557. [HTMLConstructor] constructor();
  13558. readonly attribute HTMLCollection rows;
  13559. [Throws]
  13560. HTMLElement insertRow(optional long index = -1);
  13561. [CEReactions, Throws]
  13562. undefined deleteRow(long index);
  13563. };
  13564. partial interface HTMLTableSectionElement {
  13565. [CEReactions, SetterThrows]
  13566. attribute DOMString align;
  13567. [CEReactions, SetterThrows]
  13568. attribute DOMString ch;
  13569. [CEReactions, SetterThrows]
  13570. attribute DOMString chOff;
  13571. [CEReactions, SetterThrows]
  13572. attribute DOMString vAlign;
  13573. };
  13574. /* ---------------------- HTMLTemplateElement ----------------------------- */
  13575. /* ./webidl/HTMLTemplateElement.webidl */
  13576. /* This Source Code Form is subject to the terms of the Mozilla Public
  13577. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13578. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13579. *
  13580. * The origin of this IDL file is
  13581. * https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
  13582. *
  13583. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  13584. * liability, trademark and document use rules apply.
  13585. */
  13586. [Exposed=Window]
  13587. interface HTMLTemplateElement : HTMLElement {
  13588. [HTMLConstructor] constructor();
  13589. readonly attribute DocumentFragment content;
  13590. [CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  13591. attribute DOMString shadowRootMode;
  13592. [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  13593. attribute boolean shadowRootDelegatesFocus;
  13594. [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  13595. attribute boolean shadowRootClonable;
  13596. };
  13597. /* ---------------------- HTMLTextAreaElement ----------------------------- */
  13598. /* ./webidl/HTMLTextAreaElement.webidl */
  13599. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13600. /* This Source Code Form is subject to the terms of the Mozilla Public
  13601. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13602. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13603. *
  13604. * The origin of this IDL file is
  13605. * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element
  13606. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13607. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13608. * Opera Software ASA. You are granted a license to use, reproduce
  13609. * and create derivative works of this document.
  13610. */
  13611. interface nsIEditor;
  13612. interface XULControllers;
  13613. [Exposed=Window]
  13614. interface HTMLTextAreaElement : HTMLElement {
  13615. [HTMLConstructor] constructor();
  13616. [CEReactions, SetterThrows, Pure]
  13617. attribute DOMString autocomplete;
  13618. [CEReactions, SetterThrows, Pure]
  13619. attribute unsigned long cols;
  13620. [CEReactions, Pure, SetterThrows]
  13621. attribute DOMString dirName;
  13622. [CEReactions, SetterThrows, Pure]
  13623. attribute boolean disabled;
  13624. [Pure]
  13625. readonly attribute HTMLFormElement? form;
  13626. // attribute DOMString inputMode;
  13627. [CEReactions, SetterThrows, Pure]
  13628. attribute long maxLength;
  13629. [CEReactions, SetterThrows, Pure]
  13630. attribute long minLength;
  13631. [CEReactions, SetterThrows, Pure]
  13632. attribute DOMString name;
  13633. [CEReactions, SetterThrows, Pure]
  13634. attribute DOMString placeholder;
  13635. [CEReactions, SetterThrows, Pure]
  13636. attribute boolean readOnly;
  13637. [CEReactions, SetterThrows, Pure]
  13638. attribute boolean required;
  13639. [CEReactions, SetterThrows, Pure]
  13640. attribute unsigned long rows;
  13641. [CEReactions, SetterThrows, Pure]
  13642. attribute DOMString wrap;
  13643. [Constant]
  13644. readonly attribute DOMString type;
  13645. [CEReactions, Throws, Pure]
  13646. attribute DOMString defaultValue;
  13647. [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString value;
  13648. [BinaryName="getTextLength"]
  13649. readonly attribute unsigned long textLength;
  13650. readonly attribute boolean willValidate;
  13651. readonly attribute ValidityState validity;
  13652. [Throws]
  13653. readonly attribute DOMString validationMessage;
  13654. boolean checkValidity();
  13655. boolean reportValidity();
  13656. undefined setCustomValidity(DOMString error);
  13657. readonly attribute NodeList labels;
  13658. undefined select();
  13659. [Throws]
  13660. attribute unsigned long? selectionStart;
  13661. [Throws]
  13662. attribute unsigned long? selectionEnd;
  13663. [Throws]
  13664. attribute DOMString? selectionDirection;
  13665. [Throws]
  13666. undefined setRangeText(DOMString replacement);
  13667. [Throws]
  13668. undefined setRangeText(DOMString replacement, unsigned long start,
  13669. unsigned long end, optional SelectionMode selectionMode = "preserve");
  13670. [Throws]
  13671. undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
  13672. };
  13673. partial interface HTMLTextAreaElement {
  13674. // Chrome-only Mozilla extensions
  13675. [Throws, ChromeOnly]
  13676. readonly attribute XULControllers controllers;
  13677. };
  13678. HTMLTextAreaElement includes MozEditableElement;
  13679. partial interface HTMLTextAreaElement {
  13680. [ChromeOnly]
  13681. attribute DOMString previewValue;
  13682. };
  13683. /* ---------------------- HTMLTimeElement ----------------------------- */
  13684. /* ./webidl/HTMLTimeElement.webidl */
  13685. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13686. /* This Source Code Form is subject to the terms of the Mozilla Public
  13687. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13688. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13689. *
  13690. * The origin of this IDL file is
  13691. * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
  13692. */
  13693. [Exposed=Window]
  13694. interface HTMLTimeElement : HTMLElement {
  13695. [HTMLConstructor] constructor();
  13696. [CEReactions, SetterThrows]
  13697. attribute DOMString dateTime;
  13698. };
  13699. /* ---------------------- HTMLTitleElement ----------------------------- */
  13700. /* ./webidl/HTMLTitleElement.webidl */
  13701. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13702. /* This Source Code Form is subject to the terms of the Mozilla Public
  13703. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13704. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13705. *
  13706. * The origin of this IDL file is
  13707. * http://www.whatwg.org/specs/web-apps/current-work/#the-title-element
  13708. */
  13709. [Exposed=Window]
  13710. interface HTMLTitleElement : HTMLElement {
  13711. [HTMLConstructor] constructor();
  13712. [CEReactions, Throws]
  13713. attribute DOMString text;
  13714. };
  13715. /* ---------------------- HTMLTrackElement ----------------------------- */
  13716. /* ./webidl/HTMLTrackElement.webidl */
  13717. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13718. /* This Source Code Form is subject to the terms of the Mozilla Public
  13719. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13720. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13721. *
  13722. * The origin of this IDL file is
  13723. * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
  13724. */
  13725. [Exposed=Window]
  13726. interface HTMLTrackElement : HTMLElement {
  13727. [HTMLConstructor] constructor();
  13728. [CEReactions, SetterThrows, Pure]
  13729. attribute DOMString kind;
  13730. [CEReactions, SetterThrows, Pure]
  13731. attribute DOMString src;
  13732. [CEReactions, SetterThrows, Pure]
  13733. attribute DOMString srclang;
  13734. [CEReactions, SetterThrows, Pure]
  13735. attribute DOMString label;
  13736. [CEReactions, SetterThrows, Pure]
  13737. attribute boolean default;
  13738. const unsigned short NONE = 0;
  13739. const unsigned short LOADING = 1;
  13740. const unsigned short LOADED = 2;
  13741. const unsigned short ERROR = 3;
  13742. [BinaryName="readyStateForBindings"]
  13743. readonly attribute unsigned short readyState;
  13744. readonly attribute TextTrack? track;
  13745. };
  13746. /* ---------------------- HTMLUListElement ----------------------------- */
  13747. /* ./webidl/HTMLUListElement.webidl */
  13748. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13749. /* This Source Code Form is subject to the terms of the Mozilla Public
  13750. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13751. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13752. *
  13753. * The origin of this IDL file is
  13754. * http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
  13755. * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13756. *
  13757. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13758. * Opera Software ASA. You are granted a license to use, reproduce
  13759. * and create derivative works of this document.
  13760. */
  13761. // http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
  13762. [Exposed=Window]
  13763. interface HTMLUListElement : HTMLElement {
  13764. [HTMLConstructor] constructor();
  13765. };
  13766. // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
  13767. partial interface HTMLUListElement {
  13768. [CEReactions, SetterThrows]
  13769. attribute boolean compact;
  13770. [CEReactions, SetterThrows]
  13771. attribute DOMString type;
  13772. };
  13773. /* ---------------------- HTMLVideoElement ----------------------------- */
  13774. /* ./webidl/HTMLVideoElement.webidl */
  13775. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13776. /* This Source Code Form is subject to the terms of the Mozilla Public
  13777. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13778. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13779. *
  13780. * The origin of this IDL file is
  13781. * http://www.whatwg.org/specs/web-apps/current-work/#the-video-element
  13782. *
  13783. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  13784. * Opera Software ASA. You are granted a license to use, reproduce
  13785. * and create derivative works of this document.
  13786. */
  13787. [Exposed=Window,
  13788. InstrumentedProps=(cancelVideoFrameCallback,
  13789. onenterpictureinpicture,
  13790. onleavepictureinpicture,
  13791. playsInline,
  13792. requestPictureInPicture,
  13793. requestVideoFrameCallback)]
  13794. interface HTMLVideoElement : HTMLMediaElement {
  13795. [HTMLConstructor] constructor();
  13796. [CEReactions, SetterThrows]
  13797. attribute unsigned long width;
  13798. [CEReactions, SetterThrows]
  13799. attribute unsigned long height;
  13800. readonly attribute unsigned long videoWidth;
  13801. readonly attribute unsigned long videoHeight;
  13802. [CEReactions, SetterThrows]
  13803. attribute DOMString poster;
  13804. };
  13805. partial interface HTMLVideoElement {
  13806. // A count of the number of video frames that have demuxed from the media
  13807. // resource. If we were playing perfectly, we'd be able to paint this many
  13808. // frames.
  13809. readonly attribute unsigned long mozParsedFrames;
  13810. // A count of the number of frames that have been decoded. We may drop
  13811. // frames if the decode is taking too much time.
  13812. readonly attribute unsigned long mozDecodedFrames;
  13813. // A count of the number of frames that have been presented to the rendering
  13814. // pipeline. We may drop frames if they arrive late at the renderer.
  13815. readonly attribute unsigned long mozPresentedFrames;
  13816. // Number of presented frames which were painted on screen.
  13817. readonly attribute unsigned long mozPaintedFrames;
  13818. // Time which the last painted video frame was late by, in seconds.
  13819. readonly attribute double mozFrameDelay;
  13820. // True if the video has an audio track available.
  13821. readonly attribute boolean mozHasAudio;
  13822. // Clones the frames playing in this <video> to the target. Cloning ends
  13823. // when either node is removed from their DOM trees. Throws if one or
  13824. // both <video> elements are not attached to a DOM tree.
  13825. // Returns a promise that resolves when the target's ImageContainer has been
  13826. // installed in this <video>'s MediaDecoder, or selected video
  13827. // MediaStreamTrack, whichever is available first. Note that it might never
  13828. // resolve.
  13829. [NewObject, Func="IsChromeOrUAWidget"]
  13830. Promise<undefined> cloneElementVisually(HTMLVideoElement target);
  13831. // Stops a <video> from cloning visually. Does nothing if the <video>
  13832. // wasn't cloning in the first place.
  13833. [Func="IsChromeOrUAWidget"]
  13834. undefined stopCloningElementVisually();
  13835. // Returns true if the <video> is being cloned visually to another
  13836. // <video> element (see cloneElementVisually).
  13837. [Func="IsChromeOrUAWidget"]
  13838. readonly attribute boolean isCloningElementVisually;
  13839. };
  13840. // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
  13841. partial interface HTMLVideoElement {
  13842. [Pref="media.mediasource.enabled", NewObject]
  13843. VideoPlaybackQuality getVideoPlaybackQuality();
  13844. };
  13845. // https://w3c.github.io/picture-in-picture/#htmlvideoelement-extensions
  13846. partial interface HTMLVideoElement {
  13847. [CEReactions, SetterThrows] attribute boolean disablePictureInPicture;
  13848. };
  13849. /* ---------------------- IDBCursor ----------------------------- */
  13850. /* ./webidl/IDBCursor.webidl */
  13851. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13852. /* This Source Code Form is subject to the terms of the Mozilla Public
  13853. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13854. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13855. *
  13856. * The origin of this IDL file is
  13857. * https://w3c.github.io/IndexedDB/#cursor-interface
  13858. */
  13859. enum IDBCursorDirection {
  13860. "next",
  13861. "nextunique",
  13862. "prev",
  13863. "prevunique"
  13864. };
  13865. [Exposed=(Window,Worker)]
  13866. interface IDBCursor {
  13867. readonly attribute (IDBObjectStore or IDBIndex) source;
  13868. [BinaryName="getDirection"]
  13869. readonly attribute IDBCursorDirection direction;
  13870. [Pure, Throws] readonly attribute any key;
  13871. [Pure, Throws] readonly attribute any primaryKey;
  13872. [SameObject] readonly attribute IDBRequest request;
  13873. [Throws]
  13874. undefined advance ([EnforceRange] unsigned long count);
  13875. [Throws]
  13876. undefined continue (optional any key);
  13877. [Throws]
  13878. undefined continuePrimaryKey(any key, any primaryKey);
  13879. [NewObject, Throws] IDBRequest update(any value);
  13880. [NewObject, Throws] IDBRequest delete();
  13881. };
  13882. [Exposed=(Window,Worker)]
  13883. interface IDBCursorWithValue : IDBCursor {
  13884. [Pure, Throws] readonly attribute any value;
  13885. };
  13886. /* ---------------------- IDBDatabase ----------------------------- */
  13887. /* ./webidl/IDBDatabase.webidl */
  13888. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13889. /* This Source Code Form is subject to the terms of the Mozilla Public
  13890. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13891. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13892. *
  13893. * The origin of this IDL file is
  13894. * https://w3c.github.io/IndexedDB/#database-interface
  13895. * https://w3c.github.io/IndexedDB/#enumdef-idbtransactiondurability
  13896. *
  13897. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  13898. * liability, trademark and document use rules apply.
  13899. */
  13900. enum IDBTransactionDurability { "default", "strict", "relaxed" };
  13901. dictionary IDBTransactionOptions {
  13902. IDBTransactionDurability durability = "default";
  13903. };
  13904. [Exposed=(Window,Worker)]
  13905. interface IDBDatabase : EventTarget {
  13906. [Constant] readonly attribute DOMString name;
  13907. readonly attribute unsigned long long version;
  13908. readonly attribute DOMStringList objectStoreNames;
  13909. [NewObject, Throws]
  13910. IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames,
  13911. optional IDBTransactionMode mode = "readonly",
  13912. optional IDBTransactionOptions options = {});
  13913. [NewObject, Throws]
  13914. IDBObjectStore createObjectStore(
  13915. DOMString name,
  13916. optional IDBObjectStoreParameters options = {});
  13917. [Throws]
  13918. undefined deleteObjectStore (DOMString name);
  13919. undefined close ();
  13920. attribute EventHandler onabort;
  13921. attribute EventHandler onclose;
  13922. attribute EventHandler onerror;
  13923. attribute EventHandler onversionchange;
  13924. };
  13925. /* ---------------------- IDBFactory ----------------------------- */
  13926. /* ./webidl/IDBFactory.webidl */
  13927. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13928. /* This Source Code Form is subject to the terms of the Mozilla Public
  13929. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13930. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13931. *
  13932. * The origin of this IDL file is
  13933. * https://w3c.github.io/IndexedDB/#factory-interface
  13934. *
  13935. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  13936. * liability, trademark and document use rules apply.
  13937. */
  13938. interface Principal;
  13939. dictionary IDBOpenDBOptions
  13940. {
  13941. [EnforceRange] unsigned long long version;
  13942. };
  13943. /**
  13944. * Interface that defines the indexedDB property on a window. See
  13945. * https://w3c.github.io/IndexedDB/#idbfactory
  13946. * for more information.
  13947. */
  13948. [Exposed=(Window,Worker)]
  13949. interface IDBFactory {
  13950. [NewObject, Throws, NeedsCallerType]
  13951. IDBOpenDBRequest
  13952. open(DOMString name,
  13953. [EnforceRange] unsigned long long version);
  13954. [NewObject, Throws, NeedsCallerType]
  13955. IDBOpenDBRequest
  13956. open(DOMString name,
  13957. optional IDBOpenDBOptions options = {});
  13958. [NewObject, Throws, NeedsCallerType]
  13959. IDBOpenDBRequest
  13960. deleteDatabase(DOMString name,
  13961. optional IDBOpenDBOptions options = {});
  13962. Promise<sequence<IDBDatabaseInfo>> databases();
  13963. [Throws]
  13964. short
  13965. cmp(any first,
  13966. any second);
  13967. [NewObject, Throws, ChromeOnly, NeedsCallerType]
  13968. IDBOpenDBRequest
  13969. openForPrincipal(Principal principal,
  13970. DOMString name,
  13971. [EnforceRange] unsigned long long version);
  13972. [NewObject, Throws, ChromeOnly, NeedsCallerType]
  13973. IDBOpenDBRequest
  13974. openForPrincipal(Principal principal,
  13975. DOMString name,
  13976. optional IDBOpenDBOptions options = {});
  13977. [NewObject, Throws, ChromeOnly, NeedsCallerType]
  13978. IDBOpenDBRequest
  13979. deleteForPrincipal(Principal principal,
  13980. DOMString name,
  13981. optional IDBOpenDBOptions options = {});
  13982. };
  13983. dictionary IDBDatabaseInfo {
  13984. DOMString name;
  13985. unsigned long long version;
  13986. };
  13987. /* ---------------------- IDBIndex ----------------------------- */
  13988. /* ./webidl/IDBIndex.webidl */
  13989. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  13990. /* This Source Code Form is subject to the terms of the Mozilla Public
  13991. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  13992. * You can obtain one at http://mozilla.org/MPL/2.0/.
  13993. *
  13994. * The origin of this IDL file is
  13995. * https://w3c.github.io/IndexedDB/#index-interface
  13996. */
  13997. dictionary IDBIndexParameters {
  13998. boolean unique = false;
  13999. boolean multiEntry = false;
  14000. // <null>: Not locale-aware, uses normal JS sorting.
  14001. // <string>: Always sorted based on the rules of the specified
  14002. // locale (e.g. "en-US", etc.).
  14003. // "auto": Sorted by the platform default, may change based on
  14004. // user agent options.
  14005. DOMString? locale = null;
  14006. };
  14007. [Exposed=(Window,Worker)]
  14008. interface IDBIndex {
  14009. [SetterThrows] attribute DOMString name;
  14010. [SameObject] readonly attribute IDBObjectStore objectStore;
  14011. [Throws]
  14012. readonly attribute any keyPath;
  14013. readonly attribute boolean multiEntry;
  14014. readonly attribute boolean unique;
  14015. // <null>: Not locale-aware, uses normal JS sorting.
  14016. // <string>: Sorted based on the rules of the specified locale.
  14017. // Note: never returns "auto", only the current locale.
  14018. [Pref="dom.indexedDB.experimental"]
  14019. readonly attribute DOMString? locale;
  14020. [Pref="dom.indexedDB.experimental"]
  14021. readonly attribute boolean isAutoLocale;
  14022. [NewObject, Throws] IDBRequest get(any query);
  14023. [NewObject, Throws] IDBRequest getKey(any query);
  14024. // If we decide to add use counters for the mozGetAll/mozGetAllKeys
  14025. // functions, we'll need to pull them out into sepatate operations
  14026. // with a BinaryName mapping to the same underlying implementation.
  14027. // See also bug 1577227.
  14028. [NewObject, Throws, Alias="mozGetAll"]
  14029. IDBRequest getAll(optional any query,
  14030. optional [EnforceRange] unsigned long count);
  14031. [NewObject, Throws, Alias="mozGetAllKeys"]
  14032. IDBRequest getAllKeys(optional any query,
  14033. optional [EnforceRange] unsigned long count);
  14034. [NewObject, Throws] IDBRequest count(optional any query);
  14035. [NewObject, Throws]
  14036. IDBRequest openCursor(optional any query,
  14037. optional IDBCursorDirection direction = "next");
  14038. [NewObject, Throws]
  14039. IDBRequest openKeyCursor(optional any query,
  14040. optional IDBCursorDirection direction = "next");
  14041. };
  14042. /* ---------------------- IDBKeyRange ----------------------------- */
  14043. /* ./webidl/IDBKeyRange.webidl */
  14044. /* This Source Code Form is subject to the terms of the Mozilla Public
  14045. * License, v. 2.0. If a copy of the MPL was not distributed with this
  14046. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  14047. /*
  14048. * The origin of this IDL file is
  14049. * https://w3c.github.io/IndexedDB/#keyrange
  14050. *
  14051. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  14052. * liability, trademark and document use rules apply.
  14053. */
  14054. [Exposed=(Window,Worker)]
  14055. interface IDBKeyRange {
  14056. [Throws]
  14057. readonly attribute any lower;
  14058. [Throws]
  14059. readonly attribute any upper;
  14060. [Constant]
  14061. readonly attribute boolean lowerOpen;
  14062. [Constant]
  14063. readonly attribute boolean upperOpen;
  14064. [Throws]
  14065. boolean _includes(any key);
  14066. [NewObject, Throws]
  14067. static IDBKeyRange only (any value);
  14068. [NewObject, Throws]
  14069. static IDBKeyRange lowerBound (any lower, optional boolean open = false);
  14070. [NewObject, Throws]
  14071. static IDBKeyRange upperBound (any upper, optional boolean open = false);
  14072. [NewObject, Throws]
  14073. static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
  14074. };
  14075. /* ---------------------- IDBObjectStore ----------------------------- */
  14076. /* ./webidl/IDBObjectStore.webidl */
  14077. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14078. /* This Source Code Form is subject to the terms of the Mozilla Public
  14079. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14080. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14081. *
  14082. * The origin of this IDL file is
  14083. * https://w3c.github.io/IndexedDB/#object-store-interface
  14084. */
  14085. dictionary IDBObjectStoreParameters {
  14086. (DOMString or sequence<DOMString>)? keyPath = null;
  14087. boolean autoIncrement = false;
  14088. };
  14089. [Exposed=(Window,Worker)]
  14090. interface IDBObjectStore {
  14091. [SetterThrows]
  14092. attribute DOMString name;
  14093. [Throws]
  14094. readonly attribute any keyPath;
  14095. readonly attribute DOMStringList indexNames;
  14096. [SameObject] readonly attribute IDBTransaction transaction;
  14097. readonly attribute boolean autoIncrement;
  14098. [NewObject, Throws]
  14099. IDBRequest put (any value, optional any key);
  14100. [NewObject, Throws]
  14101. IDBRequest add (any value, optional any key);
  14102. [NewObject, Throws]
  14103. IDBRequest delete (any key);
  14104. [NewObject, Throws]
  14105. IDBRequest clear ();
  14106. [NewObject, Throws]
  14107. IDBRequest get (any key);
  14108. [NewObject, Throws]
  14109. IDBRequest getKey (any key);
  14110. // Success fires IDBTransactionEvent, result == array of values for given keys
  14111. // If we decide to add use a counter for the mozGetAll function, we'll need
  14112. // to pull it out into a sepatate operation with a BinaryName mapping to the
  14113. // same underlying implementation.
  14114. [NewObject, Throws, Alias="mozGetAll"]
  14115. IDBRequest getAll(optional any query,
  14116. optional [EnforceRange] unsigned long count);
  14117. [NewObject, Throws]
  14118. IDBRequest getAllKeys(optional any query,
  14119. optional [EnforceRange] unsigned long count);
  14120. [NewObject, Throws]
  14121. IDBRequest count(optional any key);
  14122. [NewObject, Throws]
  14123. IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
  14124. [NewObject, Throws]
  14125. IDBRequest openKeyCursor(optional any query,
  14126. optional IDBCursorDirection direction = "next");
  14127. [NewObject, Throws]
  14128. IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters = {});
  14129. [Throws]
  14130. IDBIndex index (DOMString name);
  14131. [Throws]
  14132. undefined deleteIndex (DOMString indexName);
  14133. };
  14134. /* ---------------------- IDBOpenDBRequest ----------------------------- */
  14135. /* ./webidl/IDBOpenDBRequest.webidl */
  14136. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14137. /* This Source Code Form is subject to the terms of the Mozilla Public
  14138. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14139. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14140. *
  14141. * The origin of this IDL file is
  14142. * https://w3c.github.io/IndexedDB/#idbopendbrequest
  14143. */
  14144. [Exposed=(Window,Worker)]
  14145. interface IDBOpenDBRequest : IDBRequest {
  14146. attribute EventHandler onblocked;
  14147. attribute EventHandler onupgradeneeded;
  14148. };
  14149. /* ---------------------- IDBRequest ----------------------------- */
  14150. /* ./webidl/IDBRequest.webidl */
  14151. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14152. /* This Source Code Form is subject to the terms of the Mozilla Public
  14153. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14154. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14155. *
  14156. * The origin of this IDL file is
  14157. * https://w3c.github.io/IndexedDB/#idbrequest
  14158. * https://w3c.github.io/IndexedDB/#enumdef-idbrequestreadystate
  14159. */
  14160. enum IDBRequestReadyState {
  14161. "pending",
  14162. "done"
  14163. };
  14164. [Exposed=(Window,Worker)]
  14165. interface IDBRequest : EventTarget {
  14166. [Throws]
  14167. readonly attribute any result;
  14168. [Throws]
  14169. readonly attribute DOMException? error;
  14170. readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
  14171. readonly attribute IDBTransaction? transaction;
  14172. readonly attribute IDBRequestReadyState readyState;
  14173. attribute EventHandler onsuccess;
  14174. attribute EventHandler onerror;
  14175. };
  14176. /* ---------------------- IDBTransaction ----------------------------- */
  14177. /* ./webidl/IDBTransaction.webidl */
  14178. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14179. /* This Source Code Form is subject to the terms of the Mozilla Public
  14180. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14181. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14182. *
  14183. * The origin of this IDL file is
  14184. * https://w3c.github.io/IndexedDB/#idbtransaction
  14185. * https://w3c.github.io/IndexedDB/#enumdef-idbtransactionmode
  14186. */
  14187. enum IDBTransactionMode {
  14188. "readonly",
  14189. "readwrite",
  14190. // The "readwriteflush" mode is only available when the
  14191. // |dom.indexedDB.experimental| pref returns
  14192. // true. This mode is not yet part of the standard.
  14193. "readwriteflush",
  14194. "cleanup",
  14195. "versionchange"
  14196. };
  14197. [Exposed=(Window,Worker)]
  14198. interface IDBTransaction : EventTarget {
  14199. [Throws]
  14200. readonly attribute IDBTransactionMode mode;
  14201. [Throws]
  14202. readonly attribute IDBTransactionDurability durability;
  14203. [SameObject] readonly attribute IDBDatabase db;
  14204. readonly attribute DOMException? error;
  14205. [Throws]
  14206. IDBObjectStore objectStore (DOMString name);
  14207. [Throws]
  14208. undefined commit();
  14209. [Throws]
  14210. undefined abort();
  14211. attribute EventHandler onabort;
  14212. attribute EventHandler oncomplete;
  14213. attribute EventHandler onerror;
  14214. };
  14215. // This seems to be custom
  14216. partial interface IDBTransaction {
  14217. readonly attribute DOMStringList objectStoreNames;
  14218. };
  14219. /* ---------------------- IDBVersionChangeEvent ----------------------------- */
  14220. /* ./webidl/IDBVersionChangeEvent.webidl */
  14221. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14222. /* This Source Code Form is subject to the terms of the Mozilla Public
  14223. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14224. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14225. *
  14226. * The origin of this IDL file is
  14227. * https://w3c.github.io/IndexedDB/#idbversionchangeevent
  14228. *
  14229. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  14230. * liability, trademark and document use rules apply.
  14231. */
  14232. dictionary IDBVersionChangeEventInit : EventInit {
  14233. unsigned long long oldVersion = 0;
  14234. unsigned long long? newVersion = null;
  14235. };
  14236. [Exposed=(Window,Worker)]
  14237. interface IDBVersionChangeEvent : Event {
  14238. constructor(DOMString type,
  14239. optional IDBVersionChangeEventInit eventInitDict = {});
  14240. [Constant] readonly attribute unsigned long long oldVersion;
  14241. [Constant] readonly attribute unsigned long long? newVersion;
  14242. };
  14243. /* ---------------------- IdentityCredential ----------------------------- */
  14244. /* ./webidl/IdentityCredential.webidl */
  14245. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14246. /* This Source Code Form is subject to the terms of the Mozilla Public
  14247. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14248. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14249. *
  14250. * The origin of this IDL file is
  14251. * https://fedidcg.github.io/FedCM
  14252. */
  14253. [Exposed=Window, SecureContext,
  14254. Pref="dom.security.credentialmanagement.identity.enabled"]
  14255. interface IdentityCredential : Credential {
  14256. readonly attribute USVString? token;
  14257. [Throws]
  14258. static Promise<undefined> logoutRPs(sequence<IdentityCredentialLogoutRPsRequest> logoutRequests);
  14259. };
  14260. dictionary IdentityCredentialRequestOptions {
  14261. sequence<IdentityProviderConfig> providers;
  14262. };
  14263. [GenerateConversionToJS]
  14264. dictionary IdentityProviderConfig {
  14265. required UTF8String configURL;
  14266. required USVString clientId;
  14267. USVString nonce;
  14268. };
  14269. // https://fedidcg.github.io/FedCM/#dictdef-identityproviderwellknown
  14270. [GenerateInit]
  14271. dictionary IdentityProviderWellKnown {
  14272. required sequence<UTF8String> provider_urls;
  14273. };
  14274. // https://fedidcg.github.io/FedCM/#dictdef-identityprovidericon
  14275. dictionary IdentityProviderIcon {
  14276. required USVString url;
  14277. unsigned long size;
  14278. };
  14279. // https://fedidcg.github.io/FedCM/#dictdef-identityproviderbranding
  14280. dictionary IdentityProviderBranding {
  14281. USVString background_color;
  14282. USVString color;
  14283. sequence<IdentityProviderIcon> icons;
  14284. USVString name;
  14285. };
  14286. // https://fedidcg.github.io/FedCM/#dictdef-identityproviderapiconfig
  14287. [GenerateInit, GenerateConversionToJS]
  14288. dictionary IdentityProviderAPIConfig {
  14289. required UTF8String accounts_endpoint;
  14290. required UTF8String client_metadata_endpoint;
  14291. required UTF8String id_assertion_endpoint;
  14292. IdentityProviderBranding branding;
  14293. };
  14294. // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccount
  14295. dictionary IdentityProviderAccount {
  14296. required USVString id;
  14297. required USVString name;
  14298. required USVString email;
  14299. USVString given_name;
  14300. USVString picture;
  14301. sequence<USVString> approved_clients;
  14302. };
  14303. // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccountlist
  14304. [GenerateInit, GenerateConversionToJS]
  14305. dictionary IdentityProviderAccountList {
  14306. sequence<IdentityProviderAccount> accounts;
  14307. };
  14308. // https://fedidcg.github.io/FedCM/#dictdef-identityproviderclientmetadata
  14309. [GenerateInit, GenerateConversionToJS]
  14310. dictionary IdentityProviderClientMetadata {
  14311. USVString privacy_policy_url;
  14312. USVString terms_of_service_url;
  14313. };
  14314. // https://fedidcg.github.io/FedCM/#dictdef-identityprovidertoken
  14315. [GenerateInit]
  14316. dictionary IdentityProviderToken {
  14317. required USVString token;
  14318. };
  14319. // https://fedidcg.github.io/FedCM/#dictdef-identitycredentiallogoutrpsrequest
  14320. dictionary IdentityCredentialLogoutRPsRequest {
  14321. required UTF8String url;
  14322. required UTF8String accountId;
  14323. };
  14324. /* ---------------------- IdleDeadline ----------------------------- */
  14325. /* ./webidl/IdleDeadline.webidl */
  14326. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14327. /* This Source Code Form is subject to the terms of the Mozilla Public
  14328. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14329. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14330. *
  14331. * The origin of this IDL file is:
  14332. * https://w3c.github.io/requestidlecallback/
  14333. */
  14334. [Exposed=Window]
  14335. interface IdleDeadline {
  14336. DOMHighResTimeStamp timeRemaining();
  14337. readonly attribute boolean didTimeout;
  14338. };
  14339. /* ---------------------- IIRFilterNode ----------------------------- */
  14340. /* ./webidl/IIRFilterNode.webidl */
  14341. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14342. /* This Source Code Form is subject to the terms of the Mozilla Public
  14343. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14344. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14345. *
  14346. * The origin of this IDL file is https://www.w3.org/TR/webaudio
  14347. *
  14348. * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  14349. * liability, trademark and document use rules apply.
  14350. */
  14351. dictionary IIRFilterOptions : AudioNodeOptions {
  14352. required sequence<double> feedforward;
  14353. required sequence<double> feedback;
  14354. };
  14355. [Pref="dom.webaudio.enabled",
  14356. Exposed=Window]
  14357. interface IIRFilterNode : AudioNode {
  14358. [Throws]
  14359. constructor(BaseAudioContext context, IIRFilterOptions options);
  14360. undefined getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
  14361. };
  14362. // Mozilla extension
  14363. IIRFilterNode includes AudioNodePassThrough;
  14364. /* ---------------------- ImageBitmap ----------------------------- */
  14365. /* ./webidl/ImageBitmap.webidl */
  14366. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14367. /* This Source Code Form is subject to the terms of the Mozilla Public
  14368. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14369. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14370. *
  14371. * The origin of this IDL file is
  14372. * https://html.spec.whatwg.org/multipage/webappapis.html#images
  14373. *
  14374. * The origin of the extended IDL file is
  14375. * http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions
  14376. */
  14377. typedef (CanvasImageSource or
  14378. Blob or
  14379. CanvasRenderingContext2D or // This is out of spec.
  14380. ImageData) ImageBitmapSource;
  14381. [Exposed=(Window,Worker)]
  14382. interface ImageBitmap {
  14383. [Constant]
  14384. readonly attribute unsigned long width;
  14385. [Constant]
  14386. readonly attribute unsigned long height;
  14387. };
  14388. // It's crucial that there be a way to explicitly dispose of ImageBitmaps
  14389. // since they refer to potentially large graphics resources. Some uses
  14390. // of this API proposal will result in repeated allocations of ImageBitmaps,
  14391. // and garbage collection will not reliably reclaim them quickly enough.
  14392. // Here we reuse close(), which also exists on another Transferable type,
  14393. // MessagePort. Potentially, all Transferable types should inherit from a
  14394. // new interface type "Closeable".
  14395. partial interface ImageBitmap {
  14396. // Dispose of all graphical resources associated with this ImageBitmap.
  14397. undefined close();
  14398. };
  14399. // ImageBitmap-extensions
  14400. // Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
  14401. // underlying image data
  14402. /*
  14403. * An image or a video frame is conceptually a two-dimensional array of data and
  14404. * each element in the array is called a pixel. The pixels are usually stored in
  14405. * a one-dimensional array and could be arranged in a variety of image formats.
  14406. * Developers need to know how the pixels are formatted so that they are able to
  14407. * process them.
  14408. *
  14409. * The image format describes how pixels in an image are arranged. A single
  14410. * pixel has at least one, but usually multiple pixel values. The range of a
  14411. * pixel value varies, which means different image formats use different data
  14412. * types to store a single pixel value.
  14413. *
  14414. * The most frequently used data type is 8-bit unsigned integer whose range is
  14415. * from 0 to 255, others could be 16-bit integer or 32-bit floating points and
  14416. * so forth. The number of pixel values of a single pixel is called the number
  14417. * of channels of the image format. Multiple pixel values of a pixel are used
  14418. * together to describe the captured property which could be color or depth
  14419. * information. For example, if the data is a color image in RGB color space,
  14420. * then it is a three-channel image format and a pixel is described by R, G and
  14421. * B three pixel values with range from 0 to 255. As another example, if the
  14422. * data is a gray image, then it is a single-channel image format with 8-bit
  14423. * unsigned integer data type and the pixel value describes the gray scale. For
  14424. * depth data, it is a single channel image format too, but the data type is
  14425. * 16-bit unsigned integer and the pixel value is the depth level.
  14426. *
  14427. * For those image formats whose pixels contain multiple pixel values, the pixel
  14428. * values might be arranged in one of the following ways:
  14429. * 1) Planar pixel layout:
  14430. * each channel has its pixel values stored consecutively in separated
  14431. * buffers (a.k.a. planes) and then all channel buffers are stored
  14432. * consecutively in memory.
  14433. * (Ex: RRRRRR......GGGGGG......BBBBBB......)
  14434. * 2) Interleaving pixel layout:
  14435. * each pixel has its pixel values from all channels stored together and
  14436. * interleaves all channels.
  14437. * (Ex: RGBRGBRGBRGBRGB......)
  14438. */
  14439. /*
  14440. * The ImageBitmap extensions use this enumeration to negotiate the image format
  14441. * while 1) accessing the underlying data of an ImageBitmap and
  14442. * 2) creating a new ImageBitmap.
  14443. *
  14444. * For each format in this enumeration, we use a 2x2 small image (4 pixels) as
  14445. * example to illustrate the pixel layout.
  14446. *
  14447. * 2x2 image: +--------+--------+
  14448. * | pixel1 | pixel2 |
  14449. * +--------+--------+
  14450. * | pixel3 | pixel4 |
  14451. * +--------+--------+
  14452. *
  14453. */
  14454. enum ImageBitmapFormat {
  14455. /*
  14456. * Channel order: R, G, B, A
  14457. * Channel size: full rgba-chennels
  14458. * Pixel layout: interleaving rgba-channels
  14459. * Pixel layout illustration:
  14460. * [Plane1]: R1 G1 B1 A1 R2 G2 B2 A2 R3 G3 B3 A3 R4 G4 B4 A4
  14461. * Data type: 8-bit unsigned integer
  14462. */
  14463. "RGBA32",
  14464. /*
  14465. * Channel order: B, G, R, A
  14466. * Channel size: full bgra-channels
  14467. * Pixel layout: interleaving bgra-channels
  14468. * Pixel layout illustration:
  14469. * [Plane1]: B1 G1 R1 A1 B2 G2 R2 A2 B3 G3 R3 A3 B4 G4 R4 A4
  14470. * Data type: 8-bit unsigned integer
  14471. */
  14472. "BGRA32",
  14473. /*
  14474. * Channel order: R, G, B
  14475. * Channel size: full rgb-channels
  14476. * Pixel layout: interleaving rgb-channels
  14477. * Pixel layout illustration:
  14478. * [Plane1]: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4
  14479. * Data type: 8-bit unsigned integer
  14480. */
  14481. "RGB24",
  14482. /*
  14483. * Channel order: B, G, R
  14484. * Channel size: full bgr-channels
  14485. * Pixel layout: interleaving bgr-channels
  14486. * Pixel layout illustration:
  14487. * [Plane1]: B1 G1 R1 B2 G2 R2 B3 G3 R3 B4 G4 R4
  14488. * Data type: 8-bit unsigned integer
  14489. */
  14490. "BGR24",
  14491. /*
  14492. * Channel order: GRAY
  14493. * Channel size: full gray-channel
  14494. * Pixel layout: planar gray-channel
  14495. * Pixel layout illustration:
  14496. * [Plane1]: GRAY1 GRAY2 GRAY3 GRAY4
  14497. * Data type: 8-bit unsigned integer
  14498. */
  14499. "GRAY8",
  14500. /*
  14501. * Channel order: Y, U, V
  14502. * Channel size: full yuv-channels
  14503. * Pixel layout: planar yuv-channels
  14504. * Pixel layout illustration:
  14505. * [Plane1]: Y1 Y2 Y3 Y4
  14506. * [Plane2]: U1 U2 U3 U4
  14507. * [Plane3]: V1 V2 V3 V4
  14508. * Data type: 8-bit unsigned integer
  14509. */
  14510. "YUV444P",
  14511. /*
  14512. * Channel order: Y, U, V
  14513. * Channel size: full y-channel, half uv-channels
  14514. * Pixel layout: planar yuv-channels
  14515. * Pixel layout illustration:
  14516. * [Plane1]: Y1 Y2 Y3 Y4
  14517. * [Plane2]: U1 U3
  14518. * [Plane3]: V1 V3
  14519. * Data type: 8-bit unsigned integer
  14520. */
  14521. "YUV422P",
  14522. /*
  14523. * Channel order: Y, U, V
  14524. * Channel size: full y-channel, quarter uv-channels
  14525. * Pixel layout: planar yuv-channels
  14526. * Pixel layout illustration:
  14527. * [Plane1]: Y1 Y2 Y3 Y4
  14528. * [Plane2]: U1
  14529. * [Plane3]: V1
  14530. * Data type: 8-bit unsigned integer
  14531. */
  14532. "YUV420P",
  14533. /*
  14534. * Channel order: Y, U, V
  14535. * Channel size: full y-channel, quarter uv-channels
  14536. * Pixel layout: planar y-channel, interleaving uv-channels
  14537. * Pixel layout illustration:
  14538. * [Plane1]: Y1 Y2 Y3 Y4
  14539. * [Plane2]: U1 V1
  14540. * Data type: 8-bit unsigned integer
  14541. */
  14542. "YUV420SP_NV12",
  14543. /*
  14544. * Channel order: Y, V, U
  14545. * Channel size: full y-channel, quarter vu-channels
  14546. * Pixel layout: planar y-channel, interleaving vu-channels
  14547. * Pixel layout illustration:
  14548. * [Plane1]: Y1 Y2 Y3 Y4
  14549. * [Plane2]: V1 U1
  14550. * Data type: 8-bit unsigned integer
  14551. */
  14552. "YUV420SP_NV21",
  14553. /*
  14554. * Channel order: H, S, V
  14555. * Channel size: full hsv-channels
  14556. * Pixel layout: interleaving hsv-channels
  14557. * Pixel layout illustration:
  14558. * [Plane1]: H1 S1 V1 H2 S2 V2 H3 S3 V3
  14559. * Data type: 32-bit floating point value
  14560. */
  14561. "HSV",
  14562. /*
  14563. * Channel order: l, a, b
  14564. * Channel size: full lab-channels
  14565. * Pixel layout: interleaving lab-channels
  14566. * Pixel layout illustration:
  14567. * [Plane1]: l1 a1 b1 l2 a2 b2 l3 a3 b3
  14568. * Data type: 32-bit floating point value
  14569. */
  14570. "Lab",
  14571. /*
  14572. * Channel order: DEPTH
  14573. * Channel size: full depth-channel
  14574. * Pixel layout: planar depth-channel
  14575. * Pixel layout illustration:
  14576. * [Plane1]: DEPTH1 DEPTH2 DEPTH3 DEPTH4
  14577. * Data type: 16-bit unsigned integer
  14578. */
  14579. "DEPTH",
  14580. };
  14581. enum ChannelPixelLayoutDataType {
  14582. "uint8",
  14583. "int8",
  14584. "uint16",
  14585. "int16",
  14586. "uint32",
  14587. "int32",
  14588. "float32",
  14589. "float64"
  14590. };
  14591. /*
  14592. * Two concepts, ImagePixelLayout and ChannelPixelLayout, together generalize
  14593. * the variety of pixel layouts among image formats.
  14594. *
  14595. * The ChannelPixelLayout represents the pixel layout of a single channel in a
  14596. * certain image format and the ImagePixelLayout is just the collection of
  14597. * ChannelPixelLayouts. So, the ChannelPixelLayout is defined as a dictionary
  14598. * type with properties to describe the layout and the ImagePixelLayout is just
  14599. * an alias name to a sequence of ChannelPixelLayout objects.
  14600. *
  14601. * Since an image format is composed of at least one channel, an
  14602. * ImagePixelLayout object contains at least one ChannelPixelLayout object.
  14603. *
  14604. * Although an image or a video frame is a two-dimensional structure, its data
  14605. * is usually stored in a one-dimensional array in the row-major way and the
  14606. * ChannelPixelLayout objects use the following properties to describe the
  14607. * layout of pixel values in the buffer.
  14608. *
  14609. * 1) offset:
  14610. * denotes the beginning position of the channel's data relative to the
  14611. * beginning position of the one-dimensional array.
  14612. * 2) width & height:
  14613. * denote the width and height of the channel respectively. Each channel in
  14614. * an image format may have different height and width.
  14615. * 3) data type:
  14616. * denotes the format used to store one single pixel value.
  14617. * 4) stride:
  14618. * the number of bytes between the beginning two consecutive rows in memory.
  14619. * (The total bytes of each row plus the padding bytes of each raw.)
  14620. * 5) skip value:
  14621. * the value is zero for the planar pixel layout, and a positive integer for
  14622. * the interleaving pixel layout. (Describes how many bytes there are between
  14623. * two adjacent pixel values in this channel.)
  14624. */
  14625. /*
  14626. * Example1: RGBA image, width = 620, height = 480, stride = 2560
  14627. *
  14628. * chanel_r: offset = 0, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
  14629. * chanel_g: offset = 1, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
  14630. * chanel_b: offset = 2, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
  14631. * chanel_a: offset = 3, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
  14632. *
  14633. * <---------------------------- stride ---------------------------->
  14634. * <---------------------- width x 4 ---------------------->
  14635. * [index] 01234 8 12 16 20 24 28 2479 2559
  14636. * |||||---|---|---|---|---|---|----------------------------|-------|
  14637. * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
  14638. * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
  14639. * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
  14640. * ^^^
  14641. * r-skip
  14642. */
  14643. /*
  14644. * Example2: YUV420P image, width = 620, height = 480, stride = 640
  14645. *
  14646. * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
  14647. * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
  14648. * chanel_v: offset = 384000, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
  14649. *
  14650. * <--------------------------- y-stride --------------------------->
  14651. * <----------------------- y-width ----------------------->
  14652. * [index] 012345 619 639
  14653. * ||||||--------------------------------------------------|--------|
  14654. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14655. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14656. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14657. * [data] ......
  14658. * <-------- u-stride ---------->
  14659. * <----- u-width ----->
  14660. * [index] 307200 307509 307519
  14661. * |-------------------|--------|
  14662. * [data] UUUUUUUUUU... U%%%%%%%%%
  14663. * [data] UUUUUUUUUU... U%%%%%%%%%
  14664. * [data] UUUUUUUUUU... U%%%%%%%%%
  14665. * [data] ......
  14666. * <-------- v-stride ---------->
  14667. * <- --- v-width ----->
  14668. * [index] 384000 384309 384319
  14669. * |-------------------|--------|
  14670. * [data] VVVVVVVVVV... V%%%%%%%%%
  14671. * [data] VVVVVVVVVV... V%%%%%%%%%
  14672. * [data] VVVVVVVVVV... V%%%%%%%%%
  14673. * [data] ......
  14674. */
  14675. /*
  14676. * Example3: YUV420SP_NV12 image, width = 620, height = 480, stride = 640
  14677. *
  14678. * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
  14679. * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
  14680. * chanel_v: offset = 307201, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
  14681. *
  14682. * <--------------------------- y-stride -------------------------->
  14683. * <----------------------- y-width ---------------------->
  14684. * [index] 012345 619 639
  14685. * ||||||-------------------------------------------------|--------|
  14686. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14687. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14688. * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
  14689. * [data] ......
  14690. * <--------------------- u-stride / v-stride -------------------->
  14691. * <------------------ u-width + v-width ----------------->
  14692. * [index] 307200(u-offset) 307819 307839
  14693. * |------------------------------------------------------|-------|
  14694. * [index] |307201(v-offset) |307820 |
  14695. * ||-----------------------------------------------------||------|
  14696. * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
  14697. * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
  14698. * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
  14699. * ^ ^
  14700. * u-skip v-skip
  14701. */
  14702. /*
  14703. * Example4: DEPTH image, width = 640, height = 480, stride = 1280
  14704. *
  14705. * chanel_d: offset = 0, width = 640, height = 480, data type = uint16, stride = 1280, skip = 0
  14706. *
  14707. * note: each DEPTH value uses two bytes
  14708. *
  14709. * <----------------------- d-stride ---------------------->
  14710. * <----------------------- d-width ----------------------->
  14711. * [index] 02468 1278
  14712. * |||||---------------------------------------------------|
  14713. * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
  14714. * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
  14715. * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
  14716. * [data] ......
  14717. */
  14718. dictionary ChannelPixelLayout {
  14719. required unsigned long offset;
  14720. required unsigned long width;
  14721. required unsigned long height;
  14722. required ChannelPixelLayoutDataType dataType;
  14723. required unsigned long stride;
  14724. required unsigned long skip;
  14725. };
  14726. typedef sequence<ChannelPixelLayout> ImagePixelLayout;
  14727. enum ImageOrientation { "none", "flipY", "from-image" };
  14728. enum PremultiplyAlpha { "none", "premultiply", "default" };
  14729. enum ColorSpaceConversion { "none", "default" };
  14730. //enum ResizeQuality { "pixelated", "low", "medium", "high" };
  14731. dictionary ImageBitmapOptions {
  14732. ImageOrientation imageOrientation = "none";
  14733. PremultiplyAlpha premultiplyAlpha = "default";
  14734. // options to be added bugs: 1363861
  14735. ColorSpaceConversion colorSpaceConversion = "default";
  14736. [EnforceRange] unsigned long resizeWidth;
  14737. [EnforceRange] unsigned long resizeHeight;
  14738. //ResizeQuality resizeQuality = "low";
  14739. };
  14740. /* ---------------------- ImageBitmapRenderingContext ----------------------------- */
  14741. /* ./webidl/ImageBitmapRenderingContext.webidl */
  14742. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14743. /* This Source Code Form is subject to the terms of the Mozilla Public
  14744. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14745. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14746. *
  14747. * The origin of this IDL file is
  14748. * https://wiki.whatwg.org/wiki/OffscreenCanvas
  14749. *
  14750. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  14751. * Opera Software ASA. You are granted a license to use, reproduce
  14752. * and create derivative works of this document.
  14753. */
  14754. // The new ImageBitmapRenderingContext is a canvas rendering context
  14755. // which only provides the functionality to replace the canvas's
  14756. // contents with the given ImageBitmap. Its context id (the first argument
  14757. // to getContext) is "bitmaprenderer".
  14758. [Exposed=(Window,Worker)]
  14759. interface ImageBitmapRenderingContext {
  14760. readonly attribute CanvasSource? canvas;
  14761. // Displays the given ImageBitmap in the canvas associated with this
  14762. // rendering context. Ownership of the ImageBitmap is transferred to
  14763. // the canvas. The caller may not use its reference to the ImageBitmap
  14764. // after making this call. (This semantic is crucial to enable prompt
  14765. // reclamation of expensive graphics resources, rather than relying on
  14766. // garbage collection to do so.)
  14767. //
  14768. // The ImageBitmap conceptually replaces the canvas's bitmap, but
  14769. // it does not change the canvas's intrinsic width or height.
  14770. //
  14771. // The ImageBitmap, when displayed, is clipped to the rectangle
  14772. // defined by the canvas's instrinsic width and height. Pixels that
  14773. // would be covered by the canvas's bitmap which are not covered by
  14774. // the supplied ImageBitmap are rendered transparent black. Any CSS
  14775. // styles affecting the display of the canvas are applied as usual.
  14776. [Throws]
  14777. undefined transferFromImageBitmap(ImageBitmap? bitmap);
  14778. // Deprecated version of transferFromImageBitmap
  14779. [Deprecated="ImageBitmapRenderingContext_TransferImageBitmap", Throws]
  14780. undefined transferImageBitmap(ImageBitmap bitmap);
  14781. };
  14782. /* ---------------------- ImageCapture ----------------------------- */
  14783. /* ./webidl/ImageCapture.webidl */
  14784. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14785. /* This Source Code Form is subject to the terms of the Mozilla Public
  14786. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14787. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14788. *
  14789. * The origin of this IDL file is
  14790. * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
  14791. *
  14792. * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  14793. * W3C liability, trademark and document use rules apply.
  14794. */
  14795. [Pref="dom.imagecapture.enabled",
  14796. Exposed=Window]
  14797. interface ImageCapture : EventTarget {
  14798. [Throws]
  14799. constructor(MediaStreamTrack track);
  14800. // readonly attribute PhotoSettingsOptions photoSettingsOptions;
  14801. [BinaryName="GetVideoStreamTrack"]
  14802. readonly attribute MediaStreamTrack videoStreamTrack;
  14803. attribute EventHandler onphoto;
  14804. attribute EventHandler onerror;
  14805. // attribute EventHandler onphotosettingschange;
  14806. // attribute EventHandler onframegrab;
  14807. // [Throws]
  14808. // undefined setOptions (PhotoSettings? photoSettings);
  14809. [Throws]
  14810. undefined takePhoto();
  14811. // [Throws]
  14812. // undefined getFrame();
  14813. };
  14814. /* ---------------------- ImageCaptureErrorEvent ----------------------------- */
  14815. /* ./webidl/ImageCaptureErrorEvent.webidl */
  14816. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14817. /* This Source Code Form is subject to the terms of the Mozilla Public
  14818. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14819. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14820. *
  14821. * The origin of this IDL file is
  14822. * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
  14823. *
  14824. * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  14825. * W3C liability, trademark and document use rules apply.
  14826. */
  14827. [Pref="dom.imagecapture.enabled",
  14828. Exposed=Window]
  14829. interface ImageCaptureErrorEvent : Event {
  14830. constructor(DOMString type,
  14831. optional ImageCaptureErrorEventInit imageCaptureErrorInitDict = {});
  14832. readonly attribute ImageCaptureError? imageCaptureError;
  14833. };
  14834. dictionary ImageCaptureErrorEventInit : EventInit {
  14835. ImageCaptureError? imageCaptureError = null;
  14836. };
  14837. [LegacyNoInterfaceObject,
  14838. Exposed=Window]
  14839. interface ImageCaptureError {
  14840. const unsigned short FRAME_GRAB_ERROR = 1;
  14841. const unsigned short SETTINGS_ERROR = 2;
  14842. const unsigned short PHOTO_ERROR = 3;
  14843. const unsigned short ERROR_UNKNOWN = 4;
  14844. readonly attribute unsigned short code;
  14845. readonly attribute DOMString message;
  14846. };
  14847. /* ---------------------- ImageData ----------------------------- */
  14848. /* ./webidl/ImageData.webidl */
  14849. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14850. /* This Source Code Form is subject to the terms of the Mozilla Public
  14851. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14852. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14853. *
  14854. * The origin of this IDL file is
  14855. * http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#imagedata
  14856. *
  14857. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
  14858. * You are granted a license to use, reproduce and create derivative works of this document.
  14859. */
  14860. [Exposed=(Window,Worker),
  14861. Serializable,
  14862. InstrumentedProps=(colorSpace)]
  14863. interface ImageData {
  14864. [Throws]
  14865. constructor(unsigned long sw, unsigned long sh);
  14866. [Throws]
  14867. constructor(Uint8ClampedArray data, unsigned long sw,
  14868. optional unsigned long sh);
  14869. [Constant]
  14870. readonly attribute unsigned long width;
  14871. [Constant]
  14872. readonly attribute unsigned long height;
  14873. [Constant, StoreInSlot]
  14874. readonly attribute Uint8ClampedArray data;
  14875. };
  14876. /* ---------------------- ImageDocument ----------------------------- */
  14877. /* ./webidl/ImageDocument.webidl */
  14878. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14879. /* This Source Code Form is subject to the terms of the Mozilla Public
  14880. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14881. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14882. */
  14883. [ChromeOnly, LegacyOverrideBuiltIns,
  14884. Exposed=Window]
  14885. interface ImageDocument : HTMLDocument {
  14886. /* Whether the image is overflowing visible area. */
  14887. readonly attribute boolean imageIsOverflowing;
  14888. /* Whether the image has been resized to fit visible area. */
  14889. readonly attribute boolean imageIsResized;
  14890. /* Resize the image to fit visible area. */
  14891. undefined shrinkToFit();
  14892. /* Restore image original size. */
  14893. undefined restoreImage();
  14894. };
  14895. /* ---------------------- InputEvent ----------------------------- */
  14896. /* ./webidl/InputEvent.webidl */
  14897. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  14898. /* This Source Code Form is subject to the terms of the Mozilla Public
  14899. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14900. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14901. *
  14902. * The origin of this IDL file is
  14903. * https://w3c.github.io/input-events/#interface-InputEvent
  14904. */
  14905. [Exposed=Window]
  14906. interface InputEvent : UIEvent
  14907. {
  14908. constructor(DOMString type, optional InputEventInit eventInitDict = {});
  14909. readonly attribute boolean isComposing;
  14910. readonly attribute DOMString inputType;
  14911. [NeedsCallerType]
  14912. readonly attribute DOMString? data;
  14913. };
  14914. dictionary InputEventInit : UIEventInit
  14915. {
  14916. boolean isComposing = false;
  14917. DOMString inputType = "";
  14918. // NOTE: Currently, default value of `data` attribute is declared as empty
  14919. // string by UI Events. However, both Chrome and Safari uses `null`,
  14920. // and there is a spec issue about this:
  14921. // https://github.com/w3c/uievents/issues/139
  14922. // So, we take `null` for compatibility with them.
  14923. DOMString? data = null;
  14924. };
  14925. // https://w3c.github.io/input-events/#interface-InputEvent
  14926. // https://rawgit.com/w3c/input-events/v1/index.html#interface-InputEvent
  14927. partial interface InputEvent
  14928. {
  14929. [NeedsCallerType]
  14930. readonly attribute DataTransfer? dataTransfer;
  14931. // Enable `getTargetRanges()` only when `beforeinput` event is enabled
  14932. // because this may be used for feature detection of `beforeinput` event
  14933. // support (due to Chrome not supporting `onbeforeinput` attribute).
  14934. sequence<StaticRange> getTargetRanges();
  14935. };
  14936. partial dictionary InputEventInit
  14937. {
  14938. DataTransfer? dataTransfer = null;
  14939. sequence<StaticRange> targetRanges = [];
  14940. };
  14941. /* ---------------------- InstallTrigger ----------------------------- */
  14942. /* ./webidl/InstallTrigger.webidl */
  14943. /* This Source Code Form is subject to the terms of the Mozilla Public
  14944. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  14945. * You can obtain one at http://mozilla.org/MPL/2.0/.
  14946. */
  14947. /**
  14948. * A callback function that webpages can implement to be notified when triggered
  14949. * installs complete.
  14950. */
  14951. callback InstallTriggerCallback = undefined(DOMString url, short status);
  14952. dictionary InstallTriggerData {
  14953. DOMString URL;
  14954. DOMString? IconURL;
  14955. DOMString? Hash;
  14956. };
  14957. /**
  14958. * The interface for the InstallTrigger object available to all websites.
  14959. */
  14960. [ChromeOnly,
  14961. JSImplementation="@mozilla.org/addons/installtrigger;1",
  14962. Exposed=Window]
  14963. interface InstallTriggerImpl {
  14964. /**
  14965. * Retained for backwards compatibility.
  14966. */
  14967. const unsigned short SKIN = 1;
  14968. const unsigned short LOCALE = 2;
  14969. const unsigned short CONTENT = 4;
  14970. const unsigned short PACKAGE = 7;
  14971. /**
  14972. * Tests if installation is enabled.
  14973. */
  14974. boolean enabled();
  14975. /**
  14976. * Tests if installation is enabled.
  14977. *
  14978. * @deprecated Use "enabled" in the future.
  14979. */
  14980. boolean updateEnabled();
  14981. /**
  14982. * Starts a new installation of a set of add-ons.
  14983. *
  14984. * @param aArgs
  14985. * The add-ons to install. This should be a JS object, each property
  14986. * is the name of an add-on to be installed. The value of the
  14987. * property should either be a string URL, or an object with the
  14988. * following properties:
  14989. * * URL for the add-on's URL
  14990. * * IconURL for an icon for the add-on
  14991. * * Hash for a hash of the add-on
  14992. * @param aCallback
  14993. * A callback to call as each installation succeeds or fails
  14994. * @return true if the installations were successfully started
  14995. */
  14996. [Deprecated="InstallTriggerInstallDeprecated"]
  14997. boolean install(record<DOMString, (DOMString or InstallTriggerData)> installs,
  14998. optional InstallTriggerCallback callback);
  14999. /**
  15000. * Starts installing a new add-on.
  15001. *
  15002. * @deprecated use "install" in the future.
  15003. *
  15004. * @param aType
  15005. * Unused, retained for backwards compatibility
  15006. * @param aUrl
  15007. * The URL of the add-on
  15008. * @param aSkin
  15009. * Unused, retained for backwards compatibility
  15010. * @return true if the installation was successfully started
  15011. */
  15012. [Deprecated="InstallTriggerInstallDeprecated"]
  15013. boolean installChrome(unsigned short type, DOMString url, DOMString skin);
  15014. /**
  15015. * Starts installing a new add-on.
  15016. *
  15017. * @deprecated use "install" in the future.
  15018. *
  15019. * @param aUrl
  15020. * The URL of the add-on
  15021. * @param aFlags
  15022. * Unused, retained for backwards compatibility
  15023. * @return true if the installation was successfully started
  15024. */
  15025. [Deprecated="InstallTriggerInstallDeprecated"]
  15026. boolean startSoftwareUpdate(DOMString url, optional unsigned short flags);
  15027. };
  15028. /* ---------------------- IntersectionObserver ----------------------------- */
  15029. /* ./webidl/IntersectionObserver.webidl */
  15030. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15031. /* This Source Code Form is subject to the terms of the Mozilla Public
  15032. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15033. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15034. *
  15035. * The origin of this IDL file is
  15036. * https://w3c.github.io/IntersectionObserver/
  15037. */
  15038. [ProbablyShortLivingWrapper, Exposed=Window]
  15039. interface IntersectionObserverEntry {
  15040. [Constant]
  15041. readonly attribute DOMHighResTimeStamp time;
  15042. [Constant]
  15043. readonly attribute DOMRectReadOnly? rootBounds;
  15044. [Constant]
  15045. readonly attribute DOMRectReadOnly boundingClientRect;
  15046. [Constant]
  15047. readonly attribute DOMRectReadOnly intersectionRect;
  15048. [Constant]
  15049. readonly attribute boolean isIntersecting;
  15050. [Constant]
  15051. readonly attribute double intersectionRatio;
  15052. [Constant]
  15053. readonly attribute Element target;
  15054. };
  15055. [Exposed=Window]
  15056. interface IntersectionObserver {
  15057. [Throws]
  15058. constructor(IntersectionCallback intersectionCallback,
  15059. optional IntersectionObserverInit options = {});
  15060. [Constant]
  15061. readonly attribute Node? root;
  15062. [Constant]
  15063. readonly attribute UTF8String rootMargin;
  15064. [Constant,Cached]
  15065. readonly attribute sequence<double> thresholds;
  15066. undefined observe(Element target);
  15067. undefined unobserve(Element target);
  15068. undefined disconnect();
  15069. sequence<IntersectionObserverEntry> takeRecords();
  15070. };
  15071. callback IntersectionCallback =
  15072. undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
  15073. dictionary IntersectionObserverEntryInit {
  15074. required DOMHighResTimeStamp time;
  15075. required DOMRectInit rootBounds;
  15076. required DOMRectInit boundingClientRect;
  15077. required DOMRectInit intersectionRect;
  15078. required Element target;
  15079. };
  15080. dictionary IntersectionObserverInit {
  15081. (Element or Document)? root = null;
  15082. UTF8String rootMargin = "0px";
  15083. (double or sequence<double>) threshold = 0;
  15084. };
  15085. /* ---------------------- IntlUtils ----------------------------- */
  15086. /* ./webidl/IntlUtils.webidl */
  15087. /* This Source Code Form is subject to the terms of the Mozilla Public
  15088. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15089. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  15090. [GenerateConversionToJS]
  15091. dictionary DisplayNameOptions {
  15092. DOMString type;
  15093. DOMString style;
  15094. DOMString calendar;
  15095. sequence<DOMString> keys;
  15096. };
  15097. [GenerateInit]
  15098. dictionary DisplayNameResult {
  15099. DOMString locale;
  15100. DOMString type;
  15101. DOMString style;
  15102. DOMString calendar;
  15103. sequence<DOMString> values;
  15104. };
  15105. [GenerateInit]
  15106. dictionary LocaleInfo {
  15107. DOMString locale;
  15108. DOMString direction;
  15109. };
  15110. /**
  15111. * The IntlUtils interface provides helper functions for localization.
  15112. */
  15113. [LegacyNoInterfaceObject,
  15114. Exposed=Window]
  15115. interface IntlUtils {
  15116. /**
  15117. * Helper function to retrieve the localized values for a list of requested
  15118. * keys.
  15119. *
  15120. * The function takes two arguments - locales which is a list of locale
  15121. * strings and options which is an object with four optional properties:
  15122. *
  15123. * keys:
  15124. * an Array of string values to localize
  15125. *
  15126. * type:
  15127. * a String with a value "language", "region", "script", "currency",
  15128. * "weekday", "month", "quarter", "dayPeriod", or "dateTimeField"
  15129. *
  15130. * style:
  15131. * a String with a value "long", "abbreviated", "short", or "narrow"
  15132. *
  15133. * calendar:
  15134. * a String to select a specific calendar type, e.g. "gregory"
  15135. *
  15136. * It returns an object with properties:
  15137. *
  15138. * locale:
  15139. * a negotiated locale string
  15140. *
  15141. * type:
  15142. * negotiated type
  15143. *
  15144. * style:
  15145. * negotiated style
  15146. *
  15147. * calendar:
  15148. * negotiated calendar
  15149. *
  15150. * values:
  15151. * a list of translated values for the requested keys
  15152. *
  15153. */
  15154. [Throws]
  15155. DisplayNameResult getDisplayNames(sequence<DOMString> locales,
  15156. optional DisplayNameOptions options = {});
  15157. /**
  15158. * Helper function to determine if the current application locale is RTL.
  15159. *
  15160. * The result of this function can be overriden by this pref:
  15161. * - `intl.l10n.pseudo`
  15162. */
  15163. boolean isAppLocaleRTL();
  15164. };
  15165. /* ---------------------- InvokeEvent ----------------------------- */
  15166. /* ./webidl/InvokeEvent.webidl */
  15167. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15168. /* This Source Code Form is subject to the terms of the Mozilla Public
  15169. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15170. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15171. *
  15172. * The origin of this IDL file is
  15173. * https://github.com/whatwg/html/pull/9841
  15174. */
  15175. [Pref="dom.element.invokers.enabled",
  15176. Exposed=Window]
  15177. interface InvokeEvent : Event {
  15178. constructor(DOMString type, optional InvokeEventInit eventInitDict = {});
  15179. readonly attribute Element? invoker;
  15180. readonly attribute DOMString action;
  15181. };
  15182. dictionary InvokeEventInit : EventInit {
  15183. Element? invoker = null;
  15184. DOMString action = "auto";
  15185. };
  15186. /* ---------------------- InvokerElement ----------------------------- */
  15187. /* ./webidl/InvokerElement.webidl */
  15188. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15189. /* This Source Code Form is subject to the terms of the Mozilla Public
  15190. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15191. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15192. *
  15193. * The origin of this IDL file is
  15194. * https://github.com/whatwg/html/pull/9841
  15195. */
  15196. interface mixin InvokerElement {
  15197. [Pref="dom.element.invokers.enabled", CEReactions] attribute Element? invokeTargetElement;
  15198. [Pref="dom.element.invokers.enabled", CEReactions] attribute DOMString invokeAction;
  15199. };
  15200. /* ---------------------- IterableIterator ----------------------------- */
  15201. /* ./webidl/IterableIterator.webidl */
  15202. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15203. /* This Source Code Form is subject to the terms of the Mozilla Public
  15204. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15205. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15206. */
  15207. [GenerateConversionToJS]
  15208. dictionary IterableKeyOrValueResult {
  15209. any value;
  15210. boolean done = false;
  15211. };
  15212. [GenerateConversionToJS]
  15213. dictionary IterableKeyAndValueResult {
  15214. sequence<any> value = [];
  15215. boolean done = false;
  15216. };
  15217. /* ---------------------- KeyAlgorithm ----------------------------- */
  15218. /* ./webidl/KeyAlgorithm.webidl */
  15219. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15220. /* This Source Code Form is subject to the terms of the Mozilla Public
  15221. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15222. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15223. *
  15224. * The origin of this IDL file is
  15225. * http://www.w3.org/TR/WebCryptoAPI/
  15226. */
  15227. dictionary KeyAlgorithm {
  15228. required DOMString name;
  15229. };
  15230. [GenerateConversionToJS]
  15231. dictionary AesKeyAlgorithm : KeyAlgorithm {
  15232. required unsigned short length;
  15233. };
  15234. [GenerateConversionToJS]
  15235. dictionary EcKeyAlgorithm : KeyAlgorithm {
  15236. required DOMString namedCurve;
  15237. };
  15238. [GenerateConversionToJS]
  15239. dictionary HmacKeyAlgorithm : KeyAlgorithm {
  15240. required KeyAlgorithm hash;
  15241. required unsigned long length;
  15242. };
  15243. [GenerateConversionToJS]
  15244. dictionary RsaHashedKeyAlgorithm : KeyAlgorithm {
  15245. required unsigned short modulusLength;
  15246. required Uint8Array publicExponent;
  15247. required KeyAlgorithm hash;
  15248. };
  15249. [GenerateConversionToJS]
  15250. dictionary DhKeyAlgorithm : KeyAlgorithm {
  15251. required Uint8Array prime;
  15252. required Uint8Array generator;
  15253. };
  15254. /* ---------------------- KeyboardEvent ----------------------------- */
  15255. /* ./webidl/KeyboardEvent.webidl */
  15256. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15257. /* This Source Code Form is subject to the terms of the Mozilla Public
  15258. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15259. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15260. */
  15261. [Exposed=Window]
  15262. interface KeyboardEvent : UIEvent
  15263. {
  15264. [BinaryName="constructorJS"]
  15265. constructor(DOMString typeArg,
  15266. optional KeyboardEventInit keyboardEventInitDict= {});
  15267. [NeedsCallerType]
  15268. readonly attribute unsigned long charCode;
  15269. [NeedsCallerType]
  15270. readonly attribute unsigned long keyCode;
  15271. [NeedsCallerType]
  15272. readonly attribute boolean altKey;
  15273. [NeedsCallerType]
  15274. readonly attribute boolean ctrlKey;
  15275. [NeedsCallerType]
  15276. readonly attribute boolean shiftKey;
  15277. readonly attribute boolean metaKey;
  15278. [NeedsCallerType]
  15279. boolean getModifierState(DOMString key);
  15280. const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
  15281. const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
  15282. const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
  15283. const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
  15284. readonly attribute unsigned long location;
  15285. readonly attribute boolean repeat;
  15286. readonly attribute boolean isComposing;
  15287. readonly attribute DOMString key;
  15288. [NeedsCallerType]
  15289. readonly attribute DOMString code;
  15290. [BinaryName="initKeyboardEventJS"]
  15291. undefined initKeyboardEvent(DOMString typeArg,
  15292. optional boolean bubblesArg = false,
  15293. optional boolean cancelableArg = false,
  15294. optional Window? viewArg = null,
  15295. optional DOMString keyArg = "",
  15296. optional unsigned long locationArg = 0,
  15297. optional boolean ctrlKey = false,
  15298. optional boolean altKey = false,
  15299. optional boolean shiftKey = false,
  15300. optional boolean metaKey = false);
  15301. // This returns the initialized dictionary for generating a
  15302. // same-type keyboard event
  15303. [Cached, ChromeOnly, Constant]
  15304. readonly attribute KeyboardEventInit initDict;
  15305. };
  15306. dictionary KeyboardEventInit : EventModifierInit
  15307. {
  15308. [BinaryType="nsAutoString"]
  15309. DOMString key = "";
  15310. [BinaryType="nsAutoString"]
  15311. DOMString code = "";
  15312. unsigned long location = 0;
  15313. boolean repeat = false;
  15314. boolean isComposing = false;
  15315. // legacy attributes
  15316. unsigned long charCode = 0;
  15317. unsigned long keyCode = 0;
  15318. unsigned long which = 0;
  15319. };
  15320. // Mozilla extensions
  15321. KeyboardEvent includes KeyEventMixin;
  15322. /* ---------------------- KeyEvent ----------------------------- */
  15323. /* ./webidl/KeyEvent.webidl */
  15324. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15325. /* This Source Code Form is subject to the terms of the Mozilla Public
  15326. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15327. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15328. */
  15329. // http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-KeyEvent
  15330. [Exposed=Window]
  15331. interface KeyEvent
  15332. {
  15333. // It's all mixed in.
  15334. };
  15335. KeyEvent includes KeyEventMixin;
  15336. interface mixin KeyEventMixin {
  15337. const unsigned long DOM_VK_CANCEL = 0x03;
  15338. const unsigned long DOM_VK_HELP = 0x06;
  15339. const unsigned long DOM_VK_BACK_SPACE = 0x08;
  15340. const unsigned long DOM_VK_TAB = 0x09;
  15341. const unsigned long DOM_VK_CLEAR = 0x0C;
  15342. const unsigned long DOM_VK_RETURN = 0x0D;
  15343. // DOM_VK_ENTER has been never used for representing native key events.
  15344. // Therefore, it's removed for preventing developers being confused.
  15345. // const unsigned long DOM_VK_ENTER = 0x0E;
  15346. const unsigned long DOM_VK_SHIFT = 0x10;
  15347. const unsigned long DOM_VK_CONTROL = 0x11;
  15348. const unsigned long DOM_VK_ALT = 0x12;
  15349. const unsigned long DOM_VK_PAUSE = 0x13;
  15350. const unsigned long DOM_VK_CAPS_LOCK = 0x14;
  15351. const unsigned long DOM_VK_KANA = 0x15;
  15352. const unsigned long DOM_VK_HANGUL = 0x15;
  15353. const unsigned long DOM_VK_EISU = 0x16; // Japanese Mac keyboard only
  15354. const unsigned long DOM_VK_JUNJA = 0x17;
  15355. const unsigned long DOM_VK_FINAL = 0x18;
  15356. const unsigned long DOM_VK_HANJA = 0x19;
  15357. const unsigned long DOM_VK_KANJI = 0x19;
  15358. const unsigned long DOM_VK_ESCAPE = 0x1B;
  15359. const unsigned long DOM_VK_CONVERT = 0x1C;
  15360. const unsigned long DOM_VK_NONCONVERT = 0x1D;
  15361. const unsigned long DOM_VK_ACCEPT = 0x1E;
  15362. const unsigned long DOM_VK_MODECHANGE = 0x1F;
  15363. const unsigned long DOM_VK_SPACE = 0x20;
  15364. const unsigned long DOM_VK_PAGE_UP = 0x21;
  15365. const unsigned long DOM_VK_PAGE_DOWN = 0x22;
  15366. const unsigned long DOM_VK_END = 0x23;
  15367. const unsigned long DOM_VK_HOME = 0x24;
  15368. const unsigned long DOM_VK_LEFT = 0x25;
  15369. const unsigned long DOM_VK_UP = 0x26;
  15370. const unsigned long DOM_VK_RIGHT = 0x27;
  15371. const unsigned long DOM_VK_DOWN = 0x28;
  15372. const unsigned long DOM_VK_SELECT = 0x29;
  15373. const unsigned long DOM_VK_PRINT = 0x2A;
  15374. const unsigned long DOM_VK_EXECUTE = 0x2B;
  15375. const unsigned long DOM_VK_PRINTSCREEN = 0x2C;
  15376. const unsigned long DOM_VK_INSERT = 0x2D;
  15377. const unsigned long DOM_VK_DELETE = 0x2E;
  15378. // DOM_VK_0 - DOM_VK_9 match their ascii values
  15379. const unsigned long DOM_VK_0 = 0x30;
  15380. const unsigned long DOM_VK_1 = 0x31;
  15381. const unsigned long DOM_VK_2 = 0x32;
  15382. const unsigned long DOM_VK_3 = 0x33;
  15383. const unsigned long DOM_VK_4 = 0x34;
  15384. const unsigned long DOM_VK_5 = 0x35;
  15385. const unsigned long DOM_VK_6 = 0x36;
  15386. const unsigned long DOM_VK_7 = 0x37;
  15387. const unsigned long DOM_VK_8 = 0x38;
  15388. const unsigned long DOM_VK_9 = 0x39;
  15389. const unsigned long DOM_VK_COLON = 0x3A;
  15390. const unsigned long DOM_VK_SEMICOLON = 0x3B;
  15391. const unsigned long DOM_VK_LESS_THAN = 0x3C;
  15392. const unsigned long DOM_VK_EQUALS = 0x3D;
  15393. const unsigned long DOM_VK_GREATER_THAN = 0x3E;
  15394. const unsigned long DOM_VK_QUESTION_MARK = 0x3F;
  15395. const unsigned long DOM_VK_AT = 0x40;
  15396. // DOM_VK_A - DOM_VK_Z match their ascii values
  15397. const unsigned long DOM_VK_A = 0x41;
  15398. const unsigned long DOM_VK_B = 0x42;
  15399. const unsigned long DOM_VK_C = 0x43;
  15400. const unsigned long DOM_VK_D = 0x44;
  15401. const unsigned long DOM_VK_E = 0x45;
  15402. const unsigned long DOM_VK_F = 0x46;
  15403. const unsigned long DOM_VK_G = 0x47;
  15404. const unsigned long DOM_VK_H = 0x48;
  15405. const unsigned long DOM_VK_I = 0x49;
  15406. const unsigned long DOM_VK_J = 0x4A;
  15407. const unsigned long DOM_VK_K = 0x4B;
  15408. const unsigned long DOM_VK_L = 0x4C;
  15409. const unsigned long DOM_VK_M = 0x4D;
  15410. const unsigned long DOM_VK_N = 0x4E;
  15411. const unsigned long DOM_VK_O = 0x4F;
  15412. const unsigned long DOM_VK_P = 0x50;
  15413. const unsigned long DOM_VK_Q = 0x51;
  15414. const unsigned long DOM_VK_R = 0x52;
  15415. const unsigned long DOM_VK_S = 0x53;
  15416. const unsigned long DOM_VK_T = 0x54;
  15417. const unsigned long DOM_VK_U = 0x55;
  15418. const unsigned long DOM_VK_V = 0x56;
  15419. const unsigned long DOM_VK_W = 0x57;
  15420. const unsigned long DOM_VK_X = 0x58;
  15421. const unsigned long DOM_VK_Y = 0x59;
  15422. const unsigned long DOM_VK_Z = 0x5A;
  15423. const unsigned long DOM_VK_WIN = 0x5B;
  15424. const unsigned long DOM_VK_CONTEXT_MENU = 0x5D;
  15425. const unsigned long DOM_VK_SLEEP = 0x5F;
  15426. // Numpad keys
  15427. const unsigned long DOM_VK_NUMPAD0 = 0x60;
  15428. const unsigned long DOM_VK_NUMPAD1 = 0x61;
  15429. const unsigned long DOM_VK_NUMPAD2 = 0x62;
  15430. const unsigned long DOM_VK_NUMPAD3 = 0x63;
  15431. const unsigned long DOM_VK_NUMPAD4 = 0x64;
  15432. const unsigned long DOM_VK_NUMPAD5 = 0x65;
  15433. const unsigned long DOM_VK_NUMPAD6 = 0x66;
  15434. const unsigned long DOM_VK_NUMPAD7 = 0x67;
  15435. const unsigned long DOM_VK_NUMPAD8 = 0x68;
  15436. const unsigned long DOM_VK_NUMPAD9 = 0x69;
  15437. const unsigned long DOM_VK_MULTIPLY = 0x6A;
  15438. const unsigned long DOM_VK_ADD = 0x6B;
  15439. const unsigned long DOM_VK_SEPARATOR = 0x6C;
  15440. const unsigned long DOM_VK_SUBTRACT = 0x6D;
  15441. const unsigned long DOM_VK_DECIMAL = 0x6E;
  15442. const unsigned long DOM_VK_DIVIDE = 0x6F;
  15443. const unsigned long DOM_VK_F1 = 0x70;
  15444. const unsigned long DOM_VK_F2 = 0x71;
  15445. const unsigned long DOM_VK_F3 = 0x72;
  15446. const unsigned long DOM_VK_F4 = 0x73;
  15447. const unsigned long DOM_VK_F5 = 0x74;
  15448. const unsigned long DOM_VK_F6 = 0x75;
  15449. const unsigned long DOM_VK_F7 = 0x76;
  15450. const unsigned long DOM_VK_F8 = 0x77;
  15451. const unsigned long DOM_VK_F9 = 0x78;
  15452. const unsigned long DOM_VK_F10 = 0x79;
  15453. const unsigned long DOM_VK_F11 = 0x7A;
  15454. const unsigned long DOM_VK_F12 = 0x7B;
  15455. const unsigned long DOM_VK_F13 = 0x7C;
  15456. const unsigned long DOM_VK_F14 = 0x7D;
  15457. const unsigned long DOM_VK_F15 = 0x7E;
  15458. const unsigned long DOM_VK_F16 = 0x7F;
  15459. const unsigned long DOM_VK_F17 = 0x80;
  15460. const unsigned long DOM_VK_F18 = 0x81;
  15461. const unsigned long DOM_VK_F19 = 0x82;
  15462. const unsigned long DOM_VK_F20 = 0x83;
  15463. const unsigned long DOM_VK_F21 = 0x84;
  15464. const unsigned long DOM_VK_F22 = 0x85;
  15465. const unsigned long DOM_VK_F23 = 0x86;
  15466. const unsigned long DOM_VK_F24 = 0x87;
  15467. const unsigned long DOM_VK_NUM_LOCK = 0x90;
  15468. const unsigned long DOM_VK_SCROLL_LOCK = 0x91;
  15469. // OEM specific virtual keyCode of Windows should pass through DOM keyCode
  15470. // for compatibility with the other web browsers on Windows.
  15471. const unsigned long DOM_VK_WIN_OEM_FJ_JISHO = 0x92;
  15472. const unsigned long DOM_VK_WIN_OEM_FJ_MASSHOU = 0x93;
  15473. const unsigned long DOM_VK_WIN_OEM_FJ_TOUROKU = 0x94;
  15474. const unsigned long DOM_VK_WIN_OEM_FJ_LOYA = 0x95;
  15475. const unsigned long DOM_VK_WIN_OEM_FJ_ROYA = 0x96;
  15476. const unsigned long DOM_VK_CIRCUMFLEX = 0xA0;
  15477. const unsigned long DOM_VK_EXCLAMATION = 0xA1;
  15478. const unsigned long DOM_VK_DOUBLE_QUOTE = 0xA2;
  15479. const unsigned long DOM_VK_HASH = 0xA3;
  15480. const unsigned long DOM_VK_DOLLAR = 0xA4;
  15481. const unsigned long DOM_VK_PERCENT = 0xA5;
  15482. const unsigned long DOM_VK_AMPERSAND = 0xA6;
  15483. const unsigned long DOM_VK_UNDERSCORE = 0xA7;
  15484. const unsigned long DOM_VK_OPEN_PAREN = 0xA8;
  15485. const unsigned long DOM_VK_CLOSE_PAREN = 0xA9;
  15486. const unsigned long DOM_VK_ASTERISK = 0xAA;
  15487. const unsigned long DOM_VK_PLUS = 0xAB;
  15488. const unsigned long DOM_VK_PIPE = 0xAC;
  15489. const unsigned long DOM_VK_HYPHEN_MINUS = 0xAD;
  15490. const unsigned long DOM_VK_OPEN_CURLY_BRACKET = 0xAE;
  15491. const unsigned long DOM_VK_CLOSE_CURLY_BRACKET = 0xAF;
  15492. const unsigned long DOM_VK_TILDE = 0xB0;
  15493. const unsigned long DOM_VK_VOLUME_MUTE = 0xB5;
  15494. const unsigned long DOM_VK_VOLUME_DOWN = 0xB6;
  15495. const unsigned long DOM_VK_VOLUME_UP = 0xB7;
  15496. const unsigned long DOM_VK_COMMA = 0xBC;
  15497. const unsigned long DOM_VK_PERIOD = 0xBE;
  15498. const unsigned long DOM_VK_SLASH = 0xBF;
  15499. const unsigned long DOM_VK_BACK_QUOTE = 0xC0;
  15500. const unsigned long DOM_VK_OPEN_BRACKET = 0xDB; // square bracket
  15501. const unsigned long DOM_VK_BACK_SLASH = 0xDC;
  15502. const unsigned long DOM_VK_CLOSE_BRACKET = 0xDD; // square bracket
  15503. const unsigned long DOM_VK_QUOTE = 0xDE; // Apostrophe
  15504. const unsigned long DOM_VK_META = 0xE0;
  15505. const unsigned long DOM_VK_ALTGR = 0xE1;
  15506. // OEM specific virtual keyCode of Windows should pass through DOM keyCode
  15507. // for compatibility with the other web browsers on Windows.
  15508. const unsigned long DOM_VK_WIN_ICO_HELP = 0xE3;
  15509. const unsigned long DOM_VK_WIN_ICO_00 = 0xE4;
  15510. // IME processed key.
  15511. const unsigned long DOM_VK_PROCESSKEY = 0xE5;
  15512. // OEM specific virtual keyCode of Windows should pass through DOM keyCode
  15513. // for compatibility with the other web browsers on Windows.
  15514. const unsigned long DOM_VK_WIN_ICO_CLEAR = 0xE6;
  15515. const unsigned long DOM_VK_WIN_OEM_RESET = 0xE9;
  15516. const unsigned long DOM_VK_WIN_OEM_JUMP = 0xEA;
  15517. const unsigned long DOM_VK_WIN_OEM_PA1 = 0xEB;
  15518. const unsigned long DOM_VK_WIN_OEM_PA2 = 0xEC;
  15519. const unsigned long DOM_VK_WIN_OEM_PA3 = 0xED;
  15520. const unsigned long DOM_VK_WIN_OEM_WSCTRL = 0xEE;
  15521. const unsigned long DOM_VK_WIN_OEM_CUSEL = 0xEF;
  15522. const unsigned long DOM_VK_WIN_OEM_ATTN = 0xF0;
  15523. const unsigned long DOM_VK_WIN_OEM_FINISH = 0xF1;
  15524. const unsigned long DOM_VK_WIN_OEM_COPY = 0xF2;
  15525. const unsigned long DOM_VK_WIN_OEM_AUTO = 0xF3;
  15526. const unsigned long DOM_VK_WIN_OEM_ENLW = 0xF4;
  15527. const unsigned long DOM_VK_WIN_OEM_BACKTAB = 0xF5;
  15528. // Following keys are not used on most keyboards. However, for compatibility
  15529. // with other browsers on Windows, we should define them.
  15530. const unsigned long DOM_VK_ATTN = 0xF6;
  15531. const unsigned long DOM_VK_CRSEL = 0xF7;
  15532. const unsigned long DOM_VK_EXSEL = 0xF8;
  15533. const unsigned long DOM_VK_EREOF = 0xF9;
  15534. const unsigned long DOM_VK_PLAY = 0xFA;
  15535. const unsigned long DOM_VK_ZOOM = 0xFB;
  15536. const unsigned long DOM_VK_PA1 = 0xFD;
  15537. // OEM specific virtual keyCode of Windows should pass through DOM keyCode
  15538. // for compatibility with the other web browsers on Windows.
  15539. const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
  15540. [BinaryName="initKeyEventJS", Func="KeyboardEvent::IsInitKeyEventAvailable"]
  15541. undefined initKeyEvent(DOMString type,
  15542. optional boolean canBubble = false,
  15543. optional boolean cancelable = false,
  15544. optional Window? view = null,
  15545. optional boolean ctrlKey = false,
  15546. optional boolean altKey = false,
  15547. optional boolean shiftKey = false,
  15548. optional boolean metaKey = false,
  15549. optional unsigned long keyCode = 0,
  15550. optional unsigned long charCode = 0);
  15551. };
  15552. /* ---------------------- KeyframeAnimationOptions ----------------------------- */
  15553. /* ./webidl/KeyframeAnimationOptions.webidl */
  15554. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15555. /* This Source Code Form is subject to the terms of the Mozilla Public
  15556. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15557. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15558. *
  15559. * The origin of this IDL file is
  15560. * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
  15561. *
  15562. * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  15563. * liability, trademark and document use rules apply.
  15564. */
  15565. // This typedef is off in its own file, because of bug 995352.
  15566. typedef (unrestricted double or KeyframeAnimationOptions) UnrestrictedDoubleOrKeyframeAnimationOptions;
  15567. /* ---------------------- KeyframeEffect ----------------------------- */
  15568. /* ./webidl/KeyframeEffect.webidl */
  15569. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15570. /* This Source Code Form is subject to the terms of the Mozilla Public
  15571. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15572. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15573. *
  15574. * The origin of this IDL file is
  15575. * https://drafts.csswg.org/web-animations/#the-keyframeeffect-interfaces
  15576. *
  15577. * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  15578. * liability, trademark and document use rules apply.
  15579. */
  15580. enum IterationCompositeOperation {
  15581. "replace",
  15582. "accumulate"
  15583. };
  15584. dictionary KeyframeEffectOptions : EffectTiming {
  15585. [Pref="dom.animations-api.compositing.enabled"]
  15586. IterationCompositeOperation iterationComposite = "replace";
  15587. [Pref="dom.animations-api.compositing.enabled"]
  15588. CompositeOperation composite = "replace";
  15589. DOMString? pseudoElement = null;
  15590. };
  15591. // KeyframeEffect should run in the caller's compartment to do custom
  15592. // processing on the `keyframes` object.
  15593. [RunConstructorInCallerCompartment, Exposed=Window]
  15594. interface KeyframeEffect : AnimationEffect {
  15595. [Throws]
  15596. constructor(Element? target,
  15597. object? keyframes,
  15598. optional (unrestricted double or KeyframeEffectOptions) options = {});
  15599. [Throws]
  15600. constructor(KeyframeEffect source);
  15601. attribute Element? target;
  15602. [SetterThrows] attribute DOMString? pseudoElement;
  15603. [Pref="dom.animations-api.compositing.enabled"]
  15604. attribute IterationCompositeOperation iterationComposite;
  15605. [Pref="dom.animations-api.compositing.enabled"]
  15606. attribute CompositeOperation composite;
  15607. [Throws] sequence<object> getKeyframes();
  15608. [Throws] undefined setKeyframes(object? keyframes);
  15609. };
  15610. // Non-standard extensions
  15611. dictionary AnimationPropertyValueDetails {
  15612. required double offset;
  15613. UTF8String value;
  15614. UTF8String easing;
  15615. required CompositeOperation composite;
  15616. };
  15617. dictionary AnimationPropertyDetails {
  15618. required DOMString property;
  15619. required boolean runningOnCompositor;
  15620. DOMString warning;
  15621. required sequence<AnimationPropertyValueDetails> values;
  15622. };
  15623. partial interface KeyframeEffect {
  15624. [ChromeOnly, Throws] sequence<AnimationPropertyDetails> getProperties();
  15625. };
  15626. /* ---------------------- KeyIdsInitData ----------------------------- */
  15627. /* ./webidl/KeyIdsInitData.webidl */
  15628. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15629. /* This Source Code Form is subject to the terms of the Mozilla Public
  15630. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15631. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15632. */
  15633. // "KeyIds" EME init data format definition/parser, as defined by
  15634. // https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html
  15635. [GenerateInitFromJSON]
  15636. dictionary KeyIdsInitData {
  15637. required sequence<DOMString> kids;
  15638. };
  15639. /* ---------------------- LinkStyle ----------------------------- */
  15640. /* ./webidl/LinkStyle.webidl */
  15641. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15642. /* This Source Code Form is subject to the terms of the Mozilla Public
  15643. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15644. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15645. *
  15646. * The origin of this IDL file is
  15647. * http://dev.w3.org/csswg/cssom/#the-linkstyle-interface
  15648. */
  15649. interface mixin LinkStyle {
  15650. [BinaryName="sheetForBindings"] readonly attribute StyleSheet? sheet;
  15651. };
  15652. /* ---------------------- Localization ----------------------------- */
  15653. /* ./webidl/Localization.webidl */
  15654. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15655. /* This Source Code Form is subject to the terms of the Mozilla Public
  15656. * License, v. 2.0. If a copy of the MPL was not distributed with this
  15657. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  15658. /**
  15659. * L10nIdArgs is an object used to carry localization tuple for message
  15660. * translation.
  15661. *
  15662. * Fields:
  15663. * id - identifier of a message.
  15664. * args - an optional record of arguments used to format the message.
  15665. * The argument will be converted to/from JSON, and the API
  15666. * will only handle strings and numbers.
  15667. */
  15668. dictionary L10nIdArgs {
  15669. UTF8String? id = null;
  15670. L10nArgs? args = null;
  15671. };
  15672. /**
  15673. * When no arguments are required to format a message a simple string can be
  15674. * used instead.
  15675. */
  15676. typedef (UTF8String or L10nIdArgs) L10nKey;
  15677. /**
  15678. * L10nMessage is a compound translation unit from Fluent which
  15679. * encodes the value and (optionally) a list of attributes used
  15680. * to translate a given widget.
  15681. *
  15682. * Most simple imperative translations will only use the `value`,
  15683. * but when building a Message for a UI widget, a combination
  15684. * of a value and attributes will be used.
  15685. */
  15686. dictionary AttributeNameValue {
  15687. required UTF8String name;
  15688. required UTF8String value;
  15689. };
  15690. dictionary L10nMessage {
  15691. UTF8String? value = null;
  15692. sequence<AttributeNameValue>? attributes = null;
  15693. };
  15694. /**
  15695. * Localization is an implementation of the Fluent Localization API.
  15696. *
  15697. * An instance of a Localization class stores a state of a mix
  15698. * of localization resources and provides the API to resolve
  15699. * translation value for localization identifiers from the
  15700. * resources.
  15701. *
  15702. * Methods:
  15703. * - addResourceIds - add resources
  15704. * - removeResourceIds - remove resources
  15705. * - formatValue - format a single value
  15706. * - formatValues - format multiple values
  15707. * - formatMessages - format multiple compound messages
  15708. *
  15709. */
  15710. [Func="IsChromeOrUAWidget", Exposed=Window]
  15711. interface Localization {
  15712. /**
  15713. * Constructor arguments:
  15714. * - aResourceids - a list of localization resource URIs
  15715. * which will provide messages for this
  15716. * Localization instance.
  15717. * - aSync - Specifies if the initial state of the Localization API is synchronous.
  15718. * This enables a number of synchronous methods on the
  15719. * Localization API.
  15720. * - aRegistry - optional custom L10nRegistry to be used by this Localization instance.
  15721. * - aLocales - custom set of locales to be used for this Localization.
  15722. */
  15723. [Throws]
  15724. constructor(sequence<L10nResourceId> aResourceIds,
  15725. optional boolean aSync = false,
  15726. optional L10nRegistry aRegistry,
  15727. optional sequence<UTF8String> aLocales);
  15728. /**
  15729. * A method for adding resources to the localization context.
  15730. */
  15731. undefined addResourceIds(sequence<L10nResourceId> aResourceIds);
  15732. /**
  15733. * A method for removing resources from the localization context.
  15734. *
  15735. * Returns a new count of resources used by the context.
  15736. */
  15737. unsigned long removeResourceIds(sequence<L10nResourceId> aResourceIds);
  15738. /**
  15739. * Formats a value of a localization message with a given id.
  15740. * An optional dictionary of arguments can be passed to inform
  15741. * the message formatting logic.
  15742. *
  15743. * Example:
  15744. * let value = await document.l10n.formatValue("unread-emails", {count: 5});
  15745. * assert.equal(value, "You have 5 unread emails");
  15746. */
  15747. [NewObject] Promise<UTF8String?> formatValue(UTF8String aId, optional L10nArgs aArgs);
  15748. /**
  15749. * Formats values of a list of messages with given ids.
  15750. *
  15751. * Example:
  15752. * let values = await document.l10n.formatValues([
  15753. * {id: "hello-world"},
  15754. * {id: "unread-emails", args: {count: 5}
  15755. * ]);
  15756. * assert.deepEqual(values, [
  15757. * "Hello World",
  15758. * "You have 5 unread emails"
  15759. * ]);
  15760. */
  15761. [NewObject] Promise<sequence<UTF8String?>> formatValues(sequence<L10nKey> aKeys);
  15762. /**
  15763. * Formats values and attributes of a list of messages with given ids.
  15764. *
  15765. * Example:
  15766. * let values = await document.l10n.formatMessages([
  15767. * {id: "hello-world"},
  15768. * {id: "unread-emails", args: {count: 5}
  15769. * ]);
  15770. * assert.deepEqual(values, [
  15771. * {
  15772. * value: "Hello World",
  15773. * attributes: null
  15774. * },
  15775. * {
  15776. * value: "You have 5 unread emails",
  15777. * attributes: {
  15778. * tooltip: "Click to select them all"
  15779. * }
  15780. * }
  15781. * ]);
  15782. */
  15783. [NewObject] Promise<sequence<L10nMessage?>> formatMessages(sequence<L10nKey> aKeys);
  15784. undefined setAsync();
  15785. [NewObject, Throws]
  15786. UTF8String? formatValueSync(UTF8String aId, optional L10nArgs aArgs);
  15787. [NewObject, Throws]
  15788. sequence<UTF8String?> formatValuesSync(sequence<L10nKey> aKeys);
  15789. [NewObject, Throws]
  15790. sequence<L10nMessage?> formatMessagesSync(sequence<L10nKey> aKeys);
  15791. };
  15792. /**
  15793. * A helper dict for converting between JS Value and L10nArgs.
  15794. */
  15795. [GenerateInitFromJSON, GenerateConversionToJS]
  15796. dictionary L10nArgsHelperDict {
  15797. required L10nArgs args;
  15798. };
  15799. /* ---------------------- Location ----------------------------- */
  15800. /* ./webidl/Location.webidl */
  15801. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15802. /* This Source Code Form is subject to the terms of the Mozilla Public
  15803. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15804. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15805. *
  15806. * The origin of this IDL file is
  15807. * https://html.spec.whatwg.org/multipage/history.html#the-location-interface
  15808. *
  15809. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  15810. * Opera Software ASA. You are granted a license to use, reproduce
  15811. * and create derivative works of this document.
  15812. */
  15813. [LegacyUnforgeable,
  15814. Exposed=Window,
  15815. InstrumentedProps=(ancestorOrigins)]
  15816. interface Location {
  15817. [Throws, CrossOriginWritable, NeedsSubjectPrincipal]
  15818. stringifier attribute USVString href;
  15819. [Throws, NeedsSubjectPrincipal]
  15820. readonly attribute USVString origin;
  15821. [Throws, NeedsSubjectPrincipal]
  15822. attribute USVString protocol;
  15823. [Throws, NeedsSubjectPrincipal]
  15824. attribute USVString host;
  15825. [Throws, NeedsSubjectPrincipal]
  15826. attribute USVString hostname;
  15827. [Throws, NeedsSubjectPrincipal]
  15828. attribute USVString port;
  15829. [Throws, NeedsSubjectPrincipal]
  15830. attribute USVString pathname;
  15831. [Throws, NeedsSubjectPrincipal]
  15832. attribute USVString search;
  15833. [Throws, NeedsSubjectPrincipal]
  15834. attribute USVString hash;
  15835. [Throws, NeedsSubjectPrincipal]
  15836. undefined assign(USVString url);
  15837. [Throws, CrossOriginCallable, NeedsSubjectPrincipal]
  15838. undefined replace(USVString url);
  15839. // XXXbz there is no forceget argument in the spec! See bug 1037721.
  15840. [Throws, NeedsSubjectPrincipal]
  15841. undefined reload(optional boolean forceget = false);
  15842. // Bug 1085214 [SameObject] readonly attribute USVString[] ancestorOrigins;
  15843. };
  15844. /* ---------------------- Lock ----------------------------- */
  15845. /* ./webidl/Lock.webidl */
  15846. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15847. /* This Source Code Form is subject to the terms of the Mozilla Public
  15848. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15849. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15850. *
  15851. * The origin of this IDL file is
  15852. * https://w3c.github.io/web-locks/
  15853. */
  15854. [SecureContext, Exposed=(Window,Worker)]
  15855. interface Lock {
  15856. readonly attribute DOMString name;
  15857. readonly attribute LockMode mode;
  15858. };
  15859. /* ---------------------- LockManager ----------------------------- */
  15860. /* ./webidl/LockManager.webidl */
  15861. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15862. /* This Source Code Form is subject to the terms of the Mozilla Public
  15863. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15864. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15865. *
  15866. * The origin of this IDL file is
  15867. * https://w3c.github.io/web-locks/
  15868. */
  15869. [SecureContext, Exposed=(Window,Worker)]
  15870. interface LockManager {
  15871. [NewObject]
  15872. Promise<any> request(DOMString name,
  15873. LockGrantedCallback callback);
  15874. [NewObject]
  15875. Promise<any> request(DOMString name,
  15876. LockOptions options,
  15877. LockGrantedCallback callback);
  15878. [NewObject]
  15879. Promise<LockManagerSnapshot> query();
  15880. };
  15881. callback LockGrantedCallback = Promise<any> (Lock? lock);
  15882. enum LockMode { "shared", "exclusive" };
  15883. dictionary LockOptions {
  15884. LockMode mode = "exclusive";
  15885. boolean ifAvailable = false;
  15886. boolean steal = false;
  15887. AbortSignal signal;
  15888. };
  15889. dictionary LockManagerSnapshot {
  15890. sequence<LockInfo> held;
  15891. sequence<LockInfo> pending;
  15892. };
  15893. dictionary LockInfo {
  15894. DOMString name;
  15895. LockMode mode;
  15896. DOMString clientId;
  15897. };
  15898. /* ---------------------- MathMLElement ----------------------------- */
  15899. /* ./webidl/MathMLElement.webidl */
  15900. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15901. /* This Source Code Form is subject to the terms of the Mozilla Public
  15902. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15903. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15904. *
  15905. * The origin of this IDL file is
  15906. * https://mathml-refresh.github.io/mathml-core/
  15907. *
  15908. * Copyright © 2019 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark
  15909. * and permissive document license rules apply.
  15910. */
  15911. [Exposed=Window]
  15912. interface MathMLElement : Element { };
  15913. MathMLElement includes GlobalEventHandlers;
  15914. MathMLElement includes HTMLOrForeignElement;
  15915. MathMLElement includes ElementCSSInlineStyle;
  15916. MathMLElement includes TouchEventHandlers;
  15917. MathMLElement includes OnErrorEventHandlerForNodes;
  15918. /* ---------------------- MediaCapabilities ----------------------------- */
  15919. /* ./webidl/MediaCapabilities.webidl */
  15920. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15921. /* This Source Code Form is subject to the terms of the Mozilla Public
  15922. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  15923. * You can obtain one at http://mozilla.org/MPL/2.0/.
  15924. *
  15925. * The origin of this IDL file is
  15926. * https://w3c.github.io/media-capabilities/
  15927. *
  15928. * Copyright © 2018 the Contributors to the Media Capabilities Specification
  15929. */
  15930. dictionary MediaConfiguration {
  15931. VideoConfiguration video;
  15932. AudioConfiguration audio;
  15933. };
  15934. dictionary MediaDecodingConfiguration : MediaConfiguration {
  15935. required MediaDecodingType type;
  15936. };
  15937. dictionary MediaEncodingConfiguration : MediaConfiguration {
  15938. required MediaEncodingType type;
  15939. };
  15940. enum MediaDecodingType {
  15941. "file",
  15942. "media-source",
  15943. };
  15944. enum MediaEncodingType {
  15945. "record",
  15946. "transmission"
  15947. };
  15948. dictionary VideoConfiguration {
  15949. required DOMString contentType;
  15950. required unsigned long width;
  15951. required unsigned long height;
  15952. required unsigned long long bitrate;
  15953. required double framerate;
  15954. boolean hasAlphaChannel;
  15955. HdrMetadataType hdrMetadataType;
  15956. ColorGamut colorGamut;
  15957. TransferFunction transferFunction;
  15958. DOMString scalabilityMode;
  15959. };
  15960. enum HdrMetadataType {
  15961. "smpteSt2086",
  15962. "smpteSt2094-10",
  15963. "smpteSt2094-40"
  15964. };
  15965. enum ColorGamut {
  15966. "srgb",
  15967. "p3",
  15968. "rec2020"
  15969. };
  15970. enum TransferFunction {
  15971. "srgb",
  15972. "pq",
  15973. "hlg"
  15974. };
  15975. dictionary AudioConfiguration {
  15976. required DOMString contentType;
  15977. DOMString channels;
  15978. unsigned long long bitrate;
  15979. unsigned long samplerate;
  15980. };
  15981. [Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled",
  15982. HeaderFile="mozilla/dom/MediaCapabilities.h"]
  15983. interface MediaCapabilitiesInfo {
  15984. readonly attribute boolean supported;
  15985. readonly attribute boolean smooth;
  15986. readonly attribute boolean powerEfficient;
  15987. };
  15988. [Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled"]
  15989. interface MediaCapabilities {
  15990. [NewObject]
  15991. Promise<MediaCapabilitiesInfo> decodingInfo(MediaDecodingConfiguration configuration);
  15992. [NewObject]
  15993. Promise<MediaCapabilitiesInfo> encodingInfo(MediaEncodingConfiguration configuration);
  15994. };
  15995. /* ---------------------- MediaDebugInfo ----------------------------- */
  15996. /* ./webidl/MediaDebugInfo.webidl */
  15997. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  15998. /* This Source Code Form is subject to the terms of the Mozilla Public
  15999. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16000. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16001. */
  16002. /*
  16003. * This module defines dictonaries that are filled with debug information
  16004. * through GetDebugInfo() calls in the media component. To get the information
  16005. * filled and returned, we have two methods that return promises, one in
  16006. * HTMLMediaElement and one in MediaSource.
  16007. *
  16008. * If you need to add some extra info, there's one dictionary per class,
  16009. * following the pattern <ClassName>DebugInfo, where you can add some fields
  16010. * and fill them in the corresponding GetDebugInfo() call.
  16011. *
  16012. * Below is the structures returned.
  16013. *
  16014. * Used by HTMLMediaElement.GetMozRequestDebugInfo(), see HTMLMediaElement.webidl:
  16015. *
  16016. * HTMLMediaElementDebugInfo
  16017. * EMEDebugInfo
  16018. * MediaDecoderDebugInfo
  16019. * MediaFormatReaderDebugInfo
  16020. * MediaStateDebugInfo
  16021. * MediaStateDebugInfo
  16022. * MediaFrameStats
  16023. * MediaDecoderStateMachineDebugInfo
  16024. * MediaDecoderStateMachineDecodingStateDebugInfo
  16025. * MediaSinkDebugInfo
  16026. * VideoSinkDebugInfo
  16027. * AudioSinkDebugInfo
  16028. * DecodedStreamDebugInfo
  16029. * DecodedStreamDataDebugInfo
  16030. * MediaResourceDebugInfo
  16031. * MediaCacheStreamDebugInfo
  16032. *
  16033. * Used by MediaSource.GetMozDebugReaderData(), see MediaSource.webidl:
  16034. *
  16035. * MediaSourceDecoderDebugInfo
  16036. * MediaFormatReaderDebugInfo
  16037. * MediaStateDebugInfo
  16038. * MediaStateDebugInfo
  16039. * MediaFrameStats
  16040. * MediaSourceDemuxerDebugInfo
  16041. * TrackBuffersManagerDebugInfo
  16042. * TrackBuffersManagerDebugInfo
  16043. */
  16044. dictionary MediaCacheStreamDebugInfo {
  16045. long long streamLength = 0;
  16046. long long channelOffset = 0;
  16047. boolean cacheSuspended = false;
  16048. boolean channelEnded = false;
  16049. long loadID = 0;
  16050. };
  16051. dictionary MediaResourceDebugInfo {
  16052. MediaCacheStreamDebugInfo cacheStream = {};
  16053. };
  16054. dictionary MediaDecoderDebugInfo {
  16055. DOMString instance = "";
  16056. unsigned long channels = 0;
  16057. unsigned long rate = 0;
  16058. boolean hasAudio = false;
  16059. boolean hasVideo = false;
  16060. DOMString PlayState = "";
  16061. DOMString containerType = "";
  16062. MediaFormatReaderDebugInfo reader = {};
  16063. MediaDecoderStateMachineDebugInfo stateMachine = {};
  16064. MediaResourceDebugInfo resource = {};
  16065. };
  16066. dictionary AudioSinkDebugInfo {
  16067. long long startTime = 0;
  16068. long long lastGoodPosition = 0;
  16069. boolean isPlaying = false;
  16070. boolean isStarted = false;
  16071. boolean audioEnded = false;
  16072. unsigned long outputRate = 0;
  16073. long long written = 0;
  16074. boolean hasErrored = false;
  16075. boolean playbackComplete = false;
  16076. };
  16077. dictionary AudioSinkWrapperDebugInfo {
  16078. boolean isPlaying = false;
  16079. boolean isStarted = false;
  16080. boolean audioEnded = false;
  16081. AudioSinkDebugInfo audioSink = {};
  16082. };
  16083. dictionary VideoSinkDebugInfo {
  16084. boolean isStarted = false;
  16085. boolean isPlaying = false;
  16086. boolean finished = false;
  16087. long size = 0;
  16088. long long videoFrameEndTime = 0;
  16089. boolean hasVideo = false;
  16090. boolean videoSinkEndRequestExists = false;
  16091. boolean endPromiseHolderIsEmpty = false;
  16092. };
  16093. dictionary DecodedStreamDataDebugInfo {
  16094. DOMString instance = "";
  16095. long long audioFramesWritten = 0;
  16096. long long streamAudioWritten = 0;
  16097. long long streamVideoWritten = 0;
  16098. long long nextAudioTime = 0;
  16099. long long lastVideoStartTime = 0;
  16100. long long lastVideoEndTime = 0;
  16101. boolean haveSentFinishAudio = false;
  16102. boolean haveSentFinishVideo = false;
  16103. };
  16104. dictionary DecodedStreamDebugInfo {
  16105. DOMString instance = "";
  16106. long long startTime = 0;
  16107. long long lastOutputTime = 0;
  16108. long playing = 0;
  16109. long long lastAudio = 0;
  16110. boolean audioQueueFinished = false;
  16111. long audioQueueSize = 0;
  16112. DecodedStreamDataDebugInfo data = {};
  16113. };
  16114. dictionary MediaSinkDebugInfo {
  16115. AudioSinkWrapperDebugInfo audioSinkWrapper = {};
  16116. VideoSinkDebugInfo videoSink = {};
  16117. DecodedStreamDebugInfo decodedStream = {};
  16118. };
  16119. dictionary MediaDecoderStateMachineDecodingStateDebugInfo {
  16120. boolean isPrerolling = false;
  16121. };
  16122. dictionary MediaDecoderStateMachineDebugInfo {
  16123. long long duration = 0;
  16124. long long mediaTime = 0;
  16125. long long clock = 0;
  16126. DOMString state = "";
  16127. long playState = 0;
  16128. boolean sentFirstFrameLoadedEvent = false;
  16129. boolean isPlaying = false;
  16130. DOMString audioRequestStatus = "";
  16131. DOMString videoRequestStatus = "";
  16132. long long decodedAudioEndTime = 0;
  16133. long long decodedVideoEndTime = 0;
  16134. boolean audioCompleted = false;
  16135. boolean videoCompleted = false;
  16136. MediaDecoderStateMachineDecodingStateDebugInfo stateObj = {};
  16137. MediaSinkDebugInfo mediaSink = {};
  16138. double totalBufferingTimeMs = 0;
  16139. };
  16140. dictionary MediaStateDebugInfo {
  16141. boolean needInput = false;
  16142. boolean hasPromise = false;
  16143. boolean waitingPromise = false;
  16144. boolean hasDemuxRequest = false;
  16145. long demuxQueueSize = 0;
  16146. boolean hasDecoder = false;
  16147. double timeTreshold = 0.0;
  16148. boolean timeTresholdHasSeeked = false;
  16149. long long numSamplesInput = 0;
  16150. long long numSamplesOutput = 0;
  16151. long queueSize = 0;
  16152. long pending = 0;
  16153. boolean waitingForData = false;
  16154. long demuxEOS = 0;
  16155. long drainState = 0;
  16156. boolean waitingForKey = false;
  16157. long long lastStreamSourceID = 0;
  16158. };
  16159. dictionary MediaFrameStats {
  16160. long long droppedDecodedFrames = 0;
  16161. long long droppedSinkFrames = 0;
  16162. long long droppedCompositorFrames = 0;
  16163. };
  16164. dictionary MediaFormatReaderDebugInfo {
  16165. DOMString videoType = "";
  16166. DOMString videoDecoderName = "";
  16167. long videoWidth = 0;
  16168. long videoHeight = 0;
  16169. double videoRate = 0.0;
  16170. DOMString audioType = "";
  16171. DOMString audioDecoderName = "";
  16172. boolean videoHardwareAccelerated = false;
  16173. long long videoNumSamplesOutputTotal = 0;
  16174. long long videoNumSamplesSkippedTotal = 0;
  16175. long audioChannels = 0;
  16176. double audioRate = 0.0;
  16177. long long audioFramesDecoded = 0;
  16178. MediaStateDebugInfo audioState = {};
  16179. MediaStateDebugInfo videoState = {};
  16180. MediaFrameStats frameStats = {};
  16181. double totalReadMetadataTimeMs = 0.0;
  16182. double totalWaitingForVideoDataTimeMs = 0.0;
  16183. };
  16184. dictionary BufferRange {
  16185. double start = 0;
  16186. double end = 0;
  16187. };
  16188. dictionary TrackBuffersManagerDebugInfo {
  16189. DOMString type = "";
  16190. double nextSampleTime = 0.0;
  16191. long numSamples = 0;
  16192. long bufferSize = 0;
  16193. long evictable = 0;
  16194. long nextGetSampleIndex = 0;
  16195. long nextInsertionIndex = 0;
  16196. sequence<BufferRange> ranges = [];
  16197. };
  16198. dictionary MediaSourceDemuxerDebugInfo {
  16199. TrackBuffersManagerDebugInfo audioTrack = {};
  16200. TrackBuffersManagerDebugInfo videoTrack = {};
  16201. };
  16202. dictionary MediaSourceDecoderDebugInfo {
  16203. MediaFormatReaderDebugInfo reader = {};
  16204. MediaSourceDemuxerDebugInfo demuxer = {};
  16205. };
  16206. dictionary EMEDebugInfo {
  16207. DOMString keySystem = "";
  16208. DOMString sessionsInfo = "";
  16209. };
  16210. dictionary HTMLMediaElementDebugInfo {
  16211. unsigned long compositorDroppedFrames = 0;
  16212. EMEDebugInfo EMEInfo = {};
  16213. MediaDecoderDebugInfo decoder = {};
  16214. };
  16215. /* ---------------------- MediaDeviceInfo ----------------------------- */
  16216. /* ./webidl/MediaDeviceInfo.webidl */
  16217. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16218. /* This Source Code Form is subject to the terms of the Mozilla Public
  16219. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16220. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16221. *
  16222. * The origin of this IDL file is
  16223. * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
  16224. */
  16225. enum MediaDeviceKind {
  16226. "audioinput",
  16227. "audiooutput",
  16228. "videoinput"
  16229. };
  16230. [Func="Navigator::HasUserMediaSupport",
  16231. Exposed=Window]
  16232. interface MediaDeviceInfo {
  16233. readonly attribute DOMString deviceId;
  16234. readonly attribute MediaDeviceKind kind;
  16235. readonly attribute DOMString label;
  16236. readonly attribute DOMString groupId;
  16237. [Default] object toJSON();
  16238. };
  16239. /* ---------------------- MediaDevices ----------------------------- */
  16240. /* ./webidl/MediaDevices.webidl */
  16241. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16242. /* This Source Code Form is subject to the terms of the Mozilla Public
  16243. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16244. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16245. *
  16246. * The origin of this IDL file is
  16247. * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
  16248. *
  16249. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16250. * liability, trademark and document use rules apply.
  16251. */
  16252. [Func="Navigator::HasUserMediaSupport",
  16253. Exposed=Window]
  16254. interface MediaDevices : EventTarget {
  16255. [Pref="media.ondevicechange.enabled"]
  16256. attribute EventHandler ondevicechange;
  16257. MediaTrackSupportedConstraints getSupportedConstraints();
  16258. [NewObject, UseCounter]
  16259. Promise<sequence<MediaDeviceInfo>> enumerateDevices();
  16260. [NewObject, NeedsCallerType, UseCounter]
  16261. Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints = {});
  16262. // We need [SecureContext] in case media.devices.insecure.enabled = true
  16263. // because we don't want that legacy pref to expose this newer method.
  16264. [SecureContext, Pref="media.getdisplaymedia.enabled", NewObject, NeedsCallerType, UseCounter]
  16265. Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints = {});
  16266. };
  16267. // https://w3c.github.io/mediacapture-output/#audiooutputoptions-dictionary
  16268. dictionary AudioOutputOptions {
  16269. DOMString deviceId = "";
  16270. };
  16271. // https://w3c.github.io/mediacapture-output/#mediadevices-extensions
  16272. partial interface MediaDevices {
  16273. [SecureContext, Pref="media.setsinkid.enabled", NewObject, NeedsCallerType]
  16274. Promise<MediaDeviceInfo> selectAudioOutput(optional AudioOutputOptions options = {});
  16275. };
  16276. /* ---------------------- MediaElementAudioSourceNode ----------------------------- */
  16277. /* ./webidl/MediaElementAudioSourceNode.webidl */
  16278. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16279. /* This Source Code Form is subject to the terms of the Mozilla Public
  16280. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16281. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16282. *
  16283. * The origin of this IDL file is
  16284. * https://webaudio.github.io/web-audio-api/
  16285. *
  16286. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16287. * liability, trademark and document use rules apply.
  16288. */
  16289. dictionary MediaElementAudioSourceOptions {
  16290. required HTMLMediaElement mediaElement;
  16291. };
  16292. [Pref="dom.webaudio.enabled",
  16293. Exposed=Window]
  16294. interface MediaElementAudioSourceNode : AudioNode {
  16295. [Throws]
  16296. constructor(AudioContext context, MediaElementAudioSourceOptions options);
  16297. readonly attribute HTMLMediaElement mediaElement;
  16298. };
  16299. // Mozilla extensions
  16300. MediaElementAudioSourceNode includes AudioNodePassThrough;
  16301. /* ---------------------- MediaEncryptedEvent ----------------------------- */
  16302. /* ./webidl/MediaEncryptedEvent.webidl */
  16303. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16304. /* This Source Code Form is subject to the terms of the Mozilla Public
  16305. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16306. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16307. *
  16308. * The origin of this IDL file is
  16309. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16310. *
  16311. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16312. * W3C liability, trademark and document use rules apply.
  16313. */
  16314. [Exposed=Window]
  16315. interface MediaEncryptedEvent : Event {
  16316. [Throws]
  16317. constructor(DOMString type,
  16318. optional MediaKeyNeededEventInit eventInitDict = {});
  16319. readonly attribute DOMString initDataType;
  16320. [Throws]
  16321. readonly attribute ArrayBuffer? initData;
  16322. };
  16323. dictionary MediaKeyNeededEventInit : EventInit {
  16324. DOMString initDataType = "";
  16325. ArrayBuffer? initData = null;
  16326. };
  16327. /* ---------------------- MediaError ----------------------------- */
  16328. /* ./webidl/MediaError.webidl */
  16329. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16330. /* This Source Code Form is subject to the terms of the Mozilla Public
  16331. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16332. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16333. *
  16334. * The origin of this IDL file is
  16335. * http://www.whatwg.org/html/#mediaerror
  16336. *
  16337. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  16338. * Opera Software ASA. You are granted a license to use, reproduce
  16339. * and create derivative works of this document.
  16340. */
  16341. [Exposed=Window]
  16342. interface MediaError {
  16343. // Keep these constants in sync with the ones defined in HTMLMediaElement.h
  16344. const unsigned short MEDIA_ERR_ABORTED = 1;
  16345. const unsigned short MEDIA_ERR_NETWORK = 2;
  16346. const unsigned short MEDIA_ERR_DECODE = 3;
  16347. const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
  16348. [Constant]
  16349. readonly attribute unsigned short code;
  16350. readonly attribute DOMString message;
  16351. };
  16352. /* ---------------------- MediaKeyError ----------------------------- */
  16353. /* ./webidl/MediaKeyError.webidl */
  16354. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16355. /* This Source Code Form is subject to the terms of the Mozilla Public
  16356. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16357. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16358. *
  16359. * The origin of this IDL file is
  16360. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16361. *
  16362. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16363. * W3C liability, trademark and document use rules apply.
  16364. */
  16365. // According to the spec, "The future of error events and MediaKeyError
  16366. // is uncertain."
  16367. // https://www.w3.org/Bugs/Public/show_bug.cgi?id=21798
  16368. [Exposed=Window]
  16369. interface MediaKeyError : Event {
  16370. readonly attribute unsigned long systemCode;
  16371. };
  16372. /* ---------------------- MediaKeyMessageEvent ----------------------------- */
  16373. /* ./webidl/MediaKeyMessageEvent.webidl */
  16374. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16375. /* This Source Code Form is subject to the terms of the Mozilla Public
  16376. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16377. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16378. *
  16379. * The origin of this IDL file is
  16380. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16381. *
  16382. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16383. * W3C liability, trademark and document use rules apply.
  16384. */
  16385. enum MediaKeyMessageType {
  16386. "license-request",
  16387. "license-renewal",
  16388. "license-release",
  16389. "individualization-request"
  16390. };
  16391. [Exposed=Window]
  16392. interface MediaKeyMessageEvent : Event {
  16393. [Throws]
  16394. constructor(DOMString type, MediaKeyMessageEventInit eventInitDict);
  16395. readonly attribute MediaKeyMessageType messageType;
  16396. [Throws]
  16397. readonly attribute ArrayBuffer message;
  16398. };
  16399. dictionary MediaKeyMessageEventInit : EventInit {
  16400. required MediaKeyMessageType messageType;
  16401. required ArrayBuffer message;
  16402. };
  16403. /* ---------------------- MediaKeys ----------------------------- */
  16404. /* ./webidl/MediaKeys.webidl */
  16405. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16406. /* This Source Code Form is subject to the terms of the Mozilla Public
  16407. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16408. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16409. *
  16410. * The origin of this IDL file is
  16411. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16412. *
  16413. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16414. * W3C liability, trademark and document use rules apply.
  16415. */
  16416. // Note: "persistent-usage-record" session type is unsupported yet, as
  16417. // it's marked as "at risk" in the spec, and Chrome doesn't support it.
  16418. enum MediaKeySessionType {
  16419. "temporary",
  16420. "persistent-license",
  16421. // persistent-usage-record,
  16422. };
  16423. // https://w3c.github.io/encrypted-media/#idl-def-hdcpversion
  16424. enum HDCPVersion {
  16425. "1.0",
  16426. "1.1",
  16427. "1.2",
  16428. "1.3",
  16429. "1.4",
  16430. "2.0",
  16431. "2.1",
  16432. "2.2",
  16433. "2.3",
  16434. };
  16435. // https://w3c.github.io/encrypted-media/#idl-def-mediakeyspolicy
  16436. dictionary MediaKeysPolicy {
  16437. HDCPVersion minHdcpVersion;
  16438. };
  16439. [Exposed=Window]
  16440. interface MediaKeys {
  16441. readonly attribute DOMString keySystem;
  16442. [NewObject, Throws]
  16443. MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary");
  16444. [NewObject]
  16445. Promise<undefined> setServerCertificate(BufferSource serverCertificate);
  16446. [Pref="media.eme.hdcp-policy-check.enabled", NewObject]
  16447. Promise<MediaKeyStatus> getStatusForPolicy(optional MediaKeysPolicy policy = {});
  16448. };
  16449. /* ---------------------- MediaKeySession ----------------------------- */
  16450. /* ./webidl/MediaKeySession.webidl */
  16451. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16452. /* This Source Code Form is subject to the terms of the Mozilla Public
  16453. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16454. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16455. *
  16456. * The origin of this IDL file is
  16457. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16458. *
  16459. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16460. * W3C liability, trademark and document use rules apply.
  16461. */
  16462. [Exposed=Window]
  16463. interface MediaKeySession : EventTarget {
  16464. // error state
  16465. readonly attribute MediaKeyError? error;
  16466. // session properties
  16467. readonly attribute DOMString sessionId;
  16468. readonly attribute unrestricted double expiration;
  16469. readonly attribute Promise<undefined> closed;
  16470. readonly attribute MediaKeyStatusMap keyStatuses;
  16471. attribute EventHandler onkeystatuseschange;
  16472. attribute EventHandler onmessage;
  16473. [NewObject]
  16474. Promise<undefined> generateRequest(DOMString initDataType, BufferSource initData);
  16475. [NewObject]
  16476. Promise<boolean> load(DOMString sessionId);
  16477. // session operations
  16478. [NewObject]
  16479. Promise<undefined> update(BufferSource response);
  16480. [NewObject]
  16481. Promise<undefined> close();
  16482. [NewObject]
  16483. Promise<undefined> remove();
  16484. };
  16485. /* ---------------------- MediaKeysRequestStatus ----------------------------- */
  16486. /* ./webidl/MediaKeysRequestStatus.webidl */
  16487. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16488. /* This Source Code Form is subject to the terms of the Mozilla Public
  16489. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16490. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16491. */
  16492. enum MediaKeySystemStatus {
  16493. "available",
  16494. "api-disabled",
  16495. "cdm-disabled",
  16496. "cdm-not-supported",
  16497. "cdm-not-installed",
  16498. "cdm-created",
  16499. };
  16500. /* Note: This dictionary and enum is only used by Gecko to convey messages
  16501. * to chrome JS code. It is not exposed to the web.
  16502. */
  16503. [GenerateToJSON]
  16504. dictionary RequestMediaKeySystemAccessNotification {
  16505. required DOMString keySystem;
  16506. required MediaKeySystemStatus status;
  16507. };
  16508. /* ---------------------- MediaKeyStatusMap ----------------------------- */
  16509. /* ./webidl/MediaKeyStatusMap.webidl */
  16510. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16511. /* This Source Code Form is subject to the terms of the Mozilla Public
  16512. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16513. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16514. *
  16515. * The origin of this IDL file is
  16516. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16517. *
  16518. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16519. * W3C liability, trademark and document use rules apply.
  16520. */
  16521. enum MediaKeyStatus {
  16522. "usable",
  16523. "expired",
  16524. "released",
  16525. "output-restricted",
  16526. "output-downscaled",
  16527. "status-pending",
  16528. "internal-error"
  16529. };
  16530. [Exposed=Window]
  16531. interface MediaKeyStatusMap {
  16532. iterable<ArrayBuffer,MediaKeyStatus>;
  16533. readonly attribute unsigned long size;
  16534. boolean has (BufferSource keyId);
  16535. [Throws]
  16536. (MediaKeyStatus or undefined) get (BufferSource keyId);
  16537. };
  16538. /* ---------------------- MediaKeySystemAccess ----------------------------- */
  16539. /* ./webidl/MediaKeySystemAccess.webidl */
  16540. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16541. /* This Source Code Form is subject to the terms of the Mozilla Public
  16542. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16543. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16544. *
  16545. * The origin of this IDL file is
  16546. * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  16547. *
  16548. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  16549. * W3C liability, trademark and document use rules apply.
  16550. */
  16551. enum MediaKeysRequirement {
  16552. "required",
  16553. "optional",
  16554. "not-allowed"
  16555. };
  16556. dictionary MediaKeySystemMediaCapability {
  16557. DOMString contentType = "";
  16558. DOMString robustness = "";
  16559. [Pref="media.eme.encrypted-media-encryption-scheme.enabled"]
  16560. DOMString? encryptionScheme = null;
  16561. };
  16562. dictionary MediaKeySystemConfiguration {
  16563. DOMString label = "";
  16564. sequence<DOMString> initDataTypes = [];
  16565. sequence<MediaKeySystemMediaCapability> audioCapabilities = [];
  16566. sequence<MediaKeySystemMediaCapability> videoCapabilities = [];
  16567. MediaKeysRequirement distinctiveIdentifier = "optional";
  16568. MediaKeysRequirement persistentState = "optional";
  16569. sequence<DOMString> sessionTypes;
  16570. };
  16571. [Exposed=Window]
  16572. interface MediaKeySystemAccess {
  16573. readonly attribute DOMString keySystem;
  16574. [NewObject]
  16575. MediaKeySystemConfiguration getConfiguration();
  16576. [NewObject]
  16577. Promise<MediaKeys> createMediaKeys();
  16578. };
  16579. /* ---------------------- MediaList ----------------------------- */
  16580. /* ./webidl/MediaList.webidl */
  16581. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16582. /* This Source Code Form is subject to the terms of the Mozilla Public
  16583. * License, v. 2.0. If a copy of the MPL was not distributed with this
  16584. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  16585. // https://drafts.csswg.org/cssom/#the-medialist-interface
  16586. [Exposed=Window]
  16587. interface MediaList {
  16588. stringifier attribute [LegacyNullToEmptyString] UTF8String mediaText;
  16589. readonly attribute unsigned long length;
  16590. getter UTF8String? item(unsigned long index);
  16591. [Throws]
  16592. undefined deleteMedium(UTF8String oldMedium);
  16593. [Throws]
  16594. undefined appendMedium(UTF8String newMedium);
  16595. };
  16596. /* ---------------------- MediaQueryList ----------------------------- */
  16597. /* ./webidl/MediaQueryList.webidl */
  16598. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16599. /* This Source Code Form is subject to the terms of the Mozilla Public
  16600. * License, v. 2.0. If a copy of the MPL was not distributed with this
  16601. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  16602. *
  16603. * The origin of this IDL file is
  16604. * https://drafts.csswg.org/cssom-view/#mediaquerylist
  16605. *
  16606. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16607. * liability, trademark and document use rules apply.
  16608. */
  16609. [ProbablyShortLivingWrapper,
  16610. Exposed=Window]
  16611. interface MediaQueryList : EventTarget {
  16612. readonly attribute UTF8String media;
  16613. readonly attribute boolean matches;
  16614. [Throws]
  16615. undefined addListener(EventListener? listener);
  16616. [Throws]
  16617. undefined removeListener(EventListener? listener);
  16618. attribute EventHandler onchange;
  16619. };
  16620. /* ---------------------- MediaQueryListEvent ----------------------------- */
  16621. /* ./webidl/MediaQueryListEvent.webidl */
  16622. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16623. /* This Source Code Form is subject to the terms of the Mozilla Public
  16624. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16625. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16626. *
  16627. * https://drafts.csswg.org/cssom-view/#mediaquerylistevent
  16628. */
  16629. [Exposed=Window]
  16630. interface MediaQueryListEvent : Event {
  16631. constructor(DOMString type,
  16632. optional MediaQueryListEventInit eventInitDict = {});
  16633. readonly attribute UTF8String media;
  16634. readonly attribute boolean matches;
  16635. };
  16636. dictionary MediaQueryListEventInit : EventInit {
  16637. UTF8String media = "";
  16638. boolean matches = false;
  16639. };
  16640. /* ---------------------- MediaRecorder ----------------------------- */
  16641. /* ./webidl/MediaRecorder.webidl */
  16642. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16643. /* This Source Code Form is subject to the terms of the Mozilla Public
  16644. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16645. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16646. *
  16647. * The origin of this IDL file is
  16648. * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
  16649. *
  16650. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16651. * liability, trademark and document use rules apply.
  16652. */
  16653. enum BitrateMode { "constant", "variable" };
  16654. enum RecordingState { "inactive", "recording", "paused" };
  16655. [Exposed=Window]
  16656. interface MediaRecorder : EventTarget {
  16657. [Throws]
  16658. constructor(MediaStream stream, optional MediaRecorderOptions options = {});
  16659. [Throws]
  16660. constructor(AudioNode node, optional unsigned long output = 0,
  16661. optional MediaRecorderOptions options = {});
  16662. readonly attribute MediaStream stream;
  16663. readonly attribute DOMString mimeType;
  16664. readonly attribute RecordingState state;
  16665. attribute EventHandler onstart;
  16666. attribute EventHandler onstop;
  16667. attribute EventHandler ondataavailable;
  16668. attribute EventHandler onpause;
  16669. attribute EventHandler onresume;
  16670. attribute EventHandler onerror;
  16671. readonly attribute unsigned long videoBitsPerSecond;
  16672. readonly attribute unsigned long audioBitsPerSecond;
  16673. [Throws]
  16674. undefined start(optional unsigned long timeslice);
  16675. [Throws]
  16676. undefined stop();
  16677. [Throws]
  16678. undefined pause();
  16679. [Throws]
  16680. undefined resume();
  16681. [Throws]
  16682. undefined requestData();
  16683. static boolean isTypeSupported(DOMString type);
  16684. };
  16685. dictionary MediaRecorderOptions {
  16686. DOMString mimeType = "";
  16687. unsigned long audioBitsPerSecond;
  16688. unsigned long videoBitsPerSecond;
  16689. unsigned long bitsPerSecond;
  16690. };
  16691. /* ---------------------- MediaRecorderErrorEvent ----------------------------- */
  16692. /* ./webidl/MediaRecorderErrorEvent.webidl */
  16693. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16694. /* This Source Code Form is subject to the terms of the Mozilla Public
  16695. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16696. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16697. *
  16698. * The origin of this IDL file is
  16699. * https://w3c.github.io/mediacapture-record/
  16700. *
  16701. * Copyright © 2017 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark
  16702. * and document use rules apply.
  16703. */
  16704. dictionary MediaRecorderErrorEventInit : EventInit {
  16705. required DOMException error;
  16706. };
  16707. [Exposed=Window]
  16708. interface MediaRecorderErrorEvent : Event {
  16709. constructor(DOMString type, MediaRecorderErrorEventInit eventInitDict);
  16710. [SameObject] readonly attribute DOMException error;
  16711. };
  16712. /* ---------------------- MediaSession ----------------------------- */
  16713. /* ./webidl/MediaSession.webidl */
  16714. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16715. /* This Source Code Form is subject to the terms of the Mozilla Public
  16716. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16717. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16718. *
  16719. * The origin of this IDL file is
  16720. * https://w3c.github.io/mediasession/#idl-index
  16721. */
  16722. enum MediaSessionPlaybackState {
  16723. "none",
  16724. "paused",
  16725. "playing"
  16726. };
  16727. enum MediaSessionAction {
  16728. "play",
  16729. "pause",
  16730. "seekbackward",
  16731. "seekforward",
  16732. "previoustrack",
  16733. "nexttrack",
  16734. "skipad",
  16735. "seekto",
  16736. "stop",
  16737. };
  16738. callback MediaSessionActionHandler = undefined(MediaSessionActionDetails details);
  16739. [Exposed=Window]
  16740. interface MediaSession {
  16741. attribute MediaMetadata? metadata;
  16742. attribute MediaSessionPlaybackState playbackState;
  16743. undefined setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler);
  16744. [Throws]
  16745. undefined setPositionState(optional MediaPositionState state = {});
  16746. // Fire the action handler. It's test-only for now.
  16747. [ChromeOnly]
  16748. undefined notifyHandler(MediaSessionActionDetails details);
  16749. };
  16750. [Exposed=Window]
  16751. interface MediaMetadata {
  16752. [Throws]
  16753. constructor(optional MediaMetadataInit init = {});
  16754. attribute DOMString title;
  16755. attribute DOMString artist;
  16756. attribute DOMString album;
  16757. // https://github.com/w3c/mediasession/issues/237
  16758. // Take and return `MediaImage` on setter and getter.
  16759. [Frozen, Cached, Pure, Throws]
  16760. attribute sequence<object> artwork;
  16761. };
  16762. dictionary MediaMetadataInit {
  16763. DOMString title = "";
  16764. DOMString artist = "";
  16765. DOMString album = "";
  16766. sequence<MediaImage> artwork = [];
  16767. };
  16768. dictionary MediaImage {
  16769. required USVString src;
  16770. DOMString sizes = "";
  16771. DOMString type = "";
  16772. };
  16773. // Spec issue https://github.com/w3c/mediasession/issues/254
  16774. dictionary MediaSessionActionDetails {
  16775. required MediaSessionAction action;
  16776. double seekOffset;
  16777. double seekTime;
  16778. boolean fastSeek;
  16779. };
  16780. dictionary MediaPositionState {
  16781. double duration;
  16782. double playbackRate;
  16783. double position;
  16784. };
  16785. /* ---------------------- MediaSource ----------------------------- */
  16786. /* ./webidl/MediaSource.webidl */
  16787. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16788. /* This Source Code Form is subject to the terms of the Mozilla Public
  16789. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16790. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16791. *
  16792. * The origin of this IDL file is
  16793. * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
  16794. *
  16795. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16796. * liability, trademark and document use rules apply.
  16797. */
  16798. enum MediaSourceReadyState {
  16799. "closed",
  16800. "open",
  16801. "ended"
  16802. };
  16803. enum MediaSourceEndOfStreamError {
  16804. "network",
  16805. "decode"
  16806. };
  16807. [Pref="media.mediasource.enabled",
  16808. Exposed=Window]
  16809. interface MediaSource : EventTarget {
  16810. [Throws]
  16811. constructor();
  16812. readonly attribute SourceBufferList sourceBuffers;
  16813. readonly attribute SourceBufferList activeSourceBuffers;
  16814. readonly attribute MediaSourceReadyState readyState;
  16815. [SetterThrows]
  16816. attribute unrestricted double duration;
  16817. attribute EventHandler onsourceopen;
  16818. attribute EventHandler onsourceended;
  16819. attribute EventHandler onsourceclose;
  16820. [NewObject, Throws]
  16821. SourceBuffer addSourceBuffer(DOMString type);
  16822. [Throws]
  16823. undefined removeSourceBuffer(SourceBuffer sourceBuffer);
  16824. [Throws]
  16825. undefined endOfStream(optional MediaSourceEndOfStreamError error);
  16826. [Throws]
  16827. undefined setLiveSeekableRange(double start, double end);
  16828. [Throws]
  16829. undefined clearLiveSeekableRange();
  16830. static boolean isTypeSupported(DOMString type);
  16831. [NewObject, ChromeOnly]
  16832. Promise<MediaSourceDecoderDebugInfo> mozDebugReaderData();
  16833. };
  16834. /* ---------------------- MediaStream ----------------------------- */
  16835. /* ./webidl/MediaStream.webidl */
  16836. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16837. /* This Source Code Form is subject to the terms of the Mozilla Public
  16838. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16839. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16840. *
  16841. * The origins of this IDL file are
  16842. * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
  16843. *
  16844. * Copyright � 2012 W3C� (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16845. * liability, trademark and document use rules apply.
  16846. */
  16847. // These dictionaries need to be in a separate file from their
  16848. // MediaTrackConstraints* counterparts due to a webidl compiler limitation.
  16849. dictionary MediaStreamConstraints {
  16850. (boolean or MediaTrackConstraints) audio = false;
  16851. (boolean or MediaTrackConstraints) video = false;
  16852. boolean picture = false; // Mozilla legacy
  16853. boolean fake; // For testing purpose. Generates frames of solid
  16854. // colors if video is enabled, and sound of 1Khz sine
  16855. // wave if audio is enabled.
  16856. DOMString? peerIdentity = null;
  16857. };
  16858. dictionary DisplayMediaStreamConstraints {
  16859. (boolean or MediaTrackConstraints) video = true;
  16860. (boolean or MediaTrackConstraints) audio = false;
  16861. };
  16862. [Exposed=Window]
  16863. interface MediaStream : EventTarget {
  16864. [Throws]
  16865. constructor();
  16866. [Throws]
  16867. constructor(MediaStream stream);
  16868. [Throws]
  16869. constructor(sequence<MediaStreamTrack> tracks);
  16870. readonly attribute DOMString id;
  16871. sequence<MediaStreamTrack> getAudioTracks ();
  16872. sequence<MediaStreamTrack> getVideoTracks ();
  16873. sequence<MediaStreamTrack> getTracks ();
  16874. MediaStreamTrack? getTrackById (DOMString trackId);
  16875. undefined addTrack (MediaStreamTrack track);
  16876. undefined removeTrack (MediaStreamTrack track);
  16877. MediaStream clone ();
  16878. readonly attribute boolean active;
  16879. attribute EventHandler onaddtrack;
  16880. attribute EventHandler onremovetrack;
  16881. [ChromeOnly, NewObject]
  16882. static Promise<long> countUnderlyingStreams();
  16883. // Webrtc allows the remote side to name a stream whatever it wants, and we
  16884. // need to surface this to content.
  16885. [ChromeOnly]
  16886. undefined assignId(DOMString id);
  16887. };
  16888. /* ---------------------- MediaStreamAudioDestinationNode ----------------------------- */
  16889. /* ./webidl/MediaStreamAudioDestinationNode.webidl */
  16890. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16891. /* This Source Code Form is subject to the terms of the Mozilla Public
  16892. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16893. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16894. *
  16895. * The origin of this IDL file is
  16896. * https://webaudio.github.io/web-audio-api/
  16897. *
  16898. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16899. * liability, trademark and document use rules apply.
  16900. */
  16901. [Pref="dom.webaudio.enabled",
  16902. Exposed=Window]
  16903. interface MediaStreamAudioDestinationNode : AudioNode {
  16904. [Throws]
  16905. constructor(AudioContext context, optional AudioNodeOptions options = {});
  16906. [BinaryName="DOMStream"]
  16907. readonly attribute MediaStream stream;
  16908. };
  16909. /* ---------------------- MediaStreamAudioSourceNode ----------------------------- */
  16910. /* ./webidl/MediaStreamAudioSourceNode.webidl */
  16911. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16912. /* This Source Code Form is subject to the terms of the Mozilla Public
  16913. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16914. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16915. *
  16916. * The origin of this IDL file is
  16917. * https://webaudio.github.io/web-audio-api/
  16918. *
  16919. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16920. * liability, trademark and document use rules apply.
  16921. */
  16922. dictionary MediaStreamAudioSourceOptions {
  16923. required MediaStream mediaStream;
  16924. };
  16925. [Pref="dom.webaudio.enabled",
  16926. Exposed=Window]
  16927. interface MediaStreamAudioSourceNode : AudioNode {
  16928. [Throws]
  16929. constructor(AudioContext context, MediaStreamAudioSourceOptions options);
  16930. [BinaryName="GetMediaStream"]
  16931. readonly attribute MediaStream mediaStream;
  16932. };
  16933. // Mozilla extensions
  16934. MediaStreamAudioSourceNode includes AudioNodePassThrough;
  16935. /* ---------------------- MediaStreamError ----------------------------- */
  16936. /* ./webidl/MediaStreamError.webidl */
  16937. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16938. /* This Source Code Form is subject to the terms of the Mozilla Public
  16939. * License, v. 2.0. If a copy of the MPL was not distributed with this
  16940. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  16941. *
  16942. * The origin of this IDL file is
  16943. * http://w3c.github.io/mediacapture-main/getusermedia.html#idl-def-MediaStreamError
  16944. */
  16945. // The future of MediaStreamError is uncertain.
  16946. // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26776
  16947. // TODO: This is an 'exception', not an interface, by virtue of needing to be
  16948. // passed as a promise rejection-reason. Revisit if DOMException grows a customArg
  16949. [ExceptionClass, LegacyNoInterfaceObject,
  16950. Exposed=Window]
  16951. interface MediaStreamError {
  16952. readonly attribute DOMString name;
  16953. readonly attribute DOMString? message;
  16954. readonly attribute DOMString? constraint;
  16955. };
  16956. /* ---------------------- MediaStreamEvent ----------------------------- */
  16957. /* ./webidl/MediaStreamEvent.webidl */
  16958. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16959. /* This Source Code Form is subject to the terms of the Mozilla Public
  16960. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16961. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16962. *
  16963. * The origin of this IDL file is
  16964. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
  16965. */
  16966. dictionary MediaStreamEventInit : EventInit {
  16967. MediaStream? stream = null;
  16968. };
  16969. [Pref="media.peerconnection.enabled",
  16970. Exposed=Window]
  16971. interface MediaStreamEvent : Event {
  16972. constructor(DOMString type, optional MediaStreamEventInit eventInitDict = {});
  16973. readonly attribute MediaStream? stream;
  16974. };
  16975. /* ---------------------- MediaStreamTrack ----------------------------- */
  16976. /* ./webidl/MediaStreamTrack.webidl */
  16977. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  16978. /* This Source Code Form is subject to the terms of the Mozilla Public
  16979. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  16980. * You can obtain one at http://mozilla.org/MPL/2.0/.
  16981. *
  16982. * The origin of this IDL file is
  16983. * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
  16984. *
  16985. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  16986. * liability, trademark and document use rules apply.
  16987. */
  16988. // These two enums are in the spec even though they're not used directly in the
  16989. // API due to https://www.w3.org/Bugs/Public/show_bug.cgi?id=19936
  16990. // Their binding code is used in the implementation.
  16991. enum VideoFacingModeEnum {
  16992. "user",
  16993. "environment",
  16994. "left",
  16995. "right"
  16996. };
  16997. enum MediaSourceEnum {
  16998. "camera",
  16999. "screen",
  17000. "application",
  17001. "window",
  17002. "browser",
  17003. "microphone",
  17004. "audioCapture",
  17005. "other"
  17006. // If values are added, adjust n_values in Histograms.json (2 places)
  17007. };
  17008. dictionary ConstrainLongRange {
  17009. long min;
  17010. long max;
  17011. long exact;
  17012. long ideal;
  17013. };
  17014. dictionary ConstrainDoubleRange {
  17015. double min;
  17016. double max;
  17017. double exact;
  17018. double ideal;
  17019. };
  17020. dictionary ConstrainBooleanParameters {
  17021. boolean exact;
  17022. boolean ideal;
  17023. };
  17024. dictionary ConstrainDOMStringParameters {
  17025. (DOMString or sequence<DOMString>) exact;
  17026. (DOMString or sequence<DOMString>) ideal;
  17027. };
  17028. typedef (long or ConstrainLongRange) ConstrainLong;
  17029. typedef (double or ConstrainDoubleRange) ConstrainDouble;
  17030. typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
  17031. typedef (DOMString or sequence<DOMString> or ConstrainDOMStringParameters) ConstrainDOMString;
  17032. // Note: When adding new constraints, remember to update the SelectSettings()
  17033. // function in MediaManager.cpp to make OverconstrainedError's constraint work!
  17034. dictionary MediaTrackConstraintSet {
  17035. ConstrainLong width;
  17036. ConstrainLong height;
  17037. ConstrainDouble frameRate;
  17038. ConstrainDOMString facingMode;
  17039. DOMString mediaSource;
  17040. long long browserWindow;
  17041. boolean scrollWithPage;
  17042. ConstrainDOMString deviceId;
  17043. ConstrainDOMString groupId;
  17044. ConstrainLong viewportOffsetX;
  17045. ConstrainLong viewportOffsetY;
  17046. ConstrainLong viewportWidth;
  17047. ConstrainLong viewportHeight;
  17048. ConstrainBoolean echoCancellation;
  17049. ConstrainBoolean noiseSuppression;
  17050. ConstrainBoolean autoGainControl;
  17051. ConstrainLong channelCount;
  17052. };
  17053. [GenerateToJSON]
  17054. dictionary MediaTrackConstraints : MediaTrackConstraintSet {
  17055. sequence<MediaTrackConstraintSet> advanced;
  17056. };
  17057. enum MediaStreamTrackState {
  17058. "live",
  17059. "ended"
  17060. };
  17061. [Exposed=Window]
  17062. interface MediaStreamTrack : EventTarget {
  17063. readonly attribute DOMString kind;
  17064. readonly attribute DOMString id;
  17065. [NeedsCallerType]
  17066. readonly attribute DOMString label;
  17067. attribute boolean enabled;
  17068. readonly attribute boolean muted;
  17069. attribute EventHandler onmute;
  17070. attribute EventHandler onunmute;
  17071. readonly attribute MediaStreamTrackState readyState;
  17072. attribute EventHandler onended;
  17073. MediaStreamTrack clone ();
  17074. undefined stop ();
  17075. // MediaTrackCapabilities getCapabilities ();
  17076. MediaTrackConstraints getConstraints ();
  17077. [NeedsCallerType]
  17078. MediaTrackSettings getSettings ();
  17079. [NewObject, NeedsCallerType]
  17080. Promise<undefined> applyConstraints (optional MediaTrackConstraints constraints = {});
  17081. // attribute EventHandler onoverconstrained;
  17082. };
  17083. /* ---------------------- MediaStreamTrackAudioSourceNode ----------------------------- */
  17084. /* ./webidl/MediaStreamTrackAudioSourceNode.webidl */
  17085. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17086. /* This Source Code Form is subject to the terms of the Mozilla Public
  17087. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17088. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17089. *
  17090. * The origin of this IDL file is
  17091. * https://webaudio.github.io/web-audio-api/
  17092. *
  17093. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  17094. * liability, trademark and document use rules apply.
  17095. */
  17096. dictionary MediaStreamTrackAudioSourceOptions {
  17097. required MediaStreamTrack mediaStreamTrack;
  17098. };
  17099. [Pref="dom.webaudio.enabled",
  17100. Exposed=Window]
  17101. interface MediaStreamTrackAudioSourceNode : AudioNode {
  17102. [Throws]
  17103. constructor(AudioContext context, MediaStreamTrackAudioSourceOptions options);
  17104. };
  17105. // Mozilla extensions
  17106. MediaStreamTrackAudioSourceNode includes AudioNodePassThrough;
  17107. /* ---------------------- MediaStreamTrackEvent ----------------------------- */
  17108. /* ./webidl/MediaStreamTrackEvent.webidl */
  17109. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17110. /* This Source Code Form is subject to the terms of the Mozilla Public
  17111. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17112. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17113. *
  17114. * The origin of this IDL file is
  17115. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
  17116. */
  17117. dictionary MediaStreamTrackEventInit : EventInit {
  17118. required MediaStreamTrack track;
  17119. };
  17120. [Exposed=Window]
  17121. interface MediaStreamTrackEvent : Event {
  17122. constructor(DOMString type, MediaStreamTrackEventInit eventInitDict);
  17123. [SameObject]
  17124. readonly attribute MediaStreamTrack track;
  17125. };
  17126. /* ---------------------- MediaTrackSettings ----------------------------- */
  17127. /* ./webidl/MediaTrackSettings.webidl */
  17128. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17129. /* This Source Code Form is subject to the terms of the Mozilla Public
  17130. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17131. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17132. *
  17133. * The origin of this IDL file is
  17134. * http://w3c.github.io/mediacapture-main/getusermedia.html
  17135. */
  17136. dictionary MediaTrackSettings {
  17137. long width;
  17138. long height;
  17139. double frameRate;
  17140. DOMString facingMode;
  17141. boolean echoCancellation;
  17142. boolean autoGainControl;
  17143. boolean noiseSuppression;
  17144. long channelCount;
  17145. DOMString deviceId;
  17146. DOMString groupId;
  17147. // Mozilla-specific extensions:
  17148. // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
  17149. // OBE by http://w3c.github.io/mediacapture-screen-share
  17150. DOMString mediaSource;
  17151. // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
  17152. // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
  17153. long long browserWindow;
  17154. boolean scrollWithPage;
  17155. long viewportOffsetX;
  17156. long viewportOffsetY;
  17157. long viewportWidth;
  17158. long viewportHeight;
  17159. };
  17160. /* ---------------------- MediaTrackSupportedConstraints ----------------------------- */
  17161. /* ./webidl/MediaTrackSupportedConstraints.webidl */
  17162. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17163. /* This Source Code Form is subject to the terms of the Mozilla Public
  17164. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17165. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17166. *
  17167. * The origin of this IDL file is
  17168. * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
  17169. */
  17170. dictionary MediaTrackSupportedConstraints {
  17171. boolean width = true;
  17172. boolean height = true;
  17173. boolean aspectRatio; // to be supported
  17174. boolean frameRate = true;
  17175. boolean facingMode = true;
  17176. boolean volume; // to be supported
  17177. boolean sampleRate; // to be supported
  17178. boolean sampleSize; // to be supported
  17179. boolean echoCancellation = true;
  17180. boolean noiseSuppression = true;
  17181. boolean autoGainControl = true;
  17182. boolean latency; // to be supported
  17183. boolean channelCount = true;
  17184. boolean deviceId = true;
  17185. boolean groupId = true;
  17186. // Mozilla-specific extensions:
  17187. // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
  17188. // OBE by http://w3c.github.io/mediacapture-screen-share
  17189. boolean mediaSource = true;
  17190. // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
  17191. // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
  17192. boolean browserWindow = true;
  17193. boolean scrollWithPage = true;
  17194. boolean viewportOffsetX = true;
  17195. boolean viewportOffsetY = true;
  17196. boolean viewportWidth = true;
  17197. boolean viewportHeight = true;
  17198. };
  17199. /* ---------------------- MerchantValidationEvent ----------------------------- */
  17200. /* ./webidl/MerchantValidationEvent.webidl */
  17201. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17202. /* This Source Code Form is subject to the terms of the Mozilla Public
  17203. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17204. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17205. *
  17206. * The origin of this WebIDL file is
  17207. * https://w3c.github.io/payment-request/#merchantvalidationevent-interface
  17208. * https://w3c.github.io/payment-request/#merchantvalidationeventinit-dictionary
  17209. *
  17210. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  17211. * liability, trademark and document use rules apply.
  17212. */
  17213. [SecureContext,
  17214. Exposed=Window,
  17215. Func="mozilla::dom::PaymentRequest::PrefEnabled"]
  17216. interface MerchantValidationEvent : Event {
  17217. [Throws]
  17218. constructor(DOMString type,
  17219. optional MerchantValidationEventInit eventInitDict = {});
  17220. readonly attribute DOMString methodName;
  17221. readonly attribute USVString validationURL;
  17222. [Throws]
  17223. undefined complete(Promise<any> merchantSessionPromise);
  17224. };
  17225. dictionary MerchantValidationEventInit : EventInit {
  17226. DOMString methodName = "";
  17227. USVString validationURL = "";
  17228. };
  17229. /* ---------------------- MessageChannel ----------------------------- */
  17230. /* ./webidl/MessageChannel.webidl */
  17231. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17232. /* This Source Code Form is subject to the terms of the Mozilla Public
  17233. * License, v. 2.0. If a copy of the MPL was not distributed with this
  17234. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  17235. *
  17236. * For more information on this interface, please see
  17237. * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
  17238. */
  17239. [Exposed=(Window,Worker)]
  17240. interface MessageChannel {
  17241. [Throws]
  17242. constructor();
  17243. readonly attribute MessagePort port1;
  17244. readonly attribute MessagePort port2;
  17245. };
  17246. /* ---------------------- MessageEvent ----------------------------- */
  17247. /* ./webidl/MessageEvent.webidl */
  17248. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17249. /* This Source Code Form is subject to the terms of the Mozilla Public
  17250. * License, v. 2.0. If a copy of the MPL was not distributed with this
  17251. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  17252. *
  17253. * For more information on this interface, please see
  17254. * https://html.spec.whatwg.org/#messageevent
  17255. */
  17256. [Exposed=(Window,Worker,AudioWorklet), ProbablyShortLivingWrapper]
  17257. interface MessageEvent : Event {
  17258. constructor(DOMString type, optional MessageEventInit eventInitDict = {});
  17259. /**
  17260. * Custom data associated with this event.
  17261. */
  17262. [GetterThrows]
  17263. readonly attribute any data;
  17264. /**
  17265. * The origin of the site from which this event originated, which is the
  17266. * scheme, ":", and if the URI has a host, "//" followed by the
  17267. * host, and if the port is not the default for the given scheme,
  17268. * ":" followed by that port. This value does not have a trailing slash.
  17269. */
  17270. readonly attribute USVString origin;
  17271. /**
  17272. * The last event ID string of the event source, for server-sent DOM events; this
  17273. * value is the empty string for cross-origin messaging.
  17274. */
  17275. readonly attribute DOMString lastEventId;
  17276. /**
  17277. * The window or port which originated this event.
  17278. */
  17279. readonly attribute MessageEventSource? source;
  17280. [Pure, Cached, Frozen]
  17281. readonly attribute sequence<MessagePort> ports;
  17282. /**
  17283. * Initializes this event with the given data, in a manner analogous to
  17284. * the similarly-named method on the Event interface, also setting the
  17285. * data, origin, source, and lastEventId attributes of this appropriately.
  17286. */
  17287. undefined initMessageEvent(DOMString type,
  17288. optional boolean bubbles = false,
  17289. optional boolean cancelable = false,
  17290. optional any data = null,
  17291. optional DOMString origin = "",
  17292. optional DOMString lastEventId = "",
  17293. optional MessageEventSource? source = null,
  17294. optional sequence<MessagePort> ports = []);
  17295. };
  17296. dictionary MessageEventInit : EventInit {
  17297. any data = null;
  17298. DOMString origin = "";
  17299. DOMString lastEventId = "";
  17300. MessageEventSource? source = null;
  17301. sequence<MessagePort> ports = [];
  17302. };
  17303. typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource;
  17304. /* ---------------------- MessagePort ----------------------------- */
  17305. /* ./webidl/MessagePort.webidl */
  17306. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17307. /* This Source Code Form is subject to the terms of the Mozilla Public
  17308. * License, v. 2.0. If a copy of the MPL was not distributed with this
  17309. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  17310. *
  17311. * For more information on this interface, please see
  17312. * https://html.spec.whatwg.org/#message-ports
  17313. */
  17314. [Exposed=(Window,Worker,AudioWorklet)]
  17315. interface MessagePort : EventTarget {
  17316. [Throws]
  17317. undefined postMessage(any message, sequence<object> transferable);
  17318. [Throws]
  17319. undefined postMessage(any message, optional StructuredSerializeOptions options = {});
  17320. undefined start();
  17321. undefined close();
  17322. // event handlers
  17323. attribute EventHandler onmessage;
  17324. attribute EventHandler onmessageerror;
  17325. };
  17326. // Used to declare which objects should be transferred.
  17327. dictionary StructuredSerializeOptions {
  17328. sequence<object> transfer = [];
  17329. };
  17330. /* ---------------------- MIDIAccess ----------------------------- */
  17331. /* ./webidl/MIDIAccess.webidl */
  17332. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17333. /* This Source Code Form is subject to the terms of the Mozilla Public
  17334. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17335. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17336. *
  17337. * The origin of this IDL file is
  17338. * https://webaudio.github.io/web-midi-api/
  17339. */
  17340. [SecureContext, Pref="dom.webmidi.enabled",
  17341. Exposed=Window]
  17342. interface MIDIAccess : EventTarget {
  17343. readonly attribute MIDIInputMap inputs;
  17344. readonly attribute MIDIOutputMap outputs;
  17345. attribute EventHandler onstatechange;
  17346. readonly attribute boolean sysexEnabled;
  17347. };
  17348. /* ---------------------- MIDIConnectionEvent ----------------------------- */
  17349. /* ./webidl/MIDIConnectionEvent.webidl */
  17350. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17351. /* This Source Code Form is subject to the terms of the Mozilla Public
  17352. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17353. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17354. *
  17355. * The origin of this IDL file is
  17356. * https://webaudio.github.io/web-midi-api/
  17357. */
  17358. [SecureContext,
  17359. Pref="dom.webmidi.enabled",
  17360. Exposed=Window]
  17361. interface MIDIConnectionEvent : Event
  17362. {
  17363. constructor(DOMString type,
  17364. optional MIDIConnectionEventInit eventInitDict = {});
  17365. readonly attribute MIDIPort? port;
  17366. };
  17367. dictionary MIDIConnectionEventInit : EventInit
  17368. {
  17369. MIDIPort? port = null;
  17370. };
  17371. /* ---------------------- MIDIInput ----------------------------- */
  17372. /* ./webidl/MIDIInput.webidl */
  17373. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17374. /* This Source Code Form is subject to the terms of the Mozilla Public
  17375. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17376. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17377. *
  17378. * The origin of this IDL file is
  17379. * https://webaudio.github.io/web-midi-api/
  17380. */
  17381. [SecureContext, Pref="dom.webmidi.enabled",
  17382. Exposed=Window]
  17383. interface MIDIInput : MIDIPort {
  17384. attribute EventHandler onmidimessage;
  17385. };
  17386. /* ---------------------- MIDIInputMap ----------------------------- */
  17387. /* ./webidl/MIDIInputMap.webidl */
  17388. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17389. /* This Source Code Form is subject to the terms of the Mozilla Public
  17390. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17391. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17392. *
  17393. * The origin of this IDL file is
  17394. * https://webaudio.github.io/web-midi-api/
  17395. */
  17396. [SecureContext, Pref="dom.webmidi.enabled",
  17397. Exposed=Window]
  17398. interface MIDIInputMap {
  17399. readonly maplike<DOMString, MIDIInput>;
  17400. };
  17401. /* ---------------------- MIDIMessageEvent ----------------------------- */
  17402. /* ./webidl/MIDIMessageEvent.webidl */
  17403. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17404. /* This Source Code Form is subject to the terms of the Mozilla Public
  17405. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17406. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17407. *
  17408. * The origin of this IDL file is
  17409. * https://webaudio.github.io/web-midi-api/
  17410. */
  17411. [SecureContext,
  17412. Pref="dom.webmidi.enabled",
  17413. Exposed=Window]
  17414. interface MIDIMessageEvent : Event
  17415. {
  17416. [Throws]
  17417. constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {});
  17418. [Throws]
  17419. readonly attribute Uint8Array data;
  17420. };
  17421. dictionary MIDIMessageEventInit : EventInit
  17422. {
  17423. Uint8Array data;
  17424. };
  17425. /* ---------------------- MIDIOptions ----------------------------- */
  17426. /* ./webidl/MIDIOptions.webidl */
  17427. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17428. /* This Source Code Form is subject to the terms of the Mozilla Public
  17429. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17430. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17431. *
  17432. * The origin of this IDL file is
  17433. * https://webaudio.github.io/web-midi-api/
  17434. */
  17435. dictionary MIDIOptions {
  17436. boolean sysex = false;
  17437. boolean software = false;
  17438. };
  17439. /* ---------------------- MIDIOutput ----------------------------- */
  17440. /* ./webidl/MIDIOutput.webidl */
  17441. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17442. /* This Source Code Form is subject to the terms of the Mozilla Public
  17443. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17444. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17445. *
  17446. * The origin of this IDL file is
  17447. * https://webaudio.github.io/web-midi-api/
  17448. */
  17449. [SecureContext, Pref="dom.webmidi.enabled",
  17450. Exposed=Window]
  17451. interface MIDIOutput : MIDIPort {
  17452. [Throws]
  17453. undefined send(sequence<octet> data, optional DOMHighResTimeStamp timestamp);
  17454. undefined clear();
  17455. };
  17456. /* ---------------------- MIDIOutputMap ----------------------------- */
  17457. /* ./webidl/MIDIOutputMap.webidl */
  17458. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17459. /* This Source Code Form is subject to the terms of the Mozilla Public
  17460. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17461. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17462. *
  17463. * The origin of this IDL file is
  17464. * https://webaudio.github.io/web-midi-api/
  17465. */
  17466. [SecureContext, Pref="dom.webmidi.enabled",
  17467. Exposed=Window]
  17468. interface MIDIOutputMap {
  17469. readonly maplike<DOMString, MIDIOutput>;
  17470. };
  17471. /* ---------------------- MIDIPort ----------------------------- */
  17472. /* ./webidl/MIDIPort.webidl */
  17473. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17474. /* This Source Code Form is subject to the terms of the Mozilla Public
  17475. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17476. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17477. *
  17478. * The origin of this IDL file is
  17479. * https://webaudio.github.io/web-midi-api/
  17480. */
  17481. enum MIDIPortType {
  17482. "input",
  17483. "output"
  17484. };
  17485. enum MIDIPortDeviceState {
  17486. "disconnected",
  17487. "connected"
  17488. };
  17489. enum MIDIPortConnectionState {
  17490. "open",
  17491. "closed",
  17492. "pending"
  17493. };
  17494. [SecureContext, Pref="dom.webmidi.enabled",
  17495. Exposed=Window]
  17496. interface MIDIPort : EventTarget {
  17497. readonly attribute DOMString id;
  17498. readonly attribute DOMString? manufacturer;
  17499. readonly attribute DOMString? name;
  17500. readonly attribute DOMString? version;
  17501. readonly attribute MIDIPortType type;
  17502. readonly attribute MIDIPortDeviceState state;
  17503. readonly attribute MIDIPortConnectionState connection;
  17504. attribute EventHandler onstatechange;
  17505. [Throws]
  17506. Promise<MIDIPort> open();
  17507. [Throws]
  17508. Promise<MIDIPort> close();
  17509. };
  17510. /* ---------------------- MimeType ----------------------------- */
  17511. /* ./webidl/MimeType.webidl */
  17512. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17513. /* This Source Code Form is subject to the terms of the Mozilla Public
  17514. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17515. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17516. */
  17517. [Exposed=Window]
  17518. interface MimeType {
  17519. readonly attribute DOMString type;
  17520. readonly attribute DOMString description;
  17521. readonly attribute DOMString suffixes;
  17522. readonly attribute Plugin enabledPlugin;
  17523. };
  17524. /* ---------------------- MimeTypeArray ----------------------------- */
  17525. /* ./webidl/MimeTypeArray.webidl */
  17526. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17527. /* This Source Code Form is subject to the terms of the Mozilla Public
  17528. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17529. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17530. */
  17531. [LegacyUnenumerableNamedProperties,
  17532. Exposed=Window]
  17533. interface MimeTypeArray {
  17534. readonly attribute unsigned long length;
  17535. getter MimeType? item(unsigned long index);
  17536. getter MimeType? namedItem(DOMString name);
  17537. };
  17538. /* ---------------------- MouseEvent ----------------------------- */
  17539. /* ./webidl/MouseEvent.webidl */
  17540. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17541. /* This Source Code Form is subject to the terms of the Mozilla Public
  17542. * License, v. 2.0. If a copy of the MPL was not distributed with this
  17543. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  17544. *
  17545. * For more information on this interface please see
  17546. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  17547. * https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
  17548. *
  17549. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  17550. * liability, trademark and document use rules apply.
  17551. */
  17552. interface nsIScreen;
  17553. [Exposed=Window]
  17554. interface MouseEvent : UIEvent {
  17555. constructor(DOMString typeArg,
  17556. optional MouseEventInit mouseEventInitDict = {});
  17557. [NeedsCallerType]
  17558. readonly attribute long screenX;
  17559. [NeedsCallerType]
  17560. readonly attribute long screenY;
  17561. [ChromeOnly]
  17562. readonly attribute nsIScreen? screen;
  17563. readonly attribute long pageX;
  17564. readonly attribute long pageY;
  17565. readonly attribute long clientX;
  17566. readonly attribute long clientY;
  17567. [BinaryName="clientX"]
  17568. readonly attribute long x;
  17569. [BinaryName="clientY"]
  17570. readonly attribute long y;
  17571. readonly attribute long offsetX;
  17572. readonly attribute long offsetY;
  17573. readonly attribute boolean ctrlKey;
  17574. readonly attribute boolean shiftKey;
  17575. readonly attribute boolean altKey;
  17576. readonly attribute boolean metaKey;
  17577. readonly attribute short button;
  17578. readonly attribute unsigned short buttons;
  17579. readonly attribute EventTarget? relatedTarget;
  17580. // Pointer Lock
  17581. readonly attribute long movementX;
  17582. readonly attribute long movementY;
  17583. // Deprecated in DOM Level 3:
  17584. [Deprecated="InitMouseEvent"]
  17585. undefined initMouseEvent(DOMString typeArg,
  17586. optional boolean canBubbleArg = false,
  17587. optional boolean cancelableArg = false,
  17588. optional Window? viewArg = null,
  17589. optional long detailArg = 0,
  17590. optional long screenXArg = 0,
  17591. optional long screenYArg = 0,
  17592. optional long clientXArg = 0,
  17593. optional long clientYArg = 0,
  17594. optional boolean ctrlKeyArg = false,
  17595. optional boolean altKeyArg = false,
  17596. optional boolean shiftKeyArg = false,
  17597. optional boolean metaKeyArg = false,
  17598. optional short buttonArg = 0,
  17599. optional EventTarget? relatedTargetArg = null);
  17600. // Introduced in DOM Level 3:
  17601. boolean getModifierState(DOMString keyArg);
  17602. };
  17603. // Suggested initMouseEvent replacement initializer:
  17604. dictionary MouseEventInit : EventModifierInit {
  17605. // Attributes for MouseEvent:
  17606. long screenX = 0;
  17607. long screenY = 0;
  17608. long clientX = 0;
  17609. long clientY = 0;
  17610. short button = 0;
  17611. // Note: "buttons" was not previously initializable through initMouseEvent!
  17612. unsigned short buttons = 0;
  17613. EventTarget? relatedTarget = null;
  17614. // Pointer Lock
  17615. long movementX = 0;
  17616. long movementY = 0;
  17617. };
  17618. // Mozilla extensions
  17619. partial interface MouseEvent
  17620. {
  17621. // Finger or touch pressure event value
  17622. // ranges between 0.0 and 1.0
  17623. // TODO: Remove mozPressure. (bug 1534199)
  17624. [Deprecated="MouseEvent_MozPressure"]
  17625. readonly attribute float mozPressure;
  17626. const unsigned short MOZ_SOURCE_UNKNOWN = 0;
  17627. const unsigned short MOZ_SOURCE_MOUSE = 1;
  17628. const unsigned short MOZ_SOURCE_PEN = 2;
  17629. const unsigned short MOZ_SOURCE_ERASER = 3;
  17630. const unsigned short MOZ_SOURCE_CURSOR = 4;
  17631. const unsigned short MOZ_SOURCE_TOUCH = 5;
  17632. const unsigned short MOZ_SOURCE_KEYBOARD = 6;
  17633. [ChromeOnly]
  17634. readonly attribute unsigned short inputSource;
  17635. [Deprecated="MozInputSource", BinaryName="inputSource"]
  17636. readonly attribute unsigned short mozInputSource;
  17637. // TODO: Remove initNSMouseEvent. (bug 1165213)
  17638. [Deprecated="InitNSMouseEvent"]
  17639. undefined initNSMouseEvent(DOMString typeArg,
  17640. optional boolean canBubbleArg = false,
  17641. optional boolean cancelableArg = false,
  17642. optional Window? viewArg = null,
  17643. optional long detailArg = 0,
  17644. optional long screenXArg = 0,
  17645. optional long screenYArg = 0,
  17646. optional long clientXArg = 0,
  17647. optional long clientYArg = 0,
  17648. optional boolean ctrlKeyArg = false,
  17649. optional boolean altKeyArg = false,
  17650. optional boolean shiftKeyArg = false,
  17651. optional boolean metaKeyArg = false,
  17652. optional short buttonArg = 0,
  17653. optional EventTarget? relatedTargetArg = null,
  17654. optional float pressure = 0,
  17655. optional unsigned short inputSourceArg = 0);
  17656. /**
  17657. * preventClickEvent() prevents the following "click", "auxclick" and
  17658. * "dblclick" events of "mousedown" and "mouseup" events.
  17659. */
  17660. [ChromeOnly]
  17661. undefined preventClickEvent();
  17662. /**
  17663. * Returns true if the following "click", "auxclick" and "dblclick"
  17664. * events of "mousedown" and "mouseup" events are prevented.
  17665. */
  17666. [ChromeOnly]
  17667. boolean clickEventPrevented();
  17668. };
  17669. /* ---------------------- MouseScrollEvent ----------------------------- */
  17670. /* ./webidl/MouseScrollEvent.webidl */
  17671. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17672. /* This Source Code Form is subject to the terms of the Mozilla Public
  17673. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17674. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17675. */
  17676. [Exposed=Window]
  17677. interface MouseScrollEvent : MouseEvent
  17678. {
  17679. const long HORIZONTAL_AXIS = 1;
  17680. const long VERTICAL_AXIS = 2;
  17681. readonly attribute long axis;
  17682. undefined initMouseScrollEvent(DOMString type,
  17683. optional boolean canBubble = false,
  17684. optional boolean cancelable = false,
  17685. optional Window? view = null,
  17686. optional long detail = 0,
  17687. optional long screenX = 0,
  17688. optional long screenY = 0,
  17689. optional long clientX = 0,
  17690. optional long clientY = 0,
  17691. optional boolean ctrlKey = false,
  17692. optional boolean altKey = false,
  17693. optional boolean shiftKey = false,
  17694. optional boolean metaKey = false,
  17695. optional short button = 0,
  17696. optional EventTarget? relatedTarget = null,
  17697. optional long axis = 0);
  17698. };
  17699. /* ---------------------- MozApplicationEvent ----------------------------- */
  17700. /* ./webidl/MozApplicationEvent.webidl */
  17701. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17702. /* This Source Code Form is subject to the terms of the Mozilla Public
  17703. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17704. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17705. */
  17706. [ChromeOnly,
  17707. Exposed=Window]
  17708. interface MozApplicationEvent : Event
  17709. {
  17710. constructor(DOMString type,
  17711. optional MozApplicationEventInit eventInitDict = {});
  17712. readonly attribute DOMApplication? application;
  17713. };
  17714. dictionary MozApplicationEventInit : EventInit
  17715. {
  17716. DOMApplication? application = null;
  17717. };
  17718. /* ---------------------- MozFrameLoaderOwner ----------------------------- */
  17719. /* ./webidl/MozFrameLoaderOwner.webidl */
  17720. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17721. /* This Source Code Form is subject to the terms of the Mozilla Public
  17722. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17723. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17724. */
  17725. dictionary RemotenessOptions {
  17726. required UTF8String? remoteType;
  17727. // Used to resume a given channel load within the target process. If present,
  17728. // it will be used rather than the `src` & `srcdoc` attributes on the
  17729. // frameloader to control the load behaviour.
  17730. unsigned long long pendingSwitchID;
  17731. // True if we have an existing channel that we will resume in the
  17732. // target process, either via pendingSwitchID or using messageManager.
  17733. boolean switchingInProgressLoad = false;
  17734. };
  17735. /**
  17736. * A mixin included by elements that are 'browsing context containers'
  17737. * in HTML5 terms (that is, elements such as iframe that creates a new
  17738. * browsing context):
  17739. *
  17740. * https://html.spec.whatwg.org/#browsing-context-container
  17741. *
  17742. * Objects including this mixin must implement nsFrameLoaderOwner in
  17743. * native C++ code.
  17744. */
  17745. interface mixin MozFrameLoaderOwner {
  17746. [ChromeOnly]
  17747. readonly attribute FrameLoader? frameLoader;
  17748. [ChromeOnly]
  17749. readonly attribute BrowsingContext? browsingContext;
  17750. [ChromeOnly, Throws]
  17751. undefined swapFrameLoaders(XULFrameElement aOtherLoaderOwner);
  17752. [ChromeOnly, Throws]
  17753. undefined swapFrameLoaders(HTMLIFrameElement aOtherLoaderOwner);
  17754. [ChromeOnly, Throws]
  17755. undefined changeRemoteness(RemotenessOptions aOptions);
  17756. };
  17757. /* ---------------------- MutationEvent ----------------------------- */
  17758. /* ./webidl/MutationEvent.webidl */
  17759. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17760. /* This Source Code Form is subject to the terms of the Mozilla Public
  17761. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17762. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17763. *
  17764. * The origin of this IDL file is
  17765. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  17766. *
  17767. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  17768. * liability, trademark and document use rules apply.
  17769. */
  17770. [Exposed=Window]
  17771. interface MutationEvent : Event
  17772. {
  17773. const unsigned short MODIFICATION = 1;
  17774. const unsigned short ADDITION = 2;
  17775. const unsigned short REMOVAL = 3;
  17776. [ChromeOnly]
  17777. const unsigned short SMIL = 4;
  17778. readonly attribute Node? relatedNode;
  17779. readonly attribute DOMString prevValue;
  17780. readonly attribute DOMString newValue;
  17781. readonly attribute DOMString attrName;
  17782. readonly attribute unsigned short attrChange;
  17783. [Throws]
  17784. undefined initMutationEvent(DOMString type,
  17785. optional boolean canBubble = false,
  17786. optional boolean cancelable = false,
  17787. optional Node? relatedNode = null,
  17788. optional DOMString prevValue = "",
  17789. optional DOMString newValue = "",
  17790. optional DOMString attrName = "",
  17791. optional unsigned short attrChange = 0);
  17792. };
  17793. /* ---------------------- MutationObserver ----------------------------- */
  17794. /* ./webidl/MutationObserver.webidl */
  17795. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17796. /* This Source Code Form is subject to the terms of the Mozilla Public
  17797. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17798. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17799. *
  17800. * The origin of this IDL file is
  17801. * http://dom.spec.whatwg.org
  17802. */
  17803. [ProbablyShortLivingWrapper,
  17804. Exposed=Window]
  17805. interface MutationRecord {
  17806. [Constant]
  17807. readonly attribute DOMString type;
  17808. // .target is not nullable per the spec, but in order to prevent crashes,
  17809. // if there are GC/CC bugs in Gecko, we let the property to be null.
  17810. [Constant]
  17811. readonly attribute Node? target;
  17812. [Constant]
  17813. readonly attribute NodeList addedNodes;
  17814. [Constant]
  17815. readonly attribute NodeList removedNodes;
  17816. [Constant]
  17817. readonly attribute Node? previousSibling;
  17818. [Constant]
  17819. readonly attribute Node? nextSibling;
  17820. [Constant]
  17821. readonly attribute DOMString? attributeName;
  17822. [Constant]
  17823. readonly attribute DOMString? attributeNamespace;
  17824. [Constant]
  17825. readonly attribute DOMString? oldValue;
  17826. [Constant, Cached, ChromeOnly]
  17827. readonly attribute sequence<Animation> addedAnimations;
  17828. [Constant, Cached, ChromeOnly]
  17829. readonly attribute sequence<Animation> changedAnimations;
  17830. [Constant, Cached, ChromeOnly]
  17831. readonly attribute sequence<Animation> removedAnimations;
  17832. };
  17833. [Exposed=Window]
  17834. interface MutationObserver {
  17835. [Throws]
  17836. constructor(MutationCallback mutationCallback);
  17837. [Throws, NeedsSubjectPrincipal]
  17838. undefined observe(Node target, optional MutationObserverInit options = {});
  17839. undefined disconnect();
  17840. sequence<MutationRecord> takeRecords();
  17841. [ChromeOnly, Throws]
  17842. sequence<MutationObservingInfo?> getObservingInfo();
  17843. [ChromeOnly]
  17844. readonly attribute MutationCallback mutationCallback;
  17845. [ChromeOnly]
  17846. attribute boolean mergeAttributeRecords;
  17847. };
  17848. callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer);
  17849. dictionary MutationObserverInit {
  17850. boolean childList = false;
  17851. boolean attributes;
  17852. boolean characterData;
  17853. boolean subtree = false;
  17854. boolean attributeOldValue;
  17855. boolean characterDataOldValue;
  17856. [ChromeOnly]
  17857. boolean chromeOnlyNodes = false;
  17858. [ChromeOnly]
  17859. boolean animations = false;
  17860. sequence<DOMString> attributeFilter;
  17861. };
  17862. dictionary MutationObservingInfo : MutationObserverInit
  17863. {
  17864. Node? observedNode = null;
  17865. };
  17866. /* ---------------------- NamedNodeMap ----------------------------- */
  17867. /* ./webidl/NamedNodeMap.webidl */
  17868. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17869. /* This Source Code Form is subject to the terms of the Mozilla Public
  17870. * License, v. 2.0. If a copy of the MPL was not distributed with this
  17871. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  17872. [LegacyUnenumerableNamedProperties,
  17873. Exposed=Window]
  17874. interface NamedNodeMap {
  17875. getter Attr? getNamedItem(DOMString name);
  17876. [CEReactions, Throws, BinaryName="setNamedItemNS"]
  17877. Attr? setNamedItem(Attr arg);
  17878. [CEReactions, Throws]
  17879. Attr removeNamedItem(DOMString name);
  17880. getter Attr? item(unsigned long index);
  17881. readonly attribute unsigned long length;
  17882. Attr? getNamedItemNS(DOMString? namespaceURI, DOMString localName);
  17883. [CEReactions, Throws]
  17884. Attr? setNamedItemNS(Attr arg);
  17885. [CEReactions, Throws]
  17886. Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
  17887. };
  17888. /* ---------------------- NavigationPreloadManager ----------------------------- */
  17889. /* ./webidl/NavigationPreloadManager.webidl */
  17890. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17891. /* This Source Code Form is subject to the terms of the Mozilla Public
  17892. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17893. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17894. *
  17895. * The origin of this IDL file is
  17896. * https://w3c.github.io/ServiceWorker/#navigation-preload-manager
  17897. */
  17898. [Func="NavigationPreloadManager::IsEnabled", SecureContext,
  17899. Exposed=(Window,Worker)]
  17900. interface NavigationPreloadManager {
  17901. [NewObject]
  17902. Promise<undefined> enable();
  17903. [NewObject]
  17904. Promise<undefined> disable();
  17905. [NewObject]
  17906. Promise<undefined> setHeaderValue(ByteString value);
  17907. [NewObject]
  17908. Promise<NavigationPreloadState> getState();
  17909. };
  17910. dictionary NavigationPreloadState {
  17911. boolean enabled = false;
  17912. ByteString headerValue;
  17913. };
  17914. /* ---------------------- Navigator ----------------------------- */
  17915. /* ./webidl/Navigator.webidl */
  17916. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  17917. /* This Source Code Form is subject to the terms of the Mozilla Public
  17918. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  17919. * You can obtain one at http://mozilla.org/MPL/2.0/.
  17920. *
  17921. * The origin of this IDL file is
  17922. * https://html.spec.whatwg.org/#the-navigator-object
  17923. * http://www.w3.org/TR/tracking-dnt/
  17924. * http://www.w3.org/TR/geolocation-API/#geolocation_interface
  17925. * http://www.w3.org/TR/battery-status/#navigatorbattery-interface
  17926. * http://www.w3.org/TR/vibration/#vibration-interface
  17927. * http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1
  17928. * https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
  17929. * http://www.w3.org/TR/beacon/#sec-beacon-method
  17930. * https://html.spec.whatwg.org/#navigatorconcurrenthardware
  17931. * http://wicg.github.io/netinfo/#extensions-to-the-navigator-interface
  17932. * https://w3c.github.io/webappsec-credential-management/#framework-credential-management
  17933. * https://w3c.github.io/webdriver/webdriver-spec.html#interface
  17934. * https://wicg.github.io/media-capabilities/#idl-index
  17935. * https://w3c.github.io/mediasession/#idl-index
  17936. *
  17937. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  17938. * Opera Software ASA. You are granted a license to use, reproduce
  17939. * and create derivative works of this document.
  17940. */
  17941. interface URI;
  17942. // https://html.spec.whatwg.org/#the-navigator-object
  17943. [HeaderFile="Navigator.h",
  17944. Exposed=Window,
  17945. InstrumentedProps=(canShare,
  17946. clearAppBadge,
  17947. setAppBadge,
  17948. share,
  17949. userActivation,
  17950. wakeLock)]
  17951. interface Navigator {
  17952. // objects implementing this interface also implement the interfaces given below
  17953. };
  17954. Navigator includes NavigatorID;
  17955. Navigator includes NavigatorLanguage;
  17956. Navigator includes NavigatorOnLine;
  17957. Navigator includes NavigatorContentUtils;
  17958. Navigator includes NavigatorStorageUtils;
  17959. Navigator includes NavigatorConcurrentHardware;
  17960. Navigator includes NavigatorStorage;
  17961. Navigator includes NavigatorAutomationInformation;
  17962. Navigator includes NavigatorGPU;
  17963. Navigator includes GlobalPrivacyControl;
  17964. interface mixin NavigatorID {
  17965. // WebKit/Blink/Trident/Presto support this (hardcoded "Mozilla").
  17966. [Constant, Cached, Throws]
  17967. readonly attribute DOMString appCodeName; // constant "Mozilla"
  17968. [Constant, Cached]
  17969. readonly attribute DOMString appName; // constant "Netscape"
  17970. [Constant, Cached, Throws, NeedsCallerType]
  17971. readonly attribute DOMString appVersion;
  17972. [Pure, Cached, Throws, NeedsCallerType]
  17973. readonly attribute DOMString platform;
  17974. [Pure, Cached, Throws, NeedsCallerType]
  17975. readonly attribute DOMString userAgent;
  17976. [Constant, Cached]
  17977. readonly attribute DOMString product; // constant "Gecko"
  17978. // Everyone but WebKit/Blink supports this. See bug 679971.
  17979. [Exposed=Window]
  17980. boolean taintEnabled(); // constant false
  17981. };
  17982. interface mixin NavigatorLanguage {
  17983. // These two attributes are cached because this interface is also implemented
  17984. // by Workernavigator and this way we don't have to go back to the
  17985. // main-thread from the worker thread anytime we need to retrieve them. They
  17986. // are updated when pref intl.accept_languages is changed.
  17987. [Pure, Cached]
  17988. readonly attribute DOMString? language;
  17989. [Pure, Cached, Frozen]
  17990. readonly attribute sequence<DOMString> languages;
  17991. };
  17992. interface mixin NavigatorOnLine {
  17993. readonly attribute boolean onLine;
  17994. };
  17995. interface mixin NavigatorContentUtils {
  17996. // content handler registration
  17997. [Throws, ChromeOnly]
  17998. undefined checkProtocolHandlerAllowed(DOMString scheme, URI handlerURI, URI documentURI);
  17999. [Throws, SecureContext]
  18000. undefined registerProtocolHandler(DOMString scheme, DOMString url);
  18001. // NOT IMPLEMENTED
  18002. //undefined unregisterProtocolHandler(DOMString scheme, DOMString url);
  18003. };
  18004. [SecureContext]
  18005. interface mixin NavigatorStorage {
  18006. readonly attribute StorageManager storage;
  18007. };
  18008. interface mixin NavigatorStorageUtils {
  18009. // NOT IMPLEMENTED
  18010. //undefined yieldForStorageUpdates();
  18011. };
  18012. partial interface Navigator {
  18013. [Throws]
  18014. readonly attribute Permissions permissions;
  18015. };
  18016. partial interface Navigator {
  18017. [Throws, SameObject]
  18018. readonly attribute MimeTypeArray mimeTypes;
  18019. [Throws, SameObject]
  18020. readonly attribute PluginArray plugins;
  18021. readonly attribute boolean pdfViewerEnabled;
  18022. };
  18023. // http://www.w3.org/TR/tracking-dnt/ sort of
  18024. partial interface Navigator {
  18025. readonly attribute DOMString doNotTrack;
  18026. };
  18027. // https://globalprivacycontrol.github.io/gpc-spec/
  18028. interface mixin GlobalPrivacyControl {
  18029. [Pref="privacy.globalprivacycontrol.functionality.enabled"]
  18030. readonly attribute boolean globalPrivacyControl;
  18031. };
  18032. // http://www.w3.org/TR/geolocation-API/#geolocation_interface
  18033. interface mixin NavigatorGeolocation {
  18034. [Throws, Pref="geo.enabled"]
  18035. readonly attribute Geolocation geolocation;
  18036. };
  18037. Navigator includes NavigatorGeolocation;
  18038. // http://www.w3.org/TR/battery-status/#navigatorbattery-interface
  18039. partial interface Navigator {
  18040. // ChromeOnly to prevent web content from fingerprinting users' batteries.
  18041. [Throws, ChromeOnly, Pref="dom.battery.enabled"]
  18042. Promise<BatteryManager> getBattery();
  18043. };
  18044. // http://www.w3.org/TR/vibration/#vibration-interface
  18045. partial interface Navigator {
  18046. // We don't support sequences in unions yet
  18047. //boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
  18048. boolean vibrate(unsigned long duration);
  18049. boolean vibrate(sequence<unsigned long> pattern);
  18050. };
  18051. // http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface
  18052. partial interface Navigator {
  18053. [NeedsCallerType]
  18054. readonly attribute long maxTouchPoints;
  18055. };
  18056. // https://wicg.github.io/media-capabilities/#idl-index
  18057. [Exposed=Window]
  18058. partial interface Navigator {
  18059. [SameObject, Func="mozilla::dom::MediaCapabilities::Enabled"]
  18060. readonly attribute MediaCapabilities mediaCapabilities;
  18061. };
  18062. // Mozilla-specific extensions
  18063. // Chrome-only interface for Vibration API permission handling.
  18064. partial interface Navigator {
  18065. /* Set permission state to device vibration.
  18066. * @param permitted permission state (true for allowing vibration)
  18067. * @param persistent make the permission session-persistent
  18068. */
  18069. [ChromeOnly]
  18070. undefined setVibrationPermission(boolean permitted,
  18071. optional boolean persistent = true);
  18072. };
  18073. partial interface Navigator {
  18074. [Throws, Constant, Cached, NeedsCallerType]
  18075. readonly attribute DOMString oscpu;
  18076. // WebKit/Blink support this; Trident/Presto do not.
  18077. readonly attribute DOMString vendor;
  18078. // WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
  18079. readonly attribute DOMString vendorSub;
  18080. // WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
  18081. readonly attribute DOMString productSub;
  18082. // WebKit/Blink/Trident/Presto support this.
  18083. readonly attribute boolean cookieEnabled;
  18084. [Throws, Constant, Cached, NeedsCallerType]
  18085. readonly attribute DOMString buildID;
  18086. // WebKit/Blink/Trident/Presto support this.
  18087. [Affects=Nothing, DependsOn=Nothing]
  18088. boolean javaEnabled();
  18089. };
  18090. // Addon manager bits
  18091. partial interface Navigator {
  18092. [Throws, Func="mozilla::AddonManagerWebAPI::IsAPIEnabled"]
  18093. readonly attribute AddonManager mozAddonManager;
  18094. };
  18095. // NetworkInformation
  18096. partial interface Navigator {
  18097. [Throws, Pref="dom.netinfo.enabled"]
  18098. readonly attribute NetworkInformation connection;
  18099. };
  18100. // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
  18101. partial interface Navigator {
  18102. [Throws, Pref="dom.gamepad.enabled"]
  18103. sequence<Gamepad?> getGamepads();
  18104. };
  18105. partial interface Navigator {
  18106. [Throws, Pref="dom.gamepad.test.enabled"]
  18107. GamepadServiceTest requestGamepadServiceTest();
  18108. };
  18109. // https://immersive-web.github.io/webvr/spec/1.1/#interface-navigator
  18110. partial interface Navigator {
  18111. [NewObject, SecureContext, Pref="dom.vr.enabled"]
  18112. Promise<sequence<VRDisplay>> getVRDisplays();
  18113. // TODO: Use FrozenArray once available. (Bug 1236777)
  18114. [SecureContext, Frozen, Cached, Pure, Pref="dom.vr.enabled"]
  18115. readonly attribute sequence<VRDisplay> activeVRDisplays;
  18116. [ChromeOnly, Pref="dom.vr.enabled"]
  18117. readonly attribute boolean isWebVRContentDetected;
  18118. [ChromeOnly, Pref="dom.vr.enabled"]
  18119. readonly attribute boolean isWebVRContentPresenting;
  18120. [ChromeOnly, Pref="dom.vr.enabled"]
  18121. undefined requestVRPresentation(VRDisplay display);
  18122. };
  18123. partial interface Navigator {
  18124. [Throws, Pref="dom.vr.puppet.enabled"]
  18125. VRServiceTest requestVRServiceTest();
  18126. };
  18127. // https://immersive-web.github.io/webxr/#dom-navigator-xr
  18128. partial interface Navigator {
  18129. [SecureContext, SameObject, Throws, Pref="dom.vr.webxr.enabled"]
  18130. readonly attribute XRSystem xr;
  18131. };
  18132. // http://webaudio.github.io/web-midi-api/#requestmidiaccess
  18133. partial interface Navigator {
  18134. [NewObject, Func="Navigator::HasMidiSupport"]
  18135. Promise<MIDIAccess> requestMIDIAccess(optional MIDIOptions options = {});
  18136. };
  18137. callback NavigatorUserMediaSuccessCallback = undefined (MediaStream stream);
  18138. callback NavigatorUserMediaErrorCallback = undefined (MediaStreamError error);
  18139. partial interface Navigator {
  18140. [Throws, Func="Navigator::HasUserMediaSupport"]
  18141. readonly attribute MediaDevices mediaDevices;
  18142. // Deprecated. Use mediaDevices.getUserMedia instead.
  18143. [Deprecated="NavigatorGetUserMedia", Throws,
  18144. Func="Navigator::HasUserMediaSupport",
  18145. NeedsCallerType,
  18146. UseCounter]
  18147. undefined mozGetUserMedia(MediaStreamConstraints constraints,
  18148. NavigatorUserMediaSuccessCallback successCallback,
  18149. NavigatorUserMediaErrorCallback errorCallback);
  18150. };
  18151. // Service Workers/Navigation Controllers
  18152. partial interface Navigator {
  18153. [Func="ServiceWorkersEnabled", SameObject, BinaryName="serviceWorkerJS"]
  18154. readonly attribute ServiceWorkerContainer serviceWorker;
  18155. };
  18156. partial interface Navigator {
  18157. [Throws, Pref="beacon.enabled"]
  18158. boolean sendBeacon(DOMString url,
  18159. optional BodyInit? data = null);
  18160. };
  18161. partial interface Navigator {
  18162. [NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
  18163. readonly attribute LegacyMozTCPSocket mozTCPSocket;
  18164. };
  18165. partial interface Navigator {
  18166. [NewObject]
  18167. Promise<MediaKeySystemAccess>
  18168. requestMediaKeySystemAccess(DOMString keySystem,
  18169. sequence<MediaKeySystemConfiguration> supportedConfigurations);
  18170. };
  18171. interface mixin NavigatorConcurrentHardware {
  18172. readonly attribute unsigned long long hardwareConcurrency;
  18173. };
  18174. // https://w3c.github.io/webappsec-credential-management/#framework-credential-management
  18175. partial interface Navigator {
  18176. [Pref="security.webauth.webauthn", SecureContext, SameObject]
  18177. readonly attribute CredentialsContainer credentials;
  18178. };
  18179. // https://w3c.github.io/webdriver/webdriver-spec.html#interface
  18180. interface mixin NavigatorAutomationInformation {
  18181. [Constant, Cached]
  18182. readonly attribute boolean webdriver;
  18183. };
  18184. // https://www.w3.org/TR/clipboard-apis/#navigator-interface
  18185. partial interface Navigator {
  18186. [SecureContext, SameObject]
  18187. readonly attribute Clipboard clipboard;
  18188. };
  18189. // Used for testing of origin trials.
  18190. partial interface Navigator {
  18191. [Trial="TestTrial"]
  18192. readonly attribute boolean testTrialGatedAttribute;
  18193. };
  18194. // https://wicg.github.io/web-share/#navigator-interface
  18195. partial interface Navigator {
  18196. [SecureContext, NewObject, Func="Navigator::HasShareSupport"]
  18197. Promise<undefined> share(optional ShareData data = {});
  18198. [SecureContext, Func="Navigator::HasShareSupport"]
  18199. boolean canShare(optional ShareData data = {});
  18200. };
  18201. // https://wicg.github.io/web-share/#sharedata-dictionary
  18202. dictionary ShareData {
  18203. USVString title;
  18204. USVString text;
  18205. USVString url;
  18206. // Note: we don't actually support files yet
  18207. // we have it here for the .canShare() checks.
  18208. sequence<File> files;
  18209. };
  18210. // https://w3c.github.io/mediasession/#idl-index
  18211. [Exposed=Window]
  18212. partial interface Navigator {
  18213. [SameObject]
  18214. readonly attribute MediaSession mediaSession;
  18215. };
  18216. // https://w3c.github.io/web-locks/#navigator-mixins
  18217. [SecureContext]
  18218. interface mixin NavigatorLocks {
  18219. readonly attribute LockManager locks;
  18220. };
  18221. Navigator includes NavigatorLocks;
  18222. // https://w3c.github.io/autoplay/#autoplay-policy
  18223. enum AutoplayPolicy {
  18224. "allowed",
  18225. "allowed-muted",
  18226. "disallowed"
  18227. };
  18228. enum AutoplayPolicyMediaType {
  18229. "mediaelement",
  18230. "audiocontext"
  18231. };
  18232. // https://w3c.github.io/autoplay/#autoplay-detection-methods
  18233. partial interface Navigator {
  18234. [Pref="dom.media.autoplay-policy-detection.enabled"]
  18235. AutoplayPolicy getAutoplayPolicy(AutoplayPolicyMediaType type);
  18236. [Pref="dom.media.autoplay-policy-detection.enabled"]
  18237. AutoplayPolicy getAutoplayPolicy(HTMLMediaElement element);
  18238. [Pref="dom.media.autoplay-policy-detection.enabled"]
  18239. AutoplayPolicy getAutoplayPolicy(AudioContext context);
  18240. };
  18241. // https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface
  18242. partial interface Navigator {
  18243. [SameObject] readonly attribute UserActivation userActivation;
  18244. };
  18245. // https://w3c.github.io/screen-wake-lock/#extensions-to-the-navigator-interface
  18246. [SecureContext]
  18247. partial interface Navigator {
  18248. [SameObject, Pref="dom.screenwakelock.enabled"]
  18249. readonly attribute WakeLock wakeLock;
  18250. };
  18251. /* ---------------------- NetErrorInfo ----------------------------- */
  18252. /* ./webidl/NetErrorInfo.webidl */
  18253. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18254. /* This Source Code Form is subject to the terms of the Mozilla Public
  18255. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18256. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18257. */
  18258. /**
  18259. * This dictionary is used for exposing failed channel info
  18260. * to about:neterror to built UI.
  18261. */
  18262. dictionary NetErrorInfo {
  18263. DOMString errorCodeString = "";
  18264. };
  18265. /* ---------------------- NetworkInformation ----------------------------- */
  18266. /* ./webidl/NetworkInformation.webidl */
  18267. /* This Source Code Form is subject to the terms of the Mozilla Public
  18268. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18269. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18270. *
  18271. * The origin of this IDL file is https://w3c.github.io/netinfo/
  18272. *
  18273. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
  18274. * liability, trademark and document use rules apply.
  18275. */
  18276. enum ConnectionType {
  18277. "cellular",
  18278. "bluetooth",
  18279. "ethernet",
  18280. "wifi",
  18281. "other",
  18282. "none",
  18283. "unknown"
  18284. };
  18285. [Pref="dom.netinfo.enabled",
  18286. Exposed=(Window,Worker)]
  18287. interface NetworkInformation : EventTarget {
  18288. readonly attribute ConnectionType type;
  18289. attribute EventHandler ontypechange;
  18290. };
  18291. /* ---------------------- NetworkOptions ----------------------------- */
  18292. /* ./webidl/NetworkOptions.webidl */
  18293. /* This Source Code Form is subject to the terms of the Mozilla Public
  18294. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18295. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  18296. /**
  18297. * This dictionary holds the parameters sent to the network worker.
  18298. */
  18299. dictionary NetworkCommandOptions
  18300. {
  18301. long id = 0; // opaque id.
  18302. DOMString cmd = ""; // the command name.
  18303. DOMString ifname; // for "removeNetworkRoute", "setDNS",
  18304. // "setDefaultRouteAndDNS", "removeDefaultRoute"
  18305. // "addHostRoute", "removeHostRoute"
  18306. // "removeHostRoutes".
  18307. DOMString ip; // for "removeNetworkRoute", "setWifiTethering".
  18308. unsigned long prefixLength; // for "removeNetworkRoute".
  18309. DOMString domain; // for "setDNS"
  18310. sequence<DOMString> dnses; // for "setDNS", "setDefaultRouteAndDNS".
  18311. DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute".
  18312. sequence<DOMString> gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute".
  18313. DOMString mode; // for "setWifiOperationMode".
  18314. boolean report; // for "setWifiOperationMode".
  18315. boolean enabled; // for "setDhcpServer".
  18316. DOMString wifictrlinterfacename; // for "setWifiTethering".
  18317. DOMString internalIfname; // for "setWifiTethering".
  18318. DOMString externalIfname; // for "setWifiTethering".
  18319. boolean enable; // for "setWifiTethering".
  18320. DOMString ssid; // for "setWifiTethering".
  18321. DOMString security; // for "setWifiTethering".
  18322. DOMString key; // for "setWifiTethering".
  18323. DOMString prefix; // for "setWifiTethering", "setDhcpServer".
  18324. DOMString link; // for "setWifiTethering", "setDhcpServer".
  18325. sequence<DOMString> interfaceList; // for "setWifiTethering".
  18326. DOMString wifiStartIp; // for "setWifiTethering".
  18327. DOMString wifiEndIp; // for "setWifiTethering".
  18328. DOMString usbStartIp; // for "setWifiTethering".
  18329. DOMString usbEndIp; // for "setWifiTethering".
  18330. DOMString dns1; // for "setWifiTethering".
  18331. DOMString dns2; // for "setWifiTethering".
  18332. long long threshold; // for "setNetworkInterfaceAlarm",
  18333. // "enableNetworkInterfaceAlarm".
  18334. DOMString startIp; // for "setDhcpServer".
  18335. DOMString endIp; // for "setDhcpServer".
  18336. DOMString serverIp; // for "setDhcpServer".
  18337. DOMString maskLength; // for "setDhcpServer".
  18338. DOMString preInternalIfname; // for "updateUpStream".
  18339. DOMString preExternalIfname; // for "updateUpStream".
  18340. DOMString curInternalIfname; // for "updateUpStream".
  18341. DOMString curExternalIfname; // for "updateUpStream".
  18342. long ipaddr; // for "ifc_configure".
  18343. long mask; // for "ifc_configure".
  18344. long gateway_long; // for "ifc_configure".
  18345. long dns1_long; // for "ifc_configure".
  18346. long dns2_long; // for "ifc_configure".
  18347. long mtu; // for "setMtu".
  18348. };
  18349. /**
  18350. * This dictionary holds the parameters sent back to NetworkService.js.
  18351. */
  18352. dictionary NetworkResultOptions
  18353. {
  18354. long id = 0; // opaque id.
  18355. boolean ret = false; // for sync command.
  18356. boolean broadcast = false; // for netd broadcast message.
  18357. DOMString topic = ""; // for netd broadcast message.
  18358. DOMString reason = ""; // for netd broadcast message.
  18359. long resultCode = 0; // for all commands.
  18360. DOMString resultReason = ""; // for all commands.
  18361. boolean error = false; // for all commands.
  18362. boolean enable = false; // for "setWifiTethering", "setUSBTethering"
  18363. // "enableUsbRndis".
  18364. boolean result = false; // for "enableUsbRndis".
  18365. boolean success = false; // for "setDhcpServer".
  18366. DOMString curExternalIfname = ""; // for "updateUpStream".
  18367. DOMString curInternalIfname = ""; // for "updateUpStream".
  18368. DOMString reply = ""; // for "command".
  18369. DOMString route = ""; // for "ifc_get_default_route".
  18370. DOMString ipaddr_str = ""; // The following are for the result of
  18371. // dhcp_do_request.
  18372. DOMString gateway_str = "";
  18373. DOMString dns1_str = "";
  18374. DOMString dns2_str = "";
  18375. DOMString mask_str = "";
  18376. DOMString server_str = "";
  18377. DOMString vendor_str = "";
  18378. long lease = 0;
  18379. long prefixLength = 0;
  18380. long mask = 0;
  18381. long ipaddr = 0;
  18382. long gateway = 0;
  18383. long dns1 = 0;
  18384. long dns2 = 0;
  18385. long server = 0;
  18386. DOMString netId = ""; // for "getNetId".
  18387. sequence<DOMString> interfaceList; // for "getInterfaceList".
  18388. DOMString flag = "down"; // for "getInterfaceConfig".
  18389. DOMString macAddr = ""; // for "getInterfaceConfig".
  18390. DOMString ipAddr = ""; // for "getInterfaceConfig".
  18391. };
  18392. /* ---------------------- Node ----------------------------- */
  18393. /* ./webidl/Node.webidl */
  18394. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18395. /* This Source Code Form is subject to the terms of the Mozilla Public
  18396. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18397. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18398. *
  18399. * The origin of this IDL file is
  18400. * http://www.w3.org/TR/2012/WD-dom-20120105/
  18401. *
  18402. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18403. * liability, trademark and document use rules apply.
  18404. */
  18405. interface Principal;
  18406. interface URI;
  18407. [Exposed=Window]
  18408. interface Node : EventTarget {
  18409. const unsigned short ELEMENT_NODE = 1;
  18410. const unsigned short ATTRIBUTE_NODE = 2; // historical
  18411. const unsigned short TEXT_NODE = 3;
  18412. const unsigned short CDATA_SECTION_NODE = 4; // historical
  18413. const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
  18414. const unsigned short ENTITY_NODE = 6; // historical
  18415. const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
  18416. const unsigned short COMMENT_NODE = 8;
  18417. const unsigned short DOCUMENT_NODE = 9;
  18418. const unsigned short DOCUMENT_TYPE_NODE = 10;
  18419. const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
  18420. const unsigned short NOTATION_NODE = 12; // historical
  18421. [Constant]
  18422. readonly attribute unsigned short nodeType;
  18423. [Pure]
  18424. readonly attribute DOMString nodeName;
  18425. [Pure, Throws, NeedsCallerType, BinaryName="baseURIFromJS"]
  18426. readonly attribute DOMString? baseURI;
  18427. [Pure, BinaryName=isInComposedDoc]
  18428. readonly attribute boolean isConnected;
  18429. [Pure]
  18430. readonly attribute Document? ownerDocument;
  18431. [Pure]
  18432. Node getRootNode(optional GetRootNodeOptions options = {});
  18433. [Pure]
  18434. readonly attribute Node? parentNode;
  18435. [Pure]
  18436. readonly attribute Element? parentElement;
  18437. [Pure]
  18438. boolean hasChildNodes();
  18439. [SameObject]
  18440. readonly attribute NodeList childNodes;
  18441. [Pure]
  18442. readonly attribute Node? firstChild;
  18443. [Pure]
  18444. readonly attribute Node? lastChild;
  18445. [Pure]
  18446. readonly attribute Node? previousSibling;
  18447. [Pure]
  18448. readonly attribute Node? nextSibling;
  18449. [CEReactions, SetterThrows, Pure]
  18450. attribute DOMString? nodeValue;
  18451. [CEReactions, SetterThrows, GetterCanOOM,
  18452. SetterNeedsSubjectPrincipal=NonSystem, Pure]
  18453. attribute DOMString? textContent;
  18454. // These DOM methods cannot be accessed by UA Widget scripts
  18455. // because the DOM element reflectors will be in the content scope,
  18456. // instead of the desired UA Widget scope.
  18457. [CEReactions, Throws, Func="IsNotUAWidget"]
  18458. Node insertBefore(Node node, Node? child);
  18459. [CEReactions, Throws, Func="IsNotUAWidget"]
  18460. Node appendChild(Node node);
  18461. [CEReactions, Throws, Func="IsNotUAWidget"]
  18462. Node replaceChild(Node node, Node child);
  18463. [CEReactions, Throws]
  18464. Node removeChild(Node child);
  18465. [CEReactions]
  18466. undefined normalize();
  18467. [CEReactions, Throws, Func="IsNotUAWidget"]
  18468. Node cloneNode(optional boolean deep = false);
  18469. [Pure]
  18470. boolean isSameNode(Node? node);
  18471. [Pure]
  18472. boolean isEqualNode(Node? node);
  18473. const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
  18474. const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
  18475. const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
  18476. const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
  18477. const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
  18478. const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; // historical
  18479. [Pure]
  18480. unsigned short compareDocumentPosition(Node other);
  18481. [Pure]
  18482. boolean contains(Node? other);
  18483. [Pure]
  18484. DOMString? lookupPrefix(DOMString? namespace);
  18485. [Pure]
  18486. DOMString? lookupNamespaceURI(DOMString? prefix);
  18487. [Pure]
  18488. boolean isDefaultNamespace(DOMString? namespace);
  18489. // Mozilla-specific stuff
  18490. [ChromeOnly]
  18491. readonly attribute Principal nodePrincipal;
  18492. [ChromeOnly]
  18493. readonly attribute URI? baseURIObject;
  18494. [ChromeOnly]
  18495. DOMString generateXPath();
  18496. [ChromeOnly, Pure, BinaryName="flattenedTreeParentNodeNonInline"]
  18497. readonly attribute Node? flattenedTreeParentNode;
  18498. [ChromeOnly, Pure, BinaryName="isInNativeAnonymousSubtree"]
  18499. readonly attribute boolean isNativeAnonymous;
  18500. // Maybe this would be useful to authors? https://github.com/whatwg/dom/issues/826
  18501. [Func="IsChromeOrUAWidget", Pure, BinaryName="containingShadow"]
  18502. readonly attribute ShadowRoot? containingShadowRoot;
  18503. // Mozilla devtools-specific stuff
  18504. /**
  18505. * If this element is a flex item (or has one or more anonymous box ancestors
  18506. * that chain up to an anonymous flex item), then this method returns the
  18507. * flex container that the flex item participates in. Otherwise, this method
  18508. * returns null.
  18509. */
  18510. [ChromeOnly]
  18511. readonly attribute Element? parentFlexElement;
  18512. #ifdef ACCESSIBILITY
  18513. [Func="mozilla::dom::AccessibleNode::IsAOMEnabled", SameObject]
  18514. readonly attribute AccessibleNode? accessibleNode;
  18515. #endif
  18516. };
  18517. dictionary GetRootNodeOptions {
  18518. boolean composed = false;
  18519. };
  18520. /* ---------------------- NodeFilter ----------------------------- */
  18521. /* ./webidl/NodeFilter.webidl */
  18522. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18523. /* This Source Code Form is subject to the terms of the Mozilla Public
  18524. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18525. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18526. *
  18527. * The origin of this IDL file is
  18528. * http://dom.spec.whatwg.org/#interface-nodefilter
  18529. */
  18530. [Exposed=Window]
  18531. callback interface NodeFilter {
  18532. // Constants for acceptNode()
  18533. const unsigned short FILTER_ACCEPT = 1;
  18534. const unsigned short FILTER_REJECT = 2;
  18535. const unsigned short FILTER_SKIP = 3;
  18536. // Constants for whatToShow
  18537. const unsigned long SHOW_ALL = 0xFFFFFFFF;
  18538. const unsigned long SHOW_ELEMENT = 0x1;
  18539. const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
  18540. const unsigned long SHOW_TEXT = 0x4;
  18541. const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
  18542. const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
  18543. const unsigned long SHOW_ENTITY = 0x20; // historical
  18544. const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
  18545. const unsigned long SHOW_COMMENT = 0x80;
  18546. const unsigned long SHOW_DOCUMENT = 0x100;
  18547. const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
  18548. const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
  18549. const unsigned long SHOW_NOTATION = 0x800; // historical
  18550. unsigned short acceptNode(Node node);
  18551. };
  18552. /* ---------------------- NodeIterator ----------------------------- */
  18553. /* ./webidl/NodeIterator.webidl */
  18554. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18555. /* This Source Code Form is subject to the terms of the Mozilla Public
  18556. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18557. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18558. *
  18559. * The origin of this IDL file is
  18560. * http://www.w3.org/TR/2012/WD-dom-20120105/
  18561. *
  18562. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18563. * liability, trademark and document use rules apply.
  18564. */
  18565. [Exposed=Window]
  18566. interface NodeIterator {
  18567. [Constant]
  18568. readonly attribute Node root;
  18569. [Pure]
  18570. readonly attribute Node? referenceNode;
  18571. [Pure]
  18572. readonly attribute boolean pointerBeforeReferenceNode;
  18573. [Constant]
  18574. readonly attribute unsigned long whatToShow;
  18575. [Constant]
  18576. readonly attribute NodeFilter? filter;
  18577. [Throws]
  18578. Node? nextNode();
  18579. [Throws]
  18580. Node? previousNode();
  18581. undefined detach();
  18582. };
  18583. /* ---------------------- NodeList ----------------------------- */
  18584. /* ./webidl/NodeList.webidl */
  18585. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18586. /* This Source Code Form is subject to the terms of the Mozilla Public
  18587. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18588. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18589. *
  18590. * The origin of this IDL file is
  18591. * http://www.w3.org/TR/2012/WD-dom-20120105/
  18592. *
  18593. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18594. * liability, trademark and document use rules apply.
  18595. */
  18596. [ProbablyShortLivingWrapper,
  18597. Exposed=Window]
  18598. interface NodeList {
  18599. getter Node? item(unsigned long index);
  18600. readonly attribute unsigned long length;
  18601. iterable<Node?>;
  18602. };
  18603. /* ---------------------- NonElementParentNode ----------------------------- */
  18604. /* ./webidl/NonElementParentNode.webidl */
  18605. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18606. /* This Source Code Form is subject to the terms of the Mozilla Public
  18607. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18608. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18609. *
  18610. * The origin of this IDL file is
  18611. * https://dom.spec.whatwg.org/#nonelementparentnode
  18612. */
  18613. interface mixin NonElementParentNode {
  18614. [Pure]
  18615. Element? getElementById(DOMString elementId);
  18616. };
  18617. /* ---------------------- Notification ----------------------------- */
  18618. /* ./webidl/Notification.webidl */
  18619. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18620. /* This Source Code Form is subject to the terms of the Mozilla Public
  18621. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18622. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18623. *
  18624. * The origin of this IDL file is
  18625. * https://notifications.spec.whatwg.org/
  18626. *
  18627. * Copyright:
  18628. * To the extent possible under law, the editors have waived all copyright and
  18629. * related or neighboring rights to this work.
  18630. */
  18631. [Exposed=(Window,Worker),
  18632. Func="mozilla::dom::Notification::PrefEnabled"]
  18633. interface Notification : EventTarget {
  18634. [Throws]
  18635. constructor(DOMString title, optional NotificationOptions options = {});
  18636. [GetterThrows]
  18637. static readonly attribute NotificationPermission permission;
  18638. [NewObject, Func="mozilla::dom::Notification::RequestPermissionEnabledForScope"]
  18639. static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback permissionCallback);
  18640. attribute EventHandler onclick;
  18641. attribute EventHandler onshow;
  18642. attribute EventHandler onerror;
  18643. attribute EventHandler onclose;
  18644. [Pure]
  18645. readonly attribute DOMString title;
  18646. [Pure]
  18647. readonly attribute NotificationDirection dir;
  18648. [Pure]
  18649. readonly attribute DOMString? lang;
  18650. [Pure]
  18651. readonly attribute DOMString? body;
  18652. [Constant]
  18653. readonly attribute DOMString? tag;
  18654. [Pure]
  18655. readonly attribute DOMString? icon;
  18656. [Constant, Pref="dom.webnotifications.requireinteraction.enabled"]
  18657. readonly attribute boolean requireInteraction;
  18658. [Constant, Pref="dom.webnotifications.silent.enabled"]
  18659. readonly attribute boolean silent;
  18660. [Cached, Frozen, Pure, Pref="dom.webnotifications.vibrate.enabled"]
  18661. readonly attribute sequence<unsigned long> vibrate;
  18662. [Constant]
  18663. readonly attribute any data;
  18664. undefined close();
  18665. };
  18666. typedef (unsigned long or sequence<unsigned long>) VibratePattern;
  18667. dictionary NotificationOptions {
  18668. NotificationDirection dir = "auto";
  18669. DOMString lang = "";
  18670. DOMString body = "";
  18671. DOMString tag = "";
  18672. DOMString icon = "";
  18673. boolean requireInteraction = false;
  18674. boolean silent = false;
  18675. VibratePattern vibrate;
  18676. any data = null;
  18677. NotificationBehavior mozbehavior = {};
  18678. };
  18679. dictionary GetNotificationOptions {
  18680. DOMString tag = "";
  18681. };
  18682. [GenerateToJSON]
  18683. dictionary NotificationBehavior {
  18684. boolean noscreen = false;
  18685. boolean noclear = false;
  18686. boolean showOnlyOnce = false;
  18687. DOMString soundFile = "";
  18688. sequence<unsigned long> vibrationPattern;
  18689. };
  18690. enum NotificationPermission {
  18691. "default",
  18692. "denied",
  18693. "granted"
  18694. };
  18695. callback NotificationPermissionCallback = undefined (NotificationPermission permission);
  18696. enum NotificationDirection {
  18697. "auto",
  18698. "ltr",
  18699. "rtl"
  18700. };
  18701. /* ---------------------- NotificationEvent ----------------------------- */
  18702. /* ./webidl/NotificationEvent.webidl */
  18703. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18704. /* This Source Code Form is subject to the terms of the Mozilla Public
  18705. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18706. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18707. *
  18708. * The origin of this IDL file is
  18709. * http://notifications.spec.whatwg.org/
  18710. *
  18711. * Copyright:
  18712. * To the extent possible under law, the editors have waived all copyright and
  18713. * related or neighboring rights to this work.
  18714. */
  18715. [Exposed=ServiceWorker,Func="mozilla::dom::Notification::PrefEnabled"]
  18716. interface NotificationEvent : ExtendableEvent {
  18717. constructor(DOMString type, NotificationEventInit eventInitDict);
  18718. [BinaryName="notification_"]
  18719. readonly attribute Notification notification;
  18720. };
  18721. dictionary NotificationEventInit : ExtendableEventInit {
  18722. required Notification notification;
  18723. };
  18724. /* ---------------------- NotifyPaintEvent ----------------------------- */
  18725. /* ./webidl/NotifyPaintEvent.webidl */
  18726. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18727. /* This Source Code Form is subject to the terms of the Mozilla Public
  18728. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18729. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18730. */
  18731. /**
  18732. * The NotifyPaintEvent interface is used for the MozDOMAfterPaint
  18733. * event, which fires at a window when painting has happened in
  18734. * that window.
  18735. */
  18736. [ChromeOnly,
  18737. Exposed=Window]
  18738. interface NotifyPaintEvent : Event
  18739. {
  18740. /**
  18741. * Get a list of rectangles which are affected. The rectangles are
  18742. * in CSS pixels relative to the viewport origin.
  18743. */
  18744. [ChromeOnly, NeedsCallerType]
  18745. readonly attribute DOMRectList clientRects;
  18746. /**
  18747. * Get the bounding box of the rectangles which are affected. The rectangle
  18748. * is in CSS pixels relative to the viewport origin.
  18749. */
  18750. [ChromeOnly, NeedsCallerType]
  18751. readonly attribute DOMRect boundingClientRect;
  18752. [ChromeOnly, NeedsCallerType]
  18753. readonly attribute PaintRequestList paintRequests;
  18754. [ChromeOnly, NeedsCallerType]
  18755. readonly attribute unsigned long long transactionId;
  18756. [ChromeOnly, NeedsCallerType]
  18757. readonly attribute DOMHighResTimeStamp paintTimeStamp;
  18758. };
  18759. /* ---------------------- OfflineAudioCompletionEvent ----------------------------- */
  18760. /* ./webidl/OfflineAudioCompletionEvent.webidl */
  18761. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18762. /* This Source Code Form is subject to the terms of the Mozilla Public
  18763. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18764. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18765. *
  18766. * The origin of this IDL file is
  18767. * https://webaudio.github.io/web-audio-api/
  18768. *
  18769. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18770. * liability, trademark and document use rules apply.
  18771. */
  18772. dictionary OfflineAudioCompletionEventInit : EventInit {
  18773. required AudioBuffer renderedBuffer;
  18774. };
  18775. [Pref="dom.webaudio.enabled",
  18776. Exposed=Window]
  18777. interface OfflineAudioCompletionEvent : Event {
  18778. constructor(DOMString type, OfflineAudioCompletionEventInit eventInitDict);
  18779. readonly attribute AudioBuffer renderedBuffer;
  18780. };
  18781. /* ---------------------- OfflineAudioContext ----------------------------- */
  18782. /* ./webidl/OfflineAudioContext.webidl */
  18783. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  18784. /* This Source Code Form is subject to the terms of the Mozilla Public
  18785. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18786. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18787. *
  18788. * The origin of this IDL file is
  18789. * https://webaudio.github.io/web-audio-api/
  18790. *
  18791. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18792. * liability, trademark and document use rules apply.
  18793. */
  18794. dictionary OfflineAudioContextOptions {
  18795. unsigned long numberOfChannels = 1;
  18796. required unsigned long length;
  18797. required float sampleRate;
  18798. };
  18799. [Pref="dom.webaudio.enabled",
  18800. Exposed=Window]
  18801. interface OfflineAudioContext : BaseAudioContext {
  18802. [Throws]
  18803. constructor(OfflineAudioContextOptions contextOptions);
  18804. [Throws]
  18805. constructor(unsigned long numberOfChannels, unsigned long length,
  18806. float sampleRate);
  18807. [NewObject]
  18808. Promise<AudioBuffer> startRendering();
  18809. // TODO: Promise<undefined> suspend (double suspendTime);
  18810. readonly attribute unsigned long length;
  18811. attribute EventHandler oncomplete;
  18812. };
  18813. /* ---------------------- OffscreenCanvas ----------------------------- */
  18814. /* ./webidl/OffscreenCanvas.webidl */
  18815. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18816. /* This Source Code Form is subject to the terms of the Mozilla Public
  18817. * License, v. 2.0. If a copy of the MPL was not distributed with this
  18818. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  18819. *
  18820. * For more information on this interface, please see
  18821. * https://html.spec.whatwg.org/#the-offscreencanvas-interface
  18822. */
  18823. typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) OffscreenRenderingContext;
  18824. dictionary ImageEncodeOptions {
  18825. DOMString type = "image/png";
  18826. unrestricted double quality;
  18827. };
  18828. enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2", "webgpu" };
  18829. [Exposed=(Window,Worker), Pref="gfx.offscreencanvas.enabled"]
  18830. interface OffscreenCanvas : EventTarget {
  18831. [Throws]
  18832. constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height);
  18833. [Pure, SetterThrows]
  18834. attribute [EnforceRange] unsigned long width;
  18835. [Pure, SetterThrows]
  18836. attribute [EnforceRange] unsigned long height;
  18837. [Throws]
  18838. OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId,
  18839. optional any contextOptions = null);
  18840. [Throws]
  18841. ImageBitmap transferToImageBitmap();
  18842. [NewObject]
  18843. Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {});
  18844. attribute EventHandler oncontextlost;
  18845. attribute EventHandler oncontextrestored;
  18846. // Deprecated by convertToBlob
  18847. [Deprecated="OffscreenCanvasToBlob", NewObject]
  18848. Promise<Blob> toBlob(optional DOMString type = "",
  18849. optional any encoderOptions);
  18850. };
  18851. /* ---------------------- OffscreenCanvasRenderingContext2D ----------------------------- */
  18852. /* ./webidl/OffscreenCanvasRenderingContext2D.webidl */
  18853. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18854. /* This Source Code Form is subject to the terms of the Mozilla Public
  18855. * License, v. 2.0. If a copy of the MPL was not distributed with this
  18856. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  18857. *
  18858. * For more information on this interface, please see
  18859. * https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context
  18860. */
  18861. [Exposed=(Window,Worker), Pref="gfx.offscreencanvas.enabled"]
  18862. interface OffscreenCanvasRenderingContext2D {
  18863. [Throws]
  18864. undefined commit();
  18865. readonly attribute OffscreenCanvas canvas;
  18866. };
  18867. OffscreenCanvasRenderingContext2D includes CanvasState;
  18868. OffscreenCanvasRenderingContext2D includes CanvasTransform;
  18869. OffscreenCanvasRenderingContext2D includes CanvasCompositing;
  18870. OffscreenCanvasRenderingContext2D includes CanvasImageSmoothing;
  18871. OffscreenCanvasRenderingContext2D includes CanvasFillStrokeStyles;
  18872. OffscreenCanvasRenderingContext2D includes CanvasShadowStyles;
  18873. OffscreenCanvasRenderingContext2D includes CanvasFilters;
  18874. OffscreenCanvasRenderingContext2D includes CanvasRect;
  18875. OffscreenCanvasRenderingContext2D includes CanvasDrawPath;
  18876. OffscreenCanvasRenderingContext2D includes CanvasText;
  18877. OffscreenCanvasRenderingContext2D includes CanvasDrawImage;
  18878. OffscreenCanvasRenderingContext2D includes CanvasImageData;
  18879. OffscreenCanvasRenderingContext2D includes CanvasPathDrawingStyles;
  18880. OffscreenCanvasRenderingContext2D includes CanvasTextDrawingStyles;
  18881. OffscreenCanvasRenderingContext2D includes CanvasPathMethods;
  18882. /* ---------------------- OscillatorNode ----------------------------- */
  18883. /* ./webidl/OscillatorNode.webidl */
  18884. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18885. /* This Source Code Form is subject to the terms of the Mozilla Public
  18886. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18887. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18888. *
  18889. * The origin of this IDL file is
  18890. * https://webaudio.github.io/web-audio-api/
  18891. *
  18892. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  18893. * liability, trademark and document use rules apply.
  18894. */
  18895. enum OscillatorType {
  18896. "sine",
  18897. "square",
  18898. "sawtooth",
  18899. "triangle",
  18900. "custom"
  18901. };
  18902. dictionary OscillatorOptions : AudioNodeOptions {
  18903. OscillatorType type = "sine";
  18904. float frequency = 440;
  18905. float detune = 0;
  18906. PeriodicWave periodicWave;
  18907. };
  18908. [Pref="dom.webaudio.enabled",
  18909. Exposed=Window]
  18910. interface OscillatorNode : AudioScheduledSourceNode {
  18911. [Throws]
  18912. constructor(BaseAudioContext context,
  18913. optional OscillatorOptions options = {});
  18914. [SetterThrows]
  18915. attribute OscillatorType type;
  18916. readonly attribute AudioParam frequency; // in Hertz
  18917. readonly attribute AudioParam detune; // in Cents
  18918. undefined setPeriodicWave(PeriodicWave periodicWave);
  18919. };
  18920. // Mozilla extensions
  18921. OscillatorNode includes AudioNodePassThrough;
  18922. /* ---------------------- PageTransitionEvent ----------------------------- */
  18923. /* ./webidl/PageTransitionEvent.webidl */
  18924. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18925. /* This Source Code Form is subject to the terms of the Mozilla Public
  18926. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18927. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18928. */
  18929. /**
  18930. * The PageTransitionEvent interface is used for the pageshow and
  18931. * pagehide events, which are generic events that apply to both page
  18932. * load/unload and saving/restoring a document from session history.
  18933. */
  18934. [Exposed=Window]
  18935. interface PageTransitionEvent : Event
  18936. {
  18937. constructor(DOMString type,
  18938. optional PageTransitionEventInit eventInitDict = {});
  18939. /**
  18940. * Set to true if the document has been or will be persisted across
  18941. * firing of the event. For example, if a document is being cached in
  18942. * session history, |persisted| is true for the PageHide event.
  18943. */
  18944. readonly attribute boolean persisted;
  18945. // Whether the document is in the middle of a frame swap.
  18946. [ChromeOnly]
  18947. readonly attribute boolean inFrameSwap;
  18948. };
  18949. dictionary PageTransitionEventInit : EventInit
  18950. {
  18951. boolean persisted = false;
  18952. boolean inFrameSwap = false;
  18953. };
  18954. /* ---------------------- PaintRequest ----------------------------- */
  18955. /* ./webidl/PaintRequest.webidl */
  18956. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18957. /* This Source Code Form is subject to the terms of the Mozilla Public
  18958. * License, v. 2.0. If a copy of the MPL was not distributed with this
  18959. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  18960. /**
  18961. * These objects are exposed by the MozDOMAfterPaint event. Each one represents
  18962. * a request to repaint a rectangle that was generated by the browser.
  18963. */
  18964. [Exposed=Window]
  18965. interface PaintRequest {
  18966. /**
  18967. * The client rect where invalidation was triggered.
  18968. */
  18969. readonly attribute DOMRect clientRect;
  18970. /**
  18971. * The reason for the request, as a string. If an empty string, then we don't know
  18972. * the reason (this is common). Reasons include "scroll repaint", meaning that we
  18973. * needed to repaint the rectangle due to scrolling, and "scroll copy", meaning
  18974. * that we updated the rectangle due to scrolling but instead of painting
  18975. * manually, we were able to do a copy from another area of the screen.
  18976. */
  18977. readonly attribute DOMString reason;
  18978. };
  18979. /* ---------------------- PaintRequestList ----------------------------- */
  18980. /* ./webidl/PaintRequestList.webidl */
  18981. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18982. /* This Source Code Form is subject to the terms of the Mozilla Public
  18983. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  18984. * You can obtain one at http://mozilla.org/MPL/2.0/.
  18985. */
  18986. [Exposed=Window]
  18987. interface PaintRequestList {
  18988. readonly attribute unsigned long length;
  18989. getter PaintRequest? item(unsigned long index);
  18990. };
  18991. /* ---------------------- PaintWorkletGlobalScope ----------------------------- */
  18992. /* ./webidl/PaintWorkletGlobalScope.webidl */
  18993. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  18994. /* This Source Code Form is subject to the terms of the Mozilla Public
  18995. * License, v. 2.0. If a copy of the MPL was not distributed with this
  18996. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  18997. *
  18998. * The origin of this IDL file is
  18999. * https://drafts.css-houdini.org/css-paint-api-1/#paintworkletglobalscope
  19000. */
  19001. [Global=(Worklet,PaintWorklet),Exposed=PaintWorklet]
  19002. interface PaintWorkletGlobalScope : WorkletGlobalScope {
  19003. undefined registerPaint(DOMString name, VoidFunction paintCtor);
  19004. };
  19005. /* ---------------------- PannerNode ----------------------------- */
  19006. /* ./webidl/PannerNode.webidl */
  19007. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19008. /* This Source Code Form is subject to the terms of the Mozilla Public
  19009. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19010. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19011. *
  19012. * The origin of this IDL file is
  19013. * https://webaudio.github.io/web-audio-api/
  19014. *
  19015. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19016. * liability, trademark and document use rules apply.
  19017. */
  19018. enum PanningModelType {
  19019. "equalpower",
  19020. "HRTF"
  19021. };
  19022. enum DistanceModelType {
  19023. "linear",
  19024. "inverse",
  19025. "exponential"
  19026. };
  19027. dictionary PannerOptions : AudioNodeOptions {
  19028. PanningModelType panningModel = "equalpower";
  19029. DistanceModelType distanceModel = "inverse";
  19030. float positionX = 0;
  19031. float positionY = 0;
  19032. float positionZ = 0;
  19033. float orientationX = 1;
  19034. float orientationY = 0;
  19035. float orientationZ = 0;
  19036. double refDistance = 1;
  19037. double maxDistance = 10000;
  19038. double rolloffFactor = 1;
  19039. double coneInnerAngle = 360;
  19040. double coneOuterAngle = 360;
  19041. double coneOuterGain = 0;
  19042. };
  19043. [Pref="dom.webaudio.enabled",
  19044. Exposed=Window]
  19045. interface PannerNode : AudioNode {
  19046. [Throws]
  19047. constructor(BaseAudioContext context, optional PannerOptions options = {});
  19048. // Default for stereo is equalpower
  19049. attribute PanningModelType panningModel;
  19050. // Uses a 3D cartesian coordinate system
  19051. [Throws]
  19052. undefined setPosition(double x, double y, double z);
  19053. [Throws]
  19054. undefined setOrientation(double x, double y, double z);
  19055. // Cartesian coordinate for position
  19056. readonly attribute AudioParam positionX;
  19057. readonly attribute AudioParam positionY;
  19058. readonly attribute AudioParam positionZ;
  19059. // Cartesian coordinate for orientation
  19060. readonly attribute AudioParam orientationX;
  19061. readonly attribute AudioParam orientationY;
  19062. readonly attribute AudioParam orientationZ;
  19063. // Distance model and attributes
  19064. attribute DistanceModelType distanceModel;
  19065. [SetterThrows]
  19066. attribute double refDistance;
  19067. [SetterThrows]
  19068. attribute double maxDistance;
  19069. [SetterThrows]
  19070. attribute double rolloffFactor;
  19071. // Directional sound cone
  19072. attribute double coneInnerAngle;
  19073. attribute double coneOuterAngle;
  19074. [SetterThrows]
  19075. attribute double coneOuterGain;
  19076. };
  19077. // Mozilla extension
  19078. PannerNode includes AudioNodePassThrough;
  19079. /* ---------------------- ParentNode ----------------------------- */
  19080. /* ./webidl/ParentNode.webidl */
  19081. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19082. /* This Source Code Form is subject to the terms of the Mozilla Public
  19083. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19084. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19085. *
  19086. * The origin of this IDL file is
  19087. * http://dom.spec.whatwg.org/#interface-parentnode
  19088. */
  19089. interface mixin ParentNode {
  19090. [Constant]
  19091. readonly attribute HTMLCollection children;
  19092. [Pure]
  19093. readonly attribute Element? firstElementChild;
  19094. [Pure]
  19095. readonly attribute Element? lastElementChild;
  19096. [Pure]
  19097. readonly attribute unsigned long childElementCount;
  19098. [ChromeOnly]
  19099. HTMLCollection getElementsByAttribute(DOMString name,
  19100. [LegacyNullToEmptyString] DOMString value);
  19101. [ChromeOnly, Throws]
  19102. HTMLCollection getElementsByAttributeNS(DOMString? namespaceURI, DOMString name,
  19103. [LegacyNullToEmptyString] DOMString value);
  19104. [CEReactions, Throws, Unscopable]
  19105. undefined prepend((Node or DOMString)... nodes);
  19106. [CEReactions, Throws, Unscopable]
  19107. undefined append((Node or DOMString)... nodes);
  19108. [CEReactions, Throws, Unscopable]
  19109. undefined replaceChildren((Node or DOMString)... nodes);
  19110. [Throws, Pure]
  19111. Element? querySelector(UTF8String selectors);
  19112. [Throws, Pure]
  19113. NodeList querySelectorAll(UTF8String selectors);
  19114. };
  19115. /* ---------------------- PaymentAddress ----------------------------- */
  19116. /* ./webidl/PaymentAddress.webidl */
  19117. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19118. /* This Source Code Form is subject to the terms of the Mozilla Public
  19119. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19120. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19121. *
  19122. * The origin of this WebIDL file is
  19123. * https://www.w3.org/TR/payment-request/#paymentaddress-interface
  19124. *
  19125. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19126. * liability, trademark and document use rules apply.
  19127. */
  19128. [SecureContext,
  19129. Func="mozilla::dom::PaymentRequest::PrefEnabled",
  19130. Exposed=Window]
  19131. interface PaymentAddress {
  19132. [Default] object toJSON();
  19133. readonly attribute DOMString country;
  19134. // TODO: Use FrozenArray once available. (Bug 1236777)
  19135. // readonly attribute FrozenArray<DOMString> addressLine;
  19136. [Frozen, Cached, Pure]
  19137. readonly attribute sequence<DOMString> addressLine;
  19138. readonly attribute DOMString region;
  19139. readonly attribute DOMString regionCode;
  19140. readonly attribute DOMString city;
  19141. readonly attribute DOMString dependentLocality;
  19142. readonly attribute DOMString postalCode;
  19143. readonly attribute DOMString sortingCode;
  19144. readonly attribute DOMString organization;
  19145. readonly attribute DOMString recipient;
  19146. readonly attribute DOMString phone;
  19147. };
  19148. /* ---------------------- PaymentMethodChangeEvent ----------------------------- */
  19149. /* ./webidl/PaymentMethodChangeEvent.webidl */
  19150. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19151. /* This Source Code Form is subject to the terms of the Mozilla Public
  19152. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19153. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19154. *
  19155. * The origin of this WebIDL file is
  19156. * https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface
  19157. *
  19158. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19159. * liability, trademark and document use rules apply.
  19160. */
  19161. [SecureContext,
  19162. Exposed=Window,
  19163. Func="mozilla::dom::PaymentRequest::PrefEnabled"]
  19164. interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
  19165. constructor(DOMString type,
  19166. optional PaymentMethodChangeEventInit eventInitDict = {});
  19167. readonly attribute DOMString methodName;
  19168. readonly attribute object? methodDetails;
  19169. };
  19170. dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit {
  19171. DOMString methodName = "";
  19172. object? methodDetails = null;
  19173. };
  19174. /* ---------------------- PaymentRequest ----------------------------- */
  19175. /* ./webidl/PaymentRequest.webidl */
  19176. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19177. /* This Source Code Form is subject to the terms of the Mozilla Public
  19178. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19179. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19180. *
  19181. * The origin of this WebIDL file is
  19182. * https://w3c.github.io/payment-request/#paymentrequest-interface
  19183. * https://w3c.github.io/payment-request/#idl-index
  19184. *
  19185. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19186. * liability, trademark and document use rules apply.
  19187. */
  19188. dictionary PaymentMethodData {
  19189. required DOMString supportedMethods;
  19190. object data;
  19191. };
  19192. dictionary PaymentCurrencyAmount {
  19193. required DOMString currency;
  19194. required DOMString value;
  19195. };
  19196. dictionary PaymentItem {
  19197. required DOMString label;
  19198. required PaymentCurrencyAmount amount;
  19199. boolean pending = false;
  19200. };
  19201. dictionary PaymentShippingOption {
  19202. required DOMString id;
  19203. required DOMString label;
  19204. required PaymentCurrencyAmount amount;
  19205. boolean selected = false;
  19206. };
  19207. dictionary PaymentDetailsModifier {
  19208. required DOMString supportedMethods;
  19209. PaymentItem total;
  19210. sequence<PaymentItem> additionalDisplayItems;
  19211. object data;
  19212. };
  19213. dictionary PaymentDetailsBase {
  19214. sequence<PaymentItem> displayItems;
  19215. sequence<PaymentShippingOption> shippingOptions;
  19216. sequence<PaymentDetailsModifier> modifiers;
  19217. };
  19218. dictionary PaymentDetailsInit : PaymentDetailsBase {
  19219. DOMString id;
  19220. required PaymentItem total;
  19221. };
  19222. [GenerateInitFromJSON, GenerateToJSON]
  19223. dictionary AddressErrors {
  19224. DOMString addressLine;
  19225. DOMString city;
  19226. DOMString country;
  19227. DOMString dependentLocality;
  19228. DOMString organization;
  19229. DOMString phone;
  19230. DOMString postalCode;
  19231. DOMString recipient;
  19232. DOMString region;
  19233. DOMString regionCode;
  19234. DOMString sortingCode;
  19235. };
  19236. dictionary PaymentValidationErrors {
  19237. PayerErrors payer;
  19238. AddressErrors shippingAddress;
  19239. DOMString error;
  19240. object paymentMethod;
  19241. };
  19242. [GenerateInitFromJSON, GenerateToJSON]
  19243. dictionary PayerErrors {
  19244. DOMString email;
  19245. DOMString name;
  19246. DOMString phone;
  19247. };
  19248. dictionary PaymentDetailsUpdate : PaymentDetailsBase {
  19249. DOMString error;
  19250. AddressErrors shippingAddressErrors;
  19251. PayerErrors payerErrors;
  19252. object paymentMethodErrors;
  19253. PaymentItem total;
  19254. };
  19255. enum PaymentShippingType {
  19256. "shipping",
  19257. "delivery",
  19258. "pickup"
  19259. };
  19260. dictionary PaymentOptions {
  19261. boolean requestPayerName = false;
  19262. boolean requestPayerEmail = false;
  19263. boolean requestPayerPhone = false;
  19264. boolean requestShipping = false;
  19265. boolean requestBillingAddress = false;
  19266. PaymentShippingType shippingType = "shipping";
  19267. };
  19268. [SecureContext,
  19269. Func="mozilla::dom::PaymentRequest::PrefEnabled",
  19270. Exposed=Window]
  19271. interface PaymentRequest : EventTarget {
  19272. [Throws]
  19273. constructor(sequence<PaymentMethodData> methodData,
  19274. PaymentDetailsInit details,
  19275. optional PaymentOptions options = {});
  19276. [NewObject]
  19277. Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise);
  19278. [NewObject]
  19279. Promise<undefined> abort();
  19280. [NewObject]
  19281. Promise<boolean> canMakePayment();
  19282. readonly attribute DOMString id;
  19283. readonly attribute PaymentAddress? shippingAddress;
  19284. readonly attribute DOMString? shippingOption;
  19285. readonly attribute PaymentShippingType? shippingType;
  19286. attribute EventHandler onmerchantvalidation;
  19287. attribute EventHandler onshippingaddresschange;
  19288. attribute EventHandler onshippingoptionchange;
  19289. attribute EventHandler onpaymentmethodchange;
  19290. };
  19291. /* ---------------------- PaymentRequestUpdateEvent ----------------------------- */
  19292. /* ./webidl/PaymentRequestUpdateEvent.webidl */
  19293. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19294. /* This Source Code Form is subject to the terms of the Mozilla Public
  19295. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19296. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19297. *
  19298. * The origin of this WebIDL file is
  19299. * https://w3c.github.io/payment-request/#paymentrequestupdateevent-interface
  19300. *
  19301. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19302. * liability, trademark and document use rules apply.
  19303. */
  19304. [SecureContext,
  19305. Func="mozilla::dom::PaymentRequest::PrefEnabled",
  19306. Exposed=Window]
  19307. interface PaymentRequestUpdateEvent : Event {
  19308. constructor(DOMString type,
  19309. optional PaymentRequestUpdateEventInit eventInitDict = {});
  19310. [Throws]
  19311. undefined updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
  19312. };
  19313. dictionary PaymentRequestUpdateEventInit : EventInit {
  19314. };
  19315. /* ---------------------- PaymentResponse ----------------------------- */
  19316. /* ./webidl/PaymentResponse.webidl */
  19317. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19318. /* This Source Code Form is subject to the terms of the Mozilla Public
  19319. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19320. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19321. *
  19322. * The origin of this WebIDL file is
  19323. * https:/w3c.github.io/payment-request/#paymentresponse-interface
  19324. *
  19325. * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19326. * liability, trademark and document use rules apply.
  19327. */
  19328. enum PaymentComplete {
  19329. "success",
  19330. "fail",
  19331. "unknown"
  19332. };
  19333. [SecureContext,
  19334. Func="mozilla::dom::PaymentRequest::PrefEnabled",
  19335. Exposed=Window]
  19336. interface PaymentResponse : EventTarget {
  19337. [Default] object toJSON();
  19338. readonly attribute DOMString requestId;
  19339. readonly attribute DOMString methodName;
  19340. readonly attribute object details;
  19341. readonly attribute PaymentAddress? shippingAddress;
  19342. readonly attribute DOMString? shippingOption;
  19343. readonly attribute DOMString? payerName;
  19344. readonly attribute DOMString? payerEmail;
  19345. readonly attribute DOMString? payerPhone;
  19346. [NewObject]
  19347. Promise<undefined> complete(optional PaymentComplete result = "unknown");
  19348. // If the dictionary argument has no required members, it must be optional.
  19349. [NewObject]
  19350. Promise<undefined> retry(optional PaymentValidationErrors errorFields = {});
  19351. attribute EventHandler onpayerdetailchange;
  19352. };
  19353. /* ---------------------- PeerConnectionImpl ----------------------------- */
  19354. /* ./webidl/PeerConnectionImpl.webidl */
  19355. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19356. /* This Source Code Form is subject to the terms of the Mozilla Public
  19357. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19358. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19359. *
  19360. * PeerConnection.js' interface to the C++ PeerConnectionImpl.
  19361. *
  19362. * Do not confuse with RTCPeerConnection. This interface is purely for
  19363. * communication between the PeerConnection JS DOM binding and the C++
  19364. * implementation.
  19365. *
  19366. * See media/webrtc/signaling/include/PeerConnectionImpl.h
  19367. *
  19368. */
  19369. interface nsISupports;
  19370. callback ChainedOperation = Promise<any> ();
  19371. /* Must be created first. Observer events will be dispatched on the thread provided */
  19372. [ChromeOnly,
  19373. Exposed=Window]
  19374. interface PeerConnectionImpl {
  19375. constructor();
  19376. /* Must be called first. Observer events dispatched on the thread provided */
  19377. [Throws]
  19378. undefined initialize(PeerConnectionObserver observer, Window window);
  19379. /* JSEP calls */
  19380. [Throws]
  19381. undefined createOffer(optional RTCOfferOptions options = {});
  19382. [Throws]
  19383. undefined createAnswer();
  19384. [Throws]
  19385. undefined setLocalDescription(long action, DOMString sdp);
  19386. [Throws]
  19387. undefined setRemoteDescription(long action, DOMString sdp);
  19388. Promise<RTCStatsReport> getStats(MediaStreamTrack? selector);
  19389. sequence<MediaStream> getRemoteStreams();
  19390. /* Adds the tracks created by GetUserMedia */
  19391. [Throws]
  19392. RTCRtpTransceiver addTransceiver(RTCRtpTransceiverInit init,
  19393. DOMString kind,
  19394. MediaStreamTrack? sendTrack,
  19395. boolean addTrackMagic);
  19396. sequence<RTCRtpTransceiver> getTransceivers();
  19397. [Throws]
  19398. undefined closeStreams();
  19399. [Throws]
  19400. undefined enablePacketDump(unsigned long level,
  19401. mozPacketDumpType type,
  19402. boolean sending);
  19403. [Throws]
  19404. undefined disablePacketDump(unsigned long level,
  19405. mozPacketDumpType type,
  19406. boolean sending);
  19407. /* As the ICE candidates roll in this one should be called each time
  19408. * in order to keep the candidate list up-to-date for the next SDP-related
  19409. * call PeerConnectionImpl does not parse ICE candidates, just sticks them
  19410. * into the SDP.
  19411. */
  19412. [Throws]
  19413. undefined addIceCandidate(DOMString candidate,
  19414. DOMString mid,
  19415. DOMString ufrag,
  19416. unsigned short? level);
  19417. /* Shuts down threads, deletes state */
  19418. [Throws]
  19419. undefined close();
  19420. [Throws]
  19421. undefined setConfiguration(optional RTCConfiguration config = {});
  19422. undefined restartIce();
  19423. undefined restartIceNoRenegotiationNeeded();
  19424. /* Notify DOM window if this plugin crash is ours. */
  19425. boolean pluginCrash(unsigned long long pluginId, DOMString name);
  19426. // Only throws if promise creation fails
  19427. [Throws]
  19428. Promise<undefined> onSetDescriptionSuccess(RTCSdpType type, boolean remote);
  19429. undefined onSetDescriptionError();
  19430. /* Attributes */
  19431. /* This provides the implementation with the certificate it uses to
  19432. * authenticate itself. The JS side must set this before calling
  19433. * createOffer/createAnswer or retrieving the value of fingerprint. This has
  19434. * to be delayed because generating the certificate takes some time. */
  19435. attribute RTCCertificate certificate;
  19436. [Constant]
  19437. readonly attribute DOMString fingerprint;
  19438. readonly attribute DOMString currentLocalDescription;
  19439. readonly attribute DOMString pendingLocalDescription;
  19440. readonly attribute DOMString currentRemoteDescription;
  19441. readonly attribute DOMString pendingRemoteDescription;
  19442. readonly attribute boolean? currentOfferer;
  19443. readonly attribute boolean? pendingOfferer;
  19444. readonly attribute RTCIceConnectionState iceConnectionState;
  19445. readonly attribute RTCIceGatheringState iceGatheringState;
  19446. readonly attribute RTCPeerConnectionState connectionState;
  19447. readonly attribute RTCSignalingState signalingState;
  19448. attribute DOMString id;
  19449. [SetterThrows]
  19450. attribute DOMString peerIdentity;
  19451. readonly attribute boolean privacyRequested;
  19452. readonly attribute RTCSctpTransport? sctp;
  19453. /* Data channels */
  19454. [Throws]
  19455. RTCDataChannel createDataChannel(DOMString label, DOMString protocol,
  19456. unsigned short type, boolean ordered,
  19457. unsigned short maxTime, unsigned short maxNum,
  19458. boolean externalNegotiated, unsigned short stream);
  19459. [Throws]
  19460. Promise<any> chain(ChainedOperation op);
  19461. undefined updateNegotiationNeeded();
  19462. boolean createdSender(RTCRtpSender sender);
  19463. };
  19464. /* ---------------------- PeerConnectionObserver ----------------------------- */
  19465. /* ./webidl/PeerConnectionObserver.webidl */
  19466. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19467. /* This Source Code Form is subject to the terms of the Mozilla Public
  19468. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19469. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19470. */
  19471. interface nsISupports;
  19472. dictionary PCErrorData
  19473. {
  19474. required PCError name;
  19475. required DOMString message;
  19476. // Will need to add more stuff (optional) for RTCError
  19477. };
  19478. [ChromeOnly,
  19479. JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
  19480. Exposed=Window]
  19481. interface PeerConnectionObserver
  19482. {
  19483. [Throws]
  19484. constructor(RTCPeerConnection domPC);
  19485. /* JSEP callbacks */
  19486. undefined onCreateOfferSuccess(DOMString offer);
  19487. undefined onCreateOfferError(PCErrorData error);
  19488. undefined onCreateAnswerSuccess(DOMString answer);
  19489. undefined onCreateAnswerError(PCErrorData error);
  19490. undefined onSetDescriptionSuccess();
  19491. undefined onSetDescriptionError(PCErrorData error);
  19492. undefined onAddIceCandidateSuccess();
  19493. undefined onAddIceCandidateError(PCErrorData error);
  19494. undefined onIceCandidate(unsigned short level, DOMString mid, DOMString candidate, DOMString ufrag);
  19495. /* Data channel callbacks */
  19496. undefined notifyDataChannel(RTCDataChannel channel);
  19497. /* Notification of one of several types of state changed */
  19498. undefined onStateChange(PCObserverStateType state);
  19499. /*
  19500. Lets PeerConnectionImpl fire track events on the RTCPeerConnection
  19501. */
  19502. undefined fireTrackEvent(RTCRtpReceiver receiver, sequence<MediaStream> streams);
  19503. /*
  19504. Lets PeerConnectionImpl fire addstream events on the RTCPeerConnection
  19505. */
  19506. undefined fireStreamEvent(MediaStream stream);
  19507. undefined fireNegotiationNeededEvent();
  19508. /* Packet dump callback */
  19509. undefined onPacket(unsigned long level, mozPacketDumpType type, boolean sending,
  19510. ArrayBuffer packet);
  19511. };
  19512. /* ---------------------- PeerConnectionObserverEnums ----------------------------- */
  19513. /* ./webidl/PeerConnectionObserverEnums.webidl */
  19514. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19515. /* This Source Code Form is subject to the terms of the Mozilla Public
  19516. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19517. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19518. *
  19519. * This is in a separate file so it can be shared with unittests.
  19520. */
  19521. enum PCObserverStateType {
  19522. "None",
  19523. "IceConnectionState",
  19524. "IceGatheringState",
  19525. "SignalingState",
  19526. "ConnectionState",
  19527. };
  19528. enum PCError {
  19529. "UnknownError",
  19530. "InvalidAccessError",
  19531. "InvalidStateError",
  19532. "InvalidModificationError",
  19533. "OperationError",
  19534. "NotSupportedError",
  19535. "SyntaxError",
  19536. "NotReadableError",
  19537. "TypeError",
  19538. "RangeError",
  19539. "InvalidCharacterError"
  19540. };
  19541. /* ---------------------- Performance ----------------------------- */
  19542. /* ./webidl/Performance.webidl */
  19543. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19544. /* This Source Code Form is subject to the terms of the Mozilla Public
  19545. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19546. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19547. *
  19548. * The origin of this IDL file is
  19549. * https://w3c.github.io/hr-time/#sec-performance
  19550. * https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
  19551. * https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
  19552. * https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
  19553. * https://w3c.github.io/user-timing/#extensions-performance-interface
  19554. *
  19555. * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang).
  19556. * W3C liability, trademark and document use rules apply.
  19557. */
  19558. // DOMTimeStamp is deprecated, use EpochTimeStamp instead.
  19559. typedef unsigned long long DOMTimeStamp;
  19560. typedef unsigned long long EpochTimeStamp;
  19561. typedef double DOMHighResTimeStamp;
  19562. typedef sequence <PerformanceEntry> PerformanceEntryList;
  19563. // https://w3c.github.io/hr-time/#sec-performance
  19564. [Exposed=(Window,Worker)]
  19565. interface Performance : EventTarget {
  19566. [DependsOn=DeviceState, Affects=Nothing]
  19567. DOMHighResTimeStamp now();
  19568. [Constant]
  19569. readonly attribute DOMHighResTimeStamp timeOrigin;
  19570. [Default] object toJSON();
  19571. };
  19572. // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
  19573. [Exposed=Window]
  19574. partial interface Performance {
  19575. [Constant]
  19576. readonly attribute PerformanceTiming timing;
  19577. [Constant]
  19578. readonly attribute PerformanceNavigation navigation;
  19579. };
  19580. // https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
  19581. [Exposed=(Window,Worker)]
  19582. partial interface Performance {
  19583. PerformanceEntryList getEntries();
  19584. PerformanceEntryList getEntriesByType(DOMString entryType);
  19585. PerformanceEntryList getEntriesByName(DOMString name, optional DOMString
  19586. entryType);
  19587. };
  19588. // https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
  19589. [Exposed=(Window,Worker)]
  19590. partial interface Performance {
  19591. undefined clearResourceTimings();
  19592. undefined setResourceTimingBufferSize(unsigned long maxSize);
  19593. attribute EventHandler onresourcetimingbufferfull;
  19594. };
  19595. // GC microbenchmarks, pref-guarded, not for general use (bug 1125412)
  19596. [Exposed=Window]
  19597. partial interface Performance {
  19598. [Pref="dom.enable_memory_stats"]
  19599. readonly attribute object mozMemory;
  19600. };
  19601. // https://w3c.github.io/user-timing/#extensions-performance-interface
  19602. dictionary PerformanceMarkOptions {
  19603. any detail;
  19604. DOMHighResTimeStamp startTime;
  19605. };
  19606. // https://w3c.github.io/user-timing/#extensions-performance-interface
  19607. dictionary PerformanceMeasureOptions {
  19608. any detail;
  19609. (DOMString or DOMHighResTimeStamp) start;
  19610. DOMHighResTimeStamp duration;
  19611. (DOMString or DOMHighResTimeStamp) end;
  19612. };
  19613. // https://w3c.github.io/user-timing/#extensions-performance-interface
  19614. [Exposed=(Window,Worker)]
  19615. partial interface Performance {
  19616. [Throws]
  19617. PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions = {});
  19618. undefined clearMarks(optional DOMString markName);
  19619. [Throws]
  19620. PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions = {}, optional DOMString endMark);
  19621. undefined clearMeasures(optional DOMString measureName);
  19622. };
  19623. [Exposed=Window]
  19624. partial interface Performance {
  19625. [Pref="dom.enable_event_timing", SameObject]
  19626. readonly attribute EventCounts eventCounts;
  19627. };
  19628. /* ---------------------- PerformanceEntry ----------------------------- */
  19629. /* ./webidl/PerformanceEntry.webidl */
  19630. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19631. /* This Source Code Form is subject to the terms of the Mozilla Public
  19632. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19633. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19634. *
  19635. * The origin of this IDL file is
  19636. * https://w3c.github.io/performance-timeline/#dom-performanceentry
  19637. *
  19638. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19639. * liability, trademark and document use rules apply.
  19640. */
  19641. [Exposed=(Window,Worker)]
  19642. interface PerformanceEntry
  19643. {
  19644. readonly attribute DOMString name;
  19645. readonly attribute DOMString entryType;
  19646. readonly attribute DOMHighResTimeStamp startTime;
  19647. readonly attribute DOMHighResTimeStamp duration;
  19648. [Default] object toJSON();
  19649. };
  19650. /* ---------------------- PerformanceEntryEvent ----------------------------- */
  19651. /* ./webidl/PerformanceEntryEvent.webidl */
  19652. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19653. /* This Source Code Form is subject to the terms of the Mozilla Public
  19654. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19655. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19656. */
  19657. dictionary PerformanceEntryEventInit : EventInit
  19658. {
  19659. DOMString name = "";
  19660. DOMString entryType = "";
  19661. DOMHighResTimeStamp startTime = 0;
  19662. DOMHighResTimeStamp duration = 0;
  19663. double epoch = 0;
  19664. DOMString origin = "";
  19665. };
  19666. [ChromeOnly,
  19667. Exposed=Window]
  19668. interface PerformanceEntryEvent : Event
  19669. {
  19670. constructor(DOMString type,
  19671. optional PerformanceEntryEventInit eventInitDict = {});
  19672. readonly attribute DOMString name;
  19673. readonly attribute DOMString entryType;
  19674. readonly attribute DOMHighResTimeStamp startTime;
  19675. readonly attribute DOMHighResTimeStamp duration;
  19676. readonly attribute double epoch;
  19677. readonly attribute DOMString origin;
  19678. };
  19679. /* ---------------------- PerformanceEventTiming ----------------------------- */
  19680. /* ./webidl/PerformanceEventTiming.webidl */
  19681. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19682. /* This Source Code Form is subject to the terms of the Mozilla Public
  19683. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19684. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19685. *
  19686. * The origin of this IDL file is
  19687. * https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
  19688. *
  19689. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19690. * liability, trademark and document use rules apply.
  19691. */
  19692. [Pref="dom.enable_event_timing",
  19693. Exposed=Window]
  19694. interface EventCounts {
  19695. readonly maplike<DOMString, unsigned long long>;
  19696. };
  19697. [Pref="dom.enable_event_timing",
  19698. Exposed=Window]
  19699. interface PerformanceEventTiming : PerformanceEntry {
  19700. readonly attribute DOMHighResTimeStamp processingStart;
  19701. readonly attribute DOMHighResTimeStamp processingEnd;
  19702. readonly attribute boolean cancelable;
  19703. readonly attribute Node? target;
  19704. [Default] object toJSON();
  19705. };
  19706. /* ---------------------- PerformanceLargestContentfulPaint ----------------------------- */
  19707. /* ./webidl/PerformanceLargestContentfulPaint.webidl */
  19708. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19709. /* This Source Code Form is subject to the terms of the Mozilla Public
  19710. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19711. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19712. *
  19713. * The origin of this IDL file is
  19714. * https://w3c.github.io/largest-contentful-paint/
  19715. *
  19716. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19717. * liability, trademark and document use rules apply.
  19718. */
  19719. [Pref="dom.enable_largest_contentful_paint",
  19720. Exposed=Window]
  19721. interface LargestContentfulPaint : PerformanceEntry {
  19722. readonly attribute DOMHighResTimeStamp renderTime;
  19723. readonly attribute DOMHighResTimeStamp loadTime;
  19724. readonly attribute unsigned long size;
  19725. readonly attribute DOMString id;
  19726. readonly attribute DOMString url;
  19727. readonly attribute Element? element;
  19728. [Default] object toJSON();
  19729. };
  19730. /* ---------------------- PerformanceMark ----------------------------- */
  19731. /* ./webidl/PerformanceMark.webidl */
  19732. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19733. /* This Source Code Form is subject to the terms of the Mozilla Public
  19734. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19735. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19736. *
  19737. * The origin of this IDL file is
  19738. * http://www.w3.org/TR/user-timing/#performancemark
  19739. */
  19740. [Exposed=(Window,Worker)]
  19741. interface PerformanceMark : PerformanceEntry
  19742. {
  19743. [Throws]
  19744. constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {});
  19745. readonly attribute any detail;
  19746. };
  19747. /* ---------------------- PerformanceMeasure ----------------------------- */
  19748. /* ./webidl/PerformanceMeasure.webidl */
  19749. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19750. /* This Source Code Form is subject to the terms of the Mozilla Public
  19751. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19752. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19753. *
  19754. * The origin of this IDL file is
  19755. * http://www.w3.org/TR/user-timing/#performancemeasure
  19756. */
  19757. [Exposed=(Window,Worker)]
  19758. interface PerformanceMeasure : PerformanceEntry
  19759. {
  19760. readonly attribute any detail;
  19761. };
  19762. /* ---------------------- PerformanceNavigation ----------------------------- */
  19763. /* ./webidl/PerformanceNavigation.webidl */
  19764. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19765. /* This Source Code Form is subject to the terms of the Mozilla Public
  19766. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19767. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19768. *
  19769. * The origin of this IDL file is
  19770. * https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
  19771. *
  19772. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19773. * liability, trademark and document use rules apply.
  19774. */
  19775. [Exposed=Window]
  19776. interface PerformanceNavigation {
  19777. const unsigned short TYPE_NAVIGATE = 0;
  19778. const unsigned short TYPE_RELOAD = 1;
  19779. const unsigned short TYPE_BACK_FORWARD = 2;
  19780. const unsigned short TYPE_RESERVED = 255;
  19781. readonly attribute unsigned short type;
  19782. readonly attribute unsigned short redirectCount;
  19783. [Default] object toJSON();
  19784. };
  19785. /* ---------------------- PerformanceNavigationTiming ----------------------------- */
  19786. /* ./webidl/PerformanceNavigationTiming.webidl */
  19787. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19788. /* This Source Code Form is subject to the terms of the Mozilla Public
  19789. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19790. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19791. *
  19792. * The origin of this IDL file is
  19793. * https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming
  19794. *
  19795. * Copyright © 2016 W3C® (MIT, ERCIM, Keio, Beihang).
  19796. * W3C liability, trademark and document use rules apply.
  19797. */
  19798. enum NavigationType {
  19799. "navigate",
  19800. "reload",
  19801. "back_forward",
  19802. "prerender"
  19803. };
  19804. [Exposed=Window,
  19805. Func="mozilla::dom::PerformanceNavigationTiming::Enabled"]
  19806. interface PerformanceNavigationTiming : PerformanceResourceTiming {
  19807. readonly attribute DOMHighResTimeStamp unloadEventStart;
  19808. readonly attribute DOMHighResTimeStamp unloadEventEnd;
  19809. readonly attribute DOMHighResTimeStamp domInteractive;
  19810. readonly attribute DOMHighResTimeStamp domContentLoadedEventStart;
  19811. readonly attribute DOMHighResTimeStamp domContentLoadedEventEnd;
  19812. readonly attribute DOMHighResTimeStamp domComplete;
  19813. readonly attribute DOMHighResTimeStamp loadEventStart;
  19814. readonly attribute DOMHighResTimeStamp loadEventEnd;
  19815. readonly attribute NavigationType type;
  19816. readonly attribute unsigned short redirectCount;
  19817. [Default] object toJSON();
  19818. };
  19819. /* ---------------------- PerformanceObserver ----------------------------- */
  19820. /* ./webidl/PerformanceObserver.webidl */
  19821. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19822. /* This Source Code Form is subject to the terms of the Mozilla Public
  19823. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19824. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19825. *
  19826. * The origin of this IDL file is
  19827. * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
  19828. */
  19829. dictionary PerformanceObserverInit {
  19830. sequence<DOMString> entryTypes;
  19831. DOMString type;
  19832. boolean buffered;
  19833. [Pref="dom.enable_event_timing"]
  19834. DOMHighResTimeStamp durationThreshold;
  19835. };
  19836. callback PerformanceObserverCallback = undefined (PerformanceObserverEntryList entries,
  19837. PerformanceObserver observer);
  19838. [Pref="dom.enable_performance_observer",
  19839. Exposed=(Window,Worker)]
  19840. interface PerformanceObserver {
  19841. [Throws]
  19842. constructor(PerformanceObserverCallback callback);
  19843. [Throws] undefined observe(optional PerformanceObserverInit options = {});
  19844. undefined disconnect();
  19845. PerformanceEntryList takeRecords();
  19846. static readonly attribute object supportedEntryTypes;
  19847. };
  19848. /* ---------------------- PerformanceObserverEntryList ----------------------------- */
  19849. /* ./webidl/PerformanceObserverEntryList.webidl */
  19850. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19851. /* This Source Code Form is subject to the terms of the Mozilla Public
  19852. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19853. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19854. *
  19855. * The origin of this IDL file is
  19856. * https://w3c.github.io/performance-timeline/#the-performanceobserverentrylist-interface
  19857. */
  19858. // XXX should be moved into Performance.webidl.
  19859. dictionary PerformanceEntryFilterOptions {
  19860. DOMString name;
  19861. DOMString entryType;
  19862. DOMString initiatorType;
  19863. };
  19864. [Pref="dom.enable_performance_observer",
  19865. Exposed=(Window,Worker)]
  19866. interface PerformanceObserverEntryList {
  19867. PerformanceEntryList getEntries(optional PerformanceEntryFilterOptions filter = {});
  19868. PerformanceEntryList getEntriesByType(DOMString entryType);
  19869. PerformanceEntryList getEntriesByName(DOMString name,
  19870. optional DOMString entryType);
  19871. };
  19872. /* ---------------------- PerformancePaintTiming ----------------------------- */
  19873. /* ./webidl/PerformancePaintTiming.webidl */
  19874. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19875. /* This Source Code Form is subject to the terms of the Mozilla Public
  19876. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19877. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19878. *
  19879. * The origin of this IDL file is
  19880. * https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
  19881. *
  19882. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19883. * liability, trademark and document use rules apply.
  19884. */
  19885. [Exposed=(Window)]
  19886. interface PerformancePaintTiming : PerformanceEntry
  19887. {
  19888. };
  19889. /* ---------------------- PerformanceResourceTiming ----------------------------- */
  19890. /* ./webidl/PerformanceResourceTiming.webidl */
  19891. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19892. /* This Source Code Form is subject to the terms of the Mozilla Public
  19893. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19894. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19895. *
  19896. * The origin of this IDL file is
  19897. * https://w3c.github.io/resource-timing/#sec-performanceresourcetiming
  19898. *
  19899. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19900. * liability, trademark and document use rules apply.
  19901. */
  19902. [Exposed=(Window,Worker)]
  19903. interface PerformanceResourceTiming : PerformanceEntry
  19904. {
  19905. readonly attribute DOMString initiatorType;
  19906. readonly attribute DOMString nextHopProtocol;
  19907. readonly attribute DOMHighResTimeStamp workerStart;
  19908. [NeedsSubjectPrincipal]
  19909. readonly attribute DOMHighResTimeStamp redirectStart;
  19910. [NeedsSubjectPrincipal]
  19911. readonly attribute DOMHighResTimeStamp redirectEnd;
  19912. readonly attribute DOMHighResTimeStamp fetchStart;
  19913. [NeedsSubjectPrincipal]
  19914. readonly attribute DOMHighResTimeStamp domainLookupStart;
  19915. [NeedsSubjectPrincipal]
  19916. readonly attribute DOMHighResTimeStamp domainLookupEnd;
  19917. [NeedsSubjectPrincipal]
  19918. readonly attribute DOMHighResTimeStamp connectStart;
  19919. [NeedsSubjectPrincipal]
  19920. readonly attribute DOMHighResTimeStamp connectEnd;
  19921. [NeedsSubjectPrincipal]
  19922. readonly attribute DOMHighResTimeStamp secureConnectionStart;
  19923. [NeedsSubjectPrincipal]
  19924. readonly attribute DOMHighResTimeStamp requestStart;
  19925. [NeedsSubjectPrincipal]
  19926. readonly attribute DOMHighResTimeStamp responseStart;
  19927. readonly attribute DOMHighResTimeStamp responseEnd;
  19928. [NeedsSubjectPrincipal]
  19929. readonly attribute unsigned long long transferSize;
  19930. [NeedsSubjectPrincipal]
  19931. readonly attribute unsigned long long encodedBodySize;
  19932. [NeedsSubjectPrincipal]
  19933. readonly attribute unsigned long long decodedBodySize;
  19934. // TODO: Use FrozenArray once available. (Bug 1236777)
  19935. // readonly attribute FrozenArray<PerformanceServerTiming> serverTiming;
  19936. [SecureContext, Frozen, Cached, Pure, NeedsSubjectPrincipal]
  19937. readonly attribute sequence<PerformanceServerTiming> serverTiming;
  19938. [Default] object toJSON();
  19939. };
  19940. /* ---------------------- PerformanceServerTiming ----------------------------- */
  19941. /* ./webidl/PerformanceServerTiming.webidl */
  19942. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19943. /* This Source Code Form is subject to the terms of the Mozilla Public
  19944. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19945. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19946. *
  19947. * The origin of this IDL file is
  19948. * https://w3c.github.io/server-timing/#the-performanceservertiming-interface
  19949. *
  19950. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19951. * liability, trademark and document use rules apply.
  19952. */
  19953. [SecureContext,Exposed=(Window,Worker)]
  19954. interface PerformanceServerTiming {
  19955. readonly attribute DOMString name;
  19956. readonly attribute DOMHighResTimeStamp duration;
  19957. readonly attribute DOMString description;
  19958. [Default] object toJSON();
  19959. };
  19960. /* ---------------------- PerformanceTiming ----------------------------- */
  19961. /* ./webidl/PerformanceTiming.webidl */
  19962. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  19963. /* This Source Code Form is subject to the terms of the Mozilla Public
  19964. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  19965. * You can obtain one at http://mozilla.org/MPL/2.0/.
  19966. *
  19967. * The origin of this IDL file is
  19968. * https://w3c.github.io/navigation-timing/#the-performancetiming-interface
  19969. *
  19970. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  19971. * liability, trademark and document use rules apply.
  19972. */
  19973. [Exposed=Window]
  19974. interface PerformanceTiming {
  19975. readonly attribute unsigned long long navigationStart;
  19976. readonly attribute unsigned long long unloadEventStart;
  19977. readonly attribute unsigned long long unloadEventEnd;
  19978. readonly attribute unsigned long long redirectStart;
  19979. readonly attribute unsigned long long redirectEnd;
  19980. readonly attribute unsigned long long fetchStart;
  19981. readonly attribute unsigned long long domainLookupStart;
  19982. readonly attribute unsigned long long domainLookupEnd;
  19983. readonly attribute unsigned long long connectStart;
  19984. readonly attribute unsigned long long connectEnd;
  19985. readonly attribute unsigned long long secureConnectionStart;
  19986. readonly attribute unsigned long long requestStart;
  19987. readonly attribute unsigned long long responseStart;
  19988. readonly attribute unsigned long long responseEnd;
  19989. readonly attribute unsigned long long domLoading;
  19990. readonly attribute unsigned long long domInteractive;
  19991. readonly attribute unsigned long long domContentLoadedEventStart;
  19992. readonly attribute unsigned long long domContentLoadedEventEnd;
  19993. readonly attribute unsigned long long domComplete;
  19994. readonly attribute unsigned long long loadEventStart;
  19995. readonly attribute unsigned long long loadEventEnd;
  19996. // This is a Chrome proprietary extension and not part of the
  19997. // performance/navigation timing specification.
  19998. // Returns 0 if a non-blank paint has not happened.
  19999. [Pref="dom.performance.time_to_non_blank_paint.enabled"]
  20000. readonly attribute unsigned long long timeToNonBlankPaint;
  20001. // Returns 0 if a contentful paint has not happened.
  20002. [Pref="dom.performance.time_to_contentful_paint.enabled"]
  20003. readonly attribute unsigned long long timeToContentfulPaint;
  20004. // This is a Mozilla proprietary extension and not part of the
  20005. // performance/navigation timing specification. It marks the
  20006. // completion of the first presentation flush after DOMContentLoaded.
  20007. [Pref="dom.performance.time_to_dom_content_flushed.enabled"]
  20008. readonly attribute unsigned long long timeToDOMContentFlushed;
  20009. // This is a Chrome proprietary extension and not part of the
  20010. // performance/navigation timing specification.
  20011. // Returns 0 if a time-to-interactive measurement has not happened.
  20012. [Pref="dom.performance.time_to_first_interactive.enabled"]
  20013. readonly attribute unsigned long long timeToFirstInteractive;
  20014. [Default] object toJSON();
  20015. };
  20016. /* ---------------------- PeriodicWave ----------------------------- */
  20017. /* ./webidl/PeriodicWave.webidl */
  20018. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20019. /* This Source Code Form is subject to the terms of the Mozilla Public
  20020. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20021. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20022. *
  20023. * The origin of this IDL file is
  20024. * https://webaudio.github.io/web-audio-api/
  20025. *
  20026. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  20027. * liability, trademark and document use rules apply.
  20028. */
  20029. dictionary PeriodicWaveConstraints {
  20030. boolean disableNormalization = false;
  20031. };
  20032. dictionary PeriodicWaveOptions : PeriodicWaveConstraints {
  20033. sequence<float> real;
  20034. sequence<float> imag;
  20035. };
  20036. [Pref="dom.webaudio.enabled",
  20037. Exposed=Window]
  20038. interface PeriodicWave {
  20039. [Throws]
  20040. constructor(BaseAudioContext context,
  20041. optional PeriodicWaveOptions options = {});
  20042. };
  20043. /* ---------------------- Permissions ----------------------------- */
  20044. /* ./webidl/Permissions.webidl */
  20045. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20046. /* This Source Code Form is subject to the terms of the Mozilla Public
  20047. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20048. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20049. *
  20050. * The origin of this IDL file is
  20051. * https://w3c.github.io/permissions/#permissions-interface
  20052. */
  20053. enum PermissionName {
  20054. "geolocation",
  20055. "notifications",
  20056. "push",
  20057. "persistent-storage",
  20058. "midi",
  20059. "storage-access", // Defined in https://privacycg.github.io/storage-access/#permissions-integration
  20060. "screen-wake-lock" // Defined in https://w3c.github.io/screen-wake-lock/
  20061. };
  20062. [GenerateInit]
  20063. dictionary PermissionDescriptor {
  20064. required PermissionName name;
  20065. };
  20066. // https://webaudio.github.io/web-midi-api/#permissions-integration
  20067. [GenerateInit]
  20068. dictionary MidiPermissionDescriptor : PermissionDescriptor {
  20069. boolean sysex = false;
  20070. };
  20071. // We don't implement `PushPermissionDescriptor` because we use a background
  20072. // message quota instead of `userVisibleOnly`.
  20073. [Exposed=Window]
  20074. interface Permissions {
  20075. [NewObject]
  20076. Promise<PermissionStatus> query(object permission);
  20077. // http://w3c.github.io/permissions/#webdriver-command-set-permission
  20078. [ChromeOnly, Throws]
  20079. PermissionStatus parseSetParameters(PermissionSetParameters parameters);
  20080. };
  20081. /* ---------------------- PermissionStatus ----------------------------- */
  20082. /* ./webidl/PermissionStatus.webidl */
  20083. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20084. /* This Source Code Form is subject to the terms of the Mozilla Public
  20085. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20086. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20087. *
  20088. * The origin of this IDL file is
  20089. * https://w3c.github.io/permissions/#status-of-a-permission
  20090. */
  20091. enum PermissionState {
  20092. "granted",
  20093. "denied",
  20094. "prompt"
  20095. };
  20096. [Exposed=Window]
  20097. interface PermissionStatus : EventTarget {
  20098. readonly attribute PermissionName name;
  20099. readonly attribute PermissionState state;
  20100. attribute EventHandler onchange;
  20101. [ChromeOnly]
  20102. readonly attribute UTF8String type;
  20103. };
  20104. /* ---------------------- Plugin ----------------------------- */
  20105. /* ./webidl/Plugin.webidl */
  20106. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20107. /* This Source Code Form is subject to the terms of the Mozilla Public
  20108. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20109. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20110. */
  20111. [LegacyUnenumerableNamedProperties,
  20112. Exposed=Window]
  20113. interface Plugin {
  20114. readonly attribute DOMString description;
  20115. readonly attribute DOMString filename;
  20116. readonly attribute DOMString name;
  20117. readonly attribute unsigned long length;
  20118. getter MimeType? item(unsigned long index);
  20119. getter MimeType? namedItem(DOMString name);
  20120. };
  20121. /* ---------------------- PluginArray ----------------------------- */
  20122. /* ./webidl/PluginArray.webidl */
  20123. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20124. /* This Source Code Form is subject to the terms of the Mozilla Public
  20125. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20126. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20127. */
  20128. [LegacyUnenumerableNamedProperties,
  20129. Exposed=Window]
  20130. interface PluginArray {
  20131. undefined refresh();
  20132. readonly attribute unsigned long length;
  20133. getter Plugin? item(unsigned long index);
  20134. getter Plugin? namedItem(DOMString name);
  20135. };
  20136. /* ---------------------- PointerEvent ----------------------------- */
  20137. /* ./webidl/PointerEvent.webidl */
  20138. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20139. /* This Source Code Form is subject to the terms of the Mozilla Public
  20140. * License, v. 2.0. If a copy of the MPL was not distributed with this
  20141. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  20142. *
  20143. * For more information see nsIPointerEvent.idl.
  20144. *
  20145. * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
  20146. interface WindowProxy;
  20147. [Exposed=Window]
  20148. interface PointerEvent : MouseEvent
  20149. {
  20150. constructor(DOMString type, optional PointerEventInit eventInitDict = {});
  20151. readonly attribute long pointerId;
  20152. readonly attribute long width;
  20153. readonly attribute long height;
  20154. readonly attribute float pressure;
  20155. readonly attribute float tangentialPressure;
  20156. readonly attribute long tiltX;
  20157. readonly attribute long tiltY;
  20158. readonly attribute long twist;
  20159. readonly attribute DOMString pointerType;
  20160. readonly attribute boolean isPrimary;
  20161. [Func="mozilla::dom::PointerEvent::EnableGetCoalescedEvents"]
  20162. sequence<PointerEvent> getCoalescedEvents();
  20163. sequence<PointerEvent> getPredictedEvents();
  20164. };
  20165. dictionary PointerEventInit : MouseEventInit
  20166. {
  20167. long pointerId = 0;
  20168. long width = 1;
  20169. long height = 1;
  20170. float pressure = 0;
  20171. float tangentialPressure = 0;
  20172. long tiltX = 0;
  20173. long tiltY = 0;
  20174. long twist = 0;
  20175. DOMString pointerType = "";
  20176. boolean isPrimary = false;
  20177. sequence<PointerEvent> coalescedEvents = [];
  20178. sequence<PointerEvent> predictedEvents = [];
  20179. };
  20180. /* ---------------------- PopoverInvokerElement ----------------------------- */
  20181. /* ./webidl/PopoverInvokerElement.webidl */
  20182. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20183. /* This Source Code Form is subject to the terms of the Mozilla Public
  20184. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20185. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20186. *
  20187. * The origin of this IDL file is
  20188. * https://html.spec.whatwg.org/multipage/popover.html#popoverinvokerelement
  20189. */
  20190. interface mixin PopoverInvokerElement {
  20191. [Pref="dom.element.popover.enabled", CEReactions] attribute Element? popoverTargetElement;
  20192. [Pref="dom.element.popover.enabled", CEReactions] attribute DOMString popoverTargetAction;
  20193. };
  20194. /* ---------------------- PopStateEvent ----------------------------- */
  20195. /* ./webidl/PopStateEvent.webidl */
  20196. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20197. /* This Source Code Form is subject to the terms of the Mozilla Public
  20198. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20199. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20200. */
  20201. [Exposed=Window]
  20202. interface PopStateEvent : Event
  20203. {
  20204. constructor(DOMString type, optional PopStateEventInit eventInitDict = {});
  20205. readonly attribute any state;
  20206. };
  20207. dictionary PopStateEventInit : EventInit
  20208. {
  20209. any state = null;
  20210. };
  20211. /* ---------------------- PopupBlockedEvent ----------------------------- */
  20212. /* ./webidl/PopupBlockedEvent.webidl */
  20213. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20214. /* This Source Code Form is subject to the terms of the Mozilla Public
  20215. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20216. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20217. */
  20218. interface URI;
  20219. [Exposed=Window]
  20220. interface PopupBlockedEvent : Event
  20221. {
  20222. constructor(DOMString type,
  20223. optional PopupBlockedEventInit eventInitDict = {});
  20224. readonly attribute Window? requestingWindow;
  20225. readonly attribute URI? popupWindowURI;
  20226. readonly attribute DOMString? popupWindowName;
  20227. readonly attribute DOMString? popupWindowFeatures;
  20228. };
  20229. dictionary PopupBlockedEventInit : EventInit
  20230. {
  20231. Window? requestingWindow = null;
  20232. URI? popupWindowURI = null;
  20233. DOMString popupWindowName = "";
  20234. DOMString popupWindowFeatures = "";
  20235. };
  20236. /* ---------------------- PositionStateEvent ----------------------------- */
  20237. /* ./webidl/PositionStateEvent.webidl */
  20238. /**
  20239. * This Source Code Form is subject to the terms of the Mozilla Public
  20240. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20241. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20242. */
  20243. dictionary PositionStateEventInit : EventInit {
  20244. required double duration;
  20245. required double playbackRate;
  20246. required double position;
  20247. };
  20248. [Exposed=Window, ChromeOnly]
  20249. interface PositionStateEvent : Event {
  20250. constructor(DOMString type, optional PositionStateEventInit eventInitDict = {});
  20251. readonly attribute double duration;
  20252. readonly attribute double playbackRate;
  20253. readonly attribute double position;
  20254. };
  20255. /* ---------------------- ProcessingInstruction ----------------------------- */
  20256. /* ./webidl/ProcessingInstruction.webidl */
  20257. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20258. /* This Source Code Form is subject to the terms of the Mozilla Public
  20259. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20260. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20261. *
  20262. * The origin of this IDL file is
  20263. * https://dom.spec.whatwg.org/#interface-processinginstruction
  20264. * https://drafts.csswg.org/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction
  20265. *
  20266. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  20267. * liability, trademark and document use rules apply.
  20268. */
  20269. // https://dom.spec.whatwg.org/#interface-processinginstruction
  20270. [Exposed=Window]
  20271. interface ProcessingInstruction : CharacterData {
  20272. readonly attribute DOMString target;
  20273. };
  20274. // https://drafts.csswg.org/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction
  20275. ProcessingInstruction includes LinkStyle;
  20276. /* ---------------------- ProgressEvent ----------------------------- */
  20277. /* ./webidl/ProgressEvent.webidl */
  20278. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20279. /* This Source Code Form is subject to the terms of the Mozilla Public
  20280. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20281. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20282. */
  20283. [Exposed=(Window,Worker)]
  20284. interface ProgressEvent : Event
  20285. {
  20286. constructor(DOMString type, optional ProgressEventInit eventInitDict = {});
  20287. readonly attribute boolean lengthComputable;
  20288. readonly attribute unsigned long long loaded;
  20289. readonly attribute unsigned long long total;
  20290. };
  20291. dictionary ProgressEventInit : EventInit
  20292. {
  20293. boolean lengthComputable = false;
  20294. unsigned long long loaded = 0;
  20295. unsigned long long total = 0;
  20296. };
  20297. /* ---------------------- Promise ----------------------------- */
  20298. /* ./webidl/Promise.webidl */
  20299. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20300. /* This Source Code Form is subject to the terms of the Mozilla Public
  20301. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20302. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20303. *
  20304. * This IDL file contains utilities to help connect JS promises to our
  20305. * Web IDL infrastructure.
  20306. */
  20307. callback PromiseJobCallback = undefined();
  20308. [TreatNonCallableAsNull]
  20309. callback AnyCallback = any (any value);
  20310. // Hack to allow us to have JS owning and properly tracing/CCing/etc a
  20311. // PromiseNativeHandler.
  20312. [LegacyNoInterfaceObject, Exposed=(Window,Worker)]
  20313. interface PromiseNativeHandler {
  20314. };
  20315. /* ---------------------- PromiseRejectionEvent ----------------------------- */
  20316. /* ./webidl/PromiseRejectionEvent.webidl */
  20317. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20318. /* This Source Code Form is subject to the terms of the Mozilla Public
  20319. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20320. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20321. *
  20322. * The origin of this IDL file is
  20323. * https://html.spec.whatwg.org/multipage/webappapis.html#the-promiserejectionevent-interface
  20324. */
  20325. [Exposed=(Window,Worker)]
  20326. interface PromiseRejectionEvent : Event
  20327. {
  20328. constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
  20329. [BinaryName="rejectedPromise"]
  20330. readonly attribute Promise<any> promise;
  20331. readonly attribute any reason;
  20332. };
  20333. dictionary PromiseRejectionEventInit : EventInit {
  20334. required Promise<any> promise;
  20335. any reason;
  20336. };
  20337. /* ---------------------- PushEvent ----------------------------- */
  20338. /* ./webidl/PushEvent.webidl */
  20339. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20340. /* This Source Code Form is subject to the terms of the Mozilla Public
  20341. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20342. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20343. *
  20344. * The origin of this IDL file is
  20345. * https://w3c.github.io/push-api/
  20346. */
  20347. [Pref="dom.push.enabled",
  20348. Exposed=ServiceWorker]
  20349. interface PushEvent : ExtendableEvent {
  20350. [Throws]
  20351. constructor(DOMString type, optional PushEventInit eventInitDict = {});
  20352. readonly attribute PushMessageData? data;
  20353. };
  20354. typedef (BufferSource or USVString) PushMessageDataInit;
  20355. dictionary PushEventInit : ExtendableEventInit {
  20356. PushMessageDataInit data;
  20357. };
  20358. /* ---------------------- PushManager ----------------------------- */
  20359. /* ./webidl/PushManager.webidl */
  20360. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20361. /* This Source Code Form is subject to the terms of the Mozilla Public
  20362. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20363. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20364. *
  20365. * The origin of this IDL file is
  20366. * https://w3c.github.io/push-api/
  20367. */
  20368. dictionary PushSubscriptionOptionsInit {
  20369. // boolean userVisibleOnly = false;
  20370. (BufferSource or DOMString)? applicationServerKey = null;
  20371. };
  20372. // The main thread JS implementation. Please see comments in
  20373. // dom/push/PushManager.h for the split between PushManagerImpl and PushManager.
  20374. [JSImplementation="@mozilla.org/push/PushManager;1",
  20375. ChromeOnly,
  20376. Exposed=Window]
  20377. interface PushManagerImpl {
  20378. [Throws]
  20379. constructor(DOMString scope);
  20380. Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options = {});
  20381. Promise<PushSubscription?> getSubscription();
  20382. Promise<PermissionState> permissionState(optional PushSubscriptionOptionsInit options = {});
  20383. };
  20384. [Exposed=(Window,Worker), Func="PushManager::IsEnabled"]
  20385. interface PushManager {
  20386. [Throws, ChromeOnly]
  20387. constructor(DOMString scope);
  20388. [Throws, UseCounter]
  20389. Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options = {});
  20390. [Throws]
  20391. Promise<PushSubscription?> getSubscription();
  20392. [Throws]
  20393. Promise<PermissionState> permissionState(optional PushSubscriptionOptionsInit options = {});
  20394. };
  20395. /* ---------------------- PushMessageData ----------------------------- */
  20396. /* ./webidl/PushMessageData.webidl */
  20397. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20398. /* This Source Code Form is subject to the terms of the Mozilla Public
  20399. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20400. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20401. *
  20402. * The origin of this IDL file is
  20403. * https://w3c.github.io/push-api/
  20404. */
  20405. [Pref="dom.push.enabled",
  20406. Exposed=ServiceWorker]
  20407. interface PushMessageData
  20408. {
  20409. [Throws]
  20410. ArrayBuffer arrayBuffer();
  20411. [Throws]
  20412. Blob blob();
  20413. [Throws]
  20414. any json();
  20415. USVString text();
  20416. };
  20417. /* ---------------------- PushSubscription ----------------------------- */
  20418. /* ./webidl/PushSubscription.webidl */
  20419. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20420. /* This Source Code Form is subject to the terms of the Mozilla Public
  20421. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20422. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20423. *
  20424. * The origin of this IDL file is
  20425. * https://w3c.github.io/push-api/
  20426. */
  20427. interface Principal;
  20428. enum PushEncryptionKeyName
  20429. {
  20430. "p256dh",
  20431. "auth"
  20432. };
  20433. dictionary PushSubscriptionKeys
  20434. {
  20435. ByteString p256dh;
  20436. ByteString auth;
  20437. };
  20438. dictionary PushSubscriptionJSON
  20439. {
  20440. USVString endpoint;
  20441. // FIXME: bug 1493860: should this "= {}" be here? For that matter, this
  20442. // PushSubscriptionKeys thing is not even in the spec; "keys" is a record
  20443. // there.
  20444. PushSubscriptionKeys keys = {};
  20445. EpochTimeStamp? expirationTime;
  20446. };
  20447. dictionary PushSubscriptionInit
  20448. {
  20449. required USVString endpoint;
  20450. required USVString scope;
  20451. ArrayBuffer? p256dhKey;
  20452. ArrayBuffer? authSecret;
  20453. BufferSource? appServerKey;
  20454. EpochTimeStamp? expirationTime = null;
  20455. };
  20456. [Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
  20457. interface PushSubscription
  20458. {
  20459. [Throws, ChromeOnly]
  20460. constructor(PushSubscriptionInit initDict);
  20461. readonly attribute USVString endpoint;
  20462. readonly attribute PushSubscriptionOptions options;
  20463. readonly attribute EpochTimeStamp? expirationTime;
  20464. [Throws]
  20465. ArrayBuffer? getKey(PushEncryptionKeyName name);
  20466. [NewObject, UseCounter]
  20467. Promise<boolean> unsubscribe();
  20468. // Implements the custom serializer specified in Push API, section 9.
  20469. [Throws]
  20470. PushSubscriptionJSON toJSON();
  20471. };
  20472. /* ---------------------- PushSubscriptionOptions ----------------------------- */
  20473. /* ./webidl/PushSubscriptionOptions.webidl */
  20474. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20475. /* This Source Code Form is subject to the terms of the Mozilla Public
  20476. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20477. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20478. *
  20479. * The origin of this IDL file is
  20480. * https://w3c.github.io/push-api/
  20481. */
  20482. [Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
  20483. interface PushSubscriptionOptions
  20484. {
  20485. [SameObject, Throws]
  20486. readonly attribute ArrayBuffer? applicationServerKey;
  20487. };
  20488. /* ---------------------- QueuingStrategy ----------------------------- */
  20489. /* ./webidl/QueuingStrategy.webidl */
  20490. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20491. /* This Source Code Form is subject to the terms of the Mozilla Public
  20492. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20493. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20494. *
  20495. * The origin of this IDL file is
  20496. * https://streams.spec.whatwg.org/#qs
  20497. */
  20498. dictionary QueuingStrategy {
  20499. unrestricted double highWaterMark;
  20500. QueuingStrategySize size;
  20501. };
  20502. callback QueuingStrategySize = unrestricted double (optional any chunk);
  20503. dictionary QueuingStrategyInit {
  20504. required unrestricted double highWaterMark;
  20505. };
  20506. [Exposed=*]
  20507. interface CountQueuingStrategy {
  20508. constructor(QueuingStrategyInit init);
  20509. readonly attribute unrestricted double highWaterMark;
  20510. [Throws]
  20511. readonly attribute Function size;
  20512. };
  20513. [Exposed=*]
  20514. interface ByteLengthQueuingStrategy {
  20515. constructor(QueuingStrategyInit init);
  20516. readonly attribute unrestricted double highWaterMark;
  20517. [Throws]
  20518. readonly attribute Function size;
  20519. };
  20520. /* ---------------------- RadioNodeList ----------------------------- */
  20521. /* ./webidl/RadioNodeList.webidl */
  20522. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20523. /* This Source Code Form is subject to the terms of the Mozilla Public
  20524. * License, v. 2.0. If a copy of the MPL was not distributed with this
  20525. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  20526. *
  20527. * The origin of this IDL file is
  20528. * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection-0
  20529. *
  20530. * © Copyright 2004-2014 Apple Computer, Inc., Mozilla Foundation, and
  20531. * Opera Software ASA. You are granted a license to use, reproduce
  20532. * and create derivative works of this document.
  20533. */
  20534. [Exposed=Window]
  20535. interface RadioNodeList : NodeList {
  20536. [NeedsCallerType]
  20537. attribute DOMString value;
  20538. };
  20539. /* ---------------------- Range ----------------------------- */
  20540. /* ./webidl/Range.webidl */
  20541. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20542. /* This Source Code Form is subject to the terms of the Mozilla Public
  20543. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20544. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20545. *
  20546. * The origin of this IDL file is
  20547. * http://dom.spec.whatwg.org/#range
  20548. * http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
  20549. * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
  20550. *
  20551. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  20552. * liability, trademark and document use rules apply.
  20553. */
  20554. // Use ProbablyShortLivingWrapper so that the Range object could be deleted
  20555. // as soon as possible, and thus slow down DOM operations less.
  20556. [Exposed=Window, ProbablyShortLivingWrapper]
  20557. interface Range : AbstractRange {
  20558. [Throws]
  20559. constructor();
  20560. [Throws]
  20561. readonly attribute Node commonAncestorContainer;
  20562. [Throws, BinaryName="setStartJS"]
  20563. undefined setStart(Node refNode, unsigned long offset);
  20564. [Throws, BinaryName="setEndJS"]
  20565. undefined setEnd(Node refNode, unsigned long offset);
  20566. [Throws, BinaryName="setStartBeforeJS"]
  20567. undefined setStartBefore(Node refNode);
  20568. [Throws, BinaryName="setStartAfterJS"]
  20569. undefined setStartAfter(Node refNode);
  20570. [Throws, BinaryName="setEndBeforeJS"]
  20571. undefined setEndBefore(Node refNode);
  20572. [Throws, BinaryName="setEndAfterJS"]
  20573. undefined setEndAfter(Node refNode);
  20574. [BinaryName="collapseJS"]
  20575. undefined collapse(optional boolean toStart = false);
  20576. [Throws, BinaryName="selectNodeJS"]
  20577. undefined selectNode(Node refNode);
  20578. [Throws, BinaryName="selectNodeContentsJS"]
  20579. undefined selectNodeContents(Node refNode);
  20580. const unsigned short START_TO_START = 0;
  20581. const unsigned short START_TO_END = 1;
  20582. const unsigned short END_TO_END = 2;
  20583. const unsigned short END_TO_START = 3;
  20584. [Throws]
  20585. short compareBoundaryPoints(unsigned short how, Range sourceRange);
  20586. [CEReactions, Throws]
  20587. undefined deleteContents();
  20588. [CEReactions, Throws]
  20589. DocumentFragment extractContents();
  20590. [CEReactions, Throws]
  20591. DocumentFragment cloneContents();
  20592. [CEReactions, Throws]
  20593. undefined insertNode(Node node);
  20594. [CEReactions, Throws]
  20595. undefined surroundContents(Node newParent);
  20596. Range cloneRange();
  20597. undefined detach();
  20598. [Throws]
  20599. boolean isPointInRange(Node node, unsigned long offset);
  20600. [Throws]
  20601. short comparePoint(Node node, unsigned long offset);
  20602. [Throws]
  20603. boolean intersectsNode(Node node);
  20604. [Throws, BinaryName="ToString"]
  20605. stringifier;
  20606. };
  20607. // http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
  20608. partial interface Range {
  20609. [CEReactions, Throws, UseCounter]
  20610. DocumentFragment createContextualFragment(DOMString fragment);
  20611. };
  20612. // http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
  20613. partial interface Range {
  20614. DOMRectList? getClientRects();
  20615. DOMRect getBoundingClientRect();
  20616. };
  20617. dictionary ClientRectsAndTexts {
  20618. required DOMRectList rectList;
  20619. required sequence<DOMString> textList;
  20620. };
  20621. partial interface Range {
  20622. [ChromeOnly, Throws]
  20623. ClientRectsAndTexts getClientRectsAndTexts();
  20624. };
  20625. // ChromeOnly methods that allow setting Range boundaries to cross
  20626. // shadow boundary.
  20627. partial interface Range {
  20628. [ChromeOnly, Throws]
  20629. undefined setStartAllowCrossShadowBoundary(Node refNode, unsigned long offset);
  20630. [ChromeOnly, Throws]
  20631. undefined setEndAllowCrossShadowBoundary(Node refNode, unsigned long offset);
  20632. };
  20633. /* ---------------------- ReadableByteStreamController ----------------------------- */
  20634. /* ./webidl/ReadableByteStreamController.webidl */
  20635. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20636. /* This Source Code Form is subject to the terms of the Mozilla Public
  20637. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20638. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20639. *
  20640. * The origin of this IDL file is
  20641. * https://streams.spec.whatwg.org/#rbs-controller-class-definition
  20642. */
  20643. [Exposed=*]
  20644. interface ReadableByteStreamController {
  20645. [Throws] // Throws on OOM
  20646. readonly attribute ReadableStreamBYOBRequest? byobRequest;
  20647. readonly attribute unrestricted double? desiredSize;
  20648. [Throws]
  20649. undefined close();
  20650. [Throws]
  20651. undefined enqueue(ArrayBufferView chunk);
  20652. [Throws]
  20653. undefined error(optional any e);
  20654. };
  20655. /* ---------------------- ReadableStream ----------------------------- */
  20656. /* ./webidl/ReadableStream.webidl */
  20657. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20658. /* This Source Code Form is subject to the terms of the Mozilla Public
  20659. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20660. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20661. *
  20662. * The origin of this IDL file is
  20663. * https://streams.spec.whatwg.org/#rs-class-definition
  20664. */
  20665. [Exposed=*] // [Transferable] - See Bug 1562065
  20666. interface ReadableStream {
  20667. [Throws]
  20668. constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
  20669. [Pref="dom.streams.from.enabled", Throws]
  20670. static ReadableStream from(any asyncIterable);
  20671. readonly attribute boolean locked;
  20672. [NewObject]
  20673. Promise<undefined> cancel(optional any reason);
  20674. [Throws]
  20675. ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
  20676. [Throws]
  20677. ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
  20678. [NewObject]
  20679. Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
  20680. [Throws]
  20681. sequence<ReadableStream> tee();
  20682. [GenerateReturnMethod]
  20683. async iterable<any>(optional ReadableStreamIteratorOptions options = {});
  20684. };
  20685. enum ReadableStreamReaderMode { "byob" };
  20686. dictionary ReadableStreamGetReaderOptions {
  20687. ReadableStreamReaderMode mode;
  20688. };
  20689. dictionary ReadableStreamIteratorOptions {
  20690. boolean preventCancel = false;
  20691. };
  20692. dictionary ReadableWritablePair {
  20693. required ReadableStream readable;
  20694. required WritableStream writable;
  20695. };
  20696. dictionary StreamPipeOptions {
  20697. boolean preventClose = false;
  20698. boolean preventAbort = false;
  20699. boolean preventCancel = false;
  20700. AbortSignal signal;
  20701. };
  20702. /* ---------------------- ReadableStreamBYOBReader ----------------------------- */
  20703. /* ./webidl/ReadableStreamBYOBReader.webidl */
  20704. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20705. /* This Source Code Form is subject to the terms of the Mozilla Public
  20706. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20707. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20708. *
  20709. * The origin of this IDL file is
  20710. * https://streams.spec.whatwg.org/#byob-reader-class-definition
  20711. */
  20712. [Exposed=*]
  20713. interface ReadableStreamBYOBReader {
  20714. [Throws]
  20715. constructor(ReadableStream stream);
  20716. [NewObject]
  20717. Promise<ReadableStreamReadResult> read(ArrayBufferView view);
  20718. [Throws]
  20719. undefined releaseLock();
  20720. };
  20721. ReadableStreamBYOBReader includes ReadableStreamGenericReader;
  20722. /* ---------------------- ReadableStreamBYOBRequest ----------------------------- */
  20723. /* ./webidl/ReadableStreamBYOBRequest.webidl */
  20724. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20725. /* This Source Code Form is subject to the terms of the Mozilla Public
  20726. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20727. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20728. *
  20729. * The origin of this IDL file is
  20730. * https://streams.spec.whatwg.org/#rs-byob-request-class-definition
  20731. */
  20732. [Exposed=*]
  20733. interface ReadableStreamBYOBRequest {
  20734. readonly attribute ArrayBufferView? view;
  20735. [Throws]
  20736. undefined respond([EnforceRange] unsigned long long bytesWritten);
  20737. [Throws]
  20738. undefined respondWithNewView(ArrayBufferView view);
  20739. };
  20740. /* ---------------------- ReadableStreamDefaultController ----------------------------- */
  20741. /* ./webidl/ReadableStreamDefaultController.webidl */
  20742. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20743. /* This Source Code Form is subject to the terms of the Mozilla Public
  20744. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20745. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20746. *
  20747. * The origin of this IDL file is
  20748. * https://streams.spec.whatwg.org/#rs-default-controller-class-definition
  20749. */
  20750. [Exposed=*]
  20751. interface ReadableStreamDefaultController {
  20752. readonly attribute unrestricted double? desiredSize;
  20753. [Throws]
  20754. undefined close();
  20755. [Throws]
  20756. undefined enqueue(optional any chunk);
  20757. [Throws]
  20758. undefined error(optional any e);
  20759. };
  20760. /* ---------------------- ReadableStreamDefaultReader ----------------------------- */
  20761. /* ./webidl/ReadableStreamDefaultReader.webidl */
  20762. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20763. /* This Source Code Form is subject to the terms of the Mozilla Public
  20764. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20765. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20766. *
  20767. * The origin of this IDL file is
  20768. * https://streams.spec.whatwg.org/#generic-reader-mixin-definition
  20769. * https://streams.spec.whatwg.org/#default-reader-class-definition
  20770. */
  20771. typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
  20772. enum ReadableStreamType { "bytes" };
  20773. interface mixin ReadableStreamGenericReader {
  20774. readonly attribute Promise<undefined> closed;
  20775. [NewObject]
  20776. Promise<undefined> cancel(optional any reason);
  20777. };
  20778. [Exposed=*]
  20779. interface ReadableStreamDefaultReader {
  20780. [Throws]
  20781. constructor(ReadableStream stream);
  20782. [NewObject]
  20783. Promise<ReadableStreamReadResult> read();
  20784. [Throws]
  20785. undefined releaseLock();
  20786. };
  20787. ReadableStreamDefaultReader includes ReadableStreamGenericReader;
  20788. dictionary ReadableStreamReadResult {
  20789. any value;
  20790. boolean done;
  20791. };
  20792. /* ---------------------- ReferrerPolicy ----------------------------- */
  20793. /* ./webidl/ReferrerPolicy.webidl */
  20794. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20795. /* This Source Code Form is subject to the terms of the Mozilla Public
  20796. * License, v. 2.0. If a copy of the MPL was not distributed with this
  20797. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  20798. *
  20799. * For more information please see
  20800. * https://w3c.github.io/webappsec-referrer-policy#idl-index
  20801. */
  20802. enum ReferrerPolicy {
  20803. "",
  20804. "no-referrer",
  20805. "no-referrer-when-downgrade",
  20806. "origin",
  20807. "origin-when-cross-origin",
  20808. "unsafe-url", "same-origin",
  20809. "strict-origin",
  20810. "strict-origin-when-cross-origin"
  20811. };
  20812. /* ---------------------- Reporting ----------------------------- */
  20813. /* ./webidl/Reporting.webidl */
  20814. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20815. /* This Source Code Form is subject to the terms of the Mozilla Public
  20816. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20817. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20818. *
  20819. * The origin of this IDL file is
  20820. * https://w3c.github.io/reporting/#interface-reporting-observer
  20821. */
  20822. [Pref="dom.reporting.enabled",
  20823. Exposed=(Window,Worker)]
  20824. interface ReportBody {
  20825. [Default] object toJSON
  20826. ();
  20827. };
  20828. [Pref="dom.reporting.enabled",
  20829. Exposed=(Window,Worker)]
  20830. interface Report {
  20831. [Default] object toJSON
  20832. ();
  20833. readonly attribute DOMString type;
  20834. readonly attribute DOMString url;
  20835. readonly attribute ReportBody? body;
  20836. };
  20837. [Pref="dom.reporting.enabled",
  20838. Exposed=(Window,Worker)]
  20839. interface ReportingObserver {
  20840. [Throws]
  20841. constructor(ReportingObserverCallback callback, optional ReportingObserverOptions options = {});
  20842. undefined observe();
  20843. undefined disconnect();
  20844. ReportList takeRecords();
  20845. };
  20846. callback ReportingObserverCallback = undefined (sequence<Report> reports, ReportingObserver observer);
  20847. dictionary ReportingObserverOptions {
  20848. sequence<DOMString> types;
  20849. boolean buffered = false;
  20850. };
  20851. typedef sequence<Report> ReportList;
  20852. [Pref="dom.reporting.enabled",
  20853. Exposed=Window]
  20854. interface DeprecationReportBody : ReportBody {
  20855. readonly attribute DOMString id;
  20856. // The spec currently has Date, but that's not a type that exists in Web IDL.
  20857. // In any case, we always return null, so we just need _some_ nullable type
  20858. // here.
  20859. readonly attribute DOMTimeStamp? anticipatedRemoval;
  20860. readonly attribute DOMString message;
  20861. readonly attribute DOMString? sourceFile;
  20862. readonly attribute unsigned long? lineNumber;
  20863. readonly attribute unsigned long? columnNumber;
  20864. };
  20865. [Deprecated="DeprecatedTestingInterface",
  20866. Pref="dom.reporting.testing.enabled",
  20867. Exposed=(Window,DedicatedWorker)]
  20868. interface TestingDeprecatedInterface {
  20869. constructor();
  20870. [Deprecated="DeprecatedTestingMethod"]
  20871. undefined deprecatedMethod();
  20872. [Deprecated="DeprecatedTestingAttribute"]
  20873. readonly attribute boolean deprecatedAttribute;
  20874. };
  20875. // Used internally to process the JSON
  20876. [GenerateInit]
  20877. dictionary ReportingHeaderValue {
  20878. sequence<ReportingItem> items;
  20879. };
  20880. // Used internally to process the JSON
  20881. dictionary ReportingItem {
  20882. // This is a long.
  20883. any max_age;
  20884. // This is a sequence of ReportingEndpoint.
  20885. any endpoints;
  20886. // This is a string. If missing, the value is 'default'.
  20887. any group;
  20888. boolean include_subdomains = false;
  20889. };
  20890. // Used internally to process the JSON
  20891. [GenerateInit]
  20892. dictionary ReportingEndpoint {
  20893. // This is a string.
  20894. any url;
  20895. // This is an unsigned long.
  20896. any priority;
  20897. // This is an unsigned long.
  20898. any weight;
  20899. };
  20900. /* ---------------------- Request ----------------------------- */
  20901. /* ./webidl/Request.webidl */
  20902. /* -*- Mode: IDL; tab-width: 1; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20903. /* This Source Code Form is subject to the terms of the Mozilla Public
  20904. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20905. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20906. *
  20907. * The origin of this IDL file is
  20908. * https://fetch.spec.whatwg.org/#request-class
  20909. */
  20910. typedef (Request or USVString) RequestInfo;
  20911. typedef unsigned long nsContentPolicyType;
  20912. [Exposed=(Window,Worker)]
  20913. interface Request {
  20914. /**
  20915. * Note that Requests created from system principal (ie "privileged"/chrome)
  20916. * code will default to omitting credentials. You can override this behaviour
  20917. * using the ``credentials`` member on the ``init`` dictionary.
  20918. */
  20919. [Throws]
  20920. constructor(RequestInfo input, optional RequestInit init = {});
  20921. readonly attribute ByteString method;
  20922. readonly attribute USVString url;
  20923. [SameObject, BinaryName="headers_"] readonly attribute Headers headers;
  20924. readonly attribute RequestDestination destination;
  20925. readonly attribute USVString referrer;
  20926. [BinaryName="referrerPolicy_"]
  20927. readonly attribute ReferrerPolicy referrerPolicy;
  20928. readonly attribute RequestMode mode;
  20929. readonly attribute RequestCredentials credentials;
  20930. readonly attribute RequestCache cache;
  20931. readonly attribute RequestRedirect redirect;
  20932. readonly attribute DOMString integrity;
  20933. [Pref="dom.fetchKeepalive.enabled"]
  20934. readonly attribute boolean keepalive;
  20935. // If a main-thread fetch() promise rejects, the error passed will be a
  20936. // nsresult code.
  20937. [ChromeOnly]
  20938. readonly attribute boolean mozErrors;
  20939. [BinaryName="getOrCreateSignal"]
  20940. readonly attribute AbortSignal signal;
  20941. [Throws,
  20942. NewObject] Request clone();
  20943. // Bug 1124638 - Allow chrome callers to set the context.
  20944. [ChromeOnly]
  20945. undefined overrideContentPolicyType(nsContentPolicyType context);
  20946. };
  20947. Request includes Body;
  20948. // <https://fetch.spec.whatwg.org/#requestinit>.
  20949. dictionary RequestInit {
  20950. ByteString method;
  20951. HeadersInit headers;
  20952. BodyInit? body;
  20953. USVString referrer;
  20954. ReferrerPolicy referrerPolicy;
  20955. RequestMode mode;
  20956. /**
  20957. * If not set, defaults to "same-origin", except for system principal (chrome)
  20958. * requests where the default is "omit".
  20959. */
  20960. RequestCredentials credentials;
  20961. RequestCache cache;
  20962. RequestRedirect redirect;
  20963. DOMString integrity;
  20964. [Pref="dom.fetchKeepalive.enabled"]
  20965. boolean keepalive;
  20966. [ChromeOnly]
  20967. boolean mozErrors;
  20968. AbortSignal? signal;
  20969. [Pref="network.fetchpriority.enabled"]
  20970. RequestPriority priority;
  20971. [Pref="dom.fetchObserver.enabled"]
  20972. ObserverCallback observe;
  20973. };
  20974. enum RequestDestination {
  20975. "",
  20976. "audio", "audioworklet", "document", "embed", "font", "frame", "iframe",
  20977. "image", "manifest", "object", "paintworklet", "report", "script",
  20978. "sharedworker", "style", "track", "video", "worker", "xslt"
  20979. };
  20980. enum RequestMode { "same-origin", "no-cors", "cors", "navigate" };
  20981. enum RequestCredentials { "omit", "same-origin", "include" };
  20982. enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
  20983. enum RequestRedirect { "follow", "error", "manual" };
  20984. enum RequestPriority { "high" , "low" , "auto" };
  20985. /* ---------------------- ResizeObserver ----------------------------- */
  20986. /* ./webidl/ResizeObserver.webidl */
  20987. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  20988. /* This Source Code Form is subject to the terms of the Mozilla Public
  20989. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  20990. * You can obtain one at http://mozilla.org/MPL/2.0/.
  20991. *
  20992. * The origin of this IDL file is
  20993. * https://drafts.csswg.org/resize-observer/
  20994. */
  20995. enum ResizeObserverBoxOptions {
  20996. "border-box",
  20997. "content-box",
  20998. "device-pixel-content-box"
  20999. };
  21000. dictionary ResizeObserverOptions {
  21001. ResizeObserverBoxOptions box = "content-box";
  21002. };
  21003. [Exposed=Window]
  21004. interface ResizeObserver {
  21005. [Throws]
  21006. constructor(ResizeObserverCallback callback);
  21007. undefined observe(Element target, optional ResizeObserverOptions options = {});
  21008. undefined unobserve(Element target);
  21009. undefined disconnect();
  21010. };
  21011. callback ResizeObserverCallback = undefined (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
  21012. [Exposed=Window]
  21013. interface ResizeObserverEntry {
  21014. readonly attribute Element target;
  21015. readonly attribute DOMRectReadOnly contentRect;
  21016. // We are using [Pure, Cached, Frozen] sequence until `FrozenArray` is implemented.
  21017. // See https://bugzilla.mozilla.org/show_bug.cgi?id=1236777 for more details.
  21018. [Frozen, Cached, Pure]
  21019. readonly attribute sequence<ResizeObserverSize> borderBoxSize;
  21020. [Frozen, Cached, Pure]
  21021. readonly attribute sequence<ResizeObserverSize> contentBoxSize;
  21022. [Frozen, Cached, Pure]
  21023. readonly attribute sequence<ResizeObserverSize> devicePixelContentBoxSize;
  21024. };
  21025. [Exposed=Window]
  21026. interface ResizeObserverSize {
  21027. readonly attribute unrestricted double inlineSize;
  21028. readonly attribute unrestricted double blockSize;
  21029. };
  21030. /* ---------------------- Response ----------------------------- */
  21031. /* ./webidl/Response.webidl */
  21032. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21033. /* This Source Code Form is subject to the terms of the Mozilla Public
  21034. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21035. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21036. *
  21037. * The origin of this IDL file is
  21038. * https://fetch.spec.whatwg.org/#response-class
  21039. */
  21040. [Exposed=(Window,Worker)]
  21041. interface Response {
  21042. // This should be constructor(optional BodyInit... but BodyInit doesn't
  21043. // include ReadableStream yet because we don't want to expose Streams API to
  21044. // Request.
  21045. [Throws]
  21046. constructor(optional (Blob or BufferSource or FormData or URLSearchParams or ReadableStream or USVString)? body = null,
  21047. optional ResponseInit init = {});
  21048. [NewObject] static Response error();
  21049. [Throws,
  21050. NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
  21051. [BinaryName=CreateFromJson, Throws,
  21052. NewObject] static Response json(any data, optional ResponseInit init = {});
  21053. readonly attribute ResponseType type;
  21054. readonly attribute USVString url;
  21055. readonly attribute boolean redirected;
  21056. readonly attribute unsigned short status;
  21057. readonly attribute boolean ok;
  21058. readonly attribute ByteString statusText;
  21059. [SameObject, BinaryName="headers_"] readonly attribute Headers headers;
  21060. [Throws,
  21061. NewObject] Response clone();
  21062. [ChromeOnly, NewObject, Throws] Response cloneUnfiltered();
  21063. // For testing only.
  21064. [ChromeOnly] readonly attribute boolean hasCacheInfoChannel;
  21065. };
  21066. Response includes Body;
  21067. // This should be part of Body but we don't want to expose body to request yet.
  21068. // See bug 1387483.
  21069. partial interface Response {
  21070. [GetterThrows]
  21071. readonly attribute ReadableStream? body;
  21072. };
  21073. dictionary ResponseInit {
  21074. unsigned short status = 200;
  21075. ByteString statusText = "";
  21076. HeadersInit headers;
  21077. };
  21078. enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
  21079. /* ---------------------- RTCCertificate ----------------------------- */
  21080. /* ./webidl/RTCCertificate.webidl */
  21081. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21082. /* This Source Code Form is subject to the terms of the Mozilla Public
  21083. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21084. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21085. *
  21086. * Specification: http://w3c.github.io/webrtc-pc/#certificate-management
  21087. */
  21088. [GenerateInit]
  21089. dictionary RTCCertificateExpiration {
  21090. [EnforceRange]
  21091. DOMTimeStamp expires;
  21092. };
  21093. [Pref="media.peerconnection.enabled", Serializable,
  21094. Exposed=Window]
  21095. interface RTCCertificate {
  21096. readonly attribute DOMTimeStamp expires;
  21097. };
  21098. /* ---------------------- RTCConfiguration ----------------------------- */
  21099. /* ./webidl/RTCConfiguration.webidl */
  21100. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21101. /* This Source Code Form is subject to the terms of the Mozilla Public
  21102. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21103. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21104. *
  21105. * The origin of this IDL file is
  21106. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCConfiguration
  21107. */
  21108. enum RTCIceCredentialType {
  21109. "password",
  21110. };
  21111. dictionary RTCIceServer {
  21112. (DOMString or sequence<DOMString>) urls;
  21113. DOMString url; //deprecated
  21114. DOMString username;
  21115. DOMString credential;
  21116. RTCIceCredentialType credentialType = "password";
  21117. };
  21118. enum RTCIceTransportPolicy {
  21119. "relay",
  21120. "all"
  21121. };
  21122. enum RTCBundlePolicy {
  21123. "balanced",
  21124. "max-compat",
  21125. "max-bundle"
  21126. };
  21127. dictionary RTCConfiguration {
  21128. sequence<RTCIceServer> iceServers = [];
  21129. RTCIceTransportPolicy iceTransportPolicy = "all";
  21130. RTCBundlePolicy bundlePolicy = "balanced";
  21131. DOMString? peerIdentity = null;
  21132. sequence<RTCCertificate> certificates = [];
  21133. // Non-standard. Only here to be able to detect and warn in web console.
  21134. // Uses DOMString over enum as a trade-off between type errors and safety.
  21135. // TODO: Remove once sdpSemantics usage drops to zero (bug 1632243).
  21136. DOMString sdpSemantics;
  21137. };
  21138. /* ---------------------- RTCDataChannel ----------------------------- */
  21139. /* ./webidl/RTCDataChannel.webidl */
  21140. /* This Source Code Form is subject to the terms of the Mozilla Public
  21141. * License, v. 2.0. If a copy of the MPL was not distributed with this
  21142. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  21143. enum RTCDataChannelState {
  21144. "connecting",
  21145. "open",
  21146. "closing",
  21147. "closed"
  21148. };
  21149. enum RTCDataChannelType {
  21150. "arraybuffer",
  21151. "blob"
  21152. };
  21153. [Exposed=Window]
  21154. interface RTCDataChannel : EventTarget
  21155. {
  21156. readonly attribute DOMString label;
  21157. readonly attribute boolean negotiated;
  21158. readonly attribute boolean ordered;
  21159. readonly attribute boolean reliable;
  21160. readonly attribute unsigned short? maxPacketLifeTime;
  21161. readonly attribute unsigned short? maxRetransmits;
  21162. readonly attribute USVString protocol;
  21163. readonly attribute unsigned short? id;
  21164. readonly attribute RTCDataChannelState readyState;
  21165. readonly attribute unsigned long bufferedAmount;
  21166. attribute unsigned long bufferedAmountLowThreshold;
  21167. attribute EventHandler onopen;
  21168. attribute EventHandler onerror;
  21169. attribute EventHandler onclose;
  21170. undefined close();
  21171. attribute EventHandler onmessage;
  21172. attribute EventHandler onbufferedamountlow;
  21173. attribute RTCDataChannelType binaryType;
  21174. [Throws]
  21175. undefined send(DOMString data);
  21176. [Throws]
  21177. undefined send(Blob data);
  21178. [Throws]
  21179. undefined send(ArrayBuffer data);
  21180. [Throws]
  21181. undefined send(ArrayBufferView data);
  21182. };
  21183. /* ---------------------- RTCDataChannelEvent ----------------------------- */
  21184. /* ./webidl/RTCDataChannelEvent.webidl */
  21185. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21186. /* This Source Code Form is subject to the terms of the Mozilla Public
  21187. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21188. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21189. *
  21190. * The origin of this IDL file is
  21191. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelEvent
  21192. */
  21193. dictionary RTCDataChannelEventInit : EventInit {
  21194. required RTCDataChannel channel;
  21195. };
  21196. [Pref="media.peerconnection.enabled",
  21197. Exposed=Window]
  21198. interface RTCDataChannelEvent : Event {
  21199. constructor(DOMString type, RTCDataChannelEventInit eventInitDict);
  21200. readonly attribute RTCDataChannel channel;
  21201. };
  21202. /* ---------------------- RTCDtlsTransport ----------------------------- */
  21203. /* ./webidl/RTCDtlsTransport.webidl */
  21204. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21205. /* This Source Code Form is subject to the terms of the Mozilla Public
  21206. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21207. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21208. *
  21209. * The origin of this IDL file is
  21210. * https://w3c.github.io/webrtc-pc/#rtcdtlstransport-interface
  21211. */
  21212. enum RTCDtlsTransportState {
  21213. "new",
  21214. "connecting",
  21215. "connected",
  21216. "closed",
  21217. "failed"
  21218. };
  21219. [Pref="media.peerconnection.enabled",
  21220. Exposed=Window]
  21221. interface RTCDtlsTransport : EventTarget {
  21222. [SameObject] readonly attribute RTCIceTransport iceTransport;
  21223. readonly attribute RTCDtlsTransportState state;
  21224. attribute EventHandler onstatechange;
  21225. };
  21226. /* ---------------------- RTCDTMFSender ----------------------------- */
  21227. /* ./webidl/RTCDTMFSender.webidl */
  21228. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21229. /* This Source Code Form is subject to the terms of the Mozilla Public
  21230. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21231. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21232. *
  21233. * The origin of this IDL file is
  21234. * https://www.w3.org/TR/webrtc/#rtcdtmfsender
  21235. */
  21236. [Exposed=Window]
  21237. interface RTCDTMFSender : EventTarget {
  21238. [Throws]
  21239. undefined insertDTMF(DOMString tones,
  21240. optional unsigned long duration = 100,
  21241. optional unsigned long interToneGap = 70);
  21242. attribute EventHandler ontonechange;
  21243. readonly attribute DOMString toneBuffer;
  21244. };
  21245. /* ---------------------- RTCDTMFToneChangeEvent ----------------------------- */
  21246. /* ./webidl/RTCDTMFToneChangeEvent.webidl */
  21247. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21248. /* This Source Code Form is subject to the terms of the Mozilla Public
  21249. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21250. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21251. *
  21252. * The origin of this IDL file is
  21253. * https://www.w3.org/TR/webrtc/#rtcdtmftonechangeevent
  21254. */
  21255. [Exposed=Window]
  21256. interface RTCDTMFToneChangeEvent : Event {
  21257. constructor(DOMString type,
  21258. optional RTCDTMFToneChangeEventInit eventInitDict = {});
  21259. readonly attribute DOMString tone;
  21260. };
  21261. dictionary RTCDTMFToneChangeEventInit : EventInit {
  21262. DOMString tone = "";
  21263. };
  21264. /* ---------------------- RTCEncodedAudioFrame ----------------------------- */
  21265. /* ./webidl/RTCEncodedAudioFrame.webidl */
  21266. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21267. /* This Source Code Form is subject to the terms of the Mozilla Public
  21268. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21269. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21270. *
  21271. * The origin of this IDL file is
  21272. * https://w3c.github.io/webrtc-encoded-transform
  21273. */
  21274. dictionary RTCEncodedAudioFrameMetadata {
  21275. unsigned long synchronizationSource;
  21276. octet payloadType;
  21277. sequence<unsigned long> contributingSources;
  21278. short sequenceNumber;
  21279. };
  21280. [Pref="media.peerconnection.enabled",
  21281. Pref="media.peerconnection.scripttransform.enabled",
  21282. Exposed=(Window,DedicatedWorker)]
  21283. interface RTCEncodedAudioFrame {
  21284. readonly attribute unsigned long timestamp;
  21285. attribute ArrayBuffer data;
  21286. RTCEncodedAudioFrameMetadata getMetadata();
  21287. };
  21288. /* ---------------------- RTCEncodedVideoFrame ----------------------------- */
  21289. /* ./webidl/RTCEncodedVideoFrame.webidl */
  21290. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21291. /* This Source Code Form is subject to the terms of the Mozilla Public
  21292. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21293. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21294. *
  21295. * The origin of this IDL file is
  21296. * https://www.w3.org/TR/webrtc-encoded-transform
  21297. */
  21298. // New enum for video frame types. Will eventually re-use the equivalent defined
  21299. // by WebCodecs.
  21300. enum RTCEncodedVideoFrameType {
  21301. "empty",
  21302. "key",
  21303. "delta",
  21304. };
  21305. dictionary RTCEncodedVideoFrameMetadata {
  21306. unsigned long long frameId;
  21307. sequence<unsigned long long> dependencies;
  21308. unsigned short width;
  21309. unsigned short height;
  21310. unsigned long spatialIndex;
  21311. unsigned long temporalIndex;
  21312. unsigned long synchronizationSource;
  21313. octet payloadType;
  21314. sequence<unsigned long> contributingSources;
  21315. long long timestamp; // microseconds
  21316. };
  21317. // New interfaces to define encoded video and audio frames. Will eventually
  21318. // re-use or extend the equivalent defined in WebCodecs.
  21319. [Pref="media.peerconnection.enabled",
  21320. Pref="media.peerconnection.scripttransform.enabled",
  21321. Exposed=(Window,DedicatedWorker)]
  21322. interface RTCEncodedVideoFrame {
  21323. readonly attribute RTCEncodedVideoFrameType type;
  21324. readonly attribute unsigned long timestamp;
  21325. attribute ArrayBuffer data;
  21326. RTCEncodedVideoFrameMetadata getMetadata();
  21327. };
  21328. /* ---------------------- RTCIceCandidate ----------------------------- */
  21329. /* ./webidl/RTCIceCandidate.webidl */
  21330. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21331. /* This Source Code Form is subject to the terms of the Mozilla Public
  21332. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21333. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21334. *
  21335. * The origin of this IDL file is
  21336. * https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
  21337. */
  21338. dictionary RTCIceCandidateInit {
  21339. DOMString candidate = "";
  21340. DOMString? sdpMid = null;
  21341. unsigned short? sdpMLineIndex = null;
  21342. DOMString? usernameFragment = null;
  21343. };
  21344. enum RTCIceComponent {
  21345. "rtp",
  21346. "rtcp"
  21347. };
  21348. enum RTCIceProtocol {
  21349. "udp",
  21350. "tcp"
  21351. };
  21352. enum RTCIceCandidateType {
  21353. "host",
  21354. "srflx",
  21355. "prflx",
  21356. "relay"
  21357. };
  21358. enum RTCIceTcpCandidateType {
  21359. "active",
  21360. "passive",
  21361. "so"
  21362. };
  21363. [Pref="media.peerconnection.enabled",
  21364. JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
  21365. Exposed=Window]
  21366. interface RTCIceCandidate {
  21367. [Throws]
  21368. constructor(optional RTCIceCandidateInit candidateInitDict = {});
  21369. readonly attribute DOMString candidate;
  21370. readonly attribute DOMString? sdpMid;
  21371. readonly attribute unsigned short? sdpMLineIndex;
  21372. readonly attribute DOMString? foundation;
  21373. readonly attribute RTCIceComponent? component;
  21374. readonly attribute unsigned long? priority;
  21375. readonly attribute DOMString? address;
  21376. readonly attribute RTCIceProtocol? protocol;
  21377. readonly attribute unsigned short? port;
  21378. readonly attribute RTCIceCandidateType? type;
  21379. readonly attribute RTCIceTcpCandidateType? tcpType;
  21380. readonly attribute DOMString? relatedAddress;
  21381. readonly attribute unsigned short? relatedPort;
  21382. readonly attribute DOMString? usernameFragment;
  21383. // TODO: add remaining members relayProtocol and url (bug 1886013)
  21384. // readonly attribute RTCIceServerTransportProtocol? relayProtocol;
  21385. // readonly attribute DOMString? url;
  21386. RTCIceCandidateInit toJSON();
  21387. };
  21388. /* ---------------------- RTCIceTransport ----------------------------- */
  21389. /* ./webidl/RTCIceTransport.webidl */
  21390. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21391. /* This Source Code Form is subject to the terms of the Mozilla Public
  21392. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21393. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21394. *
  21395. * The origin of this IDL file is
  21396. * https://w3c.github.io/webrtc-pc/#dom-rtcicetransport
  21397. */
  21398. enum RTCIceTransportState {
  21399. "closed",
  21400. "failed",
  21401. "disconnected",
  21402. "new",
  21403. "checking",
  21404. "completed",
  21405. "connected"
  21406. };
  21407. enum RTCIceGathererState {
  21408. "new",
  21409. "gathering",
  21410. "complete"
  21411. };
  21412. [Exposed=Window]
  21413. interface RTCIceTransport : EventTarget {
  21414. // TODO(bug 1307994)
  21415. // readonly attribute RTCIceRole role;
  21416. // readonly attribute RTCIceComponent component;
  21417. readonly attribute RTCIceTransportState state;
  21418. readonly attribute RTCIceGathererState gatheringState;
  21419. // TODO(bug 1307994)
  21420. // sequence<RTCIceCandidate> getLocalCandidates();
  21421. // sequence<RTCIceCandidate> getRemoteCandidates();
  21422. // RTCIceCandidatePair? getSelectedCandidatePair();
  21423. // RTCIceParameters? getLocalParameters();
  21424. // RTCIceParameters? getRemoteParameters();
  21425. attribute EventHandler onstatechange;
  21426. attribute EventHandler ongatheringstatechange;
  21427. // TODO(bug 1307994)
  21428. // attribute EventHandler onselectedcandidatepairchange;
  21429. };
  21430. /* ---------------------- RTCIdentityAssertion ----------------------------- */
  21431. /* ./webidl/RTCIdentityAssertion.webidl */
  21432. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21433. /* This Source Code Form is subject to the terms of the Mozilla Public
  21434. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21435. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21436. *
  21437. * The origin of this IDL file is
  21438. * http://w3c.github.io/webrtc-pc/#idl-def-RTCIdentityAssertion
  21439. */
  21440. dictionary RTCIdentityAssertion {
  21441. DOMString idp;
  21442. DOMString name;
  21443. };
  21444. /* ---------------------- RTCIdentityProvider ----------------------------- */
  21445. /* ./webidl/RTCIdentityProvider.webidl */
  21446. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21447. /* This Source Code Form is subject to the terms of the Mozilla Public
  21448. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21449. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21450. *
  21451. * http://w3c.github.io/webrtc-pc/ (with https://github.com/w3c/webrtc-pc/pull/178)
  21452. */
  21453. [LegacyNoInterfaceObject,
  21454. Exposed=Window]
  21455. interface RTCIdentityProviderRegistrar {
  21456. undefined register(RTCIdentityProvider idp);
  21457. /* Whether an IdP was passed to register() to chrome code. */
  21458. [ChromeOnly]
  21459. readonly attribute boolean hasIdp;
  21460. /* The following two chrome-only functions forward to the corresponding
  21461. * function on the registered IdP. This is necessary because the
  21462. * JS-implemented WebIDL can't see these functions on `idp` above, chrome JS
  21463. * gets an Xray onto the content code that suppresses functions, see
  21464. * https://developer.mozilla.org/en-US/docs/Xray_vision#Xrays_for_JavaScript_objects
  21465. */
  21466. /* Forward to idp.generateAssertion() */
  21467. [ChromeOnly, Throws]
  21468. Promise<RTCIdentityAssertionResult>
  21469. generateAssertion(DOMString contents, DOMString origin,
  21470. optional RTCIdentityProviderOptions options = {});
  21471. /* Forward to idp.validateAssertion() */
  21472. [ChromeOnly, Throws]
  21473. Promise<RTCIdentityValidationResult>
  21474. validateAssertion(DOMString assertion, DOMString origin);
  21475. };
  21476. dictionary RTCIdentityProvider {
  21477. required GenerateAssertionCallback generateAssertion;
  21478. required ValidateAssertionCallback validateAssertion;
  21479. };
  21480. callback GenerateAssertionCallback =
  21481. Promise<RTCIdentityAssertionResult>
  21482. (DOMString contents, DOMString origin,
  21483. RTCIdentityProviderOptions options);
  21484. callback ValidateAssertionCallback =
  21485. Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
  21486. dictionary RTCIdentityAssertionResult {
  21487. required RTCIdentityProviderDetails idp;
  21488. required DOMString assertion;
  21489. };
  21490. dictionary RTCIdentityProviderDetails {
  21491. required DOMString domain;
  21492. DOMString protocol = "default";
  21493. };
  21494. dictionary RTCIdentityValidationResult {
  21495. required DOMString identity;
  21496. required DOMString contents;
  21497. };
  21498. dictionary RTCIdentityProviderOptions {
  21499. DOMString protocol = "default";
  21500. DOMString usernameHint;
  21501. DOMString peerIdentity;
  21502. };
  21503. /* ---------------------- RTCPeerConnection ----------------------------- */
  21504. /* ./webidl/RTCPeerConnection.webidl */
  21505. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21506. /* This Source Code Form is subject to the terms of the Mozilla Public
  21507. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21508. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21509. *
  21510. * The origin of this IDL file is
  21511. * http://w3c.github.io/webrtc-pc/#interface-definition
  21512. */
  21513. callback RTCSessionDescriptionCallback = undefined (RTCSessionDescriptionInit description);
  21514. callback RTCPeerConnectionErrorCallback = undefined (DOMException error);
  21515. callback RTCStatsCallback = undefined (RTCStatsReport report);
  21516. enum RTCSignalingState {
  21517. "stable",
  21518. "have-local-offer",
  21519. "have-remote-offer",
  21520. "have-local-pranswer",
  21521. "have-remote-pranswer",
  21522. "closed"
  21523. };
  21524. enum RTCIceGatheringState {
  21525. "new",
  21526. "gathering",
  21527. "complete"
  21528. };
  21529. enum RTCIceConnectionState {
  21530. "closed",
  21531. "failed",
  21532. "disconnected",
  21533. "new",
  21534. "checking",
  21535. "completed",
  21536. "connected"
  21537. };
  21538. enum RTCPeerConnectionState {
  21539. "closed",
  21540. "failed",
  21541. "disconnected",
  21542. "new",
  21543. "connecting",
  21544. "connected"
  21545. };
  21546. enum mozPacketDumpType {
  21547. "rtp", // dump unencrypted rtp as the MediaPipeline sees it
  21548. "srtp", // dump encrypted rtp as the MediaPipeline sees it
  21549. "rtcp", // dump unencrypted rtcp as the MediaPipeline sees it
  21550. "srtcp" // dump encrypted rtcp as the MediaPipeline sees it
  21551. };
  21552. callback mozPacketCallback = undefined (unsigned long level,
  21553. mozPacketDumpType type,
  21554. boolean sending,
  21555. ArrayBuffer packet);
  21556. dictionary RTCDataChannelInit {
  21557. boolean ordered = true;
  21558. [EnforceRange]
  21559. unsigned short maxPacketLifeTime;
  21560. [EnforceRange]
  21561. unsigned short maxRetransmits;
  21562. DOMString protocol = "";
  21563. boolean negotiated = false;
  21564. [EnforceRange]
  21565. unsigned short id;
  21566. // These are deprecated due to renaming in the spec, but still supported for Fx53
  21567. unsigned short maxRetransmitTime;
  21568. };
  21569. dictionary RTCOfferAnswerOptions {
  21570. // boolean voiceActivityDetection = true; // TODO: support this (Bug 1184712)
  21571. };
  21572. dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
  21573. };
  21574. dictionary RTCOfferOptions : RTCOfferAnswerOptions {
  21575. boolean offerToReceiveVideo;
  21576. boolean offerToReceiveAudio;
  21577. boolean iceRestart = false;
  21578. };
  21579. [Pref="media.peerconnection.enabled",
  21580. JSImplementation="@mozilla.org/dom/peerconnection;1",
  21581. Exposed=Window]
  21582. interface RTCPeerConnection : EventTarget {
  21583. [Throws]
  21584. constructor(optional RTCConfiguration configuration = {});
  21585. [Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
  21586. static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
  21587. undefined setIdentityProvider (DOMString provider,
  21588. optional RTCIdentityProviderOptions options = {});
  21589. Promise<DOMString> getIdentityAssertion();
  21590. Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {});
  21591. Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {});
  21592. Promise<undefined> setLocalDescription(optional RTCLocalSessionDescriptionInit description = {});
  21593. readonly attribute RTCSessionDescription? localDescription;
  21594. readonly attribute RTCSessionDescription? currentLocalDescription;
  21595. readonly attribute RTCSessionDescription? pendingLocalDescription;
  21596. Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description);
  21597. readonly attribute RTCSessionDescription? remoteDescription;
  21598. readonly attribute RTCSessionDescription? currentRemoteDescription;
  21599. readonly attribute RTCSessionDescription? pendingRemoteDescription;
  21600. readonly attribute RTCSignalingState signalingState;
  21601. Promise<undefined> addIceCandidate (optional (RTCIceCandidateInit or RTCIceCandidate) candidate = {});
  21602. readonly attribute boolean? canTrickleIceCandidates;
  21603. readonly attribute RTCIceGatheringState iceGatheringState;
  21604. readonly attribute RTCIceConnectionState iceConnectionState;
  21605. readonly attribute RTCPeerConnectionState connectionState;
  21606. undefined restartIce ();
  21607. readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
  21608. readonly attribute DOMString? idpLoginUrl;
  21609. [ChromeOnly]
  21610. attribute DOMString id;
  21611. RTCConfiguration getConfiguration ();
  21612. undefined setConfiguration(optional RTCConfiguration configuration = {});
  21613. [Deprecated="RTCPeerConnectionGetStreams"]
  21614. sequence<MediaStream> getLocalStreams ();
  21615. [Deprecated="RTCPeerConnectionGetStreams"]
  21616. sequence<MediaStream> getRemoteStreams ();
  21617. undefined addStream (MediaStream stream);
  21618. // replaces addStream; fails if already added
  21619. // because a track can be part of multiple streams, stream parameters
  21620. // indicate which particular streams should be referenced in signaling
  21621. RTCRtpSender addTrack(MediaStreamTrack track,
  21622. MediaStream... streams);
  21623. undefined removeTrack(RTCRtpSender sender);
  21624. [Throws]
  21625. RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind,
  21626. optional RTCRtpTransceiverInit init = {});
  21627. sequence<RTCRtpSender> getSenders();
  21628. sequence<RTCRtpReceiver> getReceivers();
  21629. sequence<RTCRtpTransceiver> getTransceivers();
  21630. [ChromeOnly]
  21631. undefined mozSetPacketCallback(mozPacketCallback callback);
  21632. [ChromeOnly]
  21633. undefined mozEnablePacketDump(unsigned long level,
  21634. mozPacketDumpType type,
  21635. boolean sending);
  21636. [ChromeOnly]
  21637. undefined mozDisablePacketDump(unsigned long level,
  21638. mozPacketDumpType type,
  21639. boolean sending);
  21640. undefined close ();
  21641. attribute EventHandler onnegotiationneeded;
  21642. attribute EventHandler onicecandidate;
  21643. attribute EventHandler onsignalingstatechange;
  21644. attribute EventHandler onaddstream; // obsolete
  21645. attribute EventHandler onaddtrack; // obsolete
  21646. attribute EventHandler ontrack; // replaces onaddtrack and onaddstream.
  21647. attribute EventHandler oniceconnectionstatechange;
  21648. attribute EventHandler onicegatheringstatechange;
  21649. attribute EventHandler onconnectionstatechange;
  21650. Promise<RTCStatsReport> getStats (optional MediaStreamTrack? selector = null);
  21651. readonly attribute RTCSctpTransport? sctp;
  21652. // Data channel.
  21653. RTCDataChannel createDataChannel (DOMString label,
  21654. optional RTCDataChannelInit dataChannelDict = {});
  21655. attribute EventHandler ondatachannel;
  21656. };
  21657. // Legacy callback API
  21658. partial interface RTCPeerConnection {
  21659. // Legacy Interface Extensions
  21660. // Supporting the methods in this section is optional.
  21661. // If these methods are supported
  21662. // they must be implemented as defined
  21663. // in section "Legacy Interface Extensions"
  21664. Promise<undefined> createOffer(RTCSessionDescriptionCallback successCallback,
  21665. RTCPeerConnectionErrorCallback failureCallback,
  21666. optional RTCOfferOptions options = {});
  21667. Promise<undefined> setLocalDescription(RTCLocalSessionDescriptionInit description,
  21668. VoidFunction successCallback,
  21669. RTCPeerConnectionErrorCallback failureCallback);
  21670. Promise<undefined> createAnswer(RTCSessionDescriptionCallback successCallback,
  21671. RTCPeerConnectionErrorCallback failureCallback);
  21672. Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description,
  21673. VoidFunction successCallback,
  21674. RTCPeerConnectionErrorCallback failureCallback);
  21675. Promise<undefined> addIceCandidate(RTCIceCandidateInit candidate,
  21676. VoidFunction successCallback,
  21677. RTCPeerConnectionErrorCallback failureCallback);
  21678. };
  21679. /* ---------------------- RTCPeerConnectionIceEvent ----------------------------- */
  21680. /* ./webidl/RTCPeerConnectionIceEvent.webidl */
  21681. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21682. /* This Source Code Form is subject to the terms of the Mozilla Public
  21683. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21684. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21685. *
  21686. * The origin of this IDL file is
  21687. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCPeerConnectionIceEvent
  21688. */
  21689. dictionary RTCPeerConnectionIceEventInit : EventInit {
  21690. RTCIceCandidate? candidate = null;
  21691. };
  21692. [Pref="media.peerconnection.enabled",
  21693. Exposed=Window]
  21694. interface RTCPeerConnectionIceEvent : Event {
  21695. constructor(DOMString type,
  21696. optional RTCPeerConnectionIceEventInit eventInitDict = {});
  21697. readonly attribute RTCIceCandidate? candidate;
  21698. };
  21699. /* ---------------------- RTCPeerConnectionStatic ----------------------------- */
  21700. /* ./webidl/RTCPeerConnectionStatic.webidl */
  21701. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21702. /* This Source Code Form is subject to the terms of the Mozilla Public
  21703. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21704. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21705. */
  21706. /*
  21707. Right now, it is not possible to add static functions to a JS implemented
  21708. interface (see bug 863952), so we need to create a simple interface with a
  21709. trivial constructor and no data to hold these functions that really ought to
  21710. be static in RTCPeerConnection.
  21711. TODO([email protected]) Merge this code into RTCPeerConnection once this
  21712. limitation is gone. (Bug 1017082)
  21713. */
  21714. enum RTCLifecycleEvent {
  21715. "initialized",
  21716. "icegatheringstatechange",
  21717. "iceconnectionstatechange",
  21718. "connectionstatechange",
  21719. };
  21720. callback PeerConnectionLifecycleCallback = undefined (RTCPeerConnection pc,
  21721. unsigned long long windowId,
  21722. RTCLifecycleEvent eventType);
  21723. [ChromeOnly,
  21724. Pref="media.peerconnection.enabled",
  21725. JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
  21726. Exposed=Window]
  21727. interface RTCPeerConnectionStatic {
  21728. [Throws]
  21729. constructor();
  21730. /* One slot per window (the window in which the register call is made),
  21731. automatically unregistered when window goes away.
  21732. Fires when a PC is created, and whenever the ICE connection state or
  21733. gathering state changes. */
  21734. undefined registerPeerConnectionLifecycleCallback(
  21735. PeerConnectionLifecycleCallback cb);
  21736. };
  21737. /* ---------------------- RTCRtpCapabilities ----------------------------- */
  21738. /* ./webidl/RTCRtpCapabilities.webidl */
  21739. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21740. /* This Source Code Form is subject to the terms of the Mozilla Public
  21741. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21742. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21743. *
  21744. * The origin of this IDL file is
  21745. * https://w3c.github.io/webrtc-pc/#dom-rtcrtpcapabilities
  21746. */
  21747. dictionary RTCRtpCapabilities {
  21748. required sequence<RTCRtpCodecCapability> codecs;
  21749. required sequence<RTCRtpHeaderExtensionCapability> headerExtensions;
  21750. };
  21751. dictionary RTCRtpCodecCapability : RTCRtpCodec {
  21752. };
  21753. dictionary RTCRtpCodec {
  21754. required DOMString mimeType;
  21755. required unsigned long clockRate;
  21756. unsigned short channels;
  21757. DOMString sdpFmtpLine;
  21758. };
  21759. dictionary RTCRtpHeaderExtensionCapability {
  21760. required DOMString uri;
  21761. };
  21762. /* ---------------------- RTCRtpParameters ----------------------------- */
  21763. /* ./webidl/RTCRtpParameters.webidl */
  21764. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21765. /* This Source Code Form is subject to the terms of the Mozilla Public
  21766. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21767. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21768. *
  21769. * The origin of this IDL file is
  21770. * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
  21771. */
  21772. enum RTCPriorityType {
  21773. "very-low",
  21774. "low",
  21775. "medium",
  21776. "high"
  21777. };
  21778. enum RTCDegradationPreference {
  21779. "maintain-framerate",
  21780. "maintain-resolution",
  21781. "balanced"
  21782. };
  21783. dictionary RTCRtpEncodingParameters {
  21784. boolean active = true;
  21785. // From https://www.w3.org/TR/webrtc-priority/
  21786. RTCPriorityType priority = "low";
  21787. unsigned long maxBitrate;
  21788. DOMString rid;
  21789. double scaleResolutionDownBy;
  21790. // From https://w3c.github.io/webrtc-extensions/#rtcrtpencodingparameters-dictionary
  21791. double maxFramerate;
  21792. };
  21793. dictionary RTCRtpHeaderExtensionParameters {
  21794. DOMString uri;
  21795. unsigned short id;
  21796. boolean encrypted;
  21797. };
  21798. dictionary RTCRtcpParameters {
  21799. DOMString cname;
  21800. boolean reducedSize;
  21801. };
  21802. dictionary RTCRtpCodecParameters {
  21803. unsigned short payloadType;
  21804. DOMString mimeType;
  21805. unsigned long clockRate;
  21806. unsigned short channels = 1;
  21807. DOMString sdpFmtpLine;
  21808. };
  21809. dictionary RTCRtpParameters {
  21810. // We do not support these, but every wpt test involving parameters insists
  21811. // that these be present, regardless of whether the test-case has anything to
  21812. // do with these in particular (see validateRtpParameters).
  21813. sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
  21814. RTCRtcpParameters rtcp;
  21815. sequence<RTCRtpCodecParameters> codecs;
  21816. };
  21817. dictionary RTCRtpSendParameters : RTCRtpParameters {
  21818. DOMString transactionId;
  21819. required sequence<RTCRtpEncodingParameters> encodings;
  21820. };
  21821. /* ---------------------- RTCRtpReceiver ----------------------------- */
  21822. /* ./webidl/RTCRtpReceiver.webidl */
  21823. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21824. /* This Source Code Form is subject to the terms of the Mozilla Public
  21825. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21826. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21827. *
  21828. * The origin of this IDL file is
  21829. * http://lists.w3.org/Archives/Public/public-webrtc/2014May/0067.html
  21830. */
  21831. [Pref="media.peerconnection.enabled",
  21832. Exposed=Window]
  21833. interface RTCRtpReceiver {
  21834. readonly attribute MediaStreamTrack track;
  21835. readonly attribute RTCDtlsTransport? transport;
  21836. static RTCRtpCapabilities? getCapabilities(DOMString kind);
  21837. sequence<RTCRtpContributingSource> getContributingSources();
  21838. sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
  21839. [NewObject]
  21840. Promise<RTCStatsReport> getStats();
  21841. // test-only: for testing getContributingSources
  21842. [ChromeOnly]
  21843. undefined mozInsertAudioLevelForContributingSource(unsigned long source,
  21844. DOMHighResTimeStamp timestamp,
  21845. unsigned long rtpTimestamp,
  21846. boolean hasLevel,
  21847. byte level);
  21848. };
  21849. //https://w3c.github.io/webrtc-extensions/#rtcrtpreceiver-jitterbuffertarget-rtcrtpreceiver-interface
  21850. partial interface RTCRtpReceiver {
  21851. [Throws]
  21852. attribute DOMHighResTimeStamp? jitterBufferTarget;
  21853. };
  21854. // https://w3c.github.io/webrtc-encoded-transform/#specification
  21855. partial interface RTCRtpReceiver {
  21856. [SetterThrows,
  21857. Pref="media.peerconnection.scripttransform.enabled"] attribute RTCRtpTransform? transform;
  21858. };
  21859. /* ---------------------- RTCRtpScriptTransform ----------------------------- */
  21860. /* ./webidl/RTCRtpScriptTransform.webidl */
  21861. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21862. /* This Source Code Form is subject to the terms of the Mozilla Public
  21863. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21864. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21865. *
  21866. * The origin of this IDL file is
  21867. * https://www.w3.org/TR/webrtc-encoded-transform
  21868. */
  21869. // Spec version is commented out (uncomment if SFrameTransform is implemented)
  21870. // typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
  21871. typedef RTCRtpScriptTransform RTCRtpTransform;
  21872. [Pref="media.peerconnection.enabled",
  21873. Pref="media.peerconnection.scripttransform.enabled",
  21874. Exposed=Window]
  21875. interface RTCRtpScriptTransform {
  21876. [Throws]
  21877. constructor(Worker worker, optional any options, optional sequence<object> transfer);
  21878. };
  21879. /* ---------------------- RTCRtpScriptTransformer ----------------------------- */
  21880. /* ./webidl/RTCRtpScriptTransformer.webidl */
  21881. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21882. /* This Source Code Form is subject to the terms of the Mozilla Public
  21883. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21884. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21885. *
  21886. * The origin of this IDL file is
  21887. * https://www.w3.org/TR/webrtc-encoded-transform
  21888. */
  21889. [Pref="media.peerconnection.enabled",
  21890. Pref="media.peerconnection.scripttransform.enabled",
  21891. Exposed=DedicatedWorker]
  21892. interface RTCRtpScriptTransformer {
  21893. readonly attribute ReadableStream readable;
  21894. readonly attribute WritableStream writable;
  21895. [Throws] readonly attribute any options;
  21896. Promise<unsigned long long> generateKeyFrame(optional DOMString rid);
  21897. Promise<undefined> sendKeyFrameRequest();
  21898. };
  21899. /* ---------------------- RTCRtpSender ----------------------------- */
  21900. /* ./webidl/RTCRtpSender.webidl */
  21901. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21902. /* This Source Code Form is subject to the terms of the Mozilla Public
  21903. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21904. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21905. *
  21906. * The origin of this IDL file is
  21907. * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
  21908. */
  21909. [Pref="media.peerconnection.enabled",
  21910. Exposed=Window]
  21911. interface RTCRtpSender {
  21912. readonly attribute MediaStreamTrack? track;
  21913. readonly attribute RTCDtlsTransport? transport;
  21914. static RTCRtpCapabilities? getCapabilities(DOMString kind);
  21915. [NewObject]
  21916. Promise<undefined> setParameters (RTCRtpSendParameters parameters);
  21917. RTCRtpSendParameters getParameters();
  21918. [Throws]
  21919. Promise<undefined> replaceTrack(MediaStreamTrack? withTrack);
  21920. [Throws]
  21921. undefined setStreams(MediaStream... streams);
  21922. [NewObject]
  21923. Promise<RTCStatsReport> getStats();
  21924. readonly attribute RTCDTMFSender? dtmf;
  21925. [ChromeOnly]
  21926. sequence<MediaStream> getStreams();
  21927. [ChromeOnly]
  21928. undefined setStreamsImpl(MediaStream... streams);
  21929. [ChromeOnly]
  21930. undefined setTrack(MediaStreamTrack? track);
  21931. };
  21932. // https://w3c.github.io/webrtc-encoded-transform/#specification
  21933. partial interface RTCRtpSender {
  21934. [SetterThrows,
  21935. Pref="media.peerconnection.scripttransform.enabled"] attribute RTCRtpTransform? transform;
  21936. };
  21937. /* ---------------------- RTCRtpSources ----------------------------- */
  21938. /* ./webidl/RTCRtpSources.webidl */
  21939. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21940. /* This Source Code Form is subject to the terms of the Mozilla Public
  21941. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21942. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21943. *
  21944. * The origin of this IDL file is
  21945. * https://w3c.github.io/webrtc-pc/ Editor's Draft 18 January 2018
  21946. */
  21947. dictionary RTCRtpContributingSource {
  21948. required DOMHighResTimeStamp timestamp;
  21949. required unsigned long source;
  21950. double audioLevel;
  21951. required unsigned long rtpTimestamp;
  21952. };
  21953. dictionary RTCRtpSynchronizationSource : RTCRtpContributingSource {
  21954. boolean? voiceActivityFlag;
  21955. };
  21956. /* Internal enum of types used by RTCRtpSourceEntry */
  21957. enum RTCRtpSourceEntryType {
  21958. "contributing",
  21959. "synchronization",
  21960. };
  21961. /* Internal shared representation of Contributing and Synchronization sources */
  21962. dictionary RTCRtpSourceEntry : RTCRtpSynchronizationSource {
  21963. required RTCRtpSourceEntryType sourceType;
  21964. };
  21965. /* ---------------------- RTCRtpTransceiver ----------------------------- */
  21966. /* ./webidl/RTCRtpTransceiver.webidl */
  21967. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  21968. /* This Source Code Form is subject to the terms of the Mozilla Public
  21969. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  21970. * You can obtain one at http://mozilla.org/MPL/2.0/.
  21971. *
  21972. * The origin of this IDL file is
  21973. * http://w3c.github.io/webrtc-pc/#rtcrtptransceiver-interface
  21974. */
  21975. enum RTCRtpTransceiverDirection {
  21976. "sendrecv",
  21977. "sendonly",
  21978. "recvonly",
  21979. "inactive",
  21980. "stopped"
  21981. };
  21982. dictionary RTCRtpTransceiverInit {
  21983. RTCRtpTransceiverDirection direction = "sendrecv";
  21984. sequence<MediaStream> streams = [];
  21985. sequence<RTCRtpEncodingParameters> sendEncodings = [];
  21986. };
  21987. [Pref="media.peerconnection.enabled",
  21988. Exposed=Window]
  21989. interface RTCRtpTransceiver {
  21990. readonly attribute DOMString? mid;
  21991. [SameObject]
  21992. readonly attribute RTCRtpSender sender;
  21993. [SameObject]
  21994. readonly attribute RTCRtpReceiver receiver;
  21995. readonly attribute boolean stopped;
  21996. [SetterThrows]
  21997. attribute RTCRtpTransceiverDirection direction;
  21998. readonly attribute RTCRtpTransceiverDirection? currentDirection;
  21999. [Throws]
  22000. undefined stop();
  22001. // TODO: bug 1396922
  22002. // undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
  22003. [ChromeOnly]
  22004. undefined setDirectionInternal(RTCRtpTransceiverDirection direction);
  22005. [ChromeOnly]
  22006. DOMString getKind();
  22007. [ChromeOnly]
  22008. boolean hasBeenUsedToSend();
  22009. };
  22010. /* ---------------------- RTCSctpTransport ----------------------------- */
  22011. /* ./webidl/RTCSctpTransport.webidl */
  22012. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22013. /* This Source Code Form is subject to the terms of the Mozilla Public
  22014. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22015. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22016. *
  22017. * The origin of this IDL file is
  22018. * https://w3c.github.io/webrtc-pc/#dom-rtcsctptransport
  22019. */
  22020. enum RTCSctpTransportState {
  22021. "connecting",
  22022. "connected",
  22023. "closed"
  22024. };
  22025. [Pref="media.peerconnection.enabled",
  22026. Exposed=Window]
  22027. interface RTCSctpTransport : EventTarget {
  22028. readonly attribute RTCDtlsTransport transport;
  22029. readonly attribute RTCSctpTransportState state;
  22030. readonly attribute unrestricted double maxMessageSize;
  22031. readonly attribute unsigned short? maxChannels;
  22032. attribute EventHandler onstatechange;
  22033. };
  22034. /* ---------------------- RTCSessionDescription ----------------------------- */
  22035. /* ./webidl/RTCSessionDescription.webidl */
  22036. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22037. /* This Source Code Form is subject to the terms of the Mozilla Public
  22038. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22039. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22040. *
  22041. * The origin of this IDL file is
  22042. * https://www.w3.org/TR/webrtc/#rtcsessiondescription-class
  22043. */
  22044. enum RTCSdpType {
  22045. "offer",
  22046. "pranswer",
  22047. "answer",
  22048. "rollback"
  22049. };
  22050. dictionary RTCSessionDescriptionInit {
  22051. required RTCSdpType type;
  22052. DOMString sdp = "";
  22053. };
  22054. dictionary RTCLocalSessionDescriptionInit {
  22055. RTCSdpType type;
  22056. DOMString sdp = "";
  22057. };
  22058. [Pref="media.peerconnection.enabled",
  22059. JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
  22060. Exposed=Window]
  22061. interface RTCSessionDescription {
  22062. [Throws]
  22063. constructor(RTCSessionDescriptionInit descriptionInitDict);
  22064. // These should be readonly, but writing causes deprecation warnings for a bit
  22065. attribute RTCSdpType type;
  22066. attribute DOMString sdp;
  22067. [Default] object toJSON();
  22068. };
  22069. /* ---------------------- RTCStatsReport ----------------------------- */
  22070. /* ./webidl/RTCStatsReport.webidl */
  22071. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22072. /* This Source Code Form is subject to the terms of the Mozilla Public
  22073. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22074. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22075. *
  22076. * The origin of this IDL file is
  22077. * http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcstatsreport-object
  22078. * http://www.w3.org/2011/04/webrtc/wiki/Stats
  22079. * https://www.w3.org/TR/webrtc-stats/
  22080. */
  22081. enum RTCStatsType {
  22082. "codec",
  22083. "inbound-rtp",
  22084. "outbound-rtp",
  22085. "remote-inbound-rtp",
  22086. "remote-outbound-rtp",
  22087. "media-source",
  22088. "peer-connection",
  22089. "csrc",
  22090. "data-channel",
  22091. "session",
  22092. "track",
  22093. "transport",
  22094. "candidate-pair",
  22095. "local-candidate",
  22096. "remote-candidate"
  22097. };
  22098. dictionary RTCStats {
  22099. DOMHighResTimeStamp timestamp;
  22100. RTCStatsType type;
  22101. DOMString id;
  22102. };
  22103. dictionary RTCRtpStreamStats : RTCStats {
  22104. required unsigned long ssrc;
  22105. required DOMString kind;
  22106. DOMString mediaType;
  22107. DOMString transportId;
  22108. DOMString codecId;
  22109. };
  22110. dictionary RTCCodecStats : RTCStats {
  22111. required unsigned long payloadType;
  22112. RTCCodecType codecType;
  22113. required DOMString transportId;
  22114. required DOMString mimeType;
  22115. unsigned long clockRate;
  22116. unsigned long channels;
  22117. DOMString sdpFmtpLine;
  22118. };
  22119. enum RTCCodecType {
  22120. "encode",
  22121. "decode",
  22122. };
  22123. dictionary RTCReceivedRtpStreamStats: RTCRtpStreamStats {
  22124. unsigned long long packetsReceived;
  22125. long long packetsLost;
  22126. double jitter;
  22127. unsigned long discardedPackets; // non-standard alias for packetsDiscarded
  22128. unsigned long packetsDiscarded;
  22129. };
  22130. dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
  22131. required DOMString trackIdentifier;
  22132. DOMString remoteId;
  22133. unsigned long framesDecoded;
  22134. unsigned long framesDropped;
  22135. unsigned long frameWidth;
  22136. unsigned long frameHeight;
  22137. double framesPerSecond;
  22138. unsigned long long qpSum;
  22139. double totalDecodeTime;
  22140. double totalInterFrameDelay;
  22141. double totalSquaredInterFrameDelay;
  22142. DOMHighResTimeStamp lastPacketReceivedTimestamp;
  22143. unsigned long long headerBytesReceived;
  22144. unsigned long long fecPacketsReceived;
  22145. unsigned long long fecPacketsDiscarded;
  22146. unsigned long long bytesReceived;
  22147. unsigned long nackCount;
  22148. unsigned long firCount;
  22149. unsigned long pliCount;
  22150. double totalProcessingDelay;
  22151. // Always missing from libwebrtc
  22152. // DOMHighResTimeStamp estimatedPlayoutTimestamp;
  22153. double jitterBufferDelay;
  22154. unsigned long long jitterBufferEmittedCount;
  22155. unsigned long long totalSamplesReceived;
  22156. unsigned long long concealedSamples;
  22157. unsigned long long silentConcealedSamples;
  22158. unsigned long long concealmentEvents;
  22159. unsigned long long insertedSamplesForDeceleration;
  22160. unsigned long long removedSamplesForAcceleration;
  22161. double audioLevel;
  22162. double totalAudioEnergy;
  22163. double totalSamplesDuration;
  22164. unsigned long framesReceived;
  22165. };
  22166. dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
  22167. DOMString localId;
  22168. double roundTripTime;
  22169. double totalRoundTripTime;
  22170. double fractionLost;
  22171. unsigned long long roundTripTimeMeasurements;
  22172. };
  22173. dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
  22174. unsigned long packetsSent;
  22175. unsigned long long bytesSent;
  22176. };
  22177. dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
  22178. DOMString remoteId;
  22179. unsigned long framesEncoded;
  22180. unsigned long long qpSum;
  22181. unsigned long nackCount;
  22182. unsigned long firCount;
  22183. unsigned long pliCount;
  22184. unsigned long long headerBytesSent;
  22185. unsigned long long retransmittedPacketsSent;
  22186. unsigned long long retransmittedBytesSent;
  22187. unsigned long long totalEncodedBytesTarget;
  22188. unsigned long frameWidth;
  22189. unsigned long frameHeight;
  22190. double framesPerSecond;
  22191. unsigned long framesSent;
  22192. unsigned long hugeFramesSent;
  22193. double totalEncodeTime;
  22194. };
  22195. dictionary RTCRemoteOutboundRtpStreamStats : RTCSentRtpStreamStats {
  22196. DOMString localId;
  22197. DOMHighResTimeStamp remoteTimestamp;
  22198. };
  22199. dictionary RTCMediaSourceStats : RTCStats {
  22200. required DOMString trackIdentifier;
  22201. required DOMString kind;
  22202. };
  22203. dictionary RTCVideoSourceStats : RTCMediaSourceStats {
  22204. unsigned long width;
  22205. unsigned long height;
  22206. unsigned long frames;
  22207. double framesPerSecond;
  22208. };
  22209. dictionary RTCPeerConnectionStats : RTCStats {
  22210. unsigned long dataChannelsOpened;
  22211. unsigned long dataChannelsClosed;
  22212. };
  22213. dictionary RTCRTPContributingSourceStats : RTCStats {
  22214. unsigned long contributorSsrc;
  22215. DOMString inboundRtpStreamId;
  22216. };
  22217. dictionary RTCDataChannelStats : RTCStats {
  22218. DOMString label;
  22219. DOMString protocol;
  22220. long dataChannelIdentifier;
  22221. // RTCTransportId is not yet implemented - Bug 1225723
  22222. // DOMString transportId;
  22223. RTCDataChannelState state;
  22224. unsigned long messagesSent;
  22225. unsigned long long bytesSent;
  22226. unsigned long messagesReceived;
  22227. unsigned long long bytesReceived;
  22228. };
  22229. enum RTCStatsIceCandidatePairState {
  22230. "frozen",
  22231. "waiting",
  22232. "inprogress",
  22233. "failed",
  22234. "succeeded",
  22235. "cancelled"
  22236. };
  22237. dictionary RTCIceCandidatePairStats : RTCStats {
  22238. DOMString transportId;
  22239. DOMString localCandidateId;
  22240. DOMString remoteCandidateId;
  22241. RTCStatsIceCandidatePairState state;
  22242. unsigned long long priority;
  22243. boolean nominated;
  22244. boolean writable;
  22245. boolean readable;
  22246. unsigned long long bytesSent;
  22247. unsigned long long bytesReceived;
  22248. DOMHighResTimeStamp lastPacketSentTimestamp;
  22249. DOMHighResTimeStamp lastPacketReceivedTimestamp;
  22250. boolean selected;
  22251. [ChromeOnly]
  22252. unsigned long componentId; // moz
  22253. };
  22254. dictionary RTCIceCandidateStats : RTCStats {
  22255. DOMString address;
  22256. long port;
  22257. DOMString protocol;
  22258. RTCIceCandidateType candidateType;
  22259. long priority;
  22260. DOMString relayProtocol;
  22261. // Because we use this internally but don't support RTCIceCandidateStats,
  22262. // we need to keep the field as ChromeOnly. Bug 1225723
  22263. [ChromeOnly]
  22264. DOMString transportId;
  22265. [ChromeOnly]
  22266. DOMString proxied;
  22267. };
  22268. // This is for tracking the frame rate in about:webrtc
  22269. dictionary RTCVideoFrameHistoryEntryInternal {
  22270. required unsigned long width;
  22271. required unsigned long height;
  22272. required unsigned long rotationAngle;
  22273. required DOMHighResTimeStamp firstFrameTimestamp;
  22274. required DOMHighResTimeStamp lastFrameTimestamp;
  22275. required unsigned long long consecutiveFrames;
  22276. required unsigned long localSsrc;
  22277. required unsigned long remoteSsrc;
  22278. };
  22279. // Collection over the entries for a single track for about:webrtc
  22280. dictionary RTCVideoFrameHistoryInternal {
  22281. required DOMString trackIdentifier;
  22282. sequence<RTCVideoFrameHistoryEntryInternal> entries = [];
  22283. };
  22284. // Collection over the libwebrtc bandwidth estimation stats
  22285. dictionary RTCBandwidthEstimationInternal {
  22286. required DOMString trackIdentifier;
  22287. long sendBandwidthBps; // Estimated available send bandwidth
  22288. long maxPaddingBps; // Cumulative configured max padding
  22289. long receiveBandwidthBps; // Estimated available receive bandwidth
  22290. long pacerDelayMs;
  22291. long rttMs;
  22292. };
  22293. // This is used by about:webrtc to report SDP parsing errors
  22294. dictionary RTCSdpParsingErrorInternal {
  22295. required unsigned long lineNumber;
  22296. required DOMString error;
  22297. };
  22298. // This is for tracking the flow of SDP for about:webrtc
  22299. dictionary RTCSdpHistoryEntryInternal {
  22300. required DOMHighResTimeStamp timestamp;
  22301. required boolean isLocal;
  22302. required DOMString sdp;
  22303. sequence<RTCSdpParsingErrorInternal> errors = [];
  22304. };
  22305. // This is intended to be a list of dictionaries that inherit from RTCStats
  22306. // (with some raw ICE candidates thrown in). Unfortunately, we cannot simply
  22307. // store a sequence<RTCStats> because of slicing. So, we have to have a
  22308. // separate list for each type. Used in c++ gecko code.
  22309. dictionary RTCStatsCollection {
  22310. sequence<RTCInboundRtpStreamStats> inboundRtpStreamStats = [];
  22311. sequence<RTCOutboundRtpStreamStats> outboundRtpStreamStats = [];
  22312. sequence<RTCRemoteInboundRtpStreamStats> remoteInboundRtpStreamStats = [];
  22313. sequence<RTCRemoteOutboundRtpStreamStats> remoteOutboundRtpStreamStats = [];
  22314. sequence<RTCMediaSourceStats> mediaSourceStats = [];
  22315. sequence<RTCVideoSourceStats> videoSourceStats = [];
  22316. sequence<RTCPeerConnectionStats> peerConnectionStats = [];
  22317. sequence<RTCRTPContributingSourceStats> rtpContributingSourceStats = [];
  22318. sequence<RTCIceCandidatePairStats> iceCandidatePairStats = [];
  22319. sequence<RTCIceCandidateStats> iceCandidateStats = [];
  22320. sequence<RTCIceCandidateStats> trickledIceCandidateStats = [];
  22321. sequence<RTCDataChannelStats> dataChannelStats = [];
  22322. sequence<RTCCodecStats> codecStats = [];
  22323. // For internal use only
  22324. sequence<DOMString> rawLocalCandidates = [];
  22325. sequence<DOMString> rawRemoteCandidates = [];
  22326. sequence<RTCVideoFrameHistoryInternal> videoFrameHistories = [];
  22327. sequence<RTCBandwidthEstimationInternal> bandwidthEstimations = [];
  22328. };
  22329. // Details that about:webrtc can display about configured ICE servers
  22330. dictionary RTCIceServerInternal {
  22331. sequence<DOMString> urls = [];
  22332. required boolean credentialProvided;
  22333. required boolean userNameProvided;
  22334. };
  22335. // Details that about:webrtc can display about the RTCConfiguration
  22336. // Chrome only
  22337. dictionary RTCConfigurationInternal {
  22338. RTCBundlePolicy bundlePolicy;
  22339. required boolean certificatesProvided;
  22340. sequence<RTCIceServerInternal> iceServers = [];
  22341. RTCIceTransportPolicy iceTransportPolicy;
  22342. required boolean peerIdentityProvided;
  22343. DOMString sdpSemantics;
  22344. };
  22345. dictionary RTCSdpHistoryInternal {
  22346. required DOMString pcid;
  22347. sequence<RTCSdpHistoryEntryInternal> sdpHistory = [];
  22348. };
  22349. // A collection of RTCStats dictionaries, plus some other info. Used by
  22350. // WebrtcGlobalInformation for about:webrtc, and telemetry.
  22351. dictionary RTCStatsReportInternal : RTCStatsCollection {
  22352. required DOMString pcid;
  22353. required unsigned long browserId;
  22354. RTCConfigurationInternal configuration;
  22355. DOMString jsepSessionErrors;
  22356. // TODO demux from RTCStatsReportInternal in bug 1830824
  22357. sequence<RTCSdpHistoryEntryInternal> sdpHistory = [];
  22358. required DOMHighResTimeStamp timestamp;
  22359. double callDurationMs;
  22360. required unsigned long iceRestarts;
  22361. required unsigned long iceRollbacks;
  22362. boolean offerer; // Is the PC the offerer
  22363. required boolean closed; // Is the PC now closed
  22364. };
  22365. [Pref="media.peerconnection.enabled",
  22366. Exposed=Window]
  22367. interface RTCStatsReport {
  22368. // TODO(bug 1586109): Remove this once we no longer need to be able to
  22369. // construct empty RTCStatsReports from JS.
  22370. [ChromeOnly]
  22371. constructor();
  22372. readonly maplike<DOMString, object>;
  22373. };
  22374. /* ---------------------- RTCTrackEvent ----------------------------- */
  22375. /* ./webidl/RTCTrackEvent.webidl */
  22376. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22377. /* This Source Code Form is subject to the terms of the Mozilla Public
  22378. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22379. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22380. *
  22381. * The origin of this IDL file is
  22382. * http://w3c.github.io/webrtc-pc/#idl-def-RTCTrackEvent
  22383. */
  22384. dictionary RTCTrackEventInit : EventInit {
  22385. required RTCRtpReceiver receiver;
  22386. required MediaStreamTrack track;
  22387. sequence<MediaStream> streams = [];
  22388. required RTCRtpTransceiver transceiver;
  22389. };
  22390. [Pref="media.peerconnection.enabled",
  22391. Exposed=Window]
  22392. interface RTCTrackEvent : Event {
  22393. constructor(DOMString type, RTCTrackEventInit eventInitDict);
  22394. readonly attribute RTCRtpReceiver receiver;
  22395. readonly attribute MediaStreamTrack track;
  22396. // TODO: Use FrozenArray once available. (Bug 1236777)
  22397. // readonly attribute FrozenArray<MediaStream> streams;
  22398. [Frozen, Cached, Pure]
  22399. readonly attribute sequence<MediaStream> streams; // workaround
  22400. readonly attribute RTCRtpTransceiver transceiver;
  22401. };
  22402. /* ---------------------- RTCTransformEvent ----------------------------- */
  22403. /* ./webidl/RTCTransformEvent.webidl */
  22404. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22405. /* This Source Code Form is subject to the terms of the Mozilla Public
  22406. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22407. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22408. *
  22409. * The origin of this IDL file is
  22410. * https://www.w3.org/TR/webrtc-encoded-transform
  22411. */
  22412. [Pref="media.peerconnection.enabled",
  22413. Pref="media.peerconnection.scripttransform.enabled",
  22414. Exposed=DedicatedWorker]
  22415. interface RTCTransformEvent : Event {
  22416. constructor(DOMString type, RTCTransformEventInit eventInitDict);
  22417. readonly attribute RTCRtpScriptTransformer transformer;
  22418. };
  22419. dictionary RTCTransformEventInit : EventInit {
  22420. required RTCRtpScriptTransformer transformer;
  22421. };
  22422. /* ---------------------- Sanitizer ----------------------------- */
  22423. /* ./webidl/Sanitizer.webidl */
  22424. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22425. /* This Source Code Form is subject to the terms of the Mozilla Public
  22426. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22427. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22428. *
  22429. * The origin of this IDL file is
  22430. * https://wicg.github.io/sanitizer-api/#sanitizer
  22431. * https://wicg.github.io/sanitizer-api/#config
  22432. *
  22433. * * Copyright © 2020 the Contributors to the HTML Sanitizer API Specification,
  22434. * published by the Web Platform Incubator Community Group under the W3C Community Contributor License Agreement (CLA).
  22435. */
  22436. // NOTE: This IDL is still under development:
  22437. // https://github.com/WICG/sanitizer-api/issues/181
  22438. dictionary SanitizerElementNamespace {
  22439. required DOMString name;
  22440. DOMString? _namespace = "http://www.w3.org/1999/xhtml";
  22441. };
  22442. // Used by "elements"
  22443. dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace {
  22444. sequence<SanitizerAttribute> attributes;
  22445. sequence<SanitizerAttribute> removeAttributes;
  22446. };
  22447. typedef (DOMString or SanitizerElementNamespace) SanitizerElement;
  22448. typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes;
  22449. dictionary SanitizerAttributeNamespace {
  22450. required DOMString name;
  22451. DOMString? _namespace = null;
  22452. };
  22453. typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute;
  22454. dictionary SanitizerConfig {
  22455. sequence<SanitizerElementWithAttributes> elements;
  22456. sequence<SanitizerElement> removeElements;
  22457. sequence<SanitizerElement> replaceWithChildrenElements;
  22458. sequence<SanitizerAttribute> attributes;
  22459. sequence<SanitizerAttribute> removeAttributes;
  22460. boolean customElements;
  22461. boolean unknownMarkup; // Name TBD!
  22462. boolean comments;
  22463. };
  22464. typedef (DocumentFragment or Document) SanitizerInput;
  22465. [Exposed=Window, SecureContext, Pref="dom.security.sanitizer.enabled"]
  22466. interface Sanitizer {
  22467. [Throws, UseCounter]
  22468. constructor(optional SanitizerConfig sanitizerConfig = {});
  22469. [UseCounter, Throws]
  22470. DocumentFragment sanitize(SanitizerInput input);
  22471. };
  22472. /* ---------------------- Screen ----------------------------- */
  22473. /* ./webidl/Screen.webidl */
  22474. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22475. /* This Source Code Form is subject to the terms of the Mozilla Public
  22476. * License, v. 2.0. If a copy of the MPL was not distributed with this
  22477. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  22478. [Exposed=Window]
  22479. interface Screen : EventTarget {
  22480. // CSSOM-View
  22481. // http://dev.w3.org/csswg/cssom-view/#the-screen-interface
  22482. readonly attribute long availWidth;
  22483. readonly attribute long availHeight;
  22484. readonly attribute long width;
  22485. readonly attribute long height;
  22486. readonly attribute long colorDepth;
  22487. readonly attribute long pixelDepth;
  22488. readonly attribute long top;
  22489. readonly attribute long left;
  22490. readonly attribute long availTop;
  22491. readonly attribute long availLeft;
  22492. /**
  22493. * DEPRECATED, use ScreenOrientation API instead.
  22494. * Returns the current screen orientation.
  22495. * Can be: landscape-primary, landscape-secondary,
  22496. * portrait-primary or portrait-secondary.
  22497. */
  22498. [NeedsCallerType]
  22499. readonly attribute DOMString mozOrientation;
  22500. attribute EventHandler onmozorientationchange;
  22501. /**
  22502. * DEPRECATED, use ScreenOrientation API instead.
  22503. * Lock/unlock screen orientation to the specified type.
  22504. *
  22505. * FIXME(emilio): These do literally nothing, we should
  22506. * try to remove these.
  22507. */
  22508. boolean mozLockOrientation(DOMString orientation);
  22509. boolean mozLockOrientation(sequence<DOMString> orientation);
  22510. undefined mozUnlockOrientation();
  22511. };
  22512. // https://w3c.github.io/screen-orientation
  22513. partial interface Screen {
  22514. readonly attribute ScreenOrientation orientation;
  22515. };
  22516. // https://wicg.github.io/media-capabilities/#idl-index
  22517. enum ScreenColorGamut {
  22518. "srgb",
  22519. "p3",
  22520. "rec2020",
  22521. };
  22522. [Func="nsScreen::MediaCapabilitiesEnabled",
  22523. Exposed=Window]
  22524. interface ScreenLuminance {
  22525. readonly attribute double min;
  22526. readonly attribute double max;
  22527. readonly attribute double maxAverage;
  22528. };
  22529. partial interface Screen {
  22530. [Func="nsScreen::MediaCapabilitiesEnabled"]
  22531. readonly attribute ScreenColorGamut colorGamut;
  22532. [Func="nsScreen::MediaCapabilitiesEnabled"]
  22533. readonly attribute ScreenLuminance? luminance;
  22534. [Func="nsScreen::MediaCapabilitiesEnabled"]
  22535. attribute EventHandler onchange;
  22536. };
  22537. /* ---------------------- ScreenOrientation ----------------------------- */
  22538. /* ./webidl/ScreenOrientation.webidl */
  22539. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22540. /* This Source Code Form is subject to the terms of the Mozilla Public
  22541. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22542. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22543. *
  22544. * The origin of this IDL file is
  22545. * https://w3c.github.io/screen-orientation
  22546. *
  22547. * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights
  22548. * Reserved. W3C liability, trademark and document use rules apply.
  22549. */
  22550. enum OrientationType {
  22551. "portrait-primary",
  22552. "portrait-secondary",
  22553. "landscape-primary",
  22554. "landscape-secondary"
  22555. };
  22556. enum OrientationLockType {
  22557. "any",
  22558. "natural",
  22559. "landscape",
  22560. "portrait",
  22561. "portrait-primary",
  22562. "portrait-secondary",
  22563. "landscape-primary",
  22564. "landscape-secondary"
  22565. };
  22566. [Exposed=Window]
  22567. interface ScreenOrientation : EventTarget {
  22568. [NewObject]
  22569. Promise<undefined> lock(OrientationLockType orientation);
  22570. [Throws]
  22571. undefined unlock();
  22572. [Throws, NeedsCallerType]
  22573. readonly attribute OrientationType type;
  22574. [Throws, NeedsCallerType]
  22575. readonly attribute unsigned short angle;
  22576. attribute EventHandler onchange;
  22577. };
  22578. /* ---------------------- ScriptProcessorNode ----------------------------- */
  22579. /* ./webidl/ScriptProcessorNode.webidl */
  22580. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22581. /* This Source Code Form is subject to the terms of the Mozilla Public
  22582. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22583. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22584. *
  22585. * The origin of this IDL file is
  22586. * https://webaudio.github.io/web-audio-api/
  22587. *
  22588. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  22589. * liability, trademark and document use rules apply.
  22590. */
  22591. [Pref="dom.webaudio.enabled",
  22592. Exposed=Window]
  22593. interface ScriptProcessorNode : AudioNode {
  22594. attribute EventHandler onaudioprocess;
  22595. readonly attribute long bufferSize;
  22596. };
  22597. // Mozilla extension
  22598. ScriptProcessorNode includes AudioNodePassThrough;
  22599. /* ---------------------- ScrollAreaEvent ----------------------------- */
  22600. /* ./webidl/ScrollAreaEvent.webidl */
  22601. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22602. /* This Source Code Form is subject to the terms of the Mozilla Public
  22603. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22604. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22605. */
  22606. [Exposed=Window]
  22607. interface ScrollAreaEvent : UIEvent
  22608. {
  22609. readonly attribute float x;
  22610. readonly attribute float y;
  22611. readonly attribute float width;
  22612. readonly attribute float height;
  22613. undefined initScrollAreaEvent(DOMString type,
  22614. optional boolean canBubble = false,
  22615. optional boolean cancelable = false,
  22616. optional Window? view = null,
  22617. optional long detail = 0,
  22618. optional float x = 0,
  22619. optional float y = 0,
  22620. optional float width = 0,
  22621. optional float height = 0);
  22622. };
  22623. /* ---------------------- ScrollViewChangeEvent ----------------------------- */
  22624. /* ./webidl/ScrollViewChangeEvent.webidl */
  22625. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22626. /* This Source Code Form is subject to the terms of the Mozilla Public
  22627. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22628. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22629. */
  22630. enum ScrollState {"started", "stopped"};
  22631. dictionary ScrollViewChangeEventInit : EventInit {
  22632. ScrollState state = "started";
  22633. };
  22634. [ChromeOnly,
  22635. Exposed=Window]
  22636. interface ScrollViewChangeEvent : Event {
  22637. constructor(DOMString type,
  22638. optional ScrollViewChangeEventInit eventInit = {});
  22639. readonly attribute ScrollState state;
  22640. };
  22641. /* ---------------------- SecurityPolicyViolationEvent ----------------------------- */
  22642. /* ./webidl/SecurityPolicyViolationEvent.webidl */
  22643. /* This Source Code Form is subject to the terms of the Mozilla Public
  22644. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22645. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22646. *
  22647. * The origin of this IDL file is
  22648. * https://w3c.github.io/webappsec-csp/#violation-events
  22649. */
  22650. enum SecurityPolicyViolationEventDisposition
  22651. {
  22652. "enforce", "report"
  22653. };
  22654. [Exposed=Window]
  22655. interface SecurityPolicyViolationEvent : Event
  22656. {
  22657. constructor(DOMString type,
  22658. optional SecurityPolicyViolationEventInit eventInitDict = {});
  22659. readonly attribute DOMString documentURI;
  22660. readonly attribute DOMString referrer;
  22661. readonly attribute DOMString blockedURI;
  22662. readonly attribute DOMString violatedDirective; // historical alias of effectiveDirective
  22663. readonly attribute DOMString effectiveDirective;
  22664. readonly attribute DOMString originalPolicy;
  22665. readonly attribute DOMString sourceFile;
  22666. readonly attribute DOMString sample;
  22667. readonly attribute SecurityPolicyViolationEventDisposition disposition;
  22668. readonly attribute unsigned short statusCode;
  22669. readonly attribute unsigned long lineNumber;
  22670. readonly attribute unsigned long columnNumber;
  22671. };
  22672. [GenerateInitFromJSON, GenerateToJSON]
  22673. dictionary SecurityPolicyViolationEventInit : EventInit
  22674. {
  22675. DOMString documentURI = "";
  22676. DOMString referrer = "";
  22677. DOMString blockedURI = "";
  22678. DOMString violatedDirective = "";
  22679. DOMString effectiveDirective = "";
  22680. DOMString originalPolicy = "";
  22681. DOMString sourceFile = "";
  22682. DOMString sample = "";
  22683. SecurityPolicyViolationEventDisposition disposition = "enforce";
  22684. unsigned short statusCode = 0;
  22685. unsigned long lineNumber = 0;
  22686. unsigned long columnNumber = 0;
  22687. };
  22688. /* ---------------------- Selection ----------------------------- */
  22689. /* ./webidl/Selection.webidl */
  22690. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22691. /* This Source Code Form is subject to the terms of the Mozilla Public
  22692. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22693. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22694. *
  22695. * The origin of this IDL file is
  22696. * https://w3c.github.io/selection-api/#selection-interface
  22697. *
  22698. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  22699. * liability, trademark and document use rules apply.
  22700. */
  22701. [Exposed=Window]
  22702. interface Selection {
  22703. [NeedsCallerType]
  22704. readonly attribute Node? anchorNode;
  22705. [NeedsCallerType]
  22706. readonly attribute unsigned long anchorOffset;
  22707. [NeedsCallerType]
  22708. readonly attribute Node? focusNode;
  22709. [NeedsCallerType]
  22710. readonly attribute unsigned long focusOffset;
  22711. readonly attribute boolean isCollapsed;
  22712. /**
  22713. * Returns the number of ranges in the selection.
  22714. */
  22715. readonly attribute unsigned long rangeCount;
  22716. readonly attribute DOMString type;
  22717. readonly attribute DOMString direction;
  22718. /**
  22719. * Returns the range at the specified index. Throws if the index is
  22720. * out of range.
  22721. */
  22722. [Throws]
  22723. Range getRangeAt(unsigned long index);
  22724. /**
  22725. * Adds a range to the current selection.
  22726. */
  22727. [Throws, BinaryName="addRangeJS"]
  22728. undefined addRange(Range range);
  22729. /**
  22730. * Removes a range from the current selection.
  22731. */
  22732. [Throws, BinaryName="removeRangeAndUnselectFramesAndNotifyListeners"]
  22733. undefined removeRange(Range range);
  22734. /**
  22735. * Removes all ranges from the current selection.
  22736. */
  22737. [Throws]
  22738. undefined removeAllRanges();
  22739. [Throws, BinaryName="RemoveAllRanges"]
  22740. undefined empty();
  22741. [Pref="dom.shadowdom.selection_across_boundary_enabled"]
  22742. sequence<StaticRange> getComposedRanges(ShadowRoot... shadowRoots);
  22743. [Throws, BinaryName="collapseJS"]
  22744. undefined collapse(Node? node, optional unsigned long offset = 0);
  22745. [Throws, BinaryName="collapseJS"]
  22746. undefined setPosition(Node? node, optional unsigned long offset = 0);
  22747. [Throws, BinaryName="collapseToStartJS"]
  22748. undefined collapseToStart();
  22749. [Throws, BinaryName="collapseToEndJS"]
  22750. undefined collapseToEnd();
  22751. [Throws, BinaryName="extendJS"]
  22752. undefined extend(Node node, optional unsigned long offset = 0);
  22753. [Throws, BinaryName="setBaseAndExtentJS"]
  22754. undefined setBaseAndExtent(Node anchorNode,
  22755. unsigned long anchorOffset,
  22756. Node focusNode,
  22757. unsigned long focusOffset);
  22758. [Throws, BinaryName="selectAllChildrenJS"]
  22759. undefined selectAllChildren(Node node);
  22760. [CEReactions, Throws]
  22761. undefined deleteFromDocument();
  22762. [Throws]
  22763. boolean containsNode(Node node,
  22764. optional boolean allowPartialContainment = false);
  22765. stringifier DOMString ();
  22766. };
  22767. // Additional methods not currently in the spec
  22768. partial interface Selection {
  22769. [Throws]
  22770. undefined modify(DOMString alter, DOMString direction,
  22771. DOMString granularity);
  22772. };
  22773. // Additional chrome-only methods.
  22774. interface nsISelectionListener;
  22775. partial interface Selection {
  22776. /**
  22777. * A true value means "selection after newline"; false means "selection before
  22778. * newline" when a selection is positioned "between lines".
  22779. */
  22780. [ChromeOnly,Throws, BinaryName=interlinePositionJS]
  22781. attribute boolean interlinePosition;
  22782. [Throws]
  22783. attribute short? caretBidiLevel;
  22784. [ChromeOnly,Throws]
  22785. DOMString toStringWithFormat(DOMString formatType, unsigned long flags, long wrapColumn);
  22786. [ChromeOnly]
  22787. undefined addSelectionListener(nsISelectionListener newListener);
  22788. [ChromeOnly]
  22789. undefined removeSelectionListener(nsISelectionListener listenerToRemove);
  22790. [ChromeOnly,BinaryName="rawType"]
  22791. readonly attribute short selectionType;
  22792. /**
  22793. * Return array of ranges intersecting with the given DOM interval.
  22794. */
  22795. [ChromeOnly,Throws,Pref="dom.testing.selection.GetRangesForInterval"]
  22796. sequence<Range> GetRangesForInterval(Node beginNode, long beginOffset, Node endNode, long endOffset,
  22797. boolean allowAdjacent);
  22798. /**
  22799. * Scrolls a region of the selection, so that it is visible in
  22800. * the scrolled view.
  22801. *
  22802. * @param aRegion the region inside the selection to scroll into view
  22803. * (see selection region constants defined in
  22804. * nsISelectionController).
  22805. * @param aIsSynchronous when true, scrolls the selection into view
  22806. * before returning. If false, posts a request which
  22807. * is processed at some point after the method returns.
  22808. * @param aVPercent how to align the frame vertically.
  22809. * @param aHPercent how to align the frame horizontally.
  22810. */
  22811. [ChromeOnly,Throws]
  22812. undefined scrollIntoView(short aRegion, boolean aIsSynchronous, short aVPercent, short aHPercent);
  22813. /**
  22814. * setColors() sets custom colors for the selection.
  22815. * Currently, this is supported only when the selection type is SELECTION_FIND.
  22816. * Otherwise, throws an exception.
  22817. *
  22818. * @param aForegroundColor The foreground color of the selection.
  22819. * If this is "currentColor", foreground color
  22820. * isn't changed by this selection.
  22821. * @param aBackgroundColor The background color of the selection.
  22822. * If this is "transparent", background color is
  22823. * never painted.
  22824. * @param aAltForegroundColor The alternative foreground color of the
  22825. * selection.
  22826. * If aBackgroundColor doesn't have sufficient
  22827. * contrast with its around or foreground color
  22828. * if "currentColor" is specified, alternative
  22829. * colors are used if it have higher contrast.
  22830. * @param aAltBackgroundColor The alternative background color of the
  22831. * selection.
  22832. */
  22833. [ChromeOnly,Throws]
  22834. undefined setColors(DOMString aForegroundColor, DOMString aBackgroundColor,
  22835. DOMString aAltForegroundColor, DOMString aAltBackgroundColor);
  22836. /**
  22837. * resetColors() forget the customized colors which were set by setColors().
  22838. */
  22839. [ChromeOnly]
  22840. undefined resetColors();
  22841. };
  22842. /* ---------------------- ServiceWorker ----------------------------- */
  22843. /* ./webidl/ServiceWorker.webidl */
  22844. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22845. /* This Source Code Form is subject to the terms of the Mozilla Public
  22846. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22847. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22848. *
  22849. * The origin of this IDL file is
  22850. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-obj
  22851. *
  22852. */
  22853. // Still unclear what should be subclassed.
  22854. // https://github.com/slightlyoff/ServiceWorker/issues/189
  22855. [Func="ServiceWorkerVisible",
  22856. // FIXME(nsm): Bug 1113522. This is exposed to satisfy webidl constraints, but it won't actually work.
  22857. Exposed=(Window,Worker)]
  22858. interface ServiceWorker : EventTarget {
  22859. readonly attribute USVString scriptURL;
  22860. readonly attribute ServiceWorkerState state;
  22861. attribute EventHandler onstatechange;
  22862. [Throws]
  22863. undefined postMessage(any message, sequence<object> transferable);
  22864. [Throws]
  22865. undefined postMessage(any message, optional StructuredSerializeOptions options = {});
  22866. };
  22867. ServiceWorker includes AbstractWorker;
  22868. enum ServiceWorkerState {
  22869. // https://github.com/w3c/ServiceWorker/issues/1162
  22870. "parsed",
  22871. "installing",
  22872. "installed",
  22873. "activating",
  22874. "activated",
  22875. "redundant"
  22876. };
  22877. /* ---------------------- ServiceWorkerContainer ----------------------------- */
  22878. /* ./webidl/ServiceWorkerContainer.webidl */
  22879. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22880. /* This Source Code Form is subject to the terms of the Mozilla Public
  22881. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22882. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22883. *
  22884. * The origin of this IDL file is
  22885. * https://w3c.github.io/ServiceWorker/#serviceworkercontainer
  22886. *
  22887. */
  22888. [Func="ServiceWorkersEnabled",
  22889. Exposed=Window]
  22890. interface ServiceWorkerContainer : EventTarget {
  22891. // FIXME(nsm):
  22892. // https://github.com/slightlyoff/ServiceWorker/issues/198
  22893. // and discussion at https://etherpad.mozilla.org/serviceworker07apr
  22894. readonly attribute ServiceWorker? controller;
  22895. [Throws]
  22896. readonly attribute Promise<ServiceWorkerRegistration> ready;
  22897. [NewObject, NeedsCallerType]
  22898. Promise<ServiceWorkerRegistration> register(USVString scriptURL,
  22899. optional RegistrationOptions options = {});
  22900. [NewObject]
  22901. Promise<(ServiceWorkerRegistration or undefined)> getRegistration(optional USVString documentURL = "");
  22902. [NewObject]
  22903. Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
  22904. undefined startMessages();
  22905. attribute EventHandler oncontrollerchange;
  22906. attribute EventHandler onmessage;
  22907. attribute EventHandler onmessageerror;
  22908. };
  22909. // Testing only.
  22910. partial interface ServiceWorkerContainer {
  22911. [Throws,Pref="dom.serviceWorkers.testing.enabled"]
  22912. DOMString getScopeForUrl(DOMString url);
  22913. };
  22914. dictionary RegistrationOptions {
  22915. USVString scope;
  22916. ServiceWorkerUpdateViaCache updateViaCache = "imports";
  22917. };
  22918. /* ---------------------- ServiceWorkerGlobalScope ----------------------------- */
  22919. /* ./webidl/ServiceWorkerGlobalScope.webidl */
  22920. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22921. /* This Source Code Form is subject to the terms of the Mozilla Public
  22922. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22923. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22924. *
  22925. * The origin of this IDL file is
  22926. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  22927. * http://w3c.github.io/push-api/
  22928. * https://notifications.spec.whatwg.org/
  22929. *
  22930. * You are granted a license to use, reproduce and create derivative works of
  22931. * this document.
  22932. */
  22933. [Global=(Worker,ServiceWorker),
  22934. Exposed=ServiceWorker]
  22935. interface ServiceWorkerGlobalScope : WorkerGlobalScope {
  22936. [SameObject, BinaryName="GetClients"]
  22937. readonly attribute Clients clients;
  22938. [SameObject] readonly attribute ServiceWorkerRegistration registration;
  22939. [Throws, NewObject]
  22940. Promise<undefined> skipWaiting();
  22941. attribute EventHandler oninstall;
  22942. attribute EventHandler onactivate;
  22943. attribute EventHandler onfetch;
  22944. // The event.source of these MessageEvents are instances of Client
  22945. attribute EventHandler onmessage;
  22946. attribute EventHandler onmessageerror;
  22947. };
  22948. // These are from w3c.github.io/push-api/
  22949. partial interface ServiceWorkerGlobalScope {
  22950. attribute EventHandler onpush;
  22951. attribute EventHandler onpushsubscriptionchange;
  22952. };
  22953. // https://notifications.spec.whatwg.org/
  22954. partial interface ServiceWorkerGlobalScope {
  22955. attribute EventHandler onnotificationclick;
  22956. attribute EventHandler onnotificationclose;
  22957. };
  22958. // Mixin the WebExtensions API globals (the actual properties are only available to
  22959. // extension service workers, locked behind a Func="extensions::ExtensionAPIAllowed" annotation).
  22960. ServiceWorkerGlobalScope includes ExtensionGlobalsMixin;
  22961. /* ---------------------- ServiceWorkerRegistration ----------------------------- */
  22962. /* ./webidl/ServiceWorkerRegistration.webidl */
  22963. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  22964. /* This Source Code Form is subject to the terms of the Mozilla Public
  22965. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  22966. * You can obtain one at http://mozilla.org/MPL/2.0/.
  22967. *
  22968. * The origin of this IDL file is
  22969. * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  22970. * https://w3c.github.io/push-api/
  22971. * https://notifications.spec.whatwg.org/
  22972. */
  22973. [Func="ServiceWorkerVisible",
  22974. Exposed=(Window,Worker)]
  22975. interface ServiceWorkerRegistration : EventTarget {
  22976. readonly attribute ServiceWorker? installing;
  22977. readonly attribute ServiceWorker? waiting;
  22978. readonly attribute ServiceWorker? active;
  22979. [Pref="dom.serviceWorkers.navigationPreload.enabled", SameObject]
  22980. readonly attribute NavigationPreloadManager navigationPreload;
  22981. readonly attribute USVString scope;
  22982. [Throws]
  22983. readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
  22984. [Throws, NewObject]
  22985. Promise<undefined> update();
  22986. [Throws, NewObject]
  22987. Promise<boolean> unregister();
  22988. // event
  22989. attribute EventHandler onupdatefound;
  22990. };
  22991. enum ServiceWorkerUpdateViaCache {
  22992. "imports",
  22993. "all",
  22994. "none"
  22995. };
  22996. // https://w3c.github.io/push-api/
  22997. partial interface ServiceWorkerRegistration {
  22998. [Throws, Exposed=(Window,Worker), Pref="dom.push.enabled"]
  22999. readonly attribute PushManager pushManager;
  23000. };
  23001. // https://notifications.spec.whatwg.org/
  23002. partial interface ServiceWorkerRegistration {
  23003. [NewObject, Func="mozilla::dom::Notification::PrefEnabled"]
  23004. Promise<undefined> showNotification(DOMString title, optional NotificationOptions options = {});
  23005. [NewObject, Func="mozilla::dom::Notification::PrefEnabled"]
  23006. Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter = {});
  23007. };
  23008. /* ---------------------- ShadowRealmGlobalScope ----------------------------- */
  23009. /* ./webidl/ShadowRealmGlobalScope.webidl */
  23010. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23011. /* This Source Code Form is subject to the terms of the Mozilla Public
  23012. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23013. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23014. */
  23015. // This interface exists purely to register a new global as part of
  23016. // code generation so that we can properly hook this into
  23017. // shadow realms.
  23018. [Global=(ShadowRealmGlobal), Exposed=ShadowRealmGlobal, LegacyNoInterfaceObject]
  23019. interface ShadowRealmGlobalScope { };
  23020. /* ---------------------- ShadowRoot ----------------------------- */
  23021. /* ./webidl/ShadowRoot.webidl */
  23022. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23023. /* This Source Code Form is subject to the terms of the Mozilla Public
  23024. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23025. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23026. *
  23027. * The origin of this IDL file is
  23028. * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
  23029. *
  23030. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23031. * liability, trademark and document use rules apply.
  23032. */
  23033. // https://dom.spec.whatwg.org/#enumdef-shadowrootmode
  23034. enum ShadowRootMode {
  23035. "open",
  23036. "closed"
  23037. };
  23038. enum SlotAssignmentMode { "manual", "named" };
  23039. // https://dom.spec.whatwg.org/#shadowroot
  23040. [Exposed=Window,
  23041. InstrumentedProps=(pictureInPictureElement)]
  23042. interface ShadowRoot : DocumentFragment
  23043. {
  23044. // Shadow DOM v1
  23045. readonly attribute ShadowRootMode mode;
  23046. readonly attribute boolean delegatesFocus;
  23047. readonly attribute SlotAssignmentMode slotAssignment;
  23048. [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  23049. readonly attribute boolean clonable;
  23050. readonly attribute Element host;
  23051. attribute EventHandler onslotchange;
  23052. Element? getElementById(DOMString elementId);
  23053. // https://w3c.github.io/DOM-Parsing/#the-innerhtml-mixin
  23054. [CEReactions, SetterThrows]
  23055. attribute [LegacyNullToEmptyString] DOMString innerHTML;
  23056. // When JS invokes importNode or createElement, the binding code needs to
  23057. // create a reflector, and so invoking those methods directly on the content
  23058. // document would cause the reflector to be created in the content scope,
  23059. // at which point it would be difficult to move into the UA Widget scope.
  23060. // As such, these methods allow UA widget code to simultaneously create nodes
  23061. // and associate them with the UA widget tree, so that the reflectors get
  23062. // created in the right scope.
  23063. [CEReactions, Throws, Func="IsChromeOrUAWidget"]
  23064. Node importNodeAndAppendChildAt(Node parentNode, Node node, optional boolean deep = false);
  23065. [CEReactions, Throws, Func="IsChromeOrUAWidget"]
  23066. Node createElementAndAppendChildAt(Node parentNode, DOMString localName);
  23067. // For triggering UA Widget scope in tests.
  23068. [ChromeOnly]
  23069. undefined setIsUAWidget();
  23070. [ChromeOnly]
  23071. boolean isUAWidget();
  23072. };
  23073. partial interface ShadowRoot {
  23074. // https://html.spec.whatwg.org/#dom-shadowroot-sethtmlunsafe
  23075. [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
  23076. undefined setHTMLUnsafe(DOMString html);
  23077. };
  23078. ShadowRoot includes DocumentOrShadowRoot;
  23079. /* ---------------------- SharedWorker ----------------------------- */
  23080. /* ./webidl/SharedWorker.webidl */
  23081. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23082. /* This Source Code Form is subject to the terms of the Mozilla Public
  23083. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23084. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23085. */
  23086. [Exposed=Window]
  23087. interface SharedWorker : EventTarget {
  23088. [Throws]
  23089. constructor(USVString scriptURL,
  23090. optional (DOMString or WorkerOptions) options = {});
  23091. readonly attribute MessagePort port;
  23092. };
  23093. SharedWorker includes AbstractWorker;
  23094. /* ---------------------- SharedWorkerGlobalScope ----------------------------- */
  23095. /* ./webidl/SharedWorkerGlobalScope.webidl */
  23096. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23097. /* This Source Code Form is subject to the terms of the Mozilla Public
  23098. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23099. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23100. *
  23101. * The origin of this IDL file is
  23102. * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
  23103. *
  23104. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  23105. * Software ASA.
  23106. * You are granted a license to use, reproduce and create derivative works of
  23107. * this document.
  23108. */
  23109. [Global=(Worker,SharedWorker),
  23110. Exposed=SharedWorker]
  23111. interface SharedWorkerGlobalScope : WorkerGlobalScope {
  23112. [Replaceable]
  23113. readonly attribute DOMString name;
  23114. undefined close();
  23115. attribute EventHandler onconnect;
  23116. };
  23117. /* ---------------------- SimpleGestureEvent ----------------------------- */
  23118. /* ./webidl/SimpleGestureEvent.webidl */
  23119. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23120. /* This Source Code Form is subject to the terms of the Mozilla Public
  23121. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23122. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23123. */
  23124. /**
  23125. * The SimpleGestureEvent interface is the datatype for all
  23126. * Mozilla-specific simple gesture events in the Document Object Model.
  23127. *
  23128. * The following events are generated:
  23129. *
  23130. * MozSwipeGestureMayStart - Generated when the user starts a horizontal
  23131. * swipe across the input device, but before we know whether the user
  23132. * is actually scrolling past a scroll edge.
  23133. * This event asks two questions: Should a swipe really be started, and
  23134. * in which directions should the user be able to swipe? The first
  23135. * question is answered by event listeners by calling or not calling
  23136. * preventDefault() on the event. Since a swipe swallows all scroll
  23137. * events, the default action of the swipe start event is *not* to
  23138. * start a swipe. Call preventDefault() if you want a swipe to be
  23139. * started. Doing so won't necessarily result in a swipe being started,
  23140. * it only communicates an intention. Once Gecko determines whether a
  23141. * swipe should actually be started, it will send a MozSwipeGestureStart
  23142. * event.
  23143. * The second question (swipe-able directions) is answered in the
  23144. * allowedDirections field.
  23145. *
  23146. * MozSwipeGestureStart - This event signals the start of a swipe.
  23147. * It guarantees a future MozSwipeGestureEnd event that will signal
  23148. * the end of a swipe animation.
  23149. *
  23150. * MozSwipeGestureUpdate - Generated periodically while the user is
  23151. * continuing a horizontal swipe gesture. The "delta" value represents
  23152. * the current absolute gesture amount. This event may even be sent
  23153. * after a MozSwipeGesture event fired in order to allow for fluid
  23154. * completion of a swipe animation. The direction value is meaningless
  23155. * on swipe update events.
  23156. *
  23157. * MozSwipeGestureEnd - Generated when the swipe animation is completed.
  23158. *
  23159. * MozSwipeGesture - Generated when the user releases a swipe across
  23160. * across the input device. This event signals that the actual swipe
  23161. * operation is complete, even though the animation might not be finished
  23162. * yet. This event can be sent without accompanying start / update / end
  23163. * events, and it can also be handled on its own if the consumer doesn't
  23164. * want to handle swipe animation events.
  23165. * Only the direction value has any significance, the delta value is
  23166. * meaningless.
  23167. *
  23168. * MozMagnifyGestureStart - Generated when the user begins the magnify
  23169. * ("pinch") gesture. The "delta" value represents the initial
  23170. * movement.
  23171. *
  23172. * MozMagnifyGestureUpdate - Generated periodically while the user is
  23173. * continuing the magnify ("pinch") gesture. The "delta" value
  23174. * represents the movement since the last MozMagnifyGestureStart or
  23175. * MozMagnifyGestureUpdate event.
  23176. *
  23177. * MozMagnifyGesture - Generated when the user has completed the
  23178. * magnify ("pinch") gesture. If you only want to receive a single
  23179. * event when the magnify gesture is complete, you only need to hook
  23180. * this event and can safely ignore the MozMagnifyGestureStart and the
  23181. * MozMagnifyGestureUpdate events. The "delta" value is the cumulative
  23182. * amount represented by the user's gesture.
  23183. *
  23184. * MozRotateGestureStart - Generated when the user begins the rotation
  23185. * gesture. The "delta" value represents the initial rotation.
  23186. *
  23187. * MozRotateGestureUpdate - Generated periodically while the user is
  23188. * continuing the rotation gesture. The "delta" value represents the
  23189. * rotation since the last MozRotateGestureStart or
  23190. * MozRotateGestureUpdate event.
  23191. *
  23192. * MozRotateGesture - Generated when the user has completed the
  23193. * rotation gesture. If you only want to receive a single event when
  23194. * the rotation gesture is complete, you only need to hook this event
  23195. * and can safely ignore the MozRotateGestureStart and the
  23196. * MozRotateGestureUpdate events. The "delta" value is the cumulative
  23197. * amount of rotation represented by the user's gesture.
  23198. *
  23199. * MozTapGesture - Generated when the user executes a two finger
  23200. * tap gesture on the input device. Client coordinates contain the
  23201. * center point of the tap.
  23202. * (XXX On OS X, only Lion (10.7) and up)
  23203. *
  23204. * MozPressTapGesture - Generated when the user executes a press
  23205. * and tap two finger gesture (first finger down, second finger down,
  23206. * second finger up, first finger up) on the input device.
  23207. * Client coordinates contain the center pivot point of the action.
  23208. * (XXX Not implemented on Mac)
  23209. *
  23210. * MozEdgeUIGesture - Generated when the user swipes the display to
  23211. * invoke edge ui.
  23212. * (XXX Win8 only)
  23213. *
  23214. * Default behavior:
  23215. *
  23216. * Some operating systems support default behaviors for gesture events
  23217. * when they are not handled by the application. Consumers should
  23218. * use event.preventDefault() to prevent default behavior when
  23219. * consuming events.
  23220. */
  23221. [ChromeOnly,
  23222. Exposed=Window]
  23223. interface SimpleGestureEvent : MouseEvent
  23224. {
  23225. /* Swipe direction constants */
  23226. const unsigned long DIRECTION_UP = 1;
  23227. const unsigned long DIRECTION_DOWN = 2;
  23228. const unsigned long DIRECTION_LEFT = 4;
  23229. const unsigned long DIRECTION_RIGHT = 8;
  23230. /* Rotational direction constants */
  23231. const unsigned long ROTATION_COUNTERCLOCKWISE = 1;
  23232. const unsigned long ROTATION_CLOCKWISE = 2;
  23233. /* Read-write value for swipe events.
  23234. *
  23235. * Reports the directions that can be swiped to; multiple directions
  23236. * should be OR'ed together.
  23237. *
  23238. * The allowedDirections field is designed to be set on SwipeGestureMayStart
  23239. * events by event listeners. Its value after event dispatch determines
  23240. * the behavior of the swipe animation that might be about to begin.
  23241. * Specifically, if the user swipes in a direction that can't be swiped
  23242. * to, the animation will have a bounce effect.
  23243. * Future SwipeGestureUpdate, SwipeGesture and SwipeGestureEnd events
  23244. * will carry the allowDirections value that was set on the SwipeMayStart
  23245. * event. Changing this field on non-SwipeGestureMayStart events doesn't
  23246. * have any effect.
  23247. */
  23248. attribute unsigned long allowedDirections;
  23249. /* Direction of a gesture. Diagonals are indicated by OR'ing the
  23250. * applicable constants together.
  23251. *
  23252. * Swipes gestures may occur in any direction.
  23253. *
  23254. * Magnify gestures do not have a direction.
  23255. *
  23256. * Rotation gestures will be either ROTATION_COUNTERCLOCKWISE or
  23257. * ROTATION_CLOCKWISE.
  23258. */
  23259. readonly attribute unsigned long direction;
  23260. /* Delta value for magnify, rotate and swipe gestures.
  23261. *
  23262. * For rotation, the value is in degrees and is positive for
  23263. * clockwise rotation and negative for counterclockwise
  23264. * rotation.
  23265. *
  23266. * For magnification, the value will be positive for a "zoom in"
  23267. * (i.e, increased magnification) and negative for a "zoom out"
  23268. * (i.e., decreased magnification). The particular units
  23269. * represented by the "delta" are currently implementation specific.
  23270. *
  23271. * XXX - The units for measuring magnification are currently
  23272. * unspecified because the units used by Mac OS X are currently
  23273. * undocumented. The values are typically in the range of 0.0 to
  23274. * 100.0, but it is only safe currently to rely on the delta being
  23275. * positive or negative.
  23276. *
  23277. * For swipe start, update and end events, the value is a fraction
  23278. * of one "page". If the resulting swipe will have DIRECTION_LEFT, the
  23279. * delta value will be positive; for DIRECTION_RIGHT, delta is negative.
  23280. * If this seems backwards to you, look at it this way: If the current
  23281. * page is pushed to the right during the animation (positive delta),
  23282. * the page left to the current page will be visible after the swipe
  23283. * (DIRECTION_LEFT).
  23284. *
  23285. * Units on Windows represent the difference between the initial
  23286. * and current/final width between the two touch points on the input
  23287. * device and are measured in pixels.
  23288. */
  23289. readonly attribute double delta;
  23290. /* Click count value for taps. */
  23291. readonly attribute unsigned long clickCount;
  23292. undefined initSimpleGestureEvent(DOMString typeArg,
  23293. optional boolean canBubbleArg = false,
  23294. optional boolean cancelableArg = false,
  23295. optional Window? viewArg = null,
  23296. optional long detailArg = 0,
  23297. optional long screenXArg = 0,
  23298. optional long screenYArg = 0,
  23299. optional long clientXArg = 0,
  23300. optional long clientYArg = 0,
  23301. optional boolean ctrlKeyArg = false,
  23302. optional boolean altKeyArg = false,
  23303. optional boolean shiftKeyArg = false,
  23304. optional boolean metaKeyArg = false,
  23305. optional short buttonArg = 0,
  23306. optional EventTarget? relatedTargetArg = null,
  23307. optional unsigned long allowedDirectionsArg = 0,
  23308. optional unsigned long directionArg = 0,
  23309. optional double deltaArg = 0,
  23310. optional unsigned long clickCount = 0);
  23311. };
  23312. /* ---------------------- SocketCommon ----------------------------- */
  23313. /* ./webidl/SocketCommon.webidl */
  23314. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23315. /* This Source Code Form is subject to the terms of the Mozilla Public
  23316. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23317. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23318. *
  23319. * The origin of this IDL file is
  23320. * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#readystate
  23321. */
  23322. enum SocketReadyState {
  23323. "opening",
  23324. "open",
  23325. "closing",
  23326. "closed",
  23327. "halfclosed"
  23328. };
  23329. /* ---------------------- SourceBuffer ----------------------------- */
  23330. /* ./webidl/SourceBuffer.webidl */
  23331. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23332. /* This Source Code Form is subject to the terms of the Mozilla Public
  23333. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23334. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23335. *
  23336. * The origin of this IDL file is
  23337. * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
  23338. *
  23339. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23340. * liability, trademark and document use rules apply.
  23341. */
  23342. enum SourceBufferAppendMode {
  23343. "segments",
  23344. "sequence"
  23345. };
  23346. [Pref="media.mediasource.enabled",
  23347. Exposed=Window]
  23348. interface SourceBuffer : EventTarget {
  23349. [SetterThrows]
  23350. attribute SourceBufferAppendMode mode;
  23351. readonly attribute boolean updating;
  23352. [Throws]
  23353. readonly attribute TimeRanges buffered;
  23354. [SetterThrows]
  23355. attribute double timestampOffset;
  23356. //readonly attribute AudioTrackList audioTracks;
  23357. //readonly attribute VideoTrackList videoTracks;
  23358. //readonly attribute TextTrackList textTracks;
  23359. [SetterThrows]
  23360. attribute double appendWindowStart;
  23361. [SetterThrows]
  23362. attribute unrestricted double appendWindowEnd;
  23363. attribute EventHandler onupdatestart;
  23364. attribute EventHandler onupdate;
  23365. attribute EventHandler onupdateend;
  23366. attribute EventHandler onerror;
  23367. attribute EventHandler onabort;
  23368. [Throws]
  23369. undefined appendBuffer(ArrayBuffer data);
  23370. [Throws]
  23371. undefined appendBuffer(ArrayBufferView data);
  23372. //[Throws]
  23373. //undefined appendStream(Stream stream, [EnforceRange] optional unsigned long long maxSize);
  23374. [Throws]
  23375. undefined abort();
  23376. [Throws]
  23377. undefined remove(double start, unrestricted double end);
  23378. };
  23379. // Mozilla extensions for experimental features
  23380. partial interface SourceBuffer {
  23381. // Experimental function as proposed in:
  23382. // https://github.com/w3c/media-source/issues/100 for promise proposal.
  23383. [NewObject, Pref="media.mediasource.experimental.enabled"]
  23384. Promise<undefined> appendBufferAsync(ArrayBuffer data);
  23385. [NewObject, Pref="media.mediasource.experimental.enabled"]
  23386. Promise<undefined> appendBufferAsync(ArrayBufferView data);
  23387. [NewObject, Pref="media.mediasource.experimental.enabled"]
  23388. Promise<undefined> removeAsync(double start, unrestricted double end);
  23389. // Experimental function as proposed in:
  23390. // https://github.com/w3c/media-source/issues/155
  23391. [Throws]
  23392. undefined changeType(DOMString type);
  23393. };
  23394. /* ---------------------- SourceBufferList ----------------------------- */
  23395. /* ./webidl/SourceBufferList.webidl */
  23396. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23397. /* This Source Code Form is subject to the terms of the Mozilla Public
  23398. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23399. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23400. *
  23401. * The origin of this IDL file is
  23402. * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
  23403. *
  23404. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23405. * liability, trademark and document use rules apply.
  23406. */
  23407. [Pref="media.mediasource.enabled",
  23408. Exposed=Window]
  23409. interface SourceBufferList : EventTarget {
  23410. readonly attribute unsigned long length;
  23411. attribute EventHandler onaddsourcebuffer;
  23412. attribute EventHandler onremovesourcebuffer;
  23413. getter SourceBuffer (unsigned long index);
  23414. };
  23415. /* ---------------------- SpeechGrammar ----------------------------- */
  23416. /* ./webidl/SpeechGrammar.webidl */
  23417. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23418. /* This Source Code Form is subject to the terms of the Mozilla Public
  23419. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23420. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23421. *
  23422. * The origin of this IDL file is
  23423. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23424. *
  23425. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23426. * liability, trademark and document use rules apply.
  23427. */
  23428. [Pref="media.webspeech.recognition.enable",
  23429. LegacyFactoryFunction=webkitSpeechGrammar,
  23430. Func="SpeechRecognition::IsAuthorized",
  23431. Exposed=Window]
  23432. interface SpeechGrammar {
  23433. constructor();
  23434. [Throws]
  23435. attribute DOMString src;
  23436. [Throws]
  23437. attribute float weight;
  23438. };
  23439. /* ---------------------- SpeechGrammarList ----------------------------- */
  23440. /* ./webidl/SpeechGrammarList.webidl */
  23441. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23442. /* This Source Code Form is subject to the terms of the Mozilla Public
  23443. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23444. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23445. *
  23446. * The origin of this IDL file is
  23447. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23448. *
  23449. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23450. * liability, trademark and document use rules apply.
  23451. */
  23452. [Pref="media.webspeech.recognition.enable",
  23453. LegacyFactoryFunction=webkitSpeechGrammarList,
  23454. Func="SpeechRecognition::IsAuthorized",
  23455. Exposed=Window]
  23456. interface SpeechGrammarList {
  23457. constructor();
  23458. readonly attribute unsigned long length;
  23459. [Throws]
  23460. getter SpeechGrammar item(unsigned long index);
  23461. [Throws]
  23462. undefined addFromURI(DOMString src, optional float weight);
  23463. [Throws]
  23464. undefined addFromString(DOMString string, optional float weight);
  23465. };
  23466. /* ---------------------- SpeechRecognition ----------------------------- */
  23467. /* ./webidl/SpeechRecognition.webidl */
  23468. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23469. /* This Source Code Form is subject to the terms of the Mozilla Public
  23470. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23471. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23472. *
  23473. * The origin of this IDL file is
  23474. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23475. *
  23476. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23477. * liability, trademark and document use rules apply.
  23478. */
  23479. [Pref="media.webspeech.recognition.enable",
  23480. LegacyFactoryFunction=webkitSpeechRecognition,
  23481. Func="SpeechRecognition::IsAuthorized",
  23482. Exposed=Window]
  23483. interface SpeechRecognition : EventTarget {
  23484. [Throws]
  23485. constructor();
  23486. // recognition parameters
  23487. attribute SpeechGrammarList grammars;
  23488. attribute DOMString lang;
  23489. [Throws]
  23490. attribute boolean continuous;
  23491. attribute boolean interimResults;
  23492. attribute unsigned long maxAlternatives;
  23493. [Throws]
  23494. attribute DOMString serviceURI;
  23495. // methods to drive the speech interaction
  23496. [Throws, NeedsCallerType]
  23497. undefined start(optional MediaStream stream);
  23498. undefined stop();
  23499. undefined abort();
  23500. // event methods
  23501. attribute EventHandler onaudiostart;
  23502. attribute EventHandler onsoundstart;
  23503. attribute EventHandler onspeechstart;
  23504. attribute EventHandler onspeechend;
  23505. attribute EventHandler onsoundend;
  23506. attribute EventHandler onaudioend;
  23507. attribute EventHandler onresult;
  23508. attribute EventHandler onnomatch;
  23509. attribute EventHandler onerror;
  23510. attribute EventHandler onstart;
  23511. attribute EventHandler onend;
  23512. };
  23513. /* ---------------------- SpeechRecognitionAlternative ----------------------------- */
  23514. /* ./webidl/SpeechRecognitionAlternative.webidl */
  23515. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23516. /* This Source Code Form is subject to the terms of the Mozilla Public
  23517. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23518. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23519. *
  23520. * The origin of this IDL file is
  23521. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23522. *
  23523. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23524. * liability, trademark and document use rules apply.
  23525. */
  23526. [Pref="media.webspeech.recognition.enable",
  23527. Func="SpeechRecognition::IsAuthorized",
  23528. Exposed=Window]
  23529. interface SpeechRecognitionAlternative {
  23530. readonly attribute DOMString transcript;
  23531. readonly attribute float confidence;
  23532. };
  23533. /* ---------------------- SpeechRecognitionError ----------------------------- */
  23534. /* ./webidl/SpeechRecognitionError.webidl */
  23535. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23536. /* This Source Code Form is subject to the terms of the Mozilla Public
  23537. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23538. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23539. */
  23540. enum SpeechRecognitionErrorCode {
  23541. "no-speech",
  23542. "aborted",
  23543. "audio-capture",
  23544. "network",
  23545. "not-allowed",
  23546. "service-not-allowed",
  23547. "bad-grammar",
  23548. "language-not-supported"
  23549. };
  23550. [Pref="media.webspeech.recognition.enable",
  23551. Func="SpeechRecognition::IsAuthorized",
  23552. Exposed=Window]
  23553. interface SpeechRecognitionError : Event
  23554. {
  23555. constructor(DOMString type,
  23556. optional SpeechRecognitionErrorInit eventInitDict = {});
  23557. readonly attribute SpeechRecognitionErrorCode error;
  23558. readonly attribute DOMString? message;
  23559. };
  23560. dictionary SpeechRecognitionErrorInit : EventInit
  23561. {
  23562. SpeechRecognitionErrorCode error = "no-speech";
  23563. DOMString message = "";
  23564. };
  23565. /* ---------------------- SpeechRecognitionEvent ----------------------------- */
  23566. /* ./webidl/SpeechRecognitionEvent.webidl */
  23567. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23568. /* This Source Code Form is subject to the terms of the Mozilla Public
  23569. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23570. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23571. */
  23572. interface nsISupports;
  23573. [Pref="media.webspeech.recognition.enable",
  23574. Func="SpeechRecognition::IsAuthorized",
  23575. Exposed=Window]
  23576. interface SpeechRecognitionEvent : Event
  23577. {
  23578. constructor(DOMString type,
  23579. optional SpeechRecognitionEventInit eventInitDict = {});
  23580. readonly attribute unsigned long resultIndex;
  23581. readonly attribute SpeechRecognitionResultList? results;
  23582. readonly attribute any interpretation;
  23583. readonly attribute Document? emma;
  23584. };
  23585. dictionary SpeechRecognitionEventInit : EventInit
  23586. {
  23587. unsigned long resultIndex = 0;
  23588. SpeechRecognitionResultList? results = null;
  23589. any interpretation = null;
  23590. Document? emma = null;
  23591. };
  23592. /* ---------------------- SpeechRecognitionResult ----------------------------- */
  23593. /* ./webidl/SpeechRecognitionResult.webidl */
  23594. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23595. /* This Source Code Form is subject to the terms of the Mozilla Public
  23596. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23597. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23598. *
  23599. * The origin of this IDL file is
  23600. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23601. *
  23602. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23603. * liability, trademark and document use rules apply.
  23604. */
  23605. [Pref="media.webspeech.recognition.enable",
  23606. Func="SpeechRecognition::IsAuthorized",
  23607. Exposed=Window]
  23608. interface SpeechRecognitionResult {
  23609. readonly attribute unsigned long length;
  23610. getter SpeechRecognitionAlternative item(unsigned long index);
  23611. readonly attribute boolean isFinal;
  23612. };
  23613. /* ---------------------- SpeechRecognitionResultList ----------------------------- */
  23614. /* ./webidl/SpeechRecognitionResultList.webidl */
  23615. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23616. /* This Source Code Form is subject to the terms of the Mozilla Public
  23617. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23618. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23619. *
  23620. * The origin of this IDL file is
  23621. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23622. *
  23623. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23624. * liability, trademark and document use rules apply.
  23625. */
  23626. [Pref="media.webspeech.recognition.enable",
  23627. Func="SpeechRecognition::IsAuthorized",
  23628. Exposed=Window]
  23629. interface SpeechRecognitionResultList {
  23630. readonly attribute unsigned long length;
  23631. getter SpeechRecognitionResult item(unsigned long index);
  23632. };
  23633. /* ---------------------- SpeechSynthesis ----------------------------- */
  23634. /* ./webidl/SpeechSynthesis.webidl */
  23635. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23636. /* This Source Code Form is subject to the terms of the Mozilla Public
  23637. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23638. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23639. *
  23640. * The origin of this IDL file is
  23641. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23642. *
  23643. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23644. * liability, trademark and document use rules apply.
  23645. */
  23646. [Pref="media.webspeech.synth.enabled",
  23647. Exposed=Window]
  23648. interface SpeechSynthesis : EventTarget{
  23649. readonly attribute boolean pending;
  23650. readonly attribute boolean speaking;
  23651. readonly attribute boolean paused;
  23652. undefined speak(SpeechSynthesisUtterance utterance);
  23653. undefined cancel();
  23654. undefined pause();
  23655. undefined resume();
  23656. sequence<SpeechSynthesisVoice> getVoices();
  23657. attribute EventHandler onvoiceschanged;
  23658. [ChromeOnly]
  23659. // Force an utterance to end. Circumvents bad speech service implementations.
  23660. undefined forceEnd();
  23661. };
  23662. /* ---------------------- SpeechSynthesisErrorEvent ----------------------------- */
  23663. /* ./webidl/SpeechSynthesisErrorEvent.webidl */
  23664. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23665. /* This Source Code Form is subject to the terms of the Mozilla Public
  23666. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23667. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23668. *
  23669. * The origin of this IDL file is
  23670. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23671. *
  23672. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23673. * liability, trademark and document use rules apply.
  23674. */
  23675. enum SpeechSynthesisErrorCode {
  23676. "canceled",
  23677. "interrupted",
  23678. "audio-busy",
  23679. "audio-hardware",
  23680. "network",
  23681. "synthesis-unavailable",
  23682. "synthesis-failed",
  23683. "language-unavailable",
  23684. "voice-unavailable",
  23685. "text-too-long",
  23686. "invalid-argument",
  23687. };
  23688. [Pref="media.webspeech.synth.enabled",
  23689. Exposed=Window]
  23690. interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
  23691. constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict);
  23692. readonly attribute SpeechSynthesisErrorCode error;
  23693. };
  23694. dictionary SpeechSynthesisErrorEventInit : SpeechSynthesisEventInit
  23695. {
  23696. required SpeechSynthesisErrorCode error;
  23697. };
  23698. /* ---------------------- SpeechSynthesisEvent ----------------------------- */
  23699. /* ./webidl/SpeechSynthesisEvent.webidl */
  23700. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23701. /* This Source Code Form is subject to the terms of the Mozilla Public
  23702. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23703. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23704. *
  23705. * The origin of this IDL file is
  23706. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23707. *
  23708. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23709. * liability, trademark and document use rules apply.
  23710. */
  23711. [Pref="media.webspeech.synth.enabled",
  23712. Exposed=Window]
  23713. interface SpeechSynthesisEvent : Event
  23714. {
  23715. constructor(DOMString type, SpeechSynthesisEventInit eventInitDict);
  23716. readonly attribute SpeechSynthesisUtterance utterance;
  23717. readonly attribute unsigned long charIndex;
  23718. readonly attribute unsigned long? charLength;
  23719. readonly attribute float elapsedTime;
  23720. readonly attribute DOMString? name;
  23721. };
  23722. dictionary SpeechSynthesisEventInit : EventInit
  23723. {
  23724. required SpeechSynthesisUtterance utterance;
  23725. unsigned long charIndex = 0;
  23726. unsigned long? charLength = null;
  23727. float elapsedTime = 0;
  23728. DOMString name = "";
  23729. };
  23730. /* ---------------------- SpeechSynthesisUtterance ----------------------------- */
  23731. /* ./webidl/SpeechSynthesisUtterance.webidl */
  23732. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23733. /* This Source Code Form is subject to the terms of the Mozilla Public
  23734. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23735. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23736. *
  23737. * The origin of this IDL file is
  23738. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23739. *
  23740. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23741. * liability, trademark and document use rules apply.
  23742. */
  23743. [Pref="media.webspeech.synth.enabled",
  23744. Exposed=Window]
  23745. interface SpeechSynthesisUtterance : EventTarget {
  23746. [Throws]
  23747. constructor();
  23748. [Throws]
  23749. constructor(DOMString text);
  23750. attribute DOMString text;
  23751. attribute DOMString lang;
  23752. attribute SpeechSynthesisVoice? voice;
  23753. attribute float volume;
  23754. attribute float rate;
  23755. attribute float pitch;
  23756. attribute EventHandler onstart;
  23757. attribute EventHandler onend;
  23758. attribute EventHandler onerror;
  23759. attribute EventHandler onpause;
  23760. attribute EventHandler onresume;
  23761. attribute EventHandler onmark;
  23762. attribute EventHandler onboundary;
  23763. [ChromeOnly]
  23764. readonly attribute DOMString chosenVoiceURI;
  23765. };
  23766. /* ---------------------- SpeechSynthesisVoice ----------------------------- */
  23767. /* ./webidl/SpeechSynthesisVoice.webidl */
  23768. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23769. /* This Source Code Form is subject to the terms of the Mozilla Public
  23770. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23771. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23772. *
  23773. * The origin of this IDL file is
  23774. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  23775. *
  23776. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23777. * liability, trademark and document use rules apply.
  23778. */
  23779. [Pref="media.webspeech.synth.enabled",
  23780. Exposed=Window]
  23781. interface SpeechSynthesisVoice {
  23782. readonly attribute DOMString voiceURI;
  23783. readonly attribute DOMString name;
  23784. readonly attribute DOMString lang;
  23785. readonly attribute boolean localService;
  23786. readonly attribute boolean default;
  23787. };
  23788. /* ---------------------- StaticRange ----------------------------- */
  23789. /* ./webidl/StaticRange.webidl */
  23790. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23791. /* This Source Code Form is subject to the terms of the Mozilla Public
  23792. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23793. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23794. *
  23795. * The origin of this IDL file is
  23796. * https://dom.spec.whatwg.org/#staticrange
  23797. *
  23798. * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23799. * liability, trademark and document use rules apply.
  23800. */
  23801. [Exposed=Window]
  23802. interface StaticRange : AbstractRange {
  23803. [Throws]
  23804. constructor(StaticRangeInit init);
  23805. // And no additional functions/properties.
  23806. };
  23807. dictionary StaticRangeInit {
  23808. required Node startContainer;
  23809. required unsigned long startOffset;
  23810. required Node endContainer;
  23811. required unsigned long endOffset;
  23812. };
  23813. /* ---------------------- StereoPannerNode ----------------------------- */
  23814. /* ./webidl/StereoPannerNode.webidl */
  23815. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23816. /* This Source Code Form is subject to the terms of the Mozilla Public
  23817. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23818. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23819. *
  23820. * The origin of this IDL file is
  23821. * https://webaudio.github.io/web-audio-api/
  23822. *
  23823. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  23824. * liability, trademark and document use rules apply.
  23825. */
  23826. dictionary StereoPannerOptions : AudioNodeOptions {
  23827. float pan = 0;
  23828. };
  23829. [Pref="dom.webaudio.enabled",
  23830. Exposed=Window]
  23831. interface StereoPannerNode : AudioNode {
  23832. [Throws]
  23833. constructor(BaseAudioContext context,
  23834. optional StereoPannerOptions options = {});
  23835. readonly attribute AudioParam pan;
  23836. };
  23837. // Mozilla extension
  23838. StereoPannerNode includes AudioNodePassThrough;
  23839. /* ---------------------- Storage ----------------------------- */
  23840. /* ./webidl/Storage.webidl */
  23841. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23842. /* This Source Code Form is subject to the terms of the Mozilla Public
  23843. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23844. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23845. *
  23846. * The origin of this IDL file is
  23847. * http://www.whatwg.org/html/#the-storage-interface
  23848. *
  23849. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  23850. * Opera Software ASA. You are granted a license to use, reproduce
  23851. * and create derivative works of this document.
  23852. */
  23853. [Exposed=Window]
  23854. interface Storage {
  23855. [Throws, NeedsSubjectPrincipal]
  23856. readonly attribute unsigned long length;
  23857. [Throws, NeedsSubjectPrincipal]
  23858. DOMString? key(unsigned long index);
  23859. [Throws, NeedsSubjectPrincipal]
  23860. getter DOMString? getItem(DOMString key);
  23861. [Throws, NeedsSubjectPrincipal]
  23862. setter undefined setItem(DOMString key, DOMString value);
  23863. [Throws, NeedsSubjectPrincipal]
  23864. deleter undefined removeItem(DOMString key);
  23865. [Throws, NeedsSubjectPrincipal]
  23866. undefined clear();
  23867. };
  23868. /**
  23869. * Testing methods that exist only for the benefit of automated glass-box
  23870. * testing. Will never be exposed to content at large and unlikely to be useful
  23871. * in a WebDriver context.
  23872. */
  23873. partial interface Storage {
  23874. /**
  23875. * Does a security-check and ensures the underlying database has been opened
  23876. * without actually calling any database methods. (Read-only methods will
  23877. * have a similar effect but also impact the state of the snapshot.)
  23878. */
  23879. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23880. undefined open();
  23881. /**
  23882. * Automatically ends any explicit snapshot and drops the reference to the
  23883. * underlying database, but does not otherwise perturb the database.
  23884. */
  23885. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23886. undefined close();
  23887. /**
  23888. * Ensures the database has been opened and initiates an explicit snapshot.
  23889. * Snapshots are normally automatically ended and checkpointed back to the
  23890. * parent, but explicitly opened snapshots must be explicitly ended via
  23891. * `endExplicitSnapshot` or `close`.
  23892. */
  23893. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23894. undefined beginExplicitSnapshot();
  23895. /**
  23896. * Checkpoints the explicitly begun snapshot. This is only useful for testing
  23897. * of snapshot re-using when multiple checkpoints are involved. There's no
  23898. * need to call this before `endExplicitSnapshot` because it checkpoints the
  23899. * snapshot before it's ended.
  23900. */
  23901. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23902. undefined checkpointExplicitSnapshot();
  23903. /**
  23904. * Ends the explicitly begun snapshot and retains the underlying database.
  23905. * Compare with `close` which also drops the reference to the database.
  23906. */
  23907. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23908. undefined endExplicitSnapshot();
  23909. /**
  23910. * Returns true if the underlying database has been opened, the database is
  23911. * not being closed and it has a snapshot (initialized implicitly or
  23912. * explicitly).
  23913. */
  23914. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23915. readonly attribute boolean hasSnapshot;
  23916. /**
  23917. * Returns snapshot usage.
  23918. *
  23919. * @throws NS_ERROR_NOT_AVAILABLE if the underlying database hasn't been
  23920. * opened or the database is being closed or it doesn't have a
  23921. * snapshot.
  23922. */
  23923. [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
  23924. readonly attribute long long snapshotUsage;
  23925. };
  23926. /* ---------------------- StorageEvent ----------------------------- */
  23927. /* ./webidl/StorageEvent.webidl */
  23928. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23929. /* This Source Code Form is subject to the terms of the Mozilla Public
  23930. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23931. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23932. *
  23933. * Interface for a client side storage. See
  23934. * http://dev.w3.org/html5/webstorage/#the-storage-event
  23935. * for more information.
  23936. *
  23937. * Event sent to a window when a storage area changes.
  23938. */
  23939. [Exposed=Window]
  23940. interface StorageEvent : Event
  23941. {
  23942. constructor(DOMString type, optional StorageEventInit eventInitDict = {});
  23943. readonly attribute DOMString? key;
  23944. readonly attribute DOMString? oldValue;
  23945. readonly attribute DOMString? newValue;
  23946. readonly attribute DOMString? url;
  23947. readonly attribute Storage? storageArea;
  23948. // Bug 1016053 - This is not spec compliant.
  23949. undefined initStorageEvent(DOMString type,
  23950. optional boolean canBubble = false,
  23951. optional boolean cancelable = false,
  23952. optional DOMString? key = null,
  23953. optional DOMString? oldValue = null,
  23954. optional DOMString? newValue = null,
  23955. optional DOMString? url = null,
  23956. optional Storage? storageArea = null);
  23957. };
  23958. dictionary StorageEventInit : EventInit
  23959. {
  23960. DOMString? key = null;
  23961. DOMString? oldValue = null;
  23962. DOMString? newValue = null;
  23963. DOMString url = "";
  23964. Storage? storageArea = null;
  23965. };
  23966. /* ---------------------- StorageManager ----------------------------- */
  23967. /* ./webidl/StorageManager.webidl */
  23968. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  23969. /* This Source Code Form is subject to the terms of the Mozilla Public
  23970. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  23971. * You can obtain one at http://mozilla.org/MPL/2.0/.
  23972. *
  23973. * The origin of this IDL file is
  23974. * https://storage.spec.whatwg.org/#storagemanager
  23975. *
  23976. */
  23977. [SecureContext, Exposed=(Window,Worker)]
  23978. interface StorageManager {
  23979. [NewObject]
  23980. Promise<boolean> persisted();
  23981. [Exposed=Window, NewObject]
  23982. Promise<boolean> persist();
  23983. [NewObject]
  23984. Promise<StorageEstimate> estimate();
  23985. };
  23986. dictionary StorageEstimate {
  23987. unsigned long long usage;
  23988. unsigned long long quota;
  23989. };
  23990. [SecureContext]
  23991. partial interface StorageManager {
  23992. [Pref="dom.fs.enabled", NewObject]
  23993. Promise<FileSystemDirectoryHandle> getDirectory();
  23994. };
  23995. /**
  23996. * Testing methods that exist only for the benefit of automated glass-box
  23997. * testing. Will never be exposed to content at large and unlikely to be useful
  23998. * in a WebDriver context.
  23999. */
  24000. [SecureContext]
  24001. partial interface StorageManager {
  24002. [ChromeOnly]
  24003. undefined shutdown();
  24004. };
  24005. /* ---------------------- StreamFilter ----------------------------- */
  24006. /* ./webidl/StreamFilter.webidl */
  24007. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24008. /* This Source Code Form is subject to the terms of the Mozilla Public
  24009. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24010. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24011. */
  24012. /**
  24013. * This is a Mozilla-specific WebExtension API, which is not available to web
  24014. * content. It allows monitoring and filtering of HTTP response stream data.
  24015. *
  24016. * This API should currently be considered experimental, and is not defined by
  24017. * any standard.
  24018. */
  24019. enum StreamFilterStatus {
  24020. /**
  24021. * The StreamFilter is not fully initialized. No methods may be called until
  24022. * a "start" event has been received.
  24023. */
  24024. "uninitialized",
  24025. /**
  24026. * The underlying channel is currently transferring data, which will be
  24027. * dispatched via "data" events.
  24028. */
  24029. "transferringdata",
  24030. /**
  24031. * The underlying channel has finished transferring data. Data may still be
  24032. * written via write() calls at this point.
  24033. */
  24034. "finishedtransferringdata",
  24035. /**
  24036. * Data transfer is currently suspended. It may be resumed by a call to
  24037. * resume(). Data may still be written via write() calls in this state.
  24038. */
  24039. "suspended",
  24040. /**
  24041. * The channel has been closed by a call to close(). No further data wlil be
  24042. * delivered via "data" events, and no further data may be written via
  24043. * write() calls.
  24044. */
  24045. "closed",
  24046. /**
  24047. * The channel has been disconnected by a call to disconnect(). All further
  24048. * data will be delivered directly, without passing through the filter. No
  24049. * further events will be dispatched, and no further data may be written by
  24050. * write() calls.
  24051. */
  24052. "disconnected",
  24053. /**
  24054. * An error has occurred and the channel is disconnected. The `error`
  24055. * property contains the details of the error.
  24056. */
  24057. "failed",
  24058. };
  24059. /**
  24060. * An interface which allows an extension to intercept, and optionally modify,
  24061. * response data from an HTTP request.
  24062. */
  24063. [Exposed=Window,
  24064. Func="mozilla::extensions::StreamFilter::IsAllowedInContext"]
  24065. interface StreamFilter : EventTarget {
  24066. /**
  24067. * Creates a stream filter for the given add-on and the given extension ID.
  24068. */
  24069. [ChromeOnly]
  24070. static StreamFilter create(unsigned long long requestId, DOMString addonId);
  24071. /**
  24072. * Suspends processing of the request. After this is called, no further data
  24073. * will be delivered until the request is resumed.
  24074. */
  24075. [Throws]
  24076. undefined suspend();
  24077. /**
  24078. * Resumes delivery of data for a suspended request.
  24079. */
  24080. [Throws]
  24081. undefined resume();
  24082. /**
  24083. * Closes the request. After this is called, no more data may be written to
  24084. * the stream, and no further data will be delivered.
  24085. *
  24086. * This *must* be called after the consumer is finished writing data, unless
  24087. * disconnect() has already been called.
  24088. */
  24089. [Throws]
  24090. undefined close();
  24091. /**
  24092. * Disconnects the stream filter from the request. After this is called, no
  24093. * further data will be delivered to the filter, and any unprocessed data
  24094. * will be written directly to the output stream.
  24095. */
  24096. [Throws]
  24097. undefined disconnect();
  24098. /**
  24099. * Writes a chunk of data to the output stream. This may not be called
  24100. * before the "start" event has been received.
  24101. */
  24102. [Throws]
  24103. undefined write((ArrayBuffer or Uint8Array) data);
  24104. /**
  24105. * Returns the current status of the stream.
  24106. */
  24107. [Pure]
  24108. readonly attribute StreamFilterStatus status;
  24109. /**
  24110. * After an "error" event has been dispatched, this contains a message
  24111. * describing the error.
  24112. */
  24113. [Pure]
  24114. readonly attribute DOMString error;
  24115. /**
  24116. * Dispatched with a StreamFilterDataEvent whenever incoming data is
  24117. * available on the stream. This data will not be delivered to the output
  24118. * stream unless it is explicitly written via a write() call.
  24119. */
  24120. attribute EventHandler ondata;
  24121. /**
  24122. * Dispatched when the stream is opened, and is about to begin delivering
  24123. * data.
  24124. */
  24125. attribute EventHandler onstart;
  24126. /**
  24127. * Dispatched when the stream has closed, and has no more data to deliver.
  24128. * The output stream remains open and writable until close() is called.
  24129. */
  24130. attribute EventHandler onstop;
  24131. /**
  24132. * Dispatched when an error has occurred. No further data may be read or
  24133. * written after this point.
  24134. */
  24135. attribute EventHandler onerror;
  24136. };
  24137. /* ---------------------- StreamFilterDataEvent ----------------------------- */
  24138. /* ./webidl/StreamFilterDataEvent.webidl */
  24139. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24140. /* This Source Code Form is subject to the terms of the Mozilla Public
  24141. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24142. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  24143. /**
  24144. * This is a Mozilla-specific WebExtension API, which is not available to web
  24145. * content. It allows monitoring and filtering of HTTP response stream data.
  24146. *
  24147. * This API should currently be considered experimental, and is not defined by
  24148. * any standard.
  24149. */
  24150. [Func="mozilla::extensions::StreamFilter::IsAllowedInContext",
  24151. Exposed=Window]
  24152. interface StreamFilterDataEvent : Event {
  24153. constructor(DOMString type,
  24154. optional StreamFilterDataEventInit eventInitDict = {});
  24155. /**
  24156. * Contains a chunk of data read from the input stream.
  24157. */
  24158. [Pure]
  24159. readonly attribute ArrayBuffer data;
  24160. };
  24161. dictionary StreamFilterDataEventInit : EventInit {
  24162. required ArrayBuffer data;
  24163. };
  24164. /* ---------------------- StructuredCloneTester ----------------------------- */
  24165. /* ./webidl/StructuredCloneTester.webidl */
  24166. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24167. /* This Source Code Form is subject to the terms of the Mozilla Public
  24168. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24169. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24170. */
  24171. [Exposed=(Window,Worker),
  24172. Pref="dom.testing.structuredclonetester.enabled",
  24173. Serializable]
  24174. interface StructuredCloneTester {
  24175. constructor(boolean serializable, boolean deserializable);
  24176. readonly attribute boolean serializable;
  24177. readonly attribute boolean deserializable;
  24178. };
  24179. /* ---------------------- StyleSheet ----------------------------- */
  24180. /* ./webidl/StyleSheet.webidl */
  24181. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24182. /* This Source Code Form is subject to the terms of the Mozilla Public
  24183. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24184. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24185. *
  24186. * The origin of this IDL file is
  24187. * http://dev.w3.org/csswg/cssom/
  24188. */
  24189. [Exposed=Window]
  24190. interface StyleSheet {
  24191. [Constant]
  24192. readonly attribute DOMString type;
  24193. [Constant, Throws]
  24194. readonly attribute DOMString? href;
  24195. // Spec says "Node", but it can go null when the node gets a new
  24196. // sheet. That's also why it's not [Constant]
  24197. [Pure]
  24198. readonly attribute Node? ownerNode;
  24199. [Pure]
  24200. readonly attribute StyleSheet? parentStyleSheet;
  24201. [Pure]
  24202. readonly attribute DOMString? title;
  24203. [Constant, PutForwards=mediaText]
  24204. readonly attribute MediaList media;
  24205. [Pure]
  24206. attribute boolean disabled;
  24207. // The source map URL for this style sheet. The source map URL can
  24208. // be found in one of two ways.
  24209. //
  24210. // If a SourceMap or X-SourceMap response header is seen, this is
  24211. // the value. If both are seen, SourceMap is preferred. Because
  24212. // this relies on the HTTP response, it can change if checked before
  24213. // the response is available -- which is why it is not [Constant].
  24214. //
  24215. // If the style sheet has the special "# sourceMappingURL=" comment,
  24216. // then this is the URL specified there.
  24217. //
  24218. // If the source map URL is not found by either of these methods,
  24219. // then this is an empty string.
  24220. [ChromeOnly, Pure]
  24221. readonly attribute UTF8String sourceMapURL;
  24222. // The source URL for this style sheet. If the style sheet has the
  24223. // special "# sourceURL=" comment, then this is the URL specified
  24224. // there. If no such comment is found, then this is the empty
  24225. // string.
  24226. [ChromeOnly, Pure]
  24227. readonly attribute UTF8String sourceURL;
  24228. [ChromeOnly, Pure]
  24229. readonly attribute Document? associatedDocument;
  24230. [ChromeOnly, Pure, BinaryName="isConstructed"]
  24231. readonly attribute boolean constructed;
  24232. };
  24233. /* ---------------------- StyleSheetList ----------------------------- */
  24234. /* ./webidl/StyleSheetList.webidl */
  24235. /* This Source Code Form is subject to the terms of the Mozilla Public
  24236. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24237. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  24238. // https://drafts.csswg.org/cssom/#stylesheetlist
  24239. [Exposed=Window]
  24240. interface StyleSheetList {
  24241. getter CSSStyleSheet? item(unsigned long index);
  24242. readonly attribute unsigned long length;
  24243. };
  24244. /* ---------------------- SubmitEvent ----------------------------- */
  24245. /* ./webidl/SubmitEvent.webidl */
  24246. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24247. /* This Source Code Form is subject to the terms of the Mozilla Public
  24248. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24249. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  24250. *
  24251. * The origin of this IDL file is
  24252. * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submitevent
  24253. */
  24254. [Exposed=Window]
  24255. interface SubmitEvent : Event {
  24256. constructor(DOMString type, optional SubmitEventInit eventInitDict = {});
  24257. readonly attribute HTMLElement? submitter;
  24258. };
  24259. dictionary SubmitEventInit : EventInit {
  24260. HTMLElement? submitter = null;
  24261. };
  24262. /* ---------------------- SubtleCrypto ----------------------------- */
  24263. /* ./webidl/SubtleCrypto.webidl */
  24264. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24265. /* This Source Code Form is subject to the terms of the Mozilla Public
  24266. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24267. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24268. *
  24269. * The origin of this IDL file is
  24270. * http://www.w3.org/TR/WebCryptoAPI/
  24271. */
  24272. typedef DOMString KeyType;
  24273. typedef DOMString KeyUsage;
  24274. typedef DOMString NamedCurve;
  24275. typedef Uint8Array BigInteger;
  24276. /***** Algorithm dictionaries *****/
  24277. dictionary Algorithm {
  24278. required DOMString name;
  24279. };
  24280. [GenerateInit]
  24281. dictionary AesCbcParams : Algorithm {
  24282. required BufferSource iv;
  24283. };
  24284. [GenerateInit]
  24285. dictionary AesCtrParams : Algorithm {
  24286. required BufferSource counter;
  24287. required [EnforceRange] octet length;
  24288. };
  24289. [GenerateInit]
  24290. dictionary AesGcmParams : Algorithm {
  24291. required BufferSource iv;
  24292. BufferSource additionalData;
  24293. [EnforceRange] octet tagLength;
  24294. };
  24295. dictionary HmacImportParams : Algorithm {
  24296. required AlgorithmIdentifier hash;
  24297. };
  24298. [GenerateInit]
  24299. dictionary Pbkdf2Params : Algorithm {
  24300. required BufferSource salt;
  24301. required [EnforceRange] unsigned long iterations;
  24302. required AlgorithmIdentifier hash;
  24303. };
  24304. [GenerateInit]
  24305. dictionary RsaHashedImportParams {
  24306. required AlgorithmIdentifier hash;
  24307. };
  24308. dictionary AesKeyGenParams : Algorithm {
  24309. required [EnforceRange] unsigned short length;
  24310. };
  24311. [GenerateInit]
  24312. dictionary HmacKeyGenParams : Algorithm {
  24313. required AlgorithmIdentifier hash;
  24314. [EnforceRange] unsigned long length;
  24315. };
  24316. [GenerateInit]
  24317. dictionary RsaHashedKeyGenParams : Algorithm {
  24318. required [EnforceRange] unsigned long modulusLength;
  24319. required BigInteger publicExponent;
  24320. required AlgorithmIdentifier hash;
  24321. };
  24322. [GenerateInit]
  24323. dictionary RsaOaepParams : Algorithm {
  24324. BufferSource label;
  24325. };
  24326. [GenerateInit]
  24327. dictionary RsaPssParams : Algorithm {
  24328. required [EnforceRange] unsigned long saltLength;
  24329. };
  24330. [GenerateInit]
  24331. dictionary EcKeyGenParams : Algorithm {
  24332. required NamedCurve namedCurve;
  24333. };
  24334. [GenerateInit]
  24335. dictionary AesDerivedKeyParams : Algorithm {
  24336. required [EnforceRange] unsigned long length;
  24337. };
  24338. [GenerateInit]
  24339. dictionary HmacDerivedKeyParams : HmacImportParams {
  24340. [EnforceRange] unsigned long length;
  24341. };
  24342. [GenerateInit]
  24343. dictionary EcdhKeyDeriveParams : Algorithm {
  24344. required CryptoKey public;
  24345. };
  24346. [GenerateInit]
  24347. dictionary DhImportKeyParams : Algorithm {
  24348. required BigInteger prime;
  24349. required BigInteger generator;
  24350. };
  24351. [GenerateInit]
  24352. dictionary EcdsaParams : Algorithm {
  24353. required AlgorithmIdentifier hash;
  24354. };
  24355. [GenerateInit]
  24356. dictionary EcKeyImportParams : Algorithm {
  24357. NamedCurve namedCurve;
  24358. };
  24359. [GenerateInit]
  24360. dictionary HkdfParams : Algorithm {
  24361. required AlgorithmIdentifier hash;
  24362. required BufferSource salt;
  24363. required BufferSource info;
  24364. };
  24365. /***** JWK *****/
  24366. dictionary RsaOtherPrimesInfo {
  24367. // The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms
  24368. required DOMString r;
  24369. required DOMString d;
  24370. required DOMString t;
  24371. };
  24372. [GenerateInitFromJSON, GenerateToJSON]
  24373. dictionary JsonWebKey {
  24374. // The following fields are defined in Section 3.1 of JSON Web Key
  24375. required DOMString kty;
  24376. DOMString use;
  24377. sequence<DOMString> key_ops;
  24378. DOMString alg;
  24379. // The following fields are defined in JSON Web Key Parameters Registration
  24380. boolean ext;
  24381. // The following fields are defined in Section 6 of JSON Web Algorithms
  24382. DOMString crv;
  24383. DOMString x;
  24384. DOMString y;
  24385. DOMString d;
  24386. DOMString n;
  24387. DOMString e;
  24388. DOMString p;
  24389. DOMString q;
  24390. DOMString dp;
  24391. DOMString dq;
  24392. DOMString qi;
  24393. sequence<RsaOtherPrimesInfo> oth;
  24394. DOMString k;
  24395. };
  24396. /***** The Main API *****/
  24397. [Serializable,
  24398. SecureContext,
  24399. Exposed=(Window,Worker)]
  24400. interface CryptoKey {
  24401. readonly attribute KeyType type;
  24402. readonly attribute boolean extractable;
  24403. [Cached, Constant, Throws] readonly attribute object algorithm;
  24404. [Cached, Constant, Frozen] readonly attribute sequence<KeyUsage> usages;
  24405. };
  24406. [GenerateConversionToJS]
  24407. dictionary CryptoKeyPair {
  24408. required CryptoKey publicKey;
  24409. required CryptoKey privateKey;
  24410. };
  24411. typedef DOMString KeyFormat;
  24412. typedef (object or DOMString) AlgorithmIdentifier;
  24413. [Exposed=(Window,Worker),
  24414. SecureContext]
  24415. interface SubtleCrypto {
  24416. [NewObject]
  24417. Promise<any> encrypt(AlgorithmIdentifier algorithm,
  24418. CryptoKey key,
  24419. BufferSource data);
  24420. [NewObject]
  24421. Promise<any> decrypt(AlgorithmIdentifier algorithm,
  24422. CryptoKey key,
  24423. BufferSource data);
  24424. [NewObject]
  24425. Promise<any> sign(AlgorithmIdentifier algorithm,
  24426. CryptoKey key,
  24427. BufferSource data);
  24428. [NewObject]
  24429. Promise<any> verify(AlgorithmIdentifier algorithm,
  24430. CryptoKey key,
  24431. BufferSource signature,
  24432. BufferSource data);
  24433. [NewObject]
  24434. Promise<any> digest(AlgorithmIdentifier algorithm,
  24435. BufferSource data);
  24436. [NewObject]
  24437. Promise<any> generateKey(AlgorithmIdentifier algorithm,
  24438. boolean extractable,
  24439. sequence<KeyUsage> keyUsages );
  24440. [NewObject]
  24441. Promise<any> deriveKey(AlgorithmIdentifier algorithm,
  24442. CryptoKey baseKey,
  24443. AlgorithmIdentifier derivedKeyType,
  24444. boolean extractable,
  24445. sequence<KeyUsage> keyUsages );
  24446. [NewObject]
  24447. Promise<any> deriveBits(AlgorithmIdentifier algorithm,
  24448. CryptoKey baseKey,
  24449. unsigned long length);
  24450. [NewObject]
  24451. Promise<any> importKey(KeyFormat format,
  24452. object keyData,
  24453. AlgorithmIdentifier algorithm,
  24454. boolean extractable,
  24455. sequence<KeyUsage> keyUsages );
  24456. [NewObject]
  24457. Promise<any> exportKey(KeyFormat format, CryptoKey key);
  24458. [NewObject]
  24459. Promise<any> wrapKey(KeyFormat format,
  24460. CryptoKey key,
  24461. CryptoKey wrappingKey,
  24462. AlgorithmIdentifier wrapAlgorithm);
  24463. [NewObject]
  24464. Promise<any> unwrapKey(KeyFormat format,
  24465. BufferSource wrappedKey,
  24466. CryptoKey unwrappingKey,
  24467. AlgorithmIdentifier unwrapAlgorithm,
  24468. AlgorithmIdentifier unwrappedKeyAlgorithm,
  24469. boolean extractable,
  24470. sequence<KeyUsage> keyUsages );
  24471. };
  24472. /* ---------------------- SVGAElement ----------------------------- */
  24473. /* ./webidl/SVGAElement.webidl */
  24474. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24475. /* This Source Code Form is subject to the terms of the Mozilla Public
  24476. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24477. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24478. *
  24479. * The origin of this IDL file is
  24480. * http://www.w3.org/TR/SVG2/
  24481. *
  24482. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24483. * liability, trademark and document use rules apply.
  24484. */
  24485. [Exposed=Window]
  24486. interface SVGAElement : SVGGraphicsElement {
  24487. readonly attribute SVGAnimatedString target;
  24488. [SetterThrows]
  24489. attribute DOMString download;
  24490. [SetterThrows]
  24491. attribute DOMString ping;
  24492. [SetterThrows]
  24493. attribute DOMString rel;
  24494. [SetterThrows]
  24495. attribute DOMString referrerPolicy;
  24496. [PutForwards=value]
  24497. readonly attribute DOMTokenList relList;
  24498. [SetterThrows]
  24499. attribute DOMString hreflang;
  24500. [SetterThrows]
  24501. attribute DOMString type;
  24502. [Throws, Pref="svg.SVGAElement.text.enabled"]
  24503. attribute DOMString text;
  24504. };
  24505. SVGAElement includes SVGURIReference;
  24506. /* ---------------------- SVGAngle ----------------------------- */
  24507. /* ./webidl/SVGAngle.webidl */
  24508. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24509. /* This Source Code Form is subject to the terms of the Mozilla Public
  24510. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24511. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24512. *
  24513. * The origin of this IDL file is
  24514. * http://www.w3.org/TR/SVG2/
  24515. *
  24516. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24517. * liability, trademark and document use rules apply.
  24518. */
  24519. [Exposed=Window]
  24520. interface SVGAngle {
  24521. // Angle Unit Types
  24522. const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
  24523. const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
  24524. const unsigned short SVG_ANGLETYPE_DEG = 2;
  24525. const unsigned short SVG_ANGLETYPE_RAD = 3;
  24526. const unsigned short SVG_ANGLETYPE_GRAD = 4;
  24527. readonly attribute unsigned short unitType;
  24528. [SetterThrows]
  24529. attribute float value;
  24530. [SetterThrows]
  24531. attribute float valueInSpecifiedUnits;
  24532. [SetterThrows]
  24533. attribute DOMString valueAsString;
  24534. [Throws]
  24535. undefined newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
  24536. [Throws]
  24537. undefined convertToSpecifiedUnits(unsigned short unitType);
  24538. };
  24539. /* ---------------------- SVGAnimatedAngle ----------------------------- */
  24540. /* ./webidl/SVGAnimatedAngle.webidl */
  24541. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24542. /* This Source Code Form is subject to the terms of the Mozilla Public
  24543. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24544. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24545. *
  24546. * The origin of this IDL file is
  24547. * http://www.w3.org/TR/SVG2/
  24548. *
  24549. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24550. * liability, trademark and document use rules apply.
  24551. */
  24552. [Exposed=Window]
  24553. interface SVGAnimatedAngle {
  24554. [Constant]
  24555. readonly attribute SVGAngle baseVal;
  24556. [Constant]
  24557. readonly attribute SVGAngle animVal;
  24558. };
  24559. /* ---------------------- SVGAnimatedBoolean ----------------------------- */
  24560. /* ./webidl/SVGAnimatedBoolean.webidl */
  24561. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24562. /* This Source Code Form is subject to the terms of the Mozilla Public
  24563. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24564. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24565. *
  24566. * The origin of this IDL file is
  24567. * http://www.w3.org/TR/SVG2/
  24568. *
  24569. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24570. * liability, trademark and document use rules apply.
  24571. */
  24572. [Exposed=Window]
  24573. interface SVGAnimatedBoolean {
  24574. attribute boolean baseVal;
  24575. readonly attribute boolean animVal;
  24576. };
  24577. /* ---------------------- SVGAnimatedEnumeration ----------------------------- */
  24578. /* ./webidl/SVGAnimatedEnumeration.webidl */
  24579. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24580. /* This Source Code Form is subject to the terms of the Mozilla Public
  24581. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24582. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  24583. *
  24584. * The origin of this IDL file is
  24585. * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedEnumeration
  24586. *
  24587. * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  24588. * W3C liability, trademark and document use rules apply.
  24589. */
  24590. [Exposed=Window]
  24591. interface SVGAnimatedEnumeration {
  24592. [SetterThrows]
  24593. attribute unsigned short baseVal;
  24594. readonly attribute unsigned short animVal;
  24595. };
  24596. /* ---------------------- SVGAnimatedInteger ----------------------------- */
  24597. /* ./webidl/SVGAnimatedInteger.webidl */
  24598. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24599. /* This Source Code Form is subject to the terms of the Mozilla Public
  24600. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24601. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  24602. *
  24603. * The origin of this IDL file is
  24604. * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedInteger
  24605. *
  24606. * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  24607. * W3C liability, trademark and document use rules apply.
  24608. */
  24609. [Exposed=Window]
  24610. interface SVGAnimatedInteger {
  24611. attribute long baseVal;
  24612. readonly attribute long animVal;
  24613. };
  24614. /* ---------------------- SVGAnimatedLength ----------------------------- */
  24615. /* ./webidl/SVGAnimatedLength.webidl */
  24616. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24617. /* This Source Code Form is subject to the terms of the Mozilla Public
  24618. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24619. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24620. *
  24621. * The origin of this IDL file is
  24622. * http://www.w3.org/TR/SVG2/
  24623. *
  24624. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24625. * liability, trademark and document use rules apply.
  24626. */
  24627. [Exposed=Window]
  24628. interface SVGAnimatedLength {
  24629. [Constant]
  24630. readonly attribute SVGLength baseVal;
  24631. [Constant]
  24632. readonly attribute SVGLength animVal;
  24633. };
  24634. /* ---------------------- SVGAnimatedLengthList ----------------------------- */
  24635. /* ./webidl/SVGAnimatedLengthList.webidl */
  24636. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24637. /* This Source Code Form is subject to the terms of the Mozilla Public
  24638. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24639. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24640. *
  24641. * The origin of this IDL file is
  24642. * http://www.w3.org/TR/SVG2/
  24643. *
  24644. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24645. * liability, trademark and document use rules apply.
  24646. */
  24647. [Exposed=Window]
  24648. interface SVGAnimatedLengthList {
  24649. [Constant]
  24650. readonly attribute SVGLengthList baseVal;
  24651. [Constant]
  24652. readonly attribute SVGLengthList animVal;
  24653. };
  24654. /* ---------------------- SVGAnimatedNumber ----------------------------- */
  24655. /* ./webidl/SVGAnimatedNumber.webidl */
  24656. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24657. /* This Source Code Form is subject to the terms of the Mozilla Public
  24658. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24659. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  24660. *
  24661. * The origin of this IDL file is
  24662. * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumber
  24663. *
  24664. * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  24665. * W3C liability, trademark and document use rules apply.
  24666. */
  24667. [Exposed=Window]
  24668. interface SVGAnimatedNumber {
  24669. attribute float baseVal;
  24670. readonly attribute float animVal;
  24671. };
  24672. /* ---------------------- SVGAnimatedNumberList ----------------------------- */
  24673. /* ./webidl/SVGAnimatedNumberList.webidl */
  24674. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24675. /* This Source Code Form is subject to the terms of the Mozilla Public
  24676. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24677. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24678. *
  24679. * The origin of this IDL file is
  24680. * http://www.w3.org/TR/SVG2/
  24681. *
  24682. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24683. * liability, trademark and document use rules apply.
  24684. */
  24685. [Exposed=Window]
  24686. interface SVGAnimatedNumberList {
  24687. [Constant]
  24688. readonly attribute SVGNumberList baseVal;
  24689. [Constant]
  24690. readonly attribute SVGNumberList animVal;
  24691. };
  24692. /* ---------------------- SVGAnimatedPathData ----------------------------- */
  24693. /* ./webidl/SVGAnimatedPathData.webidl */
  24694. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24695. /* This Source Code Form is subject to the terms of the Mozilla Public
  24696. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24697. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24698. *
  24699. * The origin of this IDL file is
  24700. * http://www.w3.org/TR/SVG2/
  24701. *
  24702. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24703. * liability, trademark and document use rules apply.
  24704. */
  24705. interface mixin SVGAnimatedPathData {
  24706. [Pref="dom.svg.pathSeg.enabled"]
  24707. readonly attribute SVGPathSegList pathSegList;
  24708. [Pref="dom.svg.pathSeg.enabled"]
  24709. readonly attribute SVGPathSegList animatedPathSegList;
  24710. };
  24711. /* ---------------------- SVGAnimatedPoints ----------------------------- */
  24712. /* ./webidl/SVGAnimatedPoints.webidl */
  24713. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24714. /* This Source Code Form is subject to the terms of the Mozilla Public
  24715. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24716. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24717. *
  24718. * The origin of this IDL file is
  24719. * http://www.w3.org/TR/SVG2/
  24720. *
  24721. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24722. * liability, trademark and document use rules apply.
  24723. */
  24724. interface mixin SVGAnimatedPoints {
  24725. [Constant]
  24726. readonly attribute SVGPointList points;
  24727. [Constant]
  24728. readonly attribute SVGPointList animatedPoints;
  24729. };
  24730. /* ---------------------- SVGAnimatedPreserveAspectRatio ----------------------------- */
  24731. /* ./webidl/SVGAnimatedPreserveAspectRatio.webidl */
  24732. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24733. /* This Source Code Form is subject to the terms of the Mozilla Public
  24734. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24735. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24736. *
  24737. * The origin of this IDL file is
  24738. * http://www.w3.org/TR/SVG2/
  24739. *
  24740. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24741. * liability, trademark and document use rules apply.
  24742. */
  24743. [Exposed=Window]
  24744. interface SVGAnimatedPreserveAspectRatio {
  24745. [Constant]
  24746. readonly attribute SVGPreserveAspectRatio baseVal;
  24747. [Constant]
  24748. readonly attribute SVGPreserveAspectRatio animVal;
  24749. };
  24750. /* ---------------------- SVGAnimatedRect ----------------------------- */
  24751. /* ./webidl/SVGAnimatedRect.webidl */
  24752. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24753. /* This Source Code Form is subject to the terms of the Mozilla Public
  24754. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24755. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24756. *
  24757. * The origin of this IDL file is
  24758. * http://www.w3.org/TR/SVG2/
  24759. *
  24760. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24761. * liability, trademark and document use rules apply.
  24762. */
  24763. [Exposed=Window]
  24764. interface SVGAnimatedRect {
  24765. readonly attribute SVGRect? baseVal;
  24766. readonly attribute SVGRect? animVal;
  24767. };
  24768. /* ---------------------- SVGAnimatedString ----------------------------- */
  24769. /* ./webidl/SVGAnimatedString.webidl */
  24770. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24771. /* This Source Code Form is subject to the terms of the Mozilla Public
  24772. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24773. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24774. *
  24775. * The origin of this IDL file is
  24776. * http://www.w3.org/TR/SVG2/
  24777. *
  24778. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24779. * liability, trademark and document use rules apply.
  24780. */
  24781. [Exposed=Window]
  24782. interface SVGAnimatedString {
  24783. attribute DOMString baseVal;
  24784. readonly attribute DOMString animVal;
  24785. };
  24786. /* ---------------------- SVGAnimatedTransformList ----------------------------- */
  24787. /* ./webidl/SVGAnimatedTransformList.webidl */
  24788. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24789. /* This Source Code Form is subject to the terms of the Mozilla Public
  24790. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24791. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24792. *
  24793. * The origin of this IDL file is
  24794. * http://www.w3.org/TR/SVG2/
  24795. *
  24796. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24797. * liability, trademark and document use rules apply.
  24798. */
  24799. [Exposed=Window]
  24800. interface SVGAnimatedTransformList {
  24801. [Constant]
  24802. readonly attribute SVGTransformList baseVal;
  24803. [Constant]
  24804. readonly attribute SVGTransformList animVal;
  24805. };
  24806. /* ---------------------- SVGAnimateElement ----------------------------- */
  24807. /* ./webidl/SVGAnimateElement.webidl */
  24808. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24809. /* This Source Code Form is subject to the terms of the Mozilla Public
  24810. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24811. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24812. *
  24813. * The origin of this IDL file is
  24814. * http://www.w3.org/TR/SVG2/
  24815. *
  24816. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24817. * liability, trademark and document use rules apply.
  24818. */
  24819. [Exposed=Window]
  24820. interface SVGAnimateElement : SVGAnimationElement {
  24821. };
  24822. /* ---------------------- SVGAnimateMotionElement ----------------------------- */
  24823. /* ./webidl/SVGAnimateMotionElement.webidl */
  24824. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24825. /* This Source Code Form is subject to the terms of the Mozilla Public
  24826. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24827. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24828. *
  24829. * The origin of this IDL file is
  24830. * http://www.w3.org/TR/SVG2/
  24831. *
  24832. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24833. * liability, trademark and document use rules apply.
  24834. */
  24835. [Exposed=Window]
  24836. interface SVGAnimateMotionElement : SVGAnimationElement {
  24837. };
  24838. /* ---------------------- SVGAnimateTransformElement ----------------------------- */
  24839. /* ./webidl/SVGAnimateTransformElement.webidl */
  24840. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24841. /* This Source Code Form is subject to the terms of the Mozilla Public
  24842. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24843. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24844. *
  24845. * The origin of this IDL file is
  24846. * http://www.w3.org/TR/SVG2/
  24847. *
  24848. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24849. * liability, trademark and document use rules apply.
  24850. */
  24851. [Exposed=Window]
  24852. interface SVGAnimateTransformElement : SVGAnimationElement {
  24853. };
  24854. /* ---------------------- SVGAnimationElement ----------------------------- */
  24855. /* ./webidl/SVGAnimationElement.webidl */
  24856. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24857. /* This Source Code Form is subject to the terms of the Mozilla Public
  24858. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24859. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24860. *
  24861. * The origin of this IDL file is
  24862. * http://www.w3.org/TR/SVG2/
  24863. *
  24864. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24865. * liability, trademark and document use rules apply.
  24866. */
  24867. [Exposed=Window]
  24868. interface SVGAnimationElement : SVGElement {
  24869. readonly attribute SVGElement? targetElement;
  24870. attribute EventHandler onbegin;
  24871. attribute EventHandler onend;
  24872. attribute EventHandler onrepeat;
  24873. [Throws]
  24874. float getStartTime();
  24875. [BinaryName="getCurrentTimeAsFloat"]
  24876. float getCurrentTime();
  24877. [Throws]
  24878. float getSimpleDuration();
  24879. [Throws]
  24880. undefined beginElement();
  24881. [Throws]
  24882. undefined beginElementAt(float offset);
  24883. [Throws]
  24884. undefined endElement();
  24885. [Throws]
  24886. undefined endElementAt(float offset);
  24887. };
  24888. SVGAnimationElement includes SVGTests;
  24889. /* ---------------------- SVGCircleElement ----------------------------- */
  24890. /* ./webidl/SVGCircleElement.webidl */
  24891. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24892. /* This Source Code Form is subject to the terms of the Mozilla Public
  24893. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24894. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24895. *
  24896. * The origin of this IDL file is
  24897. * http://www.w3.org/TR/SVG2/
  24898. *
  24899. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24900. * liability, trademark and document use rules apply.
  24901. */
  24902. [Exposed=Window]
  24903. interface SVGCircleElement : SVGGeometryElement {
  24904. [Constant]
  24905. readonly attribute SVGAnimatedLength cx;
  24906. [Constant]
  24907. readonly attribute SVGAnimatedLength cy;
  24908. [Constant]
  24909. readonly attribute SVGAnimatedLength r;
  24910. };
  24911. /* ---------------------- SVGClipPathElement ----------------------------- */
  24912. /* ./webidl/SVGClipPathElement.webidl */
  24913. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24914. /* This Source Code Form is subject to the terms of the Mozilla Public
  24915. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24916. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24917. *
  24918. * The origin of this IDL file is
  24919. * http://www.w3.org/TR/SVG2/
  24920. *
  24921. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24922. * liability, trademark and document use rules apply.
  24923. */
  24924. [Exposed=Window]
  24925. interface SVGClipPathElement : SVGElement {
  24926. [Constant]
  24927. readonly attribute SVGAnimatedEnumeration clipPathUnits;
  24928. [Constant]
  24929. readonly attribute SVGAnimatedTransformList transform;
  24930. };
  24931. /* ---------------------- SVGComponentTransferFunctionElement ----------------------------- */
  24932. /* ./webidl/SVGComponentTransferFunctionElement.webidl */
  24933. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24934. /* This Source Code Form is subject to the terms of the Mozilla Public
  24935. * License, v. 2.0. If a copy of the MPL was not distributed with this
  24936. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  24937. *
  24938. * The origin of this IDL file is
  24939. * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
  24940. *
  24941. * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24942. * liability, trademark and document use rules apply.
  24943. */
  24944. [Exposed=Window]
  24945. interface SVGComponentTransferFunctionElement : SVGElement {
  24946. // Component Transfer Types
  24947. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
  24948. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
  24949. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
  24950. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
  24951. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
  24952. const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
  24953. [Constant]
  24954. readonly attribute SVGAnimatedEnumeration type;
  24955. [Constant]
  24956. readonly attribute SVGAnimatedNumberList tableValues;
  24957. [Constant]
  24958. readonly attribute SVGAnimatedNumber slope;
  24959. [Constant]
  24960. readonly attribute SVGAnimatedNumber intercept;
  24961. [Constant]
  24962. readonly attribute SVGAnimatedNumber amplitude;
  24963. [Constant]
  24964. readonly attribute SVGAnimatedNumber exponent;
  24965. [Constant]
  24966. readonly attribute SVGAnimatedNumber offset;
  24967. };
  24968. /* ---------------------- SVGDefsElement ----------------------------- */
  24969. /* ./webidl/SVGDefsElement.webidl */
  24970. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24971. /* This Source Code Form is subject to the terms of the Mozilla Public
  24972. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24973. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24974. *
  24975. * The origin of this IDL file is
  24976. * http://www.w3.org/TR/SVG2/
  24977. *
  24978. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24979. * liability, trademark and document use rules apply.
  24980. */
  24981. [Exposed=Window]
  24982. interface SVGDefsElement : SVGGraphicsElement {
  24983. };
  24984. /* ---------------------- SVGDescElement ----------------------------- */
  24985. /* ./webidl/SVGDescElement.webidl */
  24986. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  24987. /* This Source Code Form is subject to the terms of the Mozilla Public
  24988. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  24989. * You can obtain one at http://mozilla.org/MPL/2.0/.
  24990. *
  24991. * The origin of this IDL file is
  24992. * http://www.w3.org/TR/SVG2/
  24993. *
  24994. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  24995. * liability, trademark and document use rules apply.
  24996. */
  24997. [Exposed=Window]
  24998. interface SVGDescElement : SVGElement {
  24999. };
  25000. /* ---------------------- SVGElement ----------------------------- */
  25001. /* ./webidl/SVGElement.webidl */
  25002. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25003. /* This Source Code Form is subject to the terms of the Mozilla Public
  25004. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25005. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25006. *
  25007. * The origin of this IDL file is
  25008. * http://www.w3.org/TR/SVG2/
  25009. *
  25010. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25011. * liability, trademark and document use rules apply.
  25012. */
  25013. [Exposed=Window]
  25014. interface SVGElement : Element {
  25015. attribute DOMString id;
  25016. [Constant]
  25017. readonly attribute SVGAnimatedString className;
  25018. readonly attribute SVGSVGElement? ownerSVGElement;
  25019. readonly attribute SVGElement? viewportElement;
  25020. attribute DOMString nonce;
  25021. };
  25022. SVGElement includes GlobalEventHandlers;
  25023. SVGElement includes HTMLOrForeignElement;
  25024. SVGElement includes ElementCSSInlineStyle;
  25025. SVGElement includes TouchEventHandlers;
  25026. SVGElement includes OnErrorEventHandlerForNodes;
  25027. /* ---------------------- SVGEllipseElement ----------------------------- */
  25028. /* ./webidl/SVGEllipseElement.webidl */
  25029. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25030. /* This Source Code Form is subject to the terms of the Mozilla Public
  25031. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25032. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25033. *
  25034. * The origin of this IDL file is
  25035. * http://www.w3.org/TR/SVG2/
  25036. *
  25037. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25038. * liability, trademark and document use rules apply.
  25039. */
  25040. [Exposed=Window]
  25041. interface SVGEllipseElement : SVGGeometryElement {
  25042. [Constant]
  25043. readonly attribute SVGAnimatedLength cx;
  25044. [Constant]
  25045. readonly attribute SVGAnimatedLength cy;
  25046. [Constant]
  25047. readonly attribute SVGAnimatedLength rx;
  25048. [Constant]
  25049. readonly attribute SVGAnimatedLength ry;
  25050. };
  25051. /* ---------------------- SVGFEBlendElement ----------------------------- */
  25052. /* ./webidl/SVGFEBlendElement.webidl */
  25053. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25054. /* This Source Code Form is subject to the terms of the Mozilla Public
  25055. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25056. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25057. *
  25058. * The origin of this IDL file is
  25059. * http://www.w3.org/TR/SVG2/
  25060. *
  25061. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25062. * liability, trademark and document use rules apply.
  25063. */
  25064. [Exposed=Window]
  25065. interface SVGFEBlendElement : SVGElement {
  25066. // Blend Mode Types
  25067. const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
  25068. const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
  25069. const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
  25070. const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
  25071. const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
  25072. const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
  25073. const unsigned short SVG_FEBLEND_MODE_OVERLAY = 6;
  25074. const unsigned short SVG_FEBLEND_MODE_COLOR_DODGE = 7;
  25075. const unsigned short SVG_FEBLEND_MODE_COLOR_BURN = 8;
  25076. const unsigned short SVG_FEBLEND_MODE_HARD_LIGHT = 9;
  25077. const unsigned short SVG_FEBLEND_MODE_SOFT_LIGHT = 10;
  25078. const unsigned short SVG_FEBLEND_MODE_DIFFERENCE = 11;
  25079. const unsigned short SVG_FEBLEND_MODE_EXCLUSION = 12;
  25080. const unsigned short SVG_FEBLEND_MODE_HUE = 13;
  25081. const unsigned short SVG_FEBLEND_MODE_SATURATION = 14;
  25082. const unsigned short SVG_FEBLEND_MODE_COLOR = 15;
  25083. const unsigned short SVG_FEBLEND_MODE_LUMINOSITY = 16;
  25084. [Constant]
  25085. readonly attribute SVGAnimatedString in1;
  25086. [Constant]
  25087. readonly attribute SVGAnimatedString in2;
  25088. [Constant]
  25089. readonly attribute SVGAnimatedEnumeration mode;
  25090. };
  25091. SVGFEBlendElement includes SVGFilterPrimitiveStandardAttributes;
  25092. /* ---------------------- SVGFEColorMatrixElement ----------------------------- */
  25093. /* ./webidl/SVGFEColorMatrixElement.webidl */
  25094. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25095. /* This Source Code Form is subject to the terms of the Mozilla Public
  25096. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25097. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25098. *
  25099. * The origin of this IDL file is
  25100. * http://www.w3.org/TR/SVG2/
  25101. *
  25102. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25103. * liability, trademark and document use rules apply.
  25104. */
  25105. [Exposed=Window]
  25106. interface SVGFEColorMatrixElement : SVGElement {
  25107. // Color Matrix Types
  25108. const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
  25109. const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
  25110. const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
  25111. const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
  25112. const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
  25113. [Constant]
  25114. readonly attribute SVGAnimatedString in1;
  25115. [Constant]
  25116. readonly attribute SVGAnimatedEnumeration type;
  25117. [Constant]
  25118. readonly attribute SVGAnimatedNumberList values;
  25119. };
  25120. SVGFEColorMatrixElement includes SVGFilterPrimitiveStandardAttributes;
  25121. /* ---------------------- SVGFEComponentTransferElement ----------------------------- */
  25122. /* ./webidl/SVGFEComponentTransferElement.webidl */
  25123. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25124. /* This Source Code Form is subject to the terms of the Mozilla Public
  25125. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25126. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25127. *
  25128. * The origin of this IDL file is
  25129. * http://www.w3.org/TR/SVG2/
  25130. *
  25131. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25132. * liability, trademark and document use rules apply.
  25133. */
  25134. [Exposed=Window]
  25135. interface SVGFEComponentTransferElement : SVGElement {
  25136. [Constant]
  25137. readonly attribute SVGAnimatedString in1;
  25138. };
  25139. SVGFEComponentTransferElement includes SVGFilterPrimitiveStandardAttributes;
  25140. /* ---------------------- SVGFECompositeElement ----------------------------- */
  25141. /* ./webidl/SVGFECompositeElement.webidl */
  25142. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25143. /* This Source Code Form is subject to the terms of the Mozilla Public
  25144. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25145. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25146. *
  25147. * The origin of this IDL file is
  25148. * http://www.w3.org/TR/SVG2/
  25149. *
  25150. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25151. * liability, trademark and document use rules apply.
  25152. */
  25153. [Exposed=Window]
  25154. interface SVGFECompositeElement : SVGElement {
  25155. // Composite Operators
  25156. const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
  25157. const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
  25158. const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
  25159. const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
  25160. const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
  25161. const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
  25162. const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
  25163. const unsigned short SVG_FECOMPOSITE_OPERATOR_LIGHTER = 7;
  25164. [Constant]
  25165. readonly attribute SVGAnimatedString in1;
  25166. [Constant]
  25167. readonly attribute SVGAnimatedString in2;
  25168. [Constant]
  25169. readonly attribute SVGAnimatedEnumeration operator;
  25170. [Constant]
  25171. readonly attribute SVGAnimatedNumber k1;
  25172. [Constant]
  25173. readonly attribute SVGAnimatedNumber k2;
  25174. [Constant]
  25175. readonly attribute SVGAnimatedNumber k3;
  25176. [Constant]
  25177. readonly attribute SVGAnimatedNumber k4;
  25178. };
  25179. SVGFECompositeElement includes SVGFilterPrimitiveStandardAttributes;
  25180. /* ---------------------- SVGFEConvolveMatrixElement ----------------------------- */
  25181. /* ./webidl/SVGFEConvolveMatrixElement.webidl */
  25182. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25183. /* This Source Code Form is subject to the terms of the Mozilla Public
  25184. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25185. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25186. *
  25187. * The origin of this IDL file is
  25188. * http://www.w3.org/TR/SVG2/
  25189. *
  25190. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25191. * liability, trademark and document use rules apply.
  25192. */
  25193. [Exposed=Window]
  25194. interface SVGFEConvolveMatrixElement : SVGElement {
  25195. // Edge Mode Values
  25196. const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
  25197. const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
  25198. const unsigned short SVG_EDGEMODE_WRAP = 2;
  25199. const unsigned short SVG_EDGEMODE_NONE = 3;
  25200. [Constant]
  25201. readonly attribute SVGAnimatedString in1;
  25202. [Constant]
  25203. readonly attribute SVGAnimatedInteger orderX;
  25204. [Constant]
  25205. readonly attribute SVGAnimatedInteger orderY;
  25206. [Constant]
  25207. readonly attribute SVGAnimatedNumberList kernelMatrix;
  25208. [Constant]
  25209. readonly attribute SVGAnimatedNumber divisor;
  25210. [Constant]
  25211. readonly attribute SVGAnimatedNumber bias;
  25212. [Constant]
  25213. readonly attribute SVGAnimatedInteger targetX;
  25214. [Constant]
  25215. readonly attribute SVGAnimatedInteger targetY;
  25216. [Constant]
  25217. readonly attribute SVGAnimatedEnumeration edgeMode;
  25218. [Constant]
  25219. readonly attribute SVGAnimatedNumber kernelUnitLengthX;
  25220. [Constant]
  25221. readonly attribute SVGAnimatedNumber kernelUnitLengthY;
  25222. [Constant]
  25223. readonly attribute SVGAnimatedBoolean preserveAlpha;
  25224. };
  25225. SVGFEConvolveMatrixElement includes SVGFilterPrimitiveStandardAttributes;
  25226. /* ---------------------- SVGFEDiffuseLightingElement ----------------------------- */
  25227. /* ./webidl/SVGFEDiffuseLightingElement.webidl */
  25228. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25229. /* This Source Code Form is subject to the terms of the Mozilla Public
  25230. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25231. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25232. *
  25233. * The origin of this IDL file is
  25234. * http://www.w3.org/TR/SVG2/
  25235. *
  25236. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25237. * liability, trademark and document use rules apply.
  25238. */
  25239. [Exposed=Window]
  25240. interface SVGFEDiffuseLightingElement : SVGElement {
  25241. [Constant]
  25242. readonly attribute SVGAnimatedString in1;
  25243. [Constant]
  25244. readonly attribute SVGAnimatedNumber surfaceScale;
  25245. [Constant]
  25246. readonly attribute SVGAnimatedNumber diffuseConstant;
  25247. [Constant]
  25248. readonly attribute SVGAnimatedNumber kernelUnitLengthX;
  25249. [Constant]
  25250. readonly attribute SVGAnimatedNumber kernelUnitLengthY;
  25251. };
  25252. SVGFEDiffuseLightingElement includes SVGFilterPrimitiveStandardAttributes;
  25253. /* ---------------------- SVGFEDisplacementMapElement ----------------------------- */
  25254. /* ./webidl/SVGFEDisplacementMapElement.webidl */
  25255. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25256. /* This Source Code Form is subject to the terms of the Mozilla Public
  25257. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25258. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25259. *
  25260. * The origin of this IDL file is
  25261. * http://www.w3.org/TR/SVG2/
  25262. *
  25263. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25264. * liability, trademark and document use rules apply.
  25265. */
  25266. [Exposed=Window]
  25267. interface SVGFEDisplacementMapElement : SVGElement {
  25268. // Channel Selectors
  25269. const unsigned short SVG_CHANNEL_UNKNOWN = 0;
  25270. const unsigned short SVG_CHANNEL_R = 1;
  25271. const unsigned short SVG_CHANNEL_G = 2;
  25272. const unsigned short SVG_CHANNEL_B = 3;
  25273. const unsigned short SVG_CHANNEL_A = 4;
  25274. [Constant]
  25275. readonly attribute SVGAnimatedString in1;
  25276. [Constant]
  25277. readonly attribute SVGAnimatedString in2;
  25278. [Constant]
  25279. readonly attribute SVGAnimatedNumber scale;
  25280. [Constant]
  25281. readonly attribute SVGAnimatedEnumeration xChannelSelector;
  25282. [Constant]
  25283. readonly attribute SVGAnimatedEnumeration yChannelSelector;
  25284. };
  25285. SVGFEDisplacementMapElement includes SVGFilterPrimitiveStandardAttributes;
  25286. /* ---------------------- SVGFEDistantLightElement ----------------------------- */
  25287. /* ./webidl/SVGFEDistantLightElement.webidl */
  25288. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25289. /* This Source Code Form is subject to the terms of the Mozilla Public
  25290. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25291. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25292. *
  25293. * The origin of this IDL file is
  25294. * http://www.w3.org/TR/SVG2/
  25295. *
  25296. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25297. * liability, trademark and document use rules apply.
  25298. */
  25299. [Exposed=Window]
  25300. interface SVGFEDistantLightElement : SVGElement {
  25301. [Constant]
  25302. readonly attribute SVGAnimatedNumber azimuth;
  25303. [Constant]
  25304. readonly attribute SVGAnimatedNumber elevation;
  25305. };
  25306. /* ---------------------- SVGFEDropShadowElement ----------------------------- */
  25307. /* ./webidl/SVGFEDropShadowElement.webidl */
  25308. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25309. /* This Source Code Form is subject to the terms of the Mozilla Public
  25310. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25311. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25312. *
  25313. * The origin of this IDL file is
  25314. * http://www.w3.org/TR/SVG2/
  25315. *
  25316. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25317. * liability, trademark and document use rules apply.
  25318. */
  25319. [Exposed=Window]
  25320. interface SVGFEDropShadowElement : SVGElement {
  25321. [Constant]
  25322. readonly attribute SVGAnimatedString in1;
  25323. [Constant]
  25324. readonly attribute SVGAnimatedNumber dx;
  25325. [Constant]
  25326. readonly attribute SVGAnimatedNumber dy;
  25327. [Constant]
  25328. readonly attribute SVGAnimatedNumber stdDeviationX;
  25329. [Constant]
  25330. readonly attribute SVGAnimatedNumber stdDeviationY;
  25331. undefined setStdDeviation(float stdDeviationX, float stdDeviationY);
  25332. };
  25333. SVGFEDropShadowElement includes SVGFilterPrimitiveStandardAttributes;
  25334. /* ---------------------- SVGFEFloodElement ----------------------------- */
  25335. /* ./webidl/SVGFEFloodElement.webidl */
  25336. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25337. /* This Source Code Form is subject to the terms of the Mozilla Public
  25338. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25339. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25340. *
  25341. * The origin of this IDL file is
  25342. * http://www.w3.org/TR/SVG2/
  25343. *
  25344. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25345. * liability, trademark and document use rules apply.
  25346. */
  25347. [Exposed=Window]
  25348. interface SVGFEFloodElement : SVGElement {
  25349. };
  25350. SVGFEFloodElement includes SVGFilterPrimitiveStandardAttributes;
  25351. /* ---------------------- SVGFEFuncAElement ----------------------------- */
  25352. /* ./webidl/SVGFEFuncAElement.webidl */
  25353. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25354. /* This Source Code Form is subject to the terms of the Mozilla Public
  25355. * License, v. 2.0. If a copy of the MPL was not distributed with this
  25356. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  25357. *
  25358. * The origin of this IDL file is
  25359. * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
  25360. *
  25361. * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25362. * liability, trademark and document use rules apply.
  25363. */
  25364. [Exposed=Window]
  25365. interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {
  25366. };
  25367. /* ---------------------- SVGFEFuncBElement ----------------------------- */
  25368. /* ./webidl/SVGFEFuncBElement.webidl */
  25369. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25370. /* This Source Code Form is subject to the terms of the Mozilla Public
  25371. * License, v. 2.0. If a copy of the MPL was not distributed with this
  25372. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  25373. *
  25374. * The origin of this IDL file is
  25375. * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
  25376. *
  25377. * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25378. * liability, trademark and document use rules apply.
  25379. */
  25380. [Exposed=Window]
  25381. interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {
  25382. };
  25383. /* ---------------------- SVGFEFuncGElement ----------------------------- */
  25384. /* ./webidl/SVGFEFuncGElement.webidl */
  25385. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25386. /* This Source Code Form is subject to the terms of the Mozilla Public
  25387. * License, v. 2.0. If a copy of the MPL was not distributed with this
  25388. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  25389. *
  25390. * The origin of this IDL file is
  25391. * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
  25392. *
  25393. * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25394. * liability, trademark and document use rules apply.
  25395. */
  25396. [Exposed=Window]
  25397. interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {
  25398. };
  25399. /* ---------------------- SVGFEFuncRElement ----------------------------- */
  25400. /* ./webidl/SVGFEFuncRElement.webidl */
  25401. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25402. /* This Source Code Form is subject to the terms of the Mozilla Public
  25403. * License, v. 2.0. If a copy of the MPL was not distributed with this
  25404. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  25405. *
  25406. * The origin of this IDL file is
  25407. * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
  25408. *
  25409. * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25410. * liability, trademark and document use rules apply.
  25411. */
  25412. [Exposed=Window]
  25413. interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {
  25414. };
  25415. /* ---------------------- SVGFEGaussianBlurElement ----------------------------- */
  25416. /* ./webidl/SVGFEGaussianBlurElement.webidl */
  25417. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25418. /* This Source Code Form is subject to the terms of the Mozilla Public
  25419. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25420. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25421. *
  25422. * The origin of this IDL file is
  25423. * http://www.w3.org/TR/SVG2/
  25424. *
  25425. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25426. * liability, trademark and document use rules apply.
  25427. */
  25428. [Exposed=Window]
  25429. interface SVGFEGaussianBlurElement : SVGElement {
  25430. [Constant]
  25431. readonly attribute SVGAnimatedString in1;
  25432. [Constant]
  25433. readonly attribute SVGAnimatedNumber stdDeviationX;
  25434. [Constant]
  25435. readonly attribute SVGAnimatedNumber stdDeviationY;
  25436. undefined setStdDeviation(float stdDeviationX, float stdDeviationY);
  25437. };
  25438. SVGFEGaussianBlurElement includes SVGFilterPrimitiveStandardAttributes;
  25439. /* ---------------------- SVGFEImageElement ----------------------------- */
  25440. /* ./webidl/SVGFEImageElement.webidl */
  25441. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25442. /* This Source Code Form is subject to the terms of the Mozilla Public
  25443. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25444. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25445. *
  25446. * The origin of this IDL file is
  25447. * http://www.w3.org/TR/SVG2/
  25448. *
  25449. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25450. * liability, trademark and document use rules apply.
  25451. */
  25452. [Exposed=Window]
  25453. interface SVGFEImageElement : SVGElement {
  25454. [Constant]
  25455. readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
  25456. [SetterThrows]
  25457. attribute DOMString? crossOrigin;
  25458. };
  25459. SVGFEImageElement includes SVGFilterPrimitiveStandardAttributes;
  25460. SVGFEImageElement includes SVGURIReference;
  25461. /* ---------------------- SVGFEMergeElement ----------------------------- */
  25462. /* ./webidl/SVGFEMergeElement.webidl */
  25463. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25464. /* This Source Code Form is subject to the terms of the Mozilla Public
  25465. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25466. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25467. *
  25468. * The origin of this IDL file is
  25469. * http://www.w3.org/TR/SVG2/
  25470. *
  25471. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25472. * liability, trademark and document use rules apply.
  25473. */
  25474. [Exposed=Window]
  25475. interface SVGFEMergeElement : SVGElement {
  25476. };
  25477. SVGFEMergeElement includes SVGFilterPrimitiveStandardAttributes;
  25478. /* ---------------------- SVGFEMergeNodeElement ----------------------------- */
  25479. /* ./webidl/SVGFEMergeNodeElement.webidl */
  25480. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25481. /* This Source Code Form is subject to the terms of the Mozilla Public
  25482. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25483. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25484. *
  25485. * The origin of this IDL file is
  25486. * http://www.w3.org/TR/SVG2/
  25487. *
  25488. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25489. * liability, trademark and document use rules apply.
  25490. */
  25491. [Exposed=Window]
  25492. interface SVGFEMergeNodeElement : SVGElement {
  25493. [Constant]
  25494. readonly attribute SVGAnimatedString in1;
  25495. };
  25496. /* ---------------------- SVGFEMorphologyElement ----------------------------- */
  25497. /* ./webidl/SVGFEMorphologyElement.webidl */
  25498. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25499. /* This Source Code Form is subject to the terms of the Mozilla Public
  25500. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25501. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25502. *
  25503. * The origin of this IDL file is
  25504. * http://www.w3.org/TR/SVG2/
  25505. *
  25506. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25507. * liability, trademark and document use rules apply.
  25508. */
  25509. [Exposed=Window]
  25510. interface SVGFEMorphologyElement : SVGElement {
  25511. // Morphology Operators
  25512. const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
  25513. const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
  25514. const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
  25515. [Constant]
  25516. readonly attribute SVGAnimatedString in1;
  25517. [Constant]
  25518. readonly attribute SVGAnimatedEnumeration operator;
  25519. [Constant]
  25520. readonly attribute SVGAnimatedNumber radiusX;
  25521. [Constant]
  25522. readonly attribute SVGAnimatedNumber radiusY;
  25523. };
  25524. SVGFEMorphologyElement includes SVGFilterPrimitiveStandardAttributes;
  25525. /* ---------------------- SVGFEOffsetElement ----------------------------- */
  25526. /* ./webidl/SVGFEOffsetElement.webidl */
  25527. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25528. /* This Source Code Form is subject to the terms of the Mozilla Public
  25529. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25530. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25531. *
  25532. * The origin of this IDL file is
  25533. * http://www.w3.org/TR/SVG2/
  25534. *
  25535. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25536. * liability, trademark and document use rules apply.
  25537. */
  25538. [Exposed=Window]
  25539. interface SVGFEOffsetElement : SVGElement {
  25540. [Constant]
  25541. readonly attribute SVGAnimatedString in1;
  25542. [Constant]
  25543. readonly attribute SVGAnimatedNumber dx;
  25544. [Constant]
  25545. readonly attribute SVGAnimatedNumber dy;
  25546. };
  25547. SVGFEOffsetElement includes SVGFilterPrimitiveStandardAttributes;
  25548. /* ---------------------- SVGFEPointLightElement ----------------------------- */
  25549. /* ./webidl/SVGFEPointLightElement.webidl */
  25550. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25551. /* This Source Code Form is subject to the terms of the Mozilla Public
  25552. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25553. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25554. *
  25555. * The origin of this IDL file is
  25556. * http://www.w3.org/TR/SVG2/
  25557. *
  25558. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25559. * liability, trademark and document use rules apply.
  25560. */
  25561. [Exposed=Window]
  25562. interface SVGFEPointLightElement : SVGElement {
  25563. [Constant]
  25564. readonly attribute SVGAnimatedNumber x;
  25565. [Constant]
  25566. readonly attribute SVGAnimatedNumber y;
  25567. [Constant]
  25568. readonly attribute SVGAnimatedNumber z;
  25569. };
  25570. /* ---------------------- SVGFESpecularLightingElement ----------------------------- */
  25571. /* ./webidl/SVGFESpecularLightingElement.webidl */
  25572. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25573. /* This Source Code Form is subject to the terms of the Mozilla Public
  25574. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25575. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25576. *
  25577. * The origin of this IDL file is
  25578. * http://www.w3.org/TR/SVG2/
  25579. *
  25580. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25581. * liability, trademark and document use rules apply.
  25582. */
  25583. [Exposed=Window]
  25584. interface SVGFESpecularLightingElement : SVGElement {
  25585. [Constant]
  25586. readonly attribute SVGAnimatedString in1;
  25587. [Constant]
  25588. readonly attribute SVGAnimatedNumber surfaceScale;
  25589. [Constant]
  25590. readonly attribute SVGAnimatedNumber specularConstant;
  25591. [Constant]
  25592. readonly attribute SVGAnimatedNumber specularExponent;
  25593. [Constant]
  25594. readonly attribute SVGAnimatedNumber kernelUnitLengthX;
  25595. [Constant]
  25596. readonly attribute SVGAnimatedNumber kernelUnitLengthY;
  25597. };
  25598. SVGFESpecularLightingElement includes SVGFilterPrimitiveStandardAttributes;
  25599. /* ---------------------- SVGFESpotLightElement ----------------------------- */
  25600. /* ./webidl/SVGFESpotLightElement.webidl */
  25601. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25602. /* This Source Code Form is subject to the terms of the Mozilla Public
  25603. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25604. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25605. *
  25606. * The origin of this IDL file is
  25607. * http://www.w3.org/TR/SVG2/
  25608. *
  25609. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25610. * liability, trademark and document use rules apply.
  25611. */
  25612. [Exposed=Window]
  25613. interface SVGFESpotLightElement : SVGElement {
  25614. [Constant]
  25615. readonly attribute SVGAnimatedNumber x;
  25616. [Constant]
  25617. readonly attribute SVGAnimatedNumber y;
  25618. [Constant]
  25619. readonly attribute SVGAnimatedNumber z;
  25620. [Constant]
  25621. readonly attribute SVGAnimatedNumber pointsAtX;
  25622. [Constant]
  25623. readonly attribute SVGAnimatedNumber pointsAtY;
  25624. [Constant]
  25625. readonly attribute SVGAnimatedNumber pointsAtZ;
  25626. [Constant]
  25627. readonly attribute SVGAnimatedNumber specularExponent;
  25628. [Constant]
  25629. readonly attribute SVGAnimatedNumber limitingConeAngle;
  25630. };
  25631. /* ---------------------- SVGFETileElement ----------------------------- */
  25632. /* ./webidl/SVGFETileElement.webidl */
  25633. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25634. /* This Source Code Form is subject to the terms of the Mozilla Public
  25635. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25636. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25637. *
  25638. * The origin of this IDL file is
  25639. * http://www.w3.org/TR/SVG2/
  25640. *
  25641. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25642. * liability, trademark and document use rules apply.
  25643. */
  25644. [Exposed=Window]
  25645. interface SVGFETileElement : SVGElement {
  25646. [Constant]
  25647. readonly attribute SVGAnimatedString in1;
  25648. };
  25649. SVGFETileElement includes SVGFilterPrimitiveStandardAttributes;
  25650. /* ---------------------- SVGFETurbulenceElement ----------------------------- */
  25651. /* ./webidl/SVGFETurbulenceElement.webidl */
  25652. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25653. /* This Source Code Form is subject to the terms of the Mozilla Public
  25654. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25655. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25656. *
  25657. * The origin of this IDL file is
  25658. * http://www.w3.org/TR/SVG2/
  25659. *
  25660. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25661. * liability, trademark and document use rules apply.
  25662. */
  25663. [Exposed=Window]
  25664. interface SVGFETurbulenceElement : SVGElement {
  25665. // Turbulence Types
  25666. const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
  25667. const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
  25668. const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
  25669. // Stitch Options
  25670. const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
  25671. const unsigned short SVG_STITCHTYPE_STITCH = 1;
  25672. const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
  25673. [Constant]
  25674. readonly attribute SVGAnimatedNumber baseFrequencyX;
  25675. [Constant]
  25676. readonly attribute SVGAnimatedNumber baseFrequencyY;
  25677. [Constant]
  25678. readonly attribute SVGAnimatedInteger numOctaves;
  25679. [Constant]
  25680. readonly attribute SVGAnimatedNumber seed;
  25681. [Constant]
  25682. readonly attribute SVGAnimatedEnumeration stitchTiles;
  25683. [Constant]
  25684. readonly attribute SVGAnimatedEnumeration type;
  25685. };
  25686. SVGFETurbulenceElement includes SVGFilterPrimitiveStandardAttributes;
  25687. /* ---------------------- SVGFilterElement ----------------------------- */
  25688. /* ./webidl/SVGFilterElement.webidl */
  25689. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25690. /* This Source Code Form is subject to the terms of the Mozilla Public
  25691. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25692. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25693. *
  25694. * The origin of this IDL file is
  25695. * http://www.w3.org/TR/SVG2/
  25696. *
  25697. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25698. * liability, trademark and document use rules apply.
  25699. */
  25700. [Exposed=Window]
  25701. interface SVGFilterElement : SVGElement {
  25702. [Constant]
  25703. readonly attribute SVGAnimatedEnumeration filterUnits;
  25704. [Constant]
  25705. readonly attribute SVGAnimatedEnumeration primitiveUnits;
  25706. [Constant]
  25707. readonly attribute SVGAnimatedLength x;
  25708. [Constant]
  25709. readonly attribute SVGAnimatedLength y;
  25710. [Constant]
  25711. readonly attribute SVGAnimatedLength width;
  25712. [Constant]
  25713. readonly attribute SVGAnimatedLength height;
  25714. // ImageData apply(ImageData source);
  25715. };
  25716. SVGFilterElement includes SVGURIReference;
  25717. /* ---------------------- SVGFilterPrimitiveStandardAttributes ----------------------------- */
  25718. /* ./webidl/SVGFilterPrimitiveStandardAttributes.webidl */
  25719. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25720. /* This Source Code Form is subject to the terms of the Mozilla Public
  25721. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25722. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25723. *
  25724. * The origin of this IDL file is
  25725. * http://www.w3.org/TR/SVG2/
  25726. *
  25727. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25728. * liability, trademark and document use rules apply.
  25729. */
  25730. interface mixin SVGFilterPrimitiveStandardAttributes {
  25731. [Constant]
  25732. readonly attribute SVGAnimatedLength x;
  25733. [Constant]
  25734. readonly attribute SVGAnimatedLength y;
  25735. [Constant]
  25736. readonly attribute SVGAnimatedLength width;
  25737. [Constant]
  25738. readonly attribute SVGAnimatedLength height;
  25739. [Constant]
  25740. readonly attribute SVGAnimatedString result;
  25741. };
  25742. /* ---------------------- SVGFitToViewBox ----------------------------- */
  25743. /* ./webidl/SVGFitToViewBox.webidl */
  25744. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25745. /* This Source Code Form is subject to the terms of the Mozilla Public
  25746. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25747. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25748. *
  25749. * The origin of this IDL file is
  25750. * http://www.w3.org/TR/SVG2/
  25751. *
  25752. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25753. * liability, trademark and document use rules apply.
  25754. */
  25755. interface mixin SVGFitToViewBox {
  25756. [Constant]
  25757. readonly attribute SVGAnimatedRect viewBox;
  25758. [Constant]
  25759. readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
  25760. };
  25761. /* ---------------------- SVGForeignObjectElement ----------------------------- */
  25762. /* ./webidl/SVGForeignObjectElement.webidl */
  25763. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25764. /* This Source Code Form is subject to the terms of the Mozilla Public
  25765. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25766. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25767. *
  25768. * The origin of this IDL file is
  25769. * http://www.w3.org/TR/SVG2/
  25770. *
  25771. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25772. * liability, trademark and document use rules apply.
  25773. */
  25774. [Exposed=Window]
  25775. interface SVGForeignObjectElement : SVGGraphicsElement {
  25776. [Constant]
  25777. readonly attribute SVGAnimatedLength x;
  25778. [Constant]
  25779. readonly attribute SVGAnimatedLength y;
  25780. [Constant]
  25781. readonly attribute SVGAnimatedLength width;
  25782. [Constant]
  25783. readonly attribute SVGAnimatedLength height;
  25784. };
  25785. /* ---------------------- SVGGElement ----------------------------- */
  25786. /* ./webidl/SVGGElement.webidl */
  25787. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25788. /* This Source Code Form is subject to the terms of the Mozilla Public
  25789. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25790. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25791. *
  25792. * The origin of this IDL file is
  25793. * http://www.w3.org/TR/SVG2/
  25794. *
  25795. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25796. * liability, trademark and document use rules apply.
  25797. */
  25798. [Exposed=Window]
  25799. interface SVGGElement : SVGGraphicsElement {
  25800. };
  25801. /* ---------------------- SVGGeometryElement ----------------------------- */
  25802. /* ./webidl/SVGGeometryElement.webidl */
  25803. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25804. /* This Source Code Form is subject to the terms of the Mozilla Public
  25805. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25806. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25807. *
  25808. * The origin of this IDL file is
  25809. * http://www.w3.org/TR/SVG2/
  25810. *
  25811. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25812. * liability, trademark and document use rules apply.
  25813. */
  25814. [Exposed=Window]
  25815. interface SVGGeometryElement : SVGGraphicsElement {
  25816. [SameObject]
  25817. readonly attribute SVGAnimatedNumber pathLength;
  25818. boolean isPointInFill(optional DOMPointInit point = {});
  25819. boolean isPointInStroke(optional DOMPointInit point = {});
  25820. [BinaryName="getTotalLengthForBinding"]
  25821. float getTotalLength();
  25822. [NewObject, Throws]
  25823. SVGPoint getPointAtLength(float distance);
  25824. };
  25825. /* ---------------------- SVGGradientElement ----------------------------- */
  25826. /* ./webidl/SVGGradientElement.webidl */
  25827. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25828. /* This Source Code Form is subject to the terms of the Mozilla Public
  25829. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25830. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25831. *
  25832. * The origin of this IDL file is
  25833. * https://svgwg.org/svg2-draft/
  25834. *
  25835. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25836. * liability, trademark and document use rules apply.
  25837. */
  25838. [Exposed=Window]
  25839. interface SVGGradientElement : SVGElement {
  25840. // Spread Method Types
  25841. const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
  25842. const unsigned short SVG_SPREADMETHOD_PAD = 1;
  25843. const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
  25844. const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
  25845. [Constant]
  25846. readonly attribute SVGAnimatedEnumeration gradientUnits;
  25847. [Constant]
  25848. readonly attribute SVGAnimatedTransformList gradientTransform;
  25849. [Constant]
  25850. readonly attribute SVGAnimatedEnumeration spreadMethod;
  25851. };
  25852. SVGGradientElement includes SVGURIReference;
  25853. /* ---------------------- SVGGraphicsElement ----------------------------- */
  25854. /* ./webidl/SVGGraphicsElement.webidl */
  25855. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25856. /* This Source Code Form is subject to the terms of the Mozilla Public
  25857. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25858. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25859. *
  25860. * The origin of this IDL file is
  25861. * http://www.w3.org/TR/SVG2/
  25862. *
  25863. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25864. * liability, trademark and document use rules apply.
  25865. */
  25866. dictionary SVGBoundingBoxOptions {
  25867. boolean fill = true;
  25868. boolean stroke = false;
  25869. boolean markers = false;
  25870. boolean clipped = false;
  25871. };
  25872. [Exposed=Window]
  25873. interface SVGGraphicsElement : SVGElement {
  25874. readonly attribute SVGAnimatedTransformList transform;
  25875. [Deprecated="SVGNearestViewportElement",
  25876. Pref="svg.nearestAndFarthestViewportElement.enabled"]
  25877. readonly attribute SVGElement? nearestViewportElement;
  25878. [Deprecated="SVGFarthestViewportElement",
  25879. Pref="svg.nearestAndFarthestViewportElement.enabled"]
  25880. readonly attribute SVGElement? farthestViewportElement;
  25881. [NewObject]
  25882. SVGRect getBBox(optional SVGBoundingBoxOptions aOptions = {});
  25883. SVGMatrix? getCTM();
  25884. SVGMatrix? getScreenCTM();
  25885. };
  25886. SVGGraphicsElement includes SVGTests;
  25887. /* ---------------------- SVGImageElement ----------------------------- */
  25888. /* ./webidl/SVGImageElement.webidl */
  25889. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25890. /* This Source Code Form is subject to the terms of the Mozilla Public
  25891. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25892. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25893. *
  25894. * The origin of this IDL file is
  25895. * http://www.w3.org/TR/SVG2/
  25896. *
  25897. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25898. * liability, trademark and document use rules apply.
  25899. */
  25900. [Exposed=Window]
  25901. interface SVGImageElement : SVGGraphicsElement {
  25902. [Constant]
  25903. readonly attribute SVGAnimatedLength x;
  25904. [Constant]
  25905. readonly attribute SVGAnimatedLength y;
  25906. [Constant]
  25907. readonly attribute SVGAnimatedLength width;
  25908. [Constant]
  25909. readonly attribute SVGAnimatedLength height;
  25910. [Constant]
  25911. readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
  25912. [SetterThrows]
  25913. attribute DOMString? crossOrigin;
  25914. [CEReactions, SetterThrows]
  25915. attribute DOMString decoding;
  25916. [NewObject]
  25917. Promise<undefined> decode();
  25918. };
  25919. SVGImageElement includes MozImageLoadingContent;
  25920. SVGImageElement includes SVGURIReference;
  25921. /* ---------------------- SVGLength ----------------------------- */
  25922. /* ./webidl/SVGLength.webidl */
  25923. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25924. /* This Source Code Form is subject to the terms of the Mozilla Public
  25925. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25926. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25927. *
  25928. * The origin of this IDL file is
  25929. * http://www.w3.org/TR/SVG2/
  25930. *
  25931. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25932. * liability, trademark and document use rules apply.
  25933. */
  25934. [Exposed=Window]
  25935. interface SVGLength {
  25936. // Length Unit Types
  25937. const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
  25938. const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
  25939. const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
  25940. const unsigned short SVG_LENGTHTYPE_EMS = 3;
  25941. const unsigned short SVG_LENGTHTYPE_EXS = 4;
  25942. const unsigned short SVG_LENGTHTYPE_PX = 5;
  25943. const unsigned short SVG_LENGTHTYPE_CM = 6;
  25944. const unsigned short SVG_LENGTHTYPE_MM = 7;
  25945. const unsigned short SVG_LENGTHTYPE_IN = 8;
  25946. const unsigned short SVG_LENGTHTYPE_PT = 9;
  25947. const unsigned short SVG_LENGTHTYPE_PC = 10;
  25948. readonly attribute unsigned short unitType;
  25949. [Throws]
  25950. attribute float value;
  25951. [SetterThrows]
  25952. attribute float valueInSpecifiedUnits;
  25953. [SetterThrows]
  25954. attribute DOMString valueAsString;
  25955. [Throws]
  25956. undefined newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
  25957. [Throws]
  25958. undefined convertToSpecifiedUnits(unsigned short unitType);
  25959. };
  25960. /* ---------------------- SVGLengthList ----------------------------- */
  25961. /* ./webidl/SVGLengthList.webidl */
  25962. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25963. /* This Source Code Form is subject to the terms of the Mozilla Public
  25964. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  25965. * You can obtain one at http://mozilla.org/MPL/2.0/.
  25966. *
  25967. * The origin of this IDL file is
  25968. * http://www.w3.org/TR/SVG11/
  25969. * https://svgwg.org/svg2-draft/types.html#InterfaceSVGLengthList
  25970. *
  25971. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  25972. * liability, trademark and document use rules apply.
  25973. */
  25974. [Exposed=Window]
  25975. interface SVGLengthList {
  25976. readonly attribute unsigned long numberOfItems;
  25977. [Throws]
  25978. undefined clear();
  25979. [Throws]
  25980. SVGLength initialize(SVGLength newItem);
  25981. [Throws]
  25982. getter SVGLength getItem(unsigned long index);
  25983. [Throws]
  25984. SVGLength insertItemBefore(SVGLength newItem, unsigned long index);
  25985. [Throws]
  25986. SVGLength replaceItem(SVGLength newItem, unsigned long index);
  25987. [Throws]
  25988. SVGLength removeItem(unsigned long index);
  25989. [Throws]
  25990. SVGLength appendItem(SVGLength newItem);
  25991. [Throws]
  25992. setter undefined (unsigned long index, SVGLength newItem);
  25993. // Mozilla-specific stuff
  25994. readonly attribute unsigned long length; // synonym for numberOfItems
  25995. };
  25996. /* ---------------------- SVGLinearGradientElement ----------------------------- */
  25997. /* ./webidl/SVGLinearGradientElement.webidl */
  25998. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  25999. /* This Source Code Form is subject to the terms of the Mozilla Public
  26000. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26001. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26002. *
  26003. * The origin of this IDL file is
  26004. * https://svgwg.org/svg2-draft/
  26005. *
  26006. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26007. * liability, trademark and document use rules apply.
  26008. */
  26009. [Exposed=Window]
  26010. interface SVGLinearGradientElement : SVGGradientElement {
  26011. [Constant]
  26012. readonly attribute SVGAnimatedLength x1;
  26013. [Constant]
  26014. readonly attribute SVGAnimatedLength y1;
  26015. [Constant]
  26016. readonly attribute SVGAnimatedLength x2;
  26017. [Constant]
  26018. readonly attribute SVGAnimatedLength y2;
  26019. };
  26020. /* ---------------------- SVGLineElement ----------------------------- */
  26021. /* ./webidl/SVGLineElement.webidl */
  26022. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26023. /* This Source Code Form is subject to the terms of the Mozilla Public
  26024. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26025. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26026. *
  26027. * The origin of this IDL file is
  26028. * http://www.w3.org/TR/SVG2/
  26029. *
  26030. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26031. * liability, trademark and document use rules apply.
  26032. */
  26033. [Exposed=Window]
  26034. interface SVGLineElement : SVGGeometryElement {
  26035. [Constant]
  26036. readonly attribute SVGAnimatedLength x1;
  26037. [Constant]
  26038. readonly attribute SVGAnimatedLength y1;
  26039. [Constant]
  26040. readonly attribute SVGAnimatedLength x2;
  26041. [Constant]
  26042. readonly attribute SVGAnimatedLength y2;
  26043. };
  26044. /* ---------------------- SVGMarkerElement ----------------------------- */
  26045. /* ./webidl/SVGMarkerElement.webidl */
  26046. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26047. /* This Source Code Form is subject to the terms of the Mozilla Public
  26048. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26049. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26050. *
  26051. * The origin of this IDL file is
  26052. * http://www.w3.org/TR/SVG2/
  26053. *
  26054. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26055. * liability, trademark and document use rules apply.
  26056. */
  26057. [Exposed=Window]
  26058. interface SVGMarkerElement : SVGElement {
  26059. // Marker Unit Types
  26060. const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
  26061. const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
  26062. const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
  26063. // Marker Orientation Types
  26064. const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
  26065. const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
  26066. const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
  26067. const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
  26068. [Constant]
  26069. readonly attribute SVGAnimatedLength refX;
  26070. [Constant]
  26071. readonly attribute SVGAnimatedLength refY;
  26072. [Constant]
  26073. readonly attribute SVGAnimatedEnumeration markerUnits;
  26074. [Constant]
  26075. readonly attribute SVGAnimatedLength markerWidth;
  26076. [Constant]
  26077. readonly attribute SVGAnimatedLength markerHeight;
  26078. [Constant]
  26079. readonly attribute SVGAnimatedEnumeration orientType;
  26080. [Constant]
  26081. readonly attribute SVGAnimatedAngle orientAngle;
  26082. undefined setOrientToAuto();
  26083. undefined setOrientToAngle(SVGAngle angle);
  26084. };
  26085. SVGMarkerElement includes SVGFitToViewBox;
  26086. /* ---------------------- SVGMaskElement ----------------------------- */
  26087. /* ./webidl/SVGMaskElement.webidl */
  26088. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26089. /* This Source Code Form is subject to the terms of the Mozilla Public
  26090. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26091. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26092. *
  26093. * The origin of this IDL file is
  26094. * http://www.w3.org/TR/SVG2/
  26095. *
  26096. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26097. * liability, trademark and document use rules apply.
  26098. */
  26099. [Exposed=Window]
  26100. interface SVGMaskElement : SVGElement {
  26101. // Mask Types
  26102. const unsigned short SVG_MASKTYPE_LUMINANCE = 0;
  26103. const unsigned short SVG_MASKTYPE_ALPHA = 1;
  26104. [Constant]
  26105. readonly attribute SVGAnimatedEnumeration maskUnits;
  26106. [Constant]
  26107. readonly attribute SVGAnimatedEnumeration maskContentUnits;
  26108. [Constant]
  26109. readonly attribute SVGAnimatedLength x;
  26110. [Constant]
  26111. readonly attribute SVGAnimatedLength y;
  26112. [Constant]
  26113. readonly attribute SVGAnimatedLength width;
  26114. [Constant]
  26115. readonly attribute SVGAnimatedLength height;
  26116. };
  26117. /* ---------------------- SVGMatrix ----------------------------- */
  26118. /* ./webidl/SVGMatrix.webidl */
  26119. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26120. /* This Source Code Form is subject to the terms of the Mozilla Public
  26121. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26122. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26123. *
  26124. * The origin of this IDL file is
  26125. * http://www.w3.org/TR/SVG2/
  26126. *
  26127. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26128. * liability, trademark and document use rules apply.
  26129. */
  26130. [Exposed=Window]
  26131. interface SVGMatrix {
  26132. [SetterThrows]
  26133. attribute float a;
  26134. [SetterThrows]
  26135. attribute float b;
  26136. [SetterThrows]
  26137. attribute float c;
  26138. [SetterThrows]
  26139. attribute float d;
  26140. [SetterThrows]
  26141. attribute float e;
  26142. [SetterThrows]
  26143. attribute float f;
  26144. [NewObject]
  26145. SVGMatrix multiply(SVGMatrix secondMatrix);
  26146. [NewObject, Throws]
  26147. SVGMatrix inverse();
  26148. [NewObject]
  26149. SVGMatrix translate(float x, float y);
  26150. [NewObject]
  26151. SVGMatrix scale(float scaleFactor);
  26152. [NewObject]
  26153. SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY);
  26154. [NewObject]
  26155. SVGMatrix rotate(float angle);
  26156. [NewObject, Throws]
  26157. SVGMatrix rotateFromVector(float x, float y);
  26158. [NewObject]
  26159. SVGMatrix flipX();
  26160. [NewObject]
  26161. SVGMatrix flipY();
  26162. [NewObject, Throws]
  26163. SVGMatrix skewX(float angle);
  26164. [NewObject, Throws]
  26165. SVGMatrix skewY(float angle);
  26166. };
  26167. /* ---------------------- SVGMetadataElement ----------------------------- */
  26168. /* ./webidl/SVGMetadataElement.webidl */
  26169. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26170. /* This Source Code Form is subject to the terms of the Mozilla Public
  26171. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26172. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26173. *
  26174. * The origin of this IDL file is
  26175. * http://www.w3.org/TR/SVG2/
  26176. *
  26177. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26178. * liability, trademark and document use rules apply.
  26179. */
  26180. [Exposed=Window]
  26181. interface SVGMetadataElement : SVGElement {
  26182. };
  26183. /* ---------------------- SVGMPathElement ----------------------------- */
  26184. /* ./webidl/SVGMPathElement.webidl */
  26185. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26186. /* This Source Code Form is subject to the terms of the Mozilla Public
  26187. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26188. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26189. *
  26190. * The origin of this IDL file is
  26191. * http://www.w3.org/TR/SVG2/
  26192. *
  26193. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26194. * liability, trademark and document use rules apply.
  26195. */
  26196. [Exposed=Window]
  26197. interface SVGMPathElement : SVGElement {
  26198. };
  26199. SVGMPathElement includes SVGURIReference;
  26200. /* ---------------------- SVGNumber ----------------------------- */
  26201. /* ./webidl/SVGNumber.webidl */
  26202. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26203. /* This Source Code Form is subject to the terms of the Mozilla Public
  26204. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26205. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26206. *
  26207. * The origin of this IDL file is
  26208. * http://www.w3.org/TR/SVG2/
  26209. *
  26210. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26211. * liability, trademark and document use rules apply.
  26212. */
  26213. [Exposed=Window]
  26214. interface SVGNumber {
  26215. [SetterThrows]
  26216. attribute float value;
  26217. };
  26218. /* ---------------------- SVGNumberList ----------------------------- */
  26219. /* ./webidl/SVGNumberList.webidl */
  26220. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26221. /* This Source Code Form is subject to the terms of the Mozilla Public
  26222. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26223. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26224. *
  26225. * The origin of this IDL file is
  26226. * http://www.w3.org/TR/SVG11/
  26227. *
  26228. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26229. * liability, trademark and document use rules apply.
  26230. */
  26231. [Exposed=Window]
  26232. interface SVGNumberList {
  26233. readonly attribute unsigned long numberOfItems;
  26234. [Throws]
  26235. undefined clear();
  26236. [Throws]
  26237. SVGNumber initialize(SVGNumber newItem);
  26238. [Throws]
  26239. getter SVGNumber getItem(unsigned long index);
  26240. [Throws]
  26241. SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index);
  26242. [Throws]
  26243. SVGNumber replaceItem(SVGNumber newItem, unsigned long index);
  26244. [Throws]
  26245. SVGNumber removeItem(unsigned long index);
  26246. [Throws]
  26247. SVGNumber appendItem(SVGNumber newItem);
  26248. // Mozilla-specific stuff
  26249. readonly attribute unsigned long length; // synonym for numberOfItems
  26250. };
  26251. /* ---------------------- SVGPathElement ----------------------------- */
  26252. /* ./webidl/SVGPathElement.webidl */
  26253. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26254. /* This Source Code Form is subject to the terms of the Mozilla Public
  26255. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26256. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26257. *
  26258. * The origin of this IDL file is
  26259. * http://www.w3.org/TR/SVG2/
  26260. *
  26261. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26262. * liability, trademark and document use rules apply.
  26263. */
  26264. [Exposed=Window]
  26265. interface SVGPathElement : SVGGeometryElement {
  26266. [Pref="dom.svg.pathSeg.enabled"]
  26267. unsigned long getPathSegAtLength(float distance);
  26268. };
  26269. SVGPathElement includes SVGAnimatedPathData;
  26270. /* ---------------------- SVGPathSeg ----------------------------- */
  26271. /* ./webidl/SVGPathSeg.webidl */
  26272. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26273. /* This Source Code Form is subject to the terms of the Mozilla Public
  26274. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26275. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26276. *
  26277. * The origin of this IDL file is
  26278. * http://www.w3.org/TR/SVG2/
  26279. *
  26280. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26281. * liability, trademark and document use rules apply.
  26282. */
  26283. [LegacyNoInterfaceObject,
  26284. Exposed=Window]
  26285. interface SVGPathSeg {
  26286. // Path Segment Types
  26287. const unsigned short PATHSEG_UNKNOWN = 0;
  26288. const unsigned short PATHSEG_CLOSEPATH = 1;
  26289. const unsigned short PATHSEG_MOVETO_ABS = 2;
  26290. const unsigned short PATHSEG_MOVETO_REL = 3;
  26291. const unsigned short PATHSEG_LINETO_ABS = 4;
  26292. const unsigned short PATHSEG_LINETO_REL = 5;
  26293. const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6;
  26294. const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7;
  26295. const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
  26296. const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9;
  26297. const unsigned short PATHSEG_ARC_ABS = 10;
  26298. const unsigned short PATHSEG_ARC_REL = 11;
  26299. const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
  26300. const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13;
  26301. const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14;
  26302. const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15;
  26303. const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
  26304. const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
  26305. const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
  26306. const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
  26307. [Pure]
  26308. readonly attribute unsigned short pathSegType;
  26309. [Pure]
  26310. readonly attribute DOMString pathSegTypeAsLetter;
  26311. };
  26312. [LegacyNoInterfaceObject,
  26313. Exposed=Window]
  26314. interface SVGPathSegClosePath : SVGPathSeg {
  26315. };
  26316. [LegacyNoInterfaceObject,
  26317. Exposed=Window]
  26318. interface SVGPathSegMovetoAbs : SVGPathSeg {
  26319. [SetterThrows]
  26320. attribute float x;
  26321. [SetterThrows]
  26322. attribute float y;
  26323. };
  26324. [LegacyNoInterfaceObject,
  26325. Exposed=Window]
  26326. interface SVGPathSegMovetoRel : SVGPathSeg {
  26327. [SetterThrows]
  26328. attribute float x;
  26329. [SetterThrows]
  26330. attribute float y;
  26331. };
  26332. [LegacyNoInterfaceObject,
  26333. Exposed=Window]
  26334. interface SVGPathSegLinetoAbs : SVGPathSeg {
  26335. [SetterThrows]
  26336. attribute float x;
  26337. [SetterThrows]
  26338. attribute float y;
  26339. };
  26340. [LegacyNoInterfaceObject,
  26341. Exposed=Window]
  26342. interface SVGPathSegLinetoRel : SVGPathSeg {
  26343. [SetterThrows]
  26344. attribute float x;
  26345. [SetterThrows]
  26346. attribute float y;
  26347. };
  26348. [LegacyNoInterfaceObject,
  26349. Exposed=Window]
  26350. interface SVGPathSegCurvetoCubicAbs : SVGPathSeg {
  26351. [SetterThrows]
  26352. attribute float x;
  26353. [SetterThrows]
  26354. attribute float y;
  26355. [SetterThrows]
  26356. attribute float x1;
  26357. [SetterThrows]
  26358. attribute float y1;
  26359. [SetterThrows]
  26360. attribute float x2;
  26361. [SetterThrows]
  26362. attribute float y2;
  26363. };
  26364. [LegacyNoInterfaceObject,
  26365. Exposed=Window]
  26366. interface SVGPathSegCurvetoCubicRel : SVGPathSeg {
  26367. [SetterThrows]
  26368. attribute float x;
  26369. [SetterThrows]
  26370. attribute float y;
  26371. [SetterThrows]
  26372. attribute float x1;
  26373. [SetterThrows]
  26374. attribute float y1;
  26375. [SetterThrows]
  26376. attribute float x2;
  26377. [SetterThrows]
  26378. attribute float y2;
  26379. };
  26380. [LegacyNoInterfaceObject,
  26381. Exposed=Window]
  26382. interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg {
  26383. [SetterThrows]
  26384. attribute float x;
  26385. [SetterThrows]
  26386. attribute float y;
  26387. [SetterThrows]
  26388. attribute float x1;
  26389. [SetterThrows]
  26390. attribute float y1;
  26391. };
  26392. [LegacyNoInterfaceObject,
  26393. Exposed=Window]
  26394. interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg {
  26395. [SetterThrows]
  26396. attribute float x;
  26397. [SetterThrows]
  26398. attribute float y;
  26399. [SetterThrows]
  26400. attribute float x1;
  26401. [SetterThrows]
  26402. attribute float y1;
  26403. };
  26404. [LegacyNoInterfaceObject,
  26405. Exposed=Window]
  26406. interface SVGPathSegArcAbs : SVGPathSeg {
  26407. [SetterThrows]
  26408. attribute float x;
  26409. [SetterThrows]
  26410. attribute float y;
  26411. [SetterThrows]
  26412. attribute float r1;
  26413. [SetterThrows]
  26414. attribute float r2;
  26415. [SetterThrows]
  26416. attribute float angle;
  26417. [SetterThrows]
  26418. attribute boolean largeArcFlag;
  26419. [SetterThrows]
  26420. attribute boolean sweepFlag;
  26421. };
  26422. [LegacyNoInterfaceObject,
  26423. Exposed=Window]
  26424. interface SVGPathSegArcRel : SVGPathSeg {
  26425. [SetterThrows]
  26426. attribute float x;
  26427. [SetterThrows]
  26428. attribute float y;
  26429. [SetterThrows]
  26430. attribute float r1;
  26431. [SetterThrows]
  26432. attribute float r2;
  26433. [SetterThrows]
  26434. attribute float angle;
  26435. [SetterThrows]
  26436. attribute boolean largeArcFlag;
  26437. [SetterThrows]
  26438. attribute boolean sweepFlag;
  26439. };
  26440. [LegacyNoInterfaceObject,
  26441. Exposed=Window]
  26442. interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg {
  26443. [SetterThrows]
  26444. attribute float x;
  26445. };
  26446. [LegacyNoInterfaceObject,
  26447. Exposed=Window]
  26448. interface SVGPathSegLinetoHorizontalRel : SVGPathSeg {
  26449. [SetterThrows]
  26450. attribute float x;
  26451. };
  26452. [LegacyNoInterfaceObject,
  26453. Exposed=Window]
  26454. interface SVGPathSegLinetoVerticalAbs : SVGPathSeg {
  26455. [SetterThrows]
  26456. attribute float y;
  26457. };
  26458. [LegacyNoInterfaceObject,
  26459. Exposed=Window]
  26460. interface SVGPathSegLinetoVerticalRel : SVGPathSeg {
  26461. [SetterThrows]
  26462. attribute float y;
  26463. };
  26464. [LegacyNoInterfaceObject,
  26465. Exposed=Window]
  26466. interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg {
  26467. [SetterThrows]
  26468. attribute float x;
  26469. [SetterThrows]
  26470. attribute float y;
  26471. [SetterThrows]
  26472. attribute float x2;
  26473. [SetterThrows]
  26474. attribute float y2;
  26475. };
  26476. [LegacyNoInterfaceObject,
  26477. Exposed=Window]
  26478. interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg {
  26479. [SetterThrows]
  26480. attribute float x;
  26481. [SetterThrows]
  26482. attribute float y;
  26483. [SetterThrows]
  26484. attribute float x2;
  26485. [SetterThrows]
  26486. attribute float y2;
  26487. };
  26488. [LegacyNoInterfaceObject,
  26489. Exposed=Window]
  26490. interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg {
  26491. [SetterThrows]
  26492. attribute float x;
  26493. [SetterThrows]
  26494. attribute float y;
  26495. };
  26496. [LegacyNoInterfaceObject,
  26497. Exposed=Window]
  26498. interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg {
  26499. [SetterThrows]
  26500. attribute float x;
  26501. [SetterThrows]
  26502. attribute float y;
  26503. };
  26504. /* ---------------------- SVGPathSegList ----------------------------- */
  26505. /* ./webidl/SVGPathSegList.webidl */
  26506. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26507. /* This Source Code Form is subject to the terms of the Mozilla Public
  26508. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26509. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26510. *
  26511. * The origin of this IDL file is
  26512. * http://www.w3.org/TR/SVG11/
  26513. *
  26514. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26515. * liability, trademark and document use rules apply.
  26516. */
  26517. [Exposed=Window,
  26518. Pref="dom.svg.pathSeg.enabled"]
  26519. interface SVGPathSegList {
  26520. readonly attribute unsigned long numberOfItems;
  26521. [Throws]
  26522. getter SVGPathSeg getItem(unsigned long index);
  26523. // Mozilla-specific stuff
  26524. readonly attribute unsigned long length; // synonym for numberOfItems
  26525. };
  26526. /* ---------------------- SVGPatternElement ----------------------------- */
  26527. /* ./webidl/SVGPatternElement.webidl */
  26528. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26529. /* This Source Code Form is subject to the terms of the Mozilla Public
  26530. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26531. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26532. *
  26533. * The origin of this IDL file is
  26534. * http://www.w3.org/TR/SVG2/pservers.html#InterfaceSVGPatternElement
  26535. *
  26536. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26537. * liability, trademark and document use rules apply.
  26538. */
  26539. [Exposed=Window]
  26540. interface SVGPatternElement : SVGElement {
  26541. [Constant]
  26542. readonly attribute SVGAnimatedEnumeration patternUnits;
  26543. [Constant]
  26544. readonly attribute SVGAnimatedEnumeration patternContentUnits;
  26545. [Constant]
  26546. readonly attribute SVGAnimatedTransformList patternTransform;
  26547. [Constant]
  26548. readonly attribute SVGAnimatedLength x;
  26549. [Constant]
  26550. readonly attribute SVGAnimatedLength y;
  26551. [Constant]
  26552. readonly attribute SVGAnimatedLength width;
  26553. [Constant]
  26554. readonly attribute SVGAnimatedLength height;
  26555. };
  26556. SVGPatternElement includes SVGFitToViewBox;
  26557. SVGPatternElement includes SVGURIReference;
  26558. /* ---------------------- SVGPoint ----------------------------- */
  26559. /* ./webidl/SVGPoint.webidl */
  26560. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26561. /* This Source Code Form is subject to the terms of the Mozilla Public
  26562. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26563. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26564. *
  26565. * The origin of this IDL file is
  26566. * http://www.w3.org/TR/SVG2/
  26567. *
  26568. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26569. * liability, trademark and document use rules apply.
  26570. */
  26571. [Exposed=Window]
  26572. interface SVGPoint {
  26573. [SetterThrows]
  26574. attribute float x;
  26575. [SetterThrows]
  26576. attribute float y;
  26577. [NewObject, Throws]
  26578. SVGPoint matrixTransform(optional DOMMatrix2DInit matrix = {});
  26579. };
  26580. /* ---------------------- SVGPointList ----------------------------- */
  26581. /* ./webidl/SVGPointList.webidl */
  26582. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26583. /* This Source Code Form is subject to the terms of the Mozilla Public
  26584. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26585. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26586. *
  26587. * The origin of this IDL file is
  26588. * http://www.w3.org/TR/SVG11/
  26589. *
  26590. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26591. * liability, trademark and document use rules apply.
  26592. */
  26593. [Exposed=Window]
  26594. interface SVGPointList {
  26595. readonly attribute unsigned long numberOfItems;
  26596. [Throws]
  26597. undefined clear();
  26598. [Throws]
  26599. SVGPoint initialize(SVGPoint newItem);
  26600. [Throws]
  26601. getter SVGPoint getItem(unsigned long index);
  26602. [Throws]
  26603. SVGPoint insertItemBefore(SVGPoint newItem, unsigned long index);
  26604. [Throws]
  26605. SVGPoint replaceItem(SVGPoint newItem, unsigned long index);
  26606. [Throws]
  26607. SVGPoint removeItem(unsigned long index);
  26608. [Throws]
  26609. SVGPoint appendItem(SVGPoint newItem);
  26610. // Mozilla-specific stuff
  26611. readonly attribute unsigned long length; // synonym for numberOfItems
  26612. };
  26613. /* ---------------------- SVGPolygonElement ----------------------------- */
  26614. /* ./webidl/SVGPolygonElement.webidl */
  26615. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26616. /* This Source Code Form is subject to the terms of the Mozilla Public
  26617. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26618. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26619. *
  26620. * The origin of this IDL file is
  26621. * http://www.w3.org/TR/SVG2/
  26622. *
  26623. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26624. * liability, trademark and document use rules apply.
  26625. */
  26626. [Exposed=Window]
  26627. interface SVGPolygonElement : SVGGeometryElement {
  26628. };
  26629. SVGPolygonElement includes SVGAnimatedPoints;
  26630. /* ---------------------- SVGPolylineElement ----------------------------- */
  26631. /* ./webidl/SVGPolylineElement.webidl */
  26632. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26633. /* This Source Code Form is subject to the terms of the Mozilla Public
  26634. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26635. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26636. *
  26637. * The origin of this IDL file is
  26638. * http://www.w3.org/TR/SVG2/
  26639. *
  26640. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26641. * liability, trademark and document use rules apply.
  26642. */
  26643. [Exposed=Window]
  26644. interface SVGPolylineElement : SVGGeometryElement {
  26645. };
  26646. SVGPolylineElement includes SVGAnimatedPoints;
  26647. /* ---------------------- SVGPreserveAspectRatio ----------------------------- */
  26648. /* ./webidl/SVGPreserveAspectRatio.webidl */
  26649. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26650. /* This Source Code Form is subject to the terms of the Mozilla Public
  26651. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26652. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26653. *
  26654. * The origin of this IDL file is
  26655. * http://www.w3.org/TR/SVG2/
  26656. *
  26657. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26658. * liability, trademark and document use rules apply.
  26659. */
  26660. [Exposed=Window]
  26661. interface SVGPreserveAspectRatio {
  26662. // Alignment Types
  26663. const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
  26664. const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
  26665. const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
  26666. const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
  26667. const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
  26668. const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
  26669. const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
  26670. const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
  26671. const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
  26672. const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
  26673. const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
  26674. // Meet-or-slice Types
  26675. const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
  26676. const unsigned short SVG_MEETORSLICE_MEET = 1;
  26677. const unsigned short SVG_MEETORSLICE_SLICE = 2;
  26678. [SetterThrows]
  26679. attribute unsigned short align;
  26680. [SetterThrows]
  26681. attribute unsigned short meetOrSlice;
  26682. };
  26683. /* ---------------------- SVGRadialGradientElement ----------------------------- */
  26684. /* ./webidl/SVGRadialGradientElement.webidl */
  26685. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26686. /* This Source Code Form is subject to the terms of the Mozilla Public
  26687. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26688. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26689. *
  26690. * The origin of this IDL file is
  26691. * https://svgwg.org/svg2-draft/
  26692. *
  26693. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26694. * liability, trademark and document use rules apply.
  26695. */
  26696. [Exposed=Window]
  26697. interface SVGRadialGradientElement : SVGGradientElement {
  26698. [Constant]
  26699. readonly attribute SVGAnimatedLength cx;
  26700. [Constant]
  26701. readonly attribute SVGAnimatedLength cy;
  26702. [Constant]
  26703. readonly attribute SVGAnimatedLength r;
  26704. [Constant]
  26705. readonly attribute SVGAnimatedLength fx;
  26706. [Constant]
  26707. readonly attribute SVGAnimatedLength fy;
  26708. // XXX: Bug 1242048
  26709. // [SameObject]
  26710. readonly attribute SVGAnimatedLength fr;
  26711. };
  26712. /* ---------------------- SVGRect ----------------------------- */
  26713. /* ./webidl/SVGRect.webidl */
  26714. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26715. /* This Source Code Form is subject to the terms of the Mozilla Public
  26716. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26717. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26718. *
  26719. * The origin of this IDL file is
  26720. * http://www.w3.org/TR/SVG2/
  26721. *
  26722. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26723. * liability, trademark and document use rules apply.
  26724. */
  26725. [Exposed=Window]
  26726. interface SVGRect {
  26727. [SetterThrows]
  26728. attribute float x;
  26729. [SetterThrows]
  26730. attribute float y;
  26731. [SetterThrows]
  26732. attribute float width;
  26733. [SetterThrows]
  26734. attribute float height;
  26735. };
  26736. /* ---------------------- SVGRectElement ----------------------------- */
  26737. /* ./webidl/SVGRectElement.webidl */
  26738. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26739. /* This Source Code Form is subject to the terms of the Mozilla Public
  26740. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26741. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26742. *
  26743. * The origin of this IDL file is
  26744. * http://www.w3.org/TR/SVG2/
  26745. *
  26746. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26747. * liability, trademark and document use rules apply.
  26748. */
  26749. [Exposed=Window]
  26750. interface SVGRectElement : SVGGeometryElement {
  26751. [Constant]
  26752. readonly attribute SVGAnimatedLength x;
  26753. [Constant]
  26754. readonly attribute SVGAnimatedLength y;
  26755. [Constant]
  26756. readonly attribute SVGAnimatedLength width;
  26757. [Constant]
  26758. readonly attribute SVGAnimatedLength height;
  26759. [Constant]
  26760. readonly attribute SVGAnimatedLength rx;
  26761. [Constant]
  26762. readonly attribute SVGAnimatedLength ry;
  26763. };
  26764. /* ---------------------- SVGScriptElement ----------------------------- */
  26765. /* ./webidl/SVGScriptElement.webidl */
  26766. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26767. /* This Source Code Form is subject to the terms of the Mozilla Public
  26768. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26769. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26770. *
  26771. * The origin of this IDL file is
  26772. * http://www.w3.org/TR/SVG2/
  26773. *
  26774. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26775. * liability, trademark and document use rules apply.
  26776. */
  26777. [Exposed=Window]
  26778. interface SVGScriptElement : SVGElement {
  26779. [SetterThrows]
  26780. attribute DOMString type;
  26781. // See https://github.com/w3c/svgwg/issues/918
  26782. attribute boolean async;
  26783. attribute boolean defer;
  26784. [SetterThrows]
  26785. attribute DOMString? crossOrigin;
  26786. };
  26787. SVGScriptElement includes SVGURIReference;
  26788. /* ---------------------- SVGSetElement ----------------------------- */
  26789. /* ./webidl/SVGSetElement.webidl */
  26790. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26791. /* This Source Code Form is subject to the terms of the Mozilla Public
  26792. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26793. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26794. *
  26795. * The origin of this IDL file is
  26796. * http://www.w3.org/TR/SVG2/
  26797. *
  26798. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26799. * liability, trademark and document use rules apply.
  26800. */
  26801. [Exposed=Window]
  26802. interface SVGSetElement : SVGAnimationElement {
  26803. };
  26804. /* ---------------------- SVGStopElement ----------------------------- */
  26805. /* ./webidl/SVGStopElement.webidl */
  26806. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26807. /* This Source Code Form is subject to the terms of the Mozilla Public
  26808. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26809. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26810. *
  26811. * The origin of this IDL file is
  26812. * http://www.w3.org/TR/SVG2/
  26813. *
  26814. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26815. * liability, trademark and document use rules apply.
  26816. */
  26817. [Exposed=Window]
  26818. interface SVGStopElement : SVGElement {
  26819. [Constant]
  26820. readonly attribute SVGAnimatedNumber offset;
  26821. };
  26822. /* ---------------------- SVGStringList ----------------------------- */
  26823. /* ./webidl/SVGStringList.webidl */
  26824. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26825. /* This Source Code Form is subject to the terms of the Mozilla Public
  26826. * License, v. 2.0. If a copy of the MPL was not distributed with this
  26827. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  26828. *
  26829. * The origin of this IDL file is
  26830. * https://svgwg.org/svg2-draft/
  26831. *
  26832. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26833. * liability, trademark and document use rules apply.
  26834. */
  26835. [Exposed=Window]
  26836. interface SVGStringList {
  26837. readonly attribute unsigned long length;
  26838. readonly attribute unsigned long numberOfItems;
  26839. undefined clear();
  26840. [Throws]
  26841. DOMString initialize(DOMString newItem);
  26842. [Throws]
  26843. DOMString getItem(unsigned long index);
  26844. getter DOMString(unsigned long index);
  26845. [Throws]
  26846. DOMString insertItemBefore(DOMString newItem, unsigned long index);
  26847. [Throws]
  26848. DOMString replaceItem(DOMString newItem, unsigned long index);
  26849. [Throws]
  26850. DOMString removeItem(unsigned long index);
  26851. [Throws]
  26852. DOMString appendItem(DOMString newItem);
  26853. //setter undefined (unsigned long index, DOMString newItem);
  26854. };
  26855. /* ---------------------- SVGStyleElement ----------------------------- */
  26856. /* ./webidl/SVGStyleElement.webidl */
  26857. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26858. /* This Source Code Form is subject to the terms of the Mozilla Public
  26859. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26860. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26861. *
  26862. * The origin of this IDL file is
  26863. * http://www.w3.org/TR/SVG2/
  26864. *
  26865. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26866. * liability, trademark and document use rules apply.
  26867. */
  26868. [Exposed=Window]
  26869. interface SVGStyleElement : SVGElement {
  26870. [Pure]
  26871. attribute boolean disabled;
  26872. [SetterThrows]
  26873. attribute DOMString type;
  26874. [SetterThrows]
  26875. attribute DOMString media;
  26876. [SetterThrows]
  26877. attribute DOMString title;
  26878. };
  26879. SVGStyleElement includes LinkStyle;
  26880. /* ---------------------- SVGSVGElement ----------------------------- */
  26881. /* ./webidl/SVGSVGElement.webidl */
  26882. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26883. /* This Source Code Form is subject to the terms of the Mozilla Public
  26884. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26885. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26886. *
  26887. * The origin of this IDL file is
  26888. * http://www.w3.org/TR/SVG2/
  26889. *
  26890. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26891. * liability, trademark and document use rules apply.
  26892. */
  26893. [Exposed=Window]
  26894. interface SVGSVGElement : SVGGraphicsElement {
  26895. [Constant]
  26896. readonly attribute SVGAnimatedLength x;
  26897. [Constant]
  26898. readonly attribute SVGAnimatedLength y;
  26899. [Constant]
  26900. readonly attribute SVGAnimatedLength width;
  26901. [Constant]
  26902. readonly attribute SVGAnimatedLength height;
  26903. [UseCounter]
  26904. attribute float currentScale;
  26905. readonly attribute SVGPoint currentTranslate;
  26906. [DependsOn=Nothing, Affects=Nothing]
  26907. unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
  26908. [DependsOn=Nothing, Affects=Nothing]
  26909. undefined unsuspendRedraw(unsigned long suspendHandleID);
  26910. [DependsOn=Nothing, Affects=Nothing]
  26911. undefined unsuspendRedrawAll();
  26912. [DependsOn=Nothing, Affects=Nothing]
  26913. undefined forceRedraw();
  26914. undefined pauseAnimations();
  26915. undefined unpauseAnimations();
  26916. boolean animationsPaused();
  26917. [BinaryName="getCurrentTimeAsFloat"]
  26918. float getCurrentTime();
  26919. undefined setCurrentTime(float seconds);
  26920. // NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
  26921. // NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
  26922. // boolean checkIntersection(SVGElement element, SVGRect rect);
  26923. // boolean checkEnclosure(SVGElement element, SVGRect rect);
  26924. [Deprecated="SVGDeselectAll"]
  26925. undefined deselectAll();
  26926. [NewObject]
  26927. SVGNumber createSVGNumber();
  26928. [NewObject]
  26929. SVGLength createSVGLength();
  26930. [NewObject]
  26931. SVGAngle createSVGAngle();
  26932. [NewObject]
  26933. SVGPoint createSVGPoint();
  26934. [NewObject]
  26935. SVGMatrix createSVGMatrix();
  26936. [NewObject]
  26937. SVGRect createSVGRect();
  26938. [NewObject]
  26939. SVGTransform createSVGTransform();
  26940. [NewObject, Throws]
  26941. SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
  26942. [UseCounter]
  26943. Element? getElementById(DOMString elementId);
  26944. };
  26945. SVGSVGElement includes SVGFitToViewBox;
  26946. SVGSVGElement includes SVGZoomAndPan;
  26947. /* ---------------------- SVGSwitchElement ----------------------------- */
  26948. /* ./webidl/SVGSwitchElement.webidl */
  26949. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26950. /* This Source Code Form is subject to the terms of the Mozilla Public
  26951. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26952. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26953. *
  26954. * The origin of this IDL file is
  26955. * http://www.w3.org/TR/SVG2/
  26956. *
  26957. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26958. * liability, trademark and document use rules apply.
  26959. */
  26960. [Exposed=Window]
  26961. interface SVGSwitchElement : SVGGraphicsElement {
  26962. };
  26963. /* ---------------------- SVGSymbolElement ----------------------------- */
  26964. /* ./webidl/SVGSymbolElement.webidl */
  26965. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26966. /* This Source Code Form is subject to the terms of the Mozilla Public
  26967. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26968. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26969. *
  26970. * The origin of this IDL file is
  26971. * http://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSymbolElement
  26972. *
  26973. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26974. * liability, trademark and document use rules apply.
  26975. */
  26976. [Exposed=Window]
  26977. interface SVGSymbolElement : SVGElement {
  26978. };
  26979. SVGSymbolElement includes SVGFitToViewBox;
  26980. SVGSymbolElement includes SVGTests;
  26981. /* ---------------------- SVGTests ----------------------------- */
  26982. /* ./webidl/SVGTests.webidl */
  26983. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  26984. /* This Source Code Form is subject to the terms of the Mozilla Public
  26985. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  26986. * You can obtain one at http://mozilla.org/MPL/2.0/.
  26987. *
  26988. * The origin of this IDL file is
  26989. * http://www.w3.org/TR/SVG2/
  26990. *
  26991. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  26992. * liability, trademark and document use rules apply.
  26993. */
  26994. interface mixin SVGTests {
  26995. readonly attribute SVGStringList requiredExtensions;
  26996. readonly attribute SVGStringList systemLanguage;
  26997. };
  26998. /* ---------------------- SVGTextContentElement ----------------------------- */
  26999. /* ./webidl/SVGTextContentElement.webidl */
  27000. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27001. /* This Source Code Form is subject to the terms of the Mozilla Public
  27002. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27003. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27004. *
  27005. * The origin of this IDL file is
  27006. * http://www.w3.org/TR/SVG2/
  27007. *
  27008. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27009. * liability, trademark and document use rules apply.
  27010. */
  27011. [Exposed=Window]
  27012. interface SVGTextContentElement : SVGGraphicsElement {
  27013. // lengthAdjust Types
  27014. const unsigned short LENGTHADJUST_UNKNOWN = 0;
  27015. const unsigned short LENGTHADJUST_SPACING = 1;
  27016. const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
  27017. [Constant]
  27018. readonly attribute SVGAnimatedLength textLength;
  27019. [Constant]
  27020. readonly attribute SVGAnimatedEnumeration lengthAdjust;
  27021. long getNumberOfChars();
  27022. float getComputedTextLength();
  27023. [Throws]
  27024. float getSubStringLength(unsigned long charnum, unsigned long nchars);
  27025. [Throws]
  27026. SVGPoint getStartPositionOfChar(unsigned long charnum);
  27027. [Throws]
  27028. SVGPoint getEndPositionOfChar(unsigned long charnum);
  27029. [NewObject, Throws]
  27030. SVGRect getExtentOfChar(unsigned long charnum);
  27031. [Throws]
  27032. float getRotationOfChar(unsigned long charnum);
  27033. long getCharNumAtPosition(optional DOMPointInit point = {});
  27034. [Throws]
  27035. undefined selectSubString(unsigned long charnum, unsigned long nchars);
  27036. };
  27037. /* ---------------------- SVGTextElement ----------------------------- */
  27038. /* ./webidl/SVGTextElement.webidl */
  27039. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27040. /* This Source Code Form is subject to the terms of the Mozilla Public
  27041. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27042. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27043. *
  27044. * The origin of this IDL file is
  27045. * http://www.w3.org/TR/SVG2/
  27046. *
  27047. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27048. * liability, trademark and document use rules apply.
  27049. */
  27050. [Exposed=Window]
  27051. interface SVGTextElement : SVGTextPositioningElement {
  27052. };
  27053. /* ---------------------- SVGTextPathElement ----------------------------- */
  27054. /* ./webidl/SVGTextPathElement.webidl */
  27055. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27056. /* This Source Code Form is subject to the terms of the Mozilla Public
  27057. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27058. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27059. *
  27060. * The origin of this IDL file is
  27061. * http://www.w3.org/TR/SVG2/
  27062. *
  27063. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27064. * liability, trademark and document use rules apply.
  27065. */
  27066. [Exposed=Window]
  27067. interface SVGTextPathElement : SVGTextContentElement {
  27068. // textPath Method Types
  27069. const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
  27070. const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
  27071. const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
  27072. // textPath Spacing Types
  27073. const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
  27074. const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
  27075. const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
  27076. [Constant]
  27077. readonly attribute SVGAnimatedLength startOffset;
  27078. [Constant]
  27079. readonly attribute SVGAnimatedEnumeration method;
  27080. [Constant]
  27081. readonly attribute SVGAnimatedEnumeration spacing;
  27082. };
  27083. SVGTextPathElement includes SVGURIReference;
  27084. /* ---------------------- SVGTextPositioningElement ----------------------------- */
  27085. /* ./webidl/SVGTextPositioningElement.webidl */
  27086. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27087. /* This Source Code Form is subject to the terms of the Mozilla Public
  27088. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27089. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27090. *
  27091. * The origin of this IDL file is
  27092. * http://www.w3.org/TR/SVG2/
  27093. *
  27094. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27095. * liability, trademark and document use rules apply.
  27096. */
  27097. [Exposed=Window]
  27098. interface SVGTextPositioningElement : SVGTextContentElement {
  27099. [Constant]
  27100. readonly attribute SVGAnimatedLengthList x;
  27101. [Constant]
  27102. readonly attribute SVGAnimatedLengthList y;
  27103. [Constant]
  27104. readonly attribute SVGAnimatedLengthList dx;
  27105. [Constant]
  27106. readonly attribute SVGAnimatedLengthList dy;
  27107. [Constant]
  27108. readonly attribute SVGAnimatedNumberList rotate;
  27109. };
  27110. /* ---------------------- SVGTitleElement ----------------------------- */
  27111. /* ./webidl/SVGTitleElement.webidl */
  27112. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27113. /* This Source Code Form is subject to the terms of the Mozilla Public
  27114. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27115. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27116. *
  27117. * The origin of this IDL file is
  27118. * http://www.w3.org/TR/SVG2/
  27119. *
  27120. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27121. * liability, trademark and document use rules apply.
  27122. */
  27123. [Exposed=Window]
  27124. interface SVGTitleElement : SVGElement {
  27125. };
  27126. /* ---------------------- SVGTransform ----------------------------- */
  27127. /* ./webidl/SVGTransform.webidl */
  27128. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27129. /* This Source Code Form is subject to the terms of the Mozilla Public
  27130. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27131. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27132. *
  27133. * The origin of this IDL file is
  27134. * http://www.w3.org/TR/SVG2/
  27135. *
  27136. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27137. * liability, trademark and document use rules apply.
  27138. */
  27139. [Exposed=Window]
  27140. interface SVGTransform {
  27141. // Transform Types
  27142. const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
  27143. const unsigned short SVG_TRANSFORM_MATRIX = 1;
  27144. const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
  27145. const unsigned short SVG_TRANSFORM_SCALE = 3;
  27146. const unsigned short SVG_TRANSFORM_ROTATE = 4;
  27147. const unsigned short SVG_TRANSFORM_SKEWX = 5;
  27148. const unsigned short SVG_TRANSFORM_SKEWY = 6;
  27149. readonly attribute unsigned short type;
  27150. [BinaryName="getMatrix"]
  27151. readonly attribute SVGMatrix matrix;
  27152. readonly attribute float angle;
  27153. [Throws]
  27154. undefined setMatrix(optional DOMMatrix2DInit matrix = {});
  27155. [Throws]
  27156. undefined setTranslate(float tx, float ty);
  27157. [Throws]
  27158. undefined setScale(float sx, float sy);
  27159. [Throws]
  27160. undefined setRotate(float angle, float cx, float cy);
  27161. [Throws]
  27162. undefined setSkewX(float angle);
  27163. [Throws]
  27164. undefined setSkewY(float angle);
  27165. };
  27166. /* ---------------------- SVGTransformList ----------------------------- */
  27167. /* ./webidl/SVGTransformList.webidl */
  27168. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27169. /* This Source Code Form is subject to the terms of the Mozilla Public
  27170. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27171. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27172. *
  27173. * The origin of this IDL file is
  27174. * http://www.w3.org/TR/SVG11/
  27175. *
  27176. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27177. * liability, trademark and document use rules apply.
  27178. */
  27179. [Exposed=Window]
  27180. interface SVGTransformList {
  27181. readonly attribute unsigned long numberOfItems;
  27182. [Throws]
  27183. undefined clear();
  27184. [Throws]
  27185. SVGTransform initialize(SVGTransform newItem);
  27186. [Throws]
  27187. getter SVGTransform getItem(unsigned long index);
  27188. [Throws]
  27189. SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index);
  27190. [Throws]
  27191. SVGTransform replaceItem(SVGTransform newItem, unsigned long index);
  27192. [Throws]
  27193. SVGTransform removeItem(unsigned long index);
  27194. [Throws]
  27195. SVGTransform appendItem(SVGTransform newItem);
  27196. [Throws]
  27197. SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
  27198. [Throws]
  27199. SVGTransform? consolidate();
  27200. // Mozilla-specific stuff
  27201. readonly attribute unsigned long length; // synonym for numberOfItems
  27202. };
  27203. /* ---------------------- SVGTSpanElement ----------------------------- */
  27204. /* ./webidl/SVGTSpanElement.webidl */
  27205. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27206. /* This Source Code Form is subject to the terms of the Mozilla Public
  27207. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27208. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27209. *
  27210. * The origin of this IDL file is
  27211. * http://www.w3.org/TR/SVG2/
  27212. *
  27213. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27214. * liability, trademark and document use rules apply.
  27215. */
  27216. [Exposed=Window]
  27217. interface SVGTSpanElement : SVGTextPositioningElement {
  27218. };
  27219. /* ---------------------- SVGUnitTypes ----------------------------- */
  27220. /* ./webidl/SVGUnitTypes.webidl */
  27221. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27222. /* This Source Code Form is subject to the terms of the Mozilla Public
  27223. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27224. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27225. *
  27226. * The origin of this IDL file is
  27227. * https://svgwg.org/svg2-draft/
  27228. *
  27229. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27230. * liability, trademark and document use rules apply.
  27231. */
  27232. [Exposed=Window]
  27233. interface SVGUnitTypes {
  27234. // Unit Types
  27235. const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
  27236. const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
  27237. const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
  27238. };
  27239. /* ---------------------- SVGURIReference ----------------------------- */
  27240. /* ./webidl/SVGURIReference.webidl */
  27241. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27242. /* This Source Code Form is subject to the terms of the Mozilla Public
  27243. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27244. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27245. *
  27246. * The origin of this IDL file is
  27247. * http://www.w3.org/TR/SVG2/
  27248. *
  27249. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27250. * liability, trademark and document use rules apply.
  27251. */
  27252. interface mixin SVGURIReference {
  27253. [Constant]
  27254. readonly attribute SVGAnimatedString href;
  27255. };
  27256. /* ---------------------- SVGUseElement ----------------------------- */
  27257. /* ./webidl/SVGUseElement.webidl */
  27258. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27259. /* This Source Code Form is subject to the terms of the Mozilla Public
  27260. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27261. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27262. *
  27263. * The origin of this IDL file is
  27264. * http://www.w3.org/TR/SVG2/
  27265. *
  27266. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27267. * liability, trademark and document use rules apply.
  27268. */
  27269. [Exposed=Window]
  27270. interface SVGUseElement : SVGGraphicsElement {
  27271. [Constant]
  27272. readonly attribute SVGAnimatedLength x;
  27273. [Constant]
  27274. readonly attribute SVGAnimatedLength y;
  27275. [Constant]
  27276. readonly attribute SVGAnimatedLength width;
  27277. [Constant]
  27278. readonly attribute SVGAnimatedLength height;
  27279. //readonly attribute SVGElementInstance instanceRoot;
  27280. //readonly attribute SVGElementInstance animatedInstanceRoot;
  27281. };
  27282. SVGUseElement includes SVGURIReference;
  27283. /* ---------------------- SVGViewElement ----------------------------- */
  27284. /* ./webidl/SVGViewElement.webidl */
  27285. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27286. /* This Source Code Form is subject to the terms of the Mozilla Public
  27287. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27288. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27289. *
  27290. * The origin of this IDL file is
  27291. * http://www.w3.org/TR/SVG2/
  27292. *
  27293. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27294. * liability, trademark and document use rules apply.
  27295. */
  27296. [Exposed=Window]
  27297. interface SVGViewElement : SVGElement {
  27298. };
  27299. SVGViewElement includes SVGFitToViewBox;
  27300. SVGViewElement includes SVGZoomAndPan;
  27301. /* ---------------------- SVGZoomAndPan ----------------------------- */
  27302. /* ./webidl/SVGZoomAndPan.webidl */
  27303. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27304. /* This Source Code Form is subject to the terms of the Mozilla Public
  27305. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27306. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27307. *
  27308. * The origin of this IDL file is
  27309. * http://www.w3.org/TR/SVG2/
  27310. *
  27311. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  27312. * liability, trademark and document use rules apply.
  27313. */
  27314. interface mixin SVGZoomAndPan {
  27315. // Zoom and Pan Types
  27316. const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
  27317. const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
  27318. const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
  27319. [SetterThrows]
  27320. attribute unsigned short zoomAndPan;
  27321. };
  27322. /* ---------------------- TaskPriorityChangeEvent ----------------------------- */
  27323. /* ./webidl/TaskPriorityChangeEvent.webidl */
  27324. /* This Source Code Form is subject to the terms of the Mozilla Public
  27325. * License, v. 2.0. If a copy of the MPL was not distributed with this
  27326. * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
  27327. [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
  27328. interface TaskPriorityChangeEvent : Event {
  27329. constructor (DOMString type , TaskPriorityChangeEventInit priorityChangeEventInitDict);
  27330. readonly attribute TaskPriority previousPriority;
  27331. };
  27332. dictionary TaskPriorityChangeEventInit : EventInit {
  27333. required TaskPriority previousPriority;
  27334. };
  27335. /* ---------------------- TCPServerSocket ----------------------------- */
  27336. /* ./webidl/TCPServerSocket.webidl */
  27337. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27338. /* This Source Code Form is subject to the terms of the Mozilla Public
  27339. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27340. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  27341. /**
  27342. * TCPServerSocket
  27343. *
  27344. * An interface to a server socket that can accept incoming connections for gaia apps.
  27345. */
  27346. dictionary ServerSocketOptions {
  27347. TCPSocketBinaryType binaryType = "string";
  27348. };
  27349. [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  27350. Exposed=Window]
  27351. interface TCPServerSocket : EventTarget {
  27352. [Throws]
  27353. constructor(unsigned short port, optional ServerSocketOptions options = {},
  27354. optional unsigned short backlog = 0);
  27355. /**
  27356. * The port of this server socket object.
  27357. */
  27358. readonly attribute unsigned short localPort;
  27359. /**
  27360. * The "connect" event is dispatched when a client connection is accepted.
  27361. * The event object will be a TCPServerSocketEvent containing a TCPSocket
  27362. * instance, which is used for communication between client and server.
  27363. */
  27364. attribute EventHandler onconnect;
  27365. /**
  27366. * The "error" event will be dispatched when a listening server socket is
  27367. * unexpectedly disconnected.
  27368. */
  27369. attribute EventHandler onerror;
  27370. /**
  27371. * Close the server socket.
  27372. */
  27373. undefined close();
  27374. };
  27375. /* ---------------------- TCPServerSocketEvent ----------------------------- */
  27376. /* ./webidl/TCPServerSocketEvent.webidl */
  27377. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27378. /* This Source Code Form is subject to the terms of the Mozilla Public
  27379. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27380. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  27381. [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  27382. Exposed=Window]
  27383. interface TCPServerSocketEvent : Event {
  27384. constructor(DOMString type,
  27385. optional TCPServerSocketEventInit eventInitDict = {});
  27386. readonly attribute TCPSocket socket;
  27387. };
  27388. dictionary TCPServerSocketEventInit : EventInit {
  27389. TCPSocket? socket = null;
  27390. };
  27391. /* ---------------------- TCPSocket ----------------------------- */
  27392. /* ./webidl/TCPSocket.webidl */
  27393. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27394. /* This Source Code Form is subject to the terms of the Mozilla Public
  27395. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27396. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  27397. /**
  27398. * TCPSocket exposes a TCP client socket (no server sockets yet)
  27399. * to highly privileged apps. It provides a buffered, non-blocking
  27400. * interface for sending. For receiving, it uses an asynchronous,
  27401. * event handler based interface.
  27402. */
  27403. interface nsISocketTransport;
  27404. enum TCPSocketBinaryType {
  27405. "arraybuffer",
  27406. "string"
  27407. };
  27408. dictionary SocketOptions {
  27409. boolean useSecureTransport = false;
  27410. TCPSocketBinaryType binaryType = "string";
  27411. };
  27412. enum TCPReadyState {
  27413. "connecting",
  27414. "open",
  27415. "closing",
  27416. "closed",
  27417. };
  27418. [LegacyNoInterfaceObject,
  27419. Exposed=Window]
  27420. interface LegacyMozTCPSocket {
  27421. /**
  27422. * Legacy constructor for API compatibility.
  27423. */
  27424. [Throws]
  27425. TCPSocket open(DOMString host, unsigned short port, optional SocketOptions options = {});
  27426. [Throws]
  27427. TCPServerSocket listen(unsigned short port, optional ServerSocketOptions options = {}, optional unsigned short backlog = 0);
  27428. };
  27429. [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  27430. Exposed=Window]
  27431. interface TCPSocket : EventTarget {
  27432. [Throws]
  27433. constructor(DOMString host, unsigned short port,
  27434. optional SocketOptions options = {});
  27435. /**
  27436. * Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN.
  27437. */
  27438. [Throws] undefined upgradeToSecure();
  27439. /**
  27440. * The raw internal socket transport.
  27441. */
  27442. readonly attribute nsISocketTransport? transport;
  27443. /**
  27444. * The UTF16 host of this socket object.
  27445. */
  27446. readonly attribute USVString host;
  27447. /**
  27448. * The port of this socket object.
  27449. */
  27450. readonly attribute unsigned short port;
  27451. /**
  27452. * True if this socket object is an SSL socket.
  27453. */
  27454. readonly attribute boolean ssl;
  27455. /**
  27456. * The number of bytes which have previously been buffered by calls to
  27457. * send on this socket.
  27458. */
  27459. readonly attribute unsigned long long bufferedAmount;
  27460. /**
  27461. * Pause reading incoming data and invocations of the ondata handler until
  27462. * resume is called. Can be called multiple times without resuming.
  27463. */
  27464. undefined suspend();
  27465. /**
  27466. * Resume reading incoming data and invoking ondata as usual. There must be
  27467. * an equal number of resume as suspends that took place. Throws if the
  27468. * socket is not suspended.
  27469. */
  27470. [Throws]
  27471. undefined resume();
  27472. /**
  27473. * Close the socket.
  27474. */
  27475. undefined close();
  27476. /**
  27477. * Close the socket immediately without waiting for unsent data.
  27478. */
  27479. [ChromeOnly] undefined closeImmediately();
  27480. /**
  27481. * Write data to the socket.
  27482. *
  27483. * @param data The data to write to the socket.
  27484. *
  27485. * @return Send returns true or false as a hint to the caller that
  27486. * they may either continue sending more data immediately, or
  27487. * may want to wait until the other side has read some of the
  27488. * data which has already been written to the socket before
  27489. * buffering more. If send returns true, then less than 64k
  27490. * has been buffered and it's safe to immediately write more.
  27491. * If send returns false, then more than 64k has been buffered,
  27492. * and the caller may wish to wait until the ondrain event
  27493. * handler has been called before buffering more data by more
  27494. * calls to send.
  27495. *
  27496. * @throws Throws if the ready state is not OPEN.
  27497. */
  27498. [Throws]
  27499. boolean send(ByteString data);
  27500. /**
  27501. * Write data to the socket.
  27502. *
  27503. * @param data The data to write to the socket.
  27504. * @param byteOffset The offset within the data from which to begin writing.
  27505. * @param byteLength The number of bytes to write.
  27506. * Defaults to the byte length of the ArrayBuffer if not present,
  27507. * and clamped to (length - byteOffset).
  27508. *
  27509. * @return Send returns true or false as a hint to the caller that
  27510. * they may either continue sending more data immediately, or
  27511. * may want to wait until the other side has read some of the
  27512. * data which has already been written to the socket before
  27513. * buffering more. If send returns true, then less than 64k
  27514. * has been buffered and it's safe to immediately write more.
  27515. * If send returns false, then more than 64k has been buffered,
  27516. * and the caller may wish to wait until the ondrain event
  27517. * handler has been called before buffering more data by more
  27518. * calls to send.
  27519. *
  27520. * @throws Throws if the ready state is not OPEN.
  27521. */
  27522. [Throws]
  27523. boolean send(ArrayBuffer data, optional unsigned long byteOffset = 0, optional unsigned long byteLength);
  27524. /**
  27525. * The readyState attribute indicates which state the socket is currently
  27526. * in.
  27527. */
  27528. readonly attribute TCPReadyState readyState;
  27529. /**
  27530. * The binaryType attribute indicates which mode this socket uses for
  27531. * sending and receiving data. If the binaryType: "arraybuffer" option
  27532. * was passed to the open method that created this socket, binaryType
  27533. * will be "arraybuffer". Otherwise, it will be "string".
  27534. */
  27535. readonly attribute TCPSocketBinaryType binaryType;
  27536. /**
  27537. * The "open" event is dispatched when the connection to the server
  27538. * has been established. If the connection is refused, the "error" event
  27539. * will be dispatched, instead.
  27540. */
  27541. attribute EventHandler onopen;
  27542. /**
  27543. * After send has buffered more than 64k of data, it returns false to
  27544. * indicate that the client should pause before sending more data, to
  27545. * avoid accumulating large buffers. This is only advisory, and the client
  27546. * is free to ignore it and buffer as much data as desired, but if reducing
  27547. * the size of buffers is important (especially for a streaming application)
  27548. * the "drain" event will be dispatched once the previously-buffered data has
  27549. * been written to the network, at which point the client can resume calling
  27550. * send again.
  27551. */
  27552. attribute EventHandler ondrain;
  27553. /**
  27554. * The "data" event will be dispatched repeatedly and asynchronously after
  27555. * "open" is dispatched, every time some data was available from the server
  27556. * and was read. The event object will be a TCPSocketEvent; if the "arraybuffer"
  27557. * binaryType was passed to the constructor, the data attribute of the event
  27558. * object will be an ArrayBuffer. If not, it will be a normal JavaScript string,
  27559. * truncated at the first null byte found in the payload and the remainder
  27560. * interpreted as ASCII bytes.
  27561. *
  27562. * At any time, the client may choose to pause reading and receiving "data"
  27563. * events by calling the socket's suspend() method. Further "data" events
  27564. * will be paused until resume() is called.
  27565. */
  27566. attribute EventHandler ondata;
  27567. /**
  27568. * The "error" event will be dispatched when there is an error. The event
  27569. * object will be a TCPSocketErrorEvent.
  27570. *
  27571. * If an "error" event is dispatched before an "open" one, the connection
  27572. * was refused, and the "close" event will not be dispatched. If an "error"
  27573. * event is dispatched after an "open" event, the connection was lost,
  27574. * and a "close" event will be dispatched subsequently.
  27575. */
  27576. attribute EventHandler onerror;
  27577. /**
  27578. * The "close" event is dispatched once the underlying network socket
  27579. * has been closed, either by the server, or by the client calling
  27580. * close.
  27581. *
  27582. * If the "error" event was not dispatched before "close", then one of
  27583. * the sides cleanly closed the connection.
  27584. */
  27585. attribute EventHandler onclose;
  27586. };
  27587. /* ---------------------- TCPSocketErrorEvent ----------------------------- */
  27588. /* ./webidl/TCPSocketErrorEvent.webidl */
  27589. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27590. /* This Source Code Form is subject to the terms of the Mozilla Public
  27591. * License, v. 2.0. If a copy of the MPL was not distributed with this
  27592. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  27593. /* Dispatched as part of the "error" event in the following situations:
  27594. * - if there's an error detected when the TCPSocket closes
  27595. * - if there's an internal error while sending data
  27596. * - if there's an error connecting to the host
  27597. */
  27598. [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  27599. Exposed=Window]
  27600. interface TCPSocketErrorEvent : Event {
  27601. constructor(DOMString type,
  27602. optional TCPSocketErrorEventInit eventInitDict = {});
  27603. readonly attribute DOMString name;
  27604. readonly attribute DOMString message;
  27605. readonly attribute unsigned long errorCode; // The internal nsresult error code.
  27606. };
  27607. dictionary TCPSocketErrorEventInit : EventInit
  27608. {
  27609. DOMString name = "";
  27610. DOMString message = "";
  27611. unsigned long errorCode = 0;
  27612. };
  27613. /* ---------------------- TCPSocketEvent ----------------------------- */
  27614. /* ./webidl/TCPSocketEvent.webidl */
  27615. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27616. /* This Source Code Form is subject to the terms of the Mozilla Public
  27617. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27618. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  27619. /**
  27620. * TCPSocketEvent is the event dispatched for all of the events described by TCPSocket,
  27621. * except the "error" event. It contains the socket that was associated with the event,
  27622. * the type of event, and the data associated with the event if the event is a "data" event.
  27623. */
  27624. [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
  27625. Exposed=Window]
  27626. interface TCPSocketEvent : Event {
  27627. constructor(DOMString type, optional TCPSocketEventInit eventInitDict = {});
  27628. /**
  27629. * If the event is a "data" event, data will be the bytes read from the network;
  27630. * if the binaryType of the socket was "arraybuffer", this value will be of type
  27631. * ArrayBuffer, otherwise, it will be a ByteString.
  27632. *
  27633. * For other events, data will be an empty string.
  27634. */
  27635. //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
  27636. readonly attribute any data;
  27637. };
  27638. dictionary TCPSocketEventInit : EventInit {
  27639. //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
  27640. any data = null;
  27641. };
  27642. /* ---------------------- TestFunctions ----------------------------- */
  27643. /* ./webidl/TestFunctions.webidl */
  27644. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27645. /* This Source Code Form is subject to the terms of the Mozilla Public
  27646. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27647. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27648. */
  27649. // A dumping ground for random testing functions
  27650. callback PromiseReturner = Promise<any>();
  27651. callback PromiseReturner2 = Promise<any>(any arg, DOMString arg2);
  27652. [Pref="dom.expose_test_interfaces",
  27653. Exposed=Window]
  27654. interface WrapperCachedNonISupportsTestInterface {
  27655. [Pref="dom.webidl.test1"] constructor();
  27656. };
  27657. [Trial="TestTrial", Exposed=*]
  27658. interface TestTrialInterface {
  27659. constructor();
  27660. };
  27661. [Pref="dom.expose_test_interfaces",
  27662. Exposed=Window]
  27663. interface TestInterfaceLength {
  27664. [ChromeOnly]
  27665. constructor(boolean arg);
  27666. };
  27667. // The type of string C++ sees.
  27668. enum StringType {
  27669. "literal", // A string with the LITERAL flag.
  27670. "stringbuffer", // A string with the REFCOUNTED flag.
  27671. "inline", // A string with the INLINE flag.
  27672. "other", // Anything else.
  27673. };
  27674. [Pref="dom.expose_test_interfaces",
  27675. Exposed=Window]
  27676. interface TestFunctions {
  27677. constructor();
  27678. [Throws]
  27679. static undefined throwUncatchableException();
  27680. // Simply returns its argument. Can be used to test Promise
  27681. // argument processing behavior.
  27682. static Promise<any> passThroughPromise(Promise<any> arg);
  27683. // Returns whatever Promise the given PromiseReturner returned.
  27684. [Throws]
  27685. static Promise<any> passThroughCallbackPromise(PromiseReturner callback);
  27686. // Some basic tests for string binding round-tripping behavior.
  27687. undefined setStringData(DOMString arg);
  27688. // Get the string data, using an nsAString argument on the C++ side.
  27689. // This will just use Assign/operator=, whatever that does.
  27690. DOMString getStringDataAsAString();
  27691. // Get the string data, but only "length" chars of it, using an
  27692. // nsAString argument on the C++ side. This will always copy on the
  27693. // C++ side.
  27694. DOMString getStringDataAsAString(unsigned long length);
  27695. // Get the string data, but only "length" chars of it, using a
  27696. // DOMString argument on the C++ side and trying to hand it
  27697. // stringbuffers. If length not passed, use our full length.
  27698. DOMString getStringDataAsDOMString(optional unsigned long length);
  27699. // Get a short (short enough to fit in a JS inline string) literal string.
  27700. DOMString getShortLiteralString();
  27701. // Get a medium (long enough to not be a JS inline, but short enough
  27702. // to fit in a FakeString inline buffer) literal string.
  27703. DOMString getMediumLiteralString();
  27704. // Get a long (long enough to not fit in any inline buffers) literal string.
  27705. DOMString getLongLiteralString();
  27706. // Get a stringbuffer string for whatever string is passed in.
  27707. DOMString getStringbufferString(DOMString input);
  27708. // Get the type of string that the C++ sees after going through bindings.
  27709. StringType getStringType(DOMString str);
  27710. // Returns true if both the incoming string and the stored (via setStringData())
  27711. // string have stringbuffers and they're the same stringbuffer.
  27712. boolean stringbufferMatchesStored(DOMString str);
  27713. // Functions that just punch through to mozITestInterfaceJS.idl
  27714. [Throws]
  27715. undefined testThrowNsresult();
  27716. [Throws]
  27717. undefined testThrowNsresultFromNative();
  27718. // Throws an InvalidStateError to auto-create a rejected promise.
  27719. [Throws]
  27720. static Promise<any> throwToRejectPromise();
  27721. // Some attributes for the toJSON to work with.
  27722. readonly attribute long one;
  27723. [Func="mozilla::dom::TestFunctions::ObjectFromAboutBlank"]
  27724. readonly attribute long two;
  27725. // Testing for how default toJSON behaves.
  27726. [Default] object toJSON();
  27727. // This returns a wrappercached non-ISupports object. While this will always
  27728. // return the same object, no optimization attributes like [Pure] should be
  27729. // used here because the object should not be held alive from JS by the
  27730. // bindings. This is needed to test wrapper preservation for weak map keys.
  27731. // See bug 1351501.
  27732. readonly attribute WrapperCachedNonISupportsTestInterface wrapperCachedNonISupportsObject;
  27733. attribute [Clamp] octet? clampedNullableOctet;
  27734. attribute [EnforceRange] octet? enforcedNullableOctet;
  27735. // Testing for [AllowShared]
  27736. [GetterThrows]
  27737. attribute ArrayBufferView arrayBufferView;
  27738. [GetterThrows]
  27739. attribute [AllowShared] ArrayBufferView allowSharedArrayBufferView;
  27740. [Cached, Pure, GetterThrows]
  27741. attribute sequence<ArrayBufferView> sequenceOfArrayBufferView;
  27742. [Cached, Pure, GetterThrows]
  27743. attribute sequence<[AllowShared] ArrayBufferView> sequenceOfAllowSharedArrayBufferView;
  27744. [GetterThrows]
  27745. attribute ArrayBuffer arrayBuffer;
  27746. [GetterThrows]
  27747. attribute [AllowShared] ArrayBuffer allowSharedArrayBuffer;
  27748. [Cached, Pure, GetterThrows]
  27749. attribute sequence<ArrayBuffer> sequenceOfArrayBuffer;
  27750. [Cached, Pure, GetterThrows]
  27751. attribute sequence<[AllowShared] ArrayBuffer> sequenceOfAllowSharedArrayBuffer;
  27752. undefined testNotAllowShared(ArrayBufferView buffer);
  27753. undefined testNotAllowShared(ArrayBuffer buffer);
  27754. undefined testNotAllowShared(DOMString buffer);
  27755. undefined testAllowShared([AllowShared] ArrayBufferView buffer);
  27756. undefined testAllowShared([AllowShared] ArrayBuffer buffer);
  27757. undefined testDictWithAllowShared(optional DictWithAllowSharedBufferSource buffer = {});
  27758. undefined testUnionOfBuffferSource((ArrayBuffer or ArrayBufferView or DOMString) foo);
  27759. undefined testUnionOfAllowSharedBuffferSource(([AllowShared] ArrayBuffer or [AllowShared] ArrayBufferView) foo);
  27760. boolean staticAndNonStaticOverload();
  27761. static boolean staticAndNonStaticOverload(optional unsigned long foo);
  27762. };
  27763. dictionary DictWithAllowSharedBufferSource {
  27764. ArrayBuffer arrayBuffer;
  27765. ArrayBufferView arrayBufferView;
  27766. [AllowShared] ArrayBuffer allowSharedArrayBuffer;
  27767. [AllowShared] ArrayBufferView allowSharedArrayBufferView;
  27768. };
  27769. /* ---------------------- TestInterfaceJS ----------------------------- */
  27770. /* ./webidl/TestInterfaceJS.webidl */
  27771. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27772. /* This Source Code Form is subject to the terms of the Mozilla Public
  27773. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27774. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27775. */
  27776. dictionary TestInterfaceJSUnionableDictionary {
  27777. object objectMember;
  27778. any anyMember;
  27779. };
  27780. [JSImplementation="@mozilla.org/dom/test-interface-js;1",
  27781. Pref="dom.expose_test_interfaces",
  27782. Exposed=Window]
  27783. interface TestInterfaceJS : EventTarget {
  27784. [Throws]
  27785. constructor(optional any anyArg, optional object objectArg,
  27786. optional TestInterfaceJSDictionary dictionaryArg = {});
  27787. readonly attribute any anyArg;
  27788. readonly attribute object objectArg;
  27789. TestInterfaceJSDictionary getDictionaryArg();
  27790. attribute any anyAttr;
  27791. attribute object objectAttr;
  27792. TestInterfaceJSDictionary getDictionaryAttr();
  27793. undefined setDictionaryAttr(optional TestInterfaceJSDictionary dict = {});
  27794. any pingPongAny(any arg);
  27795. object pingPongObject(object obj);
  27796. any pingPongObjectOrString((object or DOMString) objOrString);
  27797. TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict = {});
  27798. long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong = {});
  27799. DOMString pingPongRecord(record<DOMString, any> rec);
  27800. long objectSequenceLength(sequence<object> seq);
  27801. long anySequenceLength(sequence<any> seq);
  27802. // For testing bug 968335.
  27803. DOMString getCallerPrincipal();
  27804. DOMString convertSVS(USVString svs);
  27805. (TestInterfaceJS or long) pingPongUnion((TestInterfaceJS or long) something);
  27806. (DOMString or TestInterfaceJS?) pingPongUnionContainingNull((TestInterfaceJS? or DOMString) something);
  27807. (TestInterfaceJS or long)? pingPongNullableUnion((TestInterfaceJS or long)? something);
  27808. (Location or TestInterfaceJS) returnBadUnion();
  27809. // Test for sequence overloading and union behavior
  27810. undefined testSequenceOverload(sequence<DOMString> arg);
  27811. undefined testSequenceOverload(DOMString arg);
  27812. undefined testSequenceUnion((sequence<DOMString> or DOMString) arg);
  27813. // Tests for exception-throwing behavior
  27814. [Throws]
  27815. undefined testThrowError();
  27816. [Throws]
  27817. undefined testThrowDOMException();
  27818. [Throws]
  27819. undefined testThrowTypeError();
  27820. [Throws]
  27821. undefined testThrowCallbackError(Function callback);
  27822. [Throws]
  27823. undefined testThrowXraySelfHosted();
  27824. [Throws]
  27825. undefined testThrowSelfHosted();
  27826. // Tests for promise-rejection behavior
  27827. Promise<undefined> testPromiseWithThrowingChromePromiseInit();
  27828. Promise<undefined> testPromiseWithThrowingContentPromiseInit(Function func);
  27829. Promise<undefined> testPromiseWithDOMExceptionThrowingPromiseInit();
  27830. Promise<undefined> testPromiseWithThrowingChromeThenFunction();
  27831. Promise<undefined> testPromiseWithThrowingContentThenFunction(AnyCallback func);
  27832. Promise<undefined> testPromiseWithDOMExceptionThrowingThenFunction();
  27833. Promise<undefined> testPromiseWithThrowingChromeThenable();
  27834. Promise<undefined> testPromiseWithThrowingContentThenable(object thenable);
  27835. Promise<undefined> testPromiseWithDOMExceptionThrowingThenable();
  27836. // Event handler tests
  27837. attribute EventHandler onsomething;
  27838. };
  27839. /* ---------------------- TestInterfaceJSDictionaries ----------------------------- */
  27840. /* ./webidl/TestInterfaceJSDictionaries.webidl */
  27841. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27842. /* This Source Code Form is subject to the terms of the Mozilla Public
  27843. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27844. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27845. */
  27846. //
  27847. // These dictionaries are in a separate WebIDL file to avoid circular include
  27848. // problems. One of the dictionary includes a union as a member, so that
  27849. // dictionary's header needs to include UnionTypes.h. But the API in
  27850. // TestInterfaceJS also declares a union of dictionaries, so _that_
  27851. // dictionary's header needs to be included _by_ UnionTypes.h. The solution
  27852. // is to separate those two dictionaries into separate header files.
  27853. //
  27854. dictionary TestInterfaceJSDictionary2 {
  27855. object innerObject;
  27856. };
  27857. dictionary TestInterfaceJSDictionary {
  27858. TestInterfaceJSDictionary2 innerDictionary;
  27859. object objectMember;
  27860. any anyMember;
  27861. (object or DOMString) objectOrStringMember;
  27862. sequence<any> anySequenceMember;
  27863. record<DOMString, object> objectRecordMember;
  27864. };
  27865. /* ---------------------- TestInterfaceJSMaplikeSetlikeIterable ----------------------------- */
  27866. /* ./webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl */
  27867. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27868. /* This Source Code Form is subject to the terms of the Mozilla Public
  27869. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27870. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27871. */
  27872. [Pref="dom.expose_test_interfaces",
  27873. Exposed=Window]
  27874. interface TestInterfaceMaplike {
  27875. [Throws]
  27876. constructor();
  27877. maplike<DOMString, long>;
  27878. undefined setInternal(DOMString aKey, long aValue);
  27879. undefined clearInternal();
  27880. boolean deleteInternal(DOMString aKey);
  27881. boolean hasInternal(DOMString aKey);
  27882. [Throws]
  27883. long getInternal(DOMString aKey);
  27884. };
  27885. [Pref="dom.expose_test_interfaces",
  27886. Exposed=Window]
  27887. interface TestInterfaceMaplikeObject {
  27888. [Throws]
  27889. constructor();
  27890. readonly maplike<DOMString, TestInterfaceMaplike>;
  27891. undefined setInternal(DOMString aKey);
  27892. undefined clearInternal();
  27893. boolean deleteInternal(DOMString aKey);
  27894. boolean hasInternal(DOMString aKey);
  27895. [Throws]
  27896. TestInterfaceMaplike? getInternal(DOMString aKey);
  27897. };
  27898. [Pref="dom.expose_test_interfaces",
  27899. Exposed=Window]
  27900. interface TestInterfaceMaplikeJSObject {
  27901. [Throws]
  27902. constructor();
  27903. readonly maplike<DOMString, object>;
  27904. undefined setInternal(DOMString aKey, object aObject);
  27905. undefined clearInternal();
  27906. boolean deleteInternal(DOMString aKey);
  27907. boolean hasInternal(DOMString aKey);
  27908. [Throws]
  27909. object? getInternal(DOMString aKey);
  27910. };
  27911. [Pref="dom.expose_test_interfaces",
  27912. Exposed=Window]
  27913. interface TestInterfaceSetlike {
  27914. [Throws]
  27915. constructor();
  27916. setlike<DOMString>;
  27917. };
  27918. [Pref="dom.expose_test_interfaces",
  27919. Exposed=Window]
  27920. interface TestInterfaceSetlikeNode {
  27921. [Throws]
  27922. constructor();
  27923. setlike<Node>;
  27924. };
  27925. [Pref="dom.expose_test_interfaces",
  27926. Exposed=Window]
  27927. interface TestInterfaceIterableSingle {
  27928. [Throws]
  27929. constructor();
  27930. iterable<long>;
  27931. getter long(unsigned long index);
  27932. readonly attribute unsigned long length;
  27933. };
  27934. [Pref="dom.expose_test_interfaces",
  27935. Exposed=Window]
  27936. interface TestInterfaceIterableDouble {
  27937. [Throws]
  27938. constructor();
  27939. iterable<DOMString, DOMString>;
  27940. };
  27941. [Pref="dom.expose_test_interfaces",
  27942. Exposed=Window]
  27943. interface TestInterfaceIterableDoubleUnion {
  27944. [Throws]
  27945. constructor();
  27946. iterable<DOMString, (DOMString or long)>;
  27947. };
  27948. dictionary TestInterfaceAsyncIterableSingleOptions {
  27949. boolean failToInit = false;
  27950. };
  27951. [Pref="dom.expose_test_interfaces",
  27952. Exposed=Window]
  27953. interface TestInterfaceAsyncIterableSingle {
  27954. [Throws]
  27955. constructor(optional TestInterfaceAsyncIterableSingleOptions options = {});
  27956. async iterable<long>;
  27957. };
  27958. callback TestThrowingCallback = undefined();
  27959. dictionary TestInterfaceAsyncIteratorOptions {
  27960. unsigned long multiplier = 1;
  27961. sequence<Promise<any>> blockingPromises = [];
  27962. unsigned long failNextAfter = 4294967295;
  27963. boolean throwFromNext = false;
  27964. TestThrowingCallback throwFromReturn;
  27965. };
  27966. [Pref="dom.expose_test_interfaces",
  27967. Exposed=Window]
  27968. interface TestInterfaceAsyncIterableSingleWithArgs {
  27969. [Throws]
  27970. constructor();
  27971. [GenerateReturnMethod]
  27972. async iterable<long>(optional TestInterfaceAsyncIteratorOptions options = {});
  27973. readonly attribute long returnCallCount;
  27974. readonly attribute any returnLastCalledWith;
  27975. };
  27976. [Pref="dom.expose_test_interfaces",
  27977. Exposed=Window]
  27978. interface TestInterfaceAsyncIterableDouble {
  27979. [Throws]
  27980. constructor();
  27981. async iterable<DOMString, DOMString>;
  27982. };
  27983. [Pref="dom.expose_test_interfaces",
  27984. Exposed=Window]
  27985. interface TestInterfaceAsyncIterableDoubleUnion {
  27986. [Throws]
  27987. constructor();
  27988. async iterable<DOMString, (DOMString or long)>;
  27989. };
  27990. /* ---------------------- TestInterfaceObservableArray ----------------------------- */
  27991. /* ./webidl/TestInterfaceObservableArray.webidl */
  27992. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  27993. /* This Source Code Form is subject to the terms of the Mozilla Public
  27994. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  27995. * You can obtain one at http://mozilla.org/MPL/2.0/.
  27996. */
  27997. callback SetDeleteObjectCallback = undefined (object value, unsigned long index);
  27998. callback SetDeleteBooleanCallback = undefined (boolean value, unsigned long index);
  27999. callback SetDeleteInterfaceCallback = undefined (TestInterfaceObservableArray value, unsigned long index);
  28000. dictionary ObservableArrayCallbacks {
  28001. SetDeleteObjectCallback setObjectCallback;
  28002. SetDeleteObjectCallback deleteObjectCallback;
  28003. SetDeleteBooleanCallback setBooleanCallback;
  28004. SetDeleteBooleanCallback deleteBooleanCallback;
  28005. SetDeleteInterfaceCallback setInterfaceCallback;
  28006. SetDeleteInterfaceCallback deleteInterfaceCallback;
  28007. };
  28008. [Pref="dom.expose_test_interfaces",
  28009. Exposed=Window]
  28010. interface TestInterfaceObservableArray {
  28011. [Throws]
  28012. constructor(optional ObservableArrayCallbacks callbacks = {});
  28013. // Testing for ObservableArray
  28014. attribute ObservableArray<boolean> observableArrayBoolean;
  28015. attribute ObservableArray<object> observableArrayObject;
  28016. attribute ObservableArray<TestInterfaceObservableArray> observableArrayInterface;
  28017. // Tests for C++ helper function
  28018. [Throws]
  28019. boolean booleanElementAtInternal(unsigned long index);
  28020. [Throws]
  28021. TestInterfaceObservableArray interfaceElementAtInternal(unsigned long index);
  28022. [Throws]
  28023. object objectElementAtInternal(unsigned long index);
  28024. [Throws]
  28025. undefined booleanReplaceElementAtInternal(unsigned long index, boolean value);
  28026. [Throws]
  28027. undefined interfaceReplaceElementAtInternal(unsigned long index, TestInterfaceObservableArray value);
  28028. [Throws]
  28029. undefined objectReplaceElementAtInternal(unsigned long index, object value);
  28030. [Throws]
  28031. undefined booleanAppendElementInternal(boolean value);
  28032. [Throws]
  28033. undefined interfaceAppendElementInternal(TestInterfaceObservableArray value);
  28034. [Throws]
  28035. undefined objectAppendElementInternal(object value);
  28036. [Throws]
  28037. undefined booleanRemoveLastElementInternal();
  28038. [Throws]
  28039. undefined interfaceRemoveLastElementInternal();
  28040. [Throws]
  28041. undefined objectRemoveLastElementInternal();
  28042. [Throws]
  28043. unsigned long booleanLengthInternal();
  28044. [Throws]
  28045. unsigned long interfaceLengthInternal();
  28046. [Throws]
  28047. unsigned long objectLengthInternal();
  28048. };
  28049. /* ---------------------- TestUtils ----------------------------- */
  28050. /* ./webidl/TestUtils.webidl */
  28051. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28052. /* This Source Code Form is subject to the terms of the Mozilla Public
  28053. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28054. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28055. *
  28056. * The origin of this IDL file is
  28057. * https://testutils.spec.whatwg.org/#the-testutils-namespace
  28058. */
  28059. [Exposed=(Window,Worker),
  28060. Pref="dom.testing.testutils.enabled"]
  28061. namespace TestUtils {
  28062. [NewObject, Throws] Promise<undefined> gc();
  28063. };
  28064. /* ---------------------- Text ----------------------------- */
  28065. /* ./webidl/Text.webidl */
  28066. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28067. /* This Source Code Form is subject to the terms of the Mozilla Public
  28068. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28069. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28070. *
  28071. * The origin of this IDL file is
  28072. * http://www.w3.org/TR/2012/WD-dom-20120105/
  28073. *
  28074. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28075. * liability, trademark and document use rules apply.
  28076. */
  28077. [Exposed=Window, ProbablyShortLivingWrapper]
  28078. interface Text : CharacterData {
  28079. [Throws]
  28080. constructor(optional DOMString data = "");
  28081. [Throws]
  28082. Text splitText(unsigned long offset);
  28083. readonly attribute DOMString wholeText;
  28084. };
  28085. partial interface Text {
  28086. [BinaryName="assignedSlotByMode"]
  28087. readonly attribute HTMLSlotElement? assignedSlot;
  28088. [ChromeOnly, BinaryName="assignedSlot"]
  28089. readonly attribute HTMLSlotElement? openOrClosedAssignedSlot;
  28090. };
  28091. Text includes GeometryUtils;
  28092. /* ---------------------- TextClause ----------------------------- */
  28093. /* ./webidl/TextClause.webidl */
  28094. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28095. /* This Source Code Form is subject to the terms of the Mozilla Public
  28096. * License, v. 2.0. If a copy of the MPL was not distributed with this
  28097. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  28098. */
  28099. [ChromeOnly,
  28100. Exposed=Window]
  28101. interface TextClause
  28102. {
  28103. // The start offset of TextClause
  28104. readonly attribute long startOffset;
  28105. // The end offset of TextClause
  28106. readonly attribute long endOffset;
  28107. // If the TextClause is Caret or not
  28108. readonly attribute boolean isCaret;
  28109. // If the TextClause is TargetClause or not
  28110. readonly attribute boolean isTargetClause;
  28111. };
  28112. /* ---------------------- TextDecoder ----------------------------- */
  28113. /* ./webidl/TextDecoder.webidl */
  28114. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28115. /* This Source Code Form is subject to the terms of the Mozilla Public
  28116. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28117. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28118. *
  28119. * The origin of this IDL file is
  28120. * http://encoding.spec.whatwg.org/#interface-textdecoder
  28121. */
  28122. interface mixin TextDecoderCommon {
  28123. [Constant]
  28124. readonly attribute DOMString encoding;
  28125. [Constant]
  28126. readonly attribute boolean fatal;
  28127. [Constant]
  28128. readonly attribute boolean ignoreBOM;
  28129. };
  28130. [Exposed=(Window,Worker)]
  28131. interface TextDecoder {
  28132. [Throws]
  28133. constructor(optional DOMString label = "utf-8",
  28134. optional TextDecoderOptions options = {});
  28135. [Throws]
  28136. USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
  28137. };
  28138. TextDecoder includes TextDecoderCommon;
  28139. dictionary TextDecoderOptions {
  28140. boolean fatal = false;
  28141. boolean ignoreBOM = false;
  28142. };
  28143. dictionary TextDecodeOptions {
  28144. boolean stream = false;
  28145. };
  28146. /* ---------------------- TextDecoderStream ----------------------------- */
  28147. /* ./webidl/TextDecoderStream.webidl */
  28148. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28149. /* This Source Code Form is subject to the terms of the Mozilla Public
  28150. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28151. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28152. *
  28153. * The origin of this IDL file is
  28154. * http://encoding.spec.whatwg.org/#interface-textdecoderstream
  28155. */
  28156. [Exposed=*]
  28157. interface TextDecoderStream {
  28158. [Throws]
  28159. constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
  28160. };
  28161. TextDecoderStream includes TextDecoderCommon;
  28162. TextDecoderStream includes GenericTransformStream;
  28163. /* ---------------------- TextEncoder ----------------------------- */
  28164. /* ./webidl/TextEncoder.webidl */
  28165. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28166. /* This Source Code Form is subject to the terms of the Mozilla Public
  28167. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28168. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28169. *
  28170. * The origin of this IDL file is
  28171. * http://encoding.spec.whatwg.org/#interface-textencoder
  28172. */
  28173. interface mixin TextEncoderCommon {
  28174. /*
  28175. * This is DOMString in the spec, but the value is always ASCII
  28176. * and short. By declaring this as ByteString, we get the same
  28177. * end result (storage as inline Latin1 string in SpiderMonkey)
  28178. * with fewer conversions.
  28179. */
  28180. [Constant]
  28181. readonly attribute ByteString encoding;
  28182. };
  28183. dictionary TextEncoderEncodeIntoResult {
  28184. unsigned long long read;
  28185. unsigned long long written;
  28186. };
  28187. [Exposed=(Window,Worker)]
  28188. interface TextEncoder {
  28189. constructor();
  28190. /*
  28191. * This is spec-wise USVString but marking it as UTF8String as an
  28192. * optimization. (The SpiderMonkey-provided conversion to UTF-8 takes care of
  28193. * replacing lone surrogates with the REPLACEMENT CHARACTER, so the
  28194. * observable behavior of USVString is matched.)
  28195. */
  28196. [NewObject, Throws]
  28197. Uint8Array encode(optional UTF8String input = "");
  28198. /*
  28199. * The same comment about UTF8String as above applies here with JSString.
  28200. *
  28201. * We use JSString because we don't want to encode the full string, just as
  28202. * much as the capacity of the Uint8Array.
  28203. */
  28204. [CanOOM]
  28205. TextEncoderEncodeIntoResult encodeInto(JSString source, Uint8Array destination);
  28206. };
  28207. TextEncoder includes TextEncoderCommon;
  28208. /* ---------------------- TextEncoderStream ----------------------------- */
  28209. /* ./webidl/TextEncoderStream.webidl */
  28210. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28211. /* This Source Code Form is subject to the terms of the Mozilla Public
  28212. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28213. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28214. *
  28215. * The origin of this IDL file is
  28216. * http://encoding.spec.whatwg.org/#interface-textdecoderstream
  28217. */
  28218. [Exposed=*]
  28219. interface TextEncoderStream {
  28220. [Throws]
  28221. constructor();
  28222. };
  28223. TextEncoderStream includes TextEncoderCommon;
  28224. TextEncoderStream includes GenericTransformStream;
  28225. /* ---------------------- TextTrack ----------------------------- */
  28226. /* ./webidl/TextTrack.webidl */
  28227. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28228. /* This Source Code Form is subject to the terms of the Mozilla Public
  28229. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28230. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28231. *
  28232. * The origin of this IDL file is
  28233. * http://www.whatwg.org/specs/web-apps/current-work/#texttrack
  28234. */
  28235. enum TextTrackKind {
  28236. "subtitles",
  28237. "captions",
  28238. "descriptions",
  28239. "chapters",
  28240. "metadata"
  28241. };
  28242. enum TextTrackMode {
  28243. "disabled",
  28244. "hidden",
  28245. "showing"
  28246. };
  28247. [Exposed=Window]
  28248. interface TextTrack : EventTarget {
  28249. readonly attribute TextTrackKind kind;
  28250. readonly attribute DOMString label;
  28251. readonly attribute DOMString language;
  28252. readonly attribute DOMString id;
  28253. readonly attribute DOMString inBandMetadataTrackDispatchType;
  28254. attribute TextTrackMode mode;
  28255. readonly attribute TextTrackCueList? cues;
  28256. readonly attribute TextTrackCueList? activeCues;
  28257. undefined addCue(VTTCue cue);
  28258. [Throws]
  28259. undefined removeCue(VTTCue cue);
  28260. attribute EventHandler oncuechange;
  28261. };
  28262. // Mozilla Extensions
  28263. partial interface TextTrack {
  28264. [ChromeOnly]
  28265. readonly attribute TextTrackList? textTrackList;
  28266. };
  28267. /* ---------------------- TextTrackCue ----------------------------- */
  28268. /* ./webidl/TextTrackCue.webidl */
  28269. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28270. /* This Source Code Form is subject to the terms of the Mozilla Public
  28271. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28272. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28273. *
  28274. * The origin of this IDL file is
  28275. * https://html.spec.whatwg.org/#texttrackcue
  28276. */
  28277. [Exposed=Window]
  28278. interface TextTrackCue : EventTarget {
  28279. readonly attribute TextTrack? track;
  28280. attribute DOMString id;
  28281. attribute double startTime;
  28282. attribute double endTime;
  28283. attribute boolean pauseOnExit;
  28284. attribute EventHandler onenter;
  28285. attribute EventHandler onexit;
  28286. };
  28287. /* ---------------------- TextTrackCueList ----------------------------- */
  28288. /* ./webidl/TextTrackCueList.webidl */
  28289. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28290. /* This Source Code Form is subject to the terms of the Mozilla Public
  28291. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28292. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28293. *
  28294. * The origin of this IDL file is
  28295. * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcuelist
  28296. */
  28297. [Exposed=Window]
  28298. interface TextTrackCueList {
  28299. readonly attribute unsigned long length;
  28300. getter VTTCue (unsigned long index);
  28301. VTTCue? getCueById(DOMString id);
  28302. };
  28303. /* ---------------------- TextTrackList ----------------------------- */
  28304. /* ./webidl/TextTrackList.webidl */
  28305. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28306. /* This Source Code Form is subject to the terms of the Mozilla Public
  28307. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28308. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28309. *
  28310. * The origin of this IDL file is
  28311. * http://www.whatwg.org/specs/web-apps/current-work/#texttracklist
  28312. */
  28313. [Exposed=Window]
  28314. interface TextTrackList : EventTarget {
  28315. readonly attribute unsigned long length;
  28316. getter TextTrack (unsigned long index);
  28317. TextTrack? getTrackById(DOMString id);
  28318. attribute EventHandler onchange;
  28319. attribute EventHandler onaddtrack;
  28320. attribute EventHandler onremovetrack;
  28321. };
  28322. // Mozilla extensions
  28323. partial interface TextTrackList {
  28324. [ChromeOnly]
  28325. readonly attribute HTMLMediaElement? mediaElement;
  28326. };
  28327. /* ---------------------- TimeEvent ----------------------------- */
  28328. /* ./webidl/TimeEvent.webidl */
  28329. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28330. /* This Source Code Form is subject to the terms of the Mozilla Public
  28331. * License, v. 2.0. If a copy of the MPL was not distributed with this
  28332. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  28333. *
  28334. * For more information on this interface please see
  28335. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  28336. *
  28337. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28338. * liability, trademark and document use rules apply.
  28339. */
  28340. [Exposed=Window]
  28341. interface TimeEvent : Event
  28342. {
  28343. readonly attribute long detail;
  28344. readonly attribute WindowProxy? view;
  28345. undefined initTimeEvent(DOMString aType,
  28346. optional Window? aView = null,
  28347. optional long aDetail = 0);
  28348. };
  28349. /* ---------------------- TimeRanges ----------------------------- */
  28350. /* ./webidl/TimeRanges.webidl */
  28351. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28352. /* This Source Code Form is subject to the terms of the Mozilla Public
  28353. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28354. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28355. *
  28356. * The origin of this IDL file is
  28357. * http://www.whatwg.org/specs/web-apps/current-work/#timeranges
  28358. *
  28359. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  28360. * Opera Software ASA. You are granted a license to use, reproduce
  28361. * and create derivative works of this document.
  28362. */
  28363. [Exposed=Window]
  28364. interface TimeRanges {
  28365. readonly attribute unsigned long length;
  28366. [Throws]
  28367. double start(unsigned long index);
  28368. [Throws]
  28369. double end(unsigned long index);
  28370. };
  28371. /* ---------------------- ToggleEvent ----------------------------- */
  28372. /* ./webidl/ToggleEvent.webidl */
  28373. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28374. /* This Source Code Form is subject to the terms of the Mozilla Public
  28375. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28376. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28377. *
  28378. * The origin of this IDL file is
  28379. * https://html.spec.whatwg.org/multipage/popover.html#the-toggleevent-interface
  28380. */
  28381. [Exposed=Window]
  28382. interface ToggleEvent : Event {
  28383. constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
  28384. readonly attribute DOMString oldState;
  28385. readonly attribute DOMString newState;
  28386. };
  28387. dictionary ToggleEventInit : EventInit {
  28388. DOMString oldState = "";
  28389. DOMString newState = "";
  28390. };
  28391. /* ---------------------- Touch ----------------------------- */
  28392. /* ./webidl/Touch.webidl */
  28393. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28394. /* This Source Code Form is subject to the terms of the Mozilla Public
  28395. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28396. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28397. *
  28398. * The origin of this IDL file is
  28399. * http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html
  28400. *
  28401. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28402. * liability, trademark and document use rules apply.
  28403. */
  28404. dictionary TouchInit {
  28405. required long identifier;
  28406. required EventTarget target;
  28407. long clientX = 0;
  28408. long clientY = 0;
  28409. long screenX = 0;
  28410. long screenY = 0;
  28411. long pageX = 0;
  28412. long pageY = 0;
  28413. float radiusX = 0;
  28414. float radiusY = 0;
  28415. float rotationAngle = 0;
  28416. float force = 0;
  28417. };
  28418. [Func="mozilla::dom::Touch::PrefEnabled",
  28419. Exposed=Window]
  28420. interface Touch {
  28421. constructor(TouchInit touchInitDict);
  28422. readonly attribute long identifier;
  28423. readonly attribute EventTarget? target;
  28424. [NeedsCallerType]
  28425. readonly attribute long screenX;
  28426. [NeedsCallerType]
  28427. readonly attribute long screenY;
  28428. readonly attribute long clientX;
  28429. readonly attribute long clientY;
  28430. readonly attribute long pageX;
  28431. readonly attribute long pageY;
  28432. [NeedsCallerType]
  28433. readonly attribute long radiusX;
  28434. [NeedsCallerType]
  28435. readonly attribute long radiusY;
  28436. [NeedsCallerType]
  28437. readonly attribute float rotationAngle;
  28438. [NeedsCallerType]
  28439. readonly attribute float force;
  28440. };
  28441. /* ---------------------- TouchEvent ----------------------------- */
  28442. /* ./webidl/TouchEvent.webidl */
  28443. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28444. /* This Source Code Form is subject to the terms of the Mozilla Public
  28445. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28446. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28447. */
  28448. dictionary TouchEventInit : EventModifierInit {
  28449. sequence<Touch> touches = [];
  28450. sequence<Touch> targetTouches = [];
  28451. sequence<Touch> changedTouches = [];
  28452. };
  28453. [Func="mozilla::dom::TouchEvent::PrefEnabled",
  28454. Exposed=Window]
  28455. interface TouchEvent : UIEvent {
  28456. constructor(DOMString type, optional TouchEventInit eventInitDict = {});
  28457. readonly attribute TouchList touches;
  28458. readonly attribute TouchList targetTouches;
  28459. readonly attribute TouchList changedTouches;
  28460. readonly attribute boolean altKey;
  28461. readonly attribute boolean metaKey;
  28462. readonly attribute boolean ctrlKey;
  28463. readonly attribute boolean shiftKey;
  28464. undefined initTouchEvent(DOMString type,
  28465. optional boolean canBubble = false,
  28466. optional boolean cancelable = false,
  28467. optional Window? view = null,
  28468. optional long detail = 0,
  28469. optional boolean ctrlKey = false,
  28470. optional boolean altKey = false,
  28471. optional boolean shiftKey = false,
  28472. optional boolean metaKey = false,
  28473. optional TouchList? touches = null,
  28474. optional TouchList? targetTouches = null,
  28475. optional TouchList? changedTouches = null);
  28476. };
  28477. /* ---------------------- TouchList ----------------------------- */
  28478. /* ./webidl/TouchList.webidl */
  28479. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28480. /* This Source Code Form is subject to the terms of the Mozilla Public
  28481. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28482. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28483. *
  28484. * The origin of this IDL file is
  28485. * https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html
  28486. *
  28487. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28488. * liability, trademark and document use rules apply.
  28489. */
  28490. [Func="mozilla::dom::TouchList::PrefEnabled",
  28491. Exposed=Window]
  28492. interface TouchList {
  28493. [Pure]
  28494. readonly attribute unsigned long length;
  28495. getter Touch? item(unsigned long index);
  28496. };
  28497. /* ---------------------- TrackEvent ----------------------------- */
  28498. /* ./webidl/TrackEvent.webidl */
  28499. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28500. /* This Source Code Form is subject to the terms of the Mozilla Public
  28501. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28502. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28503. *
  28504. * The origin of this IDL file is
  28505. * http://www.whatwg.org/specs/web-apps/current-work/#trackevent
  28506. */
  28507. [Exposed=Window]
  28508. interface TrackEvent : Event
  28509. {
  28510. constructor(DOMString type, optional TrackEventInit eventInitDict = {});
  28511. readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
  28512. };
  28513. dictionary TrackEventInit : EventInit
  28514. {
  28515. (VideoTrack or AudioTrack or TextTrack)? track = null;
  28516. };
  28517. /* ---------------------- Transformer ----------------------------- */
  28518. /* ./webidl/Transformer.webidl */
  28519. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28520. /* This Source Code Form is subject to the terms of the Mozilla Public
  28521. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28522. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28523. *
  28524. * The origin of this IDL file is
  28525. * https://streams.spec.whatwg.org/#transformer-api
  28526. */
  28527. [GenerateInit]
  28528. dictionary Transformer {
  28529. TransformerStartCallback start;
  28530. TransformerTransformCallback transform;
  28531. TransformerFlushCallback flush;
  28532. any readableType;
  28533. any writableType;
  28534. };
  28535. callback TransformerStartCallback = any (TransformStreamDefaultController controller);
  28536. callback TransformerFlushCallback = Promise<undefined> (TransformStreamDefaultController controller);
  28537. callback TransformerTransformCallback = Promise<undefined> (any chunk, TransformStreamDefaultController controller);
  28538. /* ---------------------- TransformStream ----------------------------- */
  28539. /* ./webidl/TransformStream.webidl */
  28540. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28541. /* This Source Code Form is subject to the terms of the Mozilla Public
  28542. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28543. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28544. *
  28545. * The origin of this IDL file is
  28546. * https://streams.spec.whatwg.org/#ts-class-definition
  28547. */
  28548. [Exposed=*] // [Transferable] - See Bug 1562065
  28549. interface TransformStream {
  28550. [Throws]
  28551. constructor(optional object transformer,
  28552. optional QueuingStrategy writableStrategy = {},
  28553. optional QueuingStrategy readableStrategy = {});
  28554. readonly attribute ReadableStream readable;
  28555. readonly attribute WritableStream writable;
  28556. };
  28557. /* ---------------------- TransformStreamDefaultController ----------------------------- */
  28558. /* ./webidl/TransformStreamDefaultController.webidl */
  28559. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28560. /* This Source Code Form is subject to the terms of the Mozilla Public
  28561. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28562. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28563. *
  28564. * The origin of this IDL file is
  28565. * https://streams.spec.whatwg.org/#ts-default-controller-class-definition
  28566. */
  28567. [Exposed=*]
  28568. interface TransformStreamDefaultController {
  28569. readonly attribute unrestricted double? desiredSize;
  28570. [Throws] undefined enqueue(optional any chunk);
  28571. [Throws] undefined error(optional any reason);
  28572. [Throws] undefined terminate();
  28573. };
  28574. /* ---------------------- TransitionEvent ----------------------------- */
  28575. /* ./webidl/TransitionEvent.webidl */
  28576. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28577. /* This Source Code Form is subject to the terms of the Mozilla Public
  28578. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28579. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28580. *
  28581. * Transition events are defined in:
  28582. * http://www.w3.org/TR/css3-transitions/#transition-events-
  28583. * http://dev.w3.org/csswg/css3-transitions/#transition-events-
  28584. *
  28585. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28586. * liability, trademark and document use rules apply.
  28587. */
  28588. [Exposed=Window]
  28589. interface TransitionEvent : Event {
  28590. constructor(DOMString type, optional TransitionEventInit eventInitDict = {});
  28591. readonly attribute DOMString propertyName;
  28592. readonly attribute float elapsedTime;
  28593. readonly attribute DOMString pseudoElement;
  28594. };
  28595. dictionary TransitionEventInit : EventInit {
  28596. DOMString propertyName = "";
  28597. float elapsedTime = 0;
  28598. DOMString pseudoElement = "";
  28599. };
  28600. /* ---------------------- TreeWalker ----------------------------- */
  28601. /* ./webidl/TreeWalker.webidl */
  28602. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28603. /* This Source Code Form is subject to the terms of the Mozilla Public
  28604. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28605. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28606. *
  28607. * The origin of this IDL file is
  28608. * http://www.w3.org/TR/2012/WD-dom-20120105/
  28609. *
  28610. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28611. * liability, trademark and document use rules apply.
  28612. */
  28613. [Exposed=Window]
  28614. interface TreeWalker {
  28615. [Constant]
  28616. readonly attribute Node root;
  28617. [Constant]
  28618. readonly attribute unsigned long whatToShow;
  28619. [Constant]
  28620. readonly attribute NodeFilter? filter;
  28621. [Pure, SetterThrows]
  28622. attribute Node currentNode;
  28623. [Throws]
  28624. Node? parentNode();
  28625. [Throws]
  28626. Node? firstChild();
  28627. [Throws]
  28628. Node? lastChild();
  28629. [Throws]
  28630. Node? previousSibling();
  28631. [Throws]
  28632. Node? nextSibling();
  28633. [Throws]
  28634. Node? previousNode();
  28635. [Throws]
  28636. Node? nextNode();
  28637. };
  28638. /* ---------------------- TrustedTypes ----------------------------- */
  28639. /* ./webidl/TrustedTypes.webidl */
  28640. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28641. /* This Source Code Form is subject to the terms of the Mozilla Public
  28642. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28643. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28644. *
  28645. * The origin of this IDL file is
  28646. * <https://w3c.github.io/trusted-types/dist/spec/>.
  28647. * It is augmented with Gecko-specific annotations.
  28648. */
  28649. [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
  28650. interface TrustedHTML {
  28651. stringifier;
  28652. DOMString toJSON();
  28653. };
  28654. [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
  28655. interface TrustedScript {
  28656. stringifier;
  28657. DOMString toJSON();
  28658. };
  28659. [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
  28660. interface TrustedScriptURL {
  28661. stringifier;
  28662. USVString toJSON();
  28663. };
  28664. [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
  28665. interface TrustedTypePolicy {
  28666. readonly attribute DOMString name;
  28667. [NewObject, Throws] TrustedHTML createHTML(DOMString input, any... arguments);
  28668. [NewObject, Throws] TrustedScript createScript(DOMString input, any... arguments);
  28669. [NewObject, Throws] TrustedScriptURL createScriptURL(DOMString input, any... arguments);
  28670. };
  28671. dictionary TrustedTypePolicyOptions {
  28672. CreateHTMLCallback createHTML;
  28673. CreateScriptCallback createScript;
  28674. CreateScriptURLCallback createScriptURL;
  28675. };
  28676. callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments);
  28677. callback CreateScriptCallback = DOMString? (DOMString input, any... arguments);
  28678. callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments);
  28679. [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
  28680. interface TrustedTypePolicyFactory {
  28681. TrustedTypePolicy createPolicy(DOMString policyName , optional TrustedTypePolicyOptions policyOptions = {});
  28682. boolean isHTML(any value);
  28683. boolean isScript(any value);
  28684. boolean isScriptURL(any value);
  28685. [Pure, StoreInSlot] readonly attribute TrustedHTML emptyHTML;
  28686. [Pure, StoreInSlot] readonly attribute TrustedScript emptyScript;
  28687. DOMString? getAttributeType(
  28688. DOMString tagName,
  28689. DOMString attribute,
  28690. optional DOMString elementNs = "",
  28691. optional DOMString attrNs = "");
  28692. DOMString? getPropertyType(
  28693. DOMString tagName,
  28694. DOMString property,
  28695. optional DOMString elementNs = "");
  28696. readonly attribute TrustedTypePolicy? defaultPolicy;
  28697. };
  28698. /* ---------------------- UDPMessageEvent ----------------------------- */
  28699. /* ./webidl/UDPMessageEvent.webidl */
  28700. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28701. /* This Source Code Form is subject to the terms of the Mozilla Public
  28702. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28703. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28704. *
  28705. * The origin of this IDL file is
  28706. * http://www.w3.org/TR/raw-sockets/#interface-udpmessageevent
  28707. */
  28708. //Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
  28709. [Pref="dom.udpsocket.enabled",
  28710. ChromeOnly,
  28711. Exposed=Window]
  28712. interface UDPMessageEvent : Event {
  28713. constructor(DOMString type,
  28714. optional UDPMessageEventInit eventInitDict = {});
  28715. readonly attribute DOMString remoteAddress;
  28716. readonly attribute unsigned short remotePort;
  28717. readonly attribute any data;
  28718. };
  28719. dictionary UDPMessageEventInit : EventInit {
  28720. DOMString remoteAddress = "";
  28721. unsigned short remotePort = 0;
  28722. any data = null;
  28723. };
  28724. /* ---------------------- UDPSocket ----------------------------- */
  28725. /* ./webidl/UDPSocket.webidl */
  28726. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28727. /* This Source Code Form is subject to the terms of the Mozilla Public
  28728. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28729. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28730. *
  28731. * The origin of this IDL file is
  28732. * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#interface-udpsocket
  28733. * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#dictionary-udpoptions
  28734. */
  28735. dictionary UDPOptions {
  28736. DOMString localAddress;
  28737. unsigned short localPort;
  28738. DOMString remoteAddress;
  28739. unsigned short remotePort;
  28740. boolean addressReuse = true;
  28741. boolean loopback = false;
  28742. };
  28743. [Pref="dom.udpsocket.enabled",
  28744. ChromeOnly,
  28745. Exposed=Window]
  28746. interface UDPSocket : EventTarget {
  28747. [Throws]
  28748. constructor(optional UDPOptions options = {});
  28749. readonly attribute DOMString? localAddress;
  28750. readonly attribute unsigned short? localPort;
  28751. readonly attribute DOMString? remoteAddress;
  28752. readonly attribute unsigned short? remotePort;
  28753. readonly attribute boolean addressReuse;
  28754. readonly attribute boolean loopback;
  28755. readonly attribute SocketReadyState readyState;
  28756. readonly attribute Promise<undefined> opened;
  28757. readonly attribute Promise<undefined> closed;
  28758. // readonly attribute ReadableStream input; //Bug 1056444: Stream API is not ready
  28759. // readonly attribute WriteableStream output; //Bug 1056444: Stream API is not ready
  28760. attribute EventHandler onmessage; //Bug 1056444: use event interface before Stream API is ready
  28761. Promise<undefined> close ();
  28762. [Throws] undefined joinMulticastGroup (DOMString multicastGroupAddress);
  28763. [Throws] undefined leaveMulticastGroup (DOMString multicastGroupAddress);
  28764. [Throws] boolean send ((DOMString or Blob or ArrayBuffer or ArrayBufferView) data, optional DOMString? remoteAddress, optional unsigned short? remotePort); //Bug 1056444: use send method before Stream API is ready
  28765. };
  28766. /* ---------------------- UIEvent ----------------------------- */
  28767. /* ./webidl/UIEvent.webidl */
  28768. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28769. /* This Source Code Form is subject to the terms of the Mozilla Public
  28770. * License, v. 2.0. If a copy of the MPL was not distributed with this
  28771. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  28772. *
  28773. * For more information on this interface please see
  28774. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  28775. *
  28776. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28777. * liability, trademark and document use rules apply.
  28778. */
  28779. [Exposed=Window]
  28780. interface UIEvent : Event
  28781. {
  28782. constructor(DOMString type, optional UIEventInit eventInitDict = {});
  28783. readonly attribute WindowProxy? view;
  28784. readonly attribute long detail;
  28785. undefined initUIEvent(DOMString aType,
  28786. optional boolean aCanBubble = false,
  28787. optional boolean aCancelable = false,
  28788. optional Window? aView = null,
  28789. optional long aDetail = 0);
  28790. };
  28791. // Additional DOM0 properties.
  28792. partial interface UIEvent {
  28793. const long SCROLL_PAGE_UP = -32768;
  28794. const long SCROLL_PAGE_DOWN = 32768;
  28795. readonly attribute long layerX;
  28796. readonly attribute long layerY;
  28797. [NeedsCallerType]
  28798. readonly attribute unsigned long which;
  28799. readonly attribute Node? rangeParent;
  28800. readonly attribute long rangeOffset;
  28801. };
  28802. dictionary UIEventInit : EventInit
  28803. {
  28804. Window? view = null;
  28805. long detail = 0;
  28806. };
  28807. // NOTE: Gecko doesn't support commented out modifiers yet.
  28808. dictionary EventModifierInit : UIEventInit
  28809. {
  28810. boolean ctrlKey = false;
  28811. boolean shiftKey = false;
  28812. boolean altKey = false;
  28813. boolean metaKey = false;
  28814. boolean modifierAltGraph = false;
  28815. boolean modifierCapsLock = false;
  28816. boolean modifierFn = false;
  28817. boolean modifierFnLock = false;
  28818. // boolean modifierHyper = false;
  28819. boolean modifierNumLock = false;
  28820. boolean modifierOS = false;
  28821. boolean modifierScrollLock = false;
  28822. // boolean modifierSuper = false;
  28823. boolean modifierSymbol = false;
  28824. boolean modifierSymbolLock = false;
  28825. };
  28826. /* ---------------------- UnderlyingSink ----------------------------- */
  28827. /* ./webidl/UnderlyingSink.webidl */
  28828. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28829. /* This Source Code Form is subject to the terms of the Mozilla Public
  28830. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28831. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28832. *
  28833. * The origin of this IDL file is
  28834. * https://streams.spec.whatwg.org/#underlying-sink-api
  28835. */
  28836. [GenerateInit]
  28837. dictionary UnderlyingSink {
  28838. UnderlyingSinkStartCallback start;
  28839. UnderlyingSinkWriteCallback write;
  28840. UnderlyingSinkCloseCallback close;
  28841. UnderlyingSinkAbortCallback abort;
  28842. any type;
  28843. };
  28844. callback UnderlyingSinkStartCallback = any (WritableStreamDefaultController controller);
  28845. callback UnderlyingSinkWriteCallback = Promise<undefined> (any chunk, WritableStreamDefaultController controller);
  28846. callback UnderlyingSinkCloseCallback = Promise<undefined> ();
  28847. callback UnderlyingSinkAbortCallback = Promise<undefined> (optional any reason);
  28848. /* ---------------------- UnderlyingSource ----------------------------- */
  28849. /* ./webidl/UnderlyingSource.webidl */
  28850. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28851. /* This Source Code Form is subject to the terms of the Mozilla Public
  28852. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28853. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28854. *
  28855. * The origin of this IDL file is
  28856. * https://streams.spec.whatwg.org/#underlying-source-api
  28857. */
  28858. [GenerateInit]
  28859. dictionary UnderlyingSource {
  28860. UnderlyingSourceStartCallback start;
  28861. UnderlyingSourcePullCallback pull;
  28862. UnderlyingSourceCancelCallback cancel;
  28863. ReadableStreamType type;
  28864. [EnforceRange] unsigned long long autoAllocateChunkSize;
  28865. };
  28866. typedef (ReadableStreamDefaultController or ReadableByteStreamController) ReadableStreamController;
  28867. callback UnderlyingSourceStartCallback = any (ReadableStreamController controller);
  28868. callback UnderlyingSourcePullCallback = Promise<undefined> (ReadableStreamController controller);
  28869. callback UnderlyingSourceCancelCallback = Promise<undefined> (optional any reason);
  28870. /* ---------------------- URL ----------------------------- */
  28871. /* ./webidl/URL.webidl */
  28872. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28873. /* This Source Code Form is subject to the terms of the Mozilla Public
  28874. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28875. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28876. *
  28877. * The origins of this IDL file are
  28878. * http://url.spec.whatwg.org/#api
  28879. * https://w3c.github.io/FileAPI/#creating-revoking
  28880. *
  28881. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  28882. * liability, trademark and document use rules apply.
  28883. */
  28884. interface URI;
  28885. [Exposed=(Window,Worker,WorkerDebugger),
  28886. LegacyWindowAlias=webkitURL]
  28887. interface URL {
  28888. [Throws]
  28889. constructor(USVString url, optional USVString base);
  28890. static URL? parse(UTF8String url, optional UTF8String base);
  28891. static boolean canParse(UTF8String url, optional UTF8String base);
  28892. [SetterThrows]
  28893. stringifier attribute USVString href;
  28894. readonly attribute USVString origin;
  28895. attribute USVString protocol;
  28896. attribute USVString username;
  28897. attribute USVString password;
  28898. attribute USVString host;
  28899. attribute USVString hostname;
  28900. attribute USVString port;
  28901. attribute USVString pathname;
  28902. attribute USVString search;
  28903. [SameObject]
  28904. readonly attribute URLSearchParams searchParams;
  28905. attribute USVString hash;
  28906. [ChromeOnly]
  28907. readonly attribute URI URI;
  28908. [ChromeOnly]
  28909. static URL fromURI(URI uri);
  28910. USVString toJSON();
  28911. };
  28912. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  28913. partial interface URL {
  28914. [Throws]
  28915. static DOMString createObjectURL(Blob blob);
  28916. [Throws]
  28917. static undefined revokeObjectURL(DOMString url);
  28918. [ChromeOnly, Throws]
  28919. static boolean isValidObjectURL(DOMString url);
  28920. // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
  28921. [Throws]
  28922. static DOMString createObjectURL(MediaSource source);
  28923. };
  28924. /* ---------------------- URLSearchParams ----------------------------- */
  28925. /* ./webidl/URLSearchParams.webidl */
  28926. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28927. /* This Source Code Form is subject to the terms of the Mozilla Public
  28928. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28929. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28930. *
  28931. * The origin of this IDL file is
  28932. * http://url.spec.whatwg.org/#urlsearchparams
  28933. *
  28934. * To the extent possible under law, the editors have waived all copyright
  28935. * and related or neighboring rights to this work. In addition, as of 17
  28936. * February 2013, the editors have made this specification available under
  28937. * the Open Web Foundation Agreement Version 1.0, which is available at
  28938. * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
  28939. */
  28940. [Exposed=(Window,Worker,WorkerDebugger)]
  28941. interface URLSearchParams {
  28942. [Throws]
  28943. constructor(optional (sequence<sequence<USVString>> or
  28944. record<USVString, USVString> or USVString) init = "");
  28945. readonly attribute unsigned long size;
  28946. undefined append(USVString name, USVString value);
  28947. undefined delete(USVString name, optional USVString value);
  28948. USVString? get(USVString name);
  28949. sequence<USVString> getAll(USVString name);
  28950. boolean has(USVString name, optional USVString value);
  28951. undefined set(USVString name, USVString value);
  28952. [Throws]
  28953. undefined sort();
  28954. iterable<USVString, USVString>;
  28955. stringifier;
  28956. };
  28957. /* ---------------------- UserActivation ----------------------------- */
  28958. /* ./webidl/UserActivation.webidl */
  28959. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28960. /* This Source Code Form is subject to the terms of the Mozilla Public
  28961. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28962. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28963. *
  28964. * The origin of this IDL file is
  28965. * https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface
  28966. */
  28967. [Exposed=Window]
  28968. interface UserActivation {
  28969. readonly attribute boolean hasBeenActive;
  28970. readonly attribute boolean isActive;
  28971. };
  28972. /* ---------------------- UserProximityEvent ----------------------------- */
  28973. /* ./webidl/UserProximityEvent.webidl */
  28974. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28975. /* This Source Code Form is subject to the terms of the Mozilla Public
  28976. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28977. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28978. */
  28979. [Pref="device.sensors.proximity.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
  28980. Exposed=Window]
  28981. interface UserProximityEvent : Event
  28982. {
  28983. constructor(DOMString type,
  28984. optional UserProximityEventInit eventInitDict = {});
  28985. readonly attribute boolean near;
  28986. };
  28987. dictionary UserProximityEventInit : EventInit
  28988. {
  28989. boolean near = false;
  28990. };
  28991. /* ---------------------- ValidityState ----------------------------- */
  28992. /* ./webidl/ValidityState.webidl */
  28993. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28994. /* This Source Code Form is subject to the terms of the Mozilla Public
  28995. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  28996. * You can obtain one at http://mozilla.org/MPL/2.0/.
  28997. *
  28998. * The origin of this IDL file is
  28999. * http://www.whatwg.org/specs/web-apps/current-work/#validitystate
  29000. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  29001. * Opera Software ASA. You are granted a license to use, reproduce
  29002. * and create derivative works of this document.
  29003. */
  29004. [Exposed=Window]
  29005. interface ValidityState {
  29006. readonly attribute boolean valueMissing;
  29007. readonly attribute boolean typeMismatch;
  29008. readonly attribute boolean patternMismatch;
  29009. readonly attribute boolean tooLong;
  29010. readonly attribute boolean tooShort;
  29011. readonly attribute boolean rangeUnderflow;
  29012. readonly attribute boolean rangeOverflow;
  29013. readonly attribute boolean stepMismatch;
  29014. readonly attribute boolean badInput;
  29015. readonly attribute boolean customError;
  29016. readonly attribute boolean valid;
  29017. };
  29018. /* ---------------------- VideoColorSpace ----------------------------- */
  29019. /* ./webidl/VideoColorSpace.webidl */
  29020. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29021. /* This Source Code Form is subject to the terms of the Mozilla Public
  29022. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29023. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29024. *
  29025. * The origin of this IDL file is
  29026. * https://w3c.github.io/webcodecs/#videocolorspace
  29027. */
  29028. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
  29029. interface VideoColorSpace {
  29030. [Throws]
  29031. constructor(optional VideoColorSpaceInit init = {});
  29032. readonly attribute VideoColorPrimaries? primaries;
  29033. readonly attribute VideoTransferCharacteristics? transfer;
  29034. readonly attribute VideoMatrixCoefficients? matrix;
  29035. readonly attribute boolean? fullRange;
  29036. // https://github.com/w3c/webcodecs/issues/486
  29037. [Default] object toJSON();
  29038. };
  29039. dictionary VideoColorSpaceInit {
  29040. VideoColorPrimaries? primaries = null;
  29041. VideoTransferCharacteristics? transfer = null;
  29042. VideoMatrixCoefficients? matrix = null;
  29043. boolean? fullRange = null;
  29044. };
  29045. enum VideoColorPrimaries {
  29046. "bt709", // BT.709, sRGB
  29047. "bt470bg", // BT.601 PAL
  29048. "smpte170m", // BT.601 NTSC
  29049. "bt2020", // BT.2020, BT.2100
  29050. "smpte432", // P3 D65
  29051. };
  29052. enum VideoTransferCharacteristics {
  29053. "bt709", // BT.709
  29054. "smpte170m", // BT.601 (functionally the same as bt709)
  29055. "iec61966-2-1", // sRGB
  29056. "linear", // linear RGB
  29057. "pq", // BT.2100 PQ
  29058. "hlg", // BT.2100 HLG
  29059. };
  29060. enum VideoMatrixCoefficients {
  29061. "rgb", // sRGB
  29062. "bt709", // BT.709
  29063. "bt470bg", // BT.601 PAL
  29064. "smpte170m", // BT.601 NTSC (functionally the same as bt470bg)
  29065. "bt2020-ncl", // BT.2020 NCL
  29066. };
  29067. /* ---------------------- VideoDecoder ----------------------------- */
  29068. /* ./webidl/VideoDecoder.webidl */
  29069. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29070. /* This Source Code Form is subject to the terms of the Mozilla Public
  29071. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29072. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29073. *
  29074. * The origin of this IDL file is
  29075. * https://w3c.github.io/webcodecs/#videodecoder
  29076. */
  29077. [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
  29078. interface VideoDecoder : EventTarget {
  29079. [Throws]
  29080. constructor(VideoDecoderInit init);
  29081. readonly attribute CodecState state;
  29082. readonly attribute unsigned long decodeQueueSize;
  29083. attribute EventHandler ondequeue;
  29084. [Throws]
  29085. undefined configure(VideoDecoderConfig config);
  29086. [Throws]
  29087. undefined decode(EncodedVideoChunk chunk);
  29088. [NewObject, Throws]
  29089. Promise<undefined> flush();
  29090. [Throws]
  29091. undefined reset();
  29092. [Throws]
  29093. undefined close();
  29094. [NewObject, Throws]
  29095. static Promise<VideoDecoderSupport> isConfigSupported(VideoDecoderConfig config);
  29096. };
  29097. dictionary VideoDecoderInit {
  29098. required VideoFrameOutputCallback output;
  29099. required WebCodecsErrorCallback error;
  29100. };
  29101. callback VideoFrameOutputCallback = undefined(VideoFrame output);
  29102. dictionary VideoDecoderSupport {
  29103. boolean supported;
  29104. VideoDecoderConfig config;
  29105. };
  29106. dictionary VideoDecoderConfig {
  29107. required DOMString codec;
  29108. // Bug 1696216: Should be [AllowShared] BufferSource description;
  29109. ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description;
  29110. [EnforceRange] unsigned long codedWidth;
  29111. [EnforceRange] unsigned long codedHeight;
  29112. [EnforceRange] unsigned long displayAspectWidth;
  29113. [EnforceRange] unsigned long displayAspectHeight;
  29114. VideoColorSpaceInit colorSpace;
  29115. HardwareAcceleration hardwareAcceleration = "no-preference";
  29116. boolean optimizeForLatency;
  29117. };
  29118. enum HardwareAcceleration {
  29119. "no-preference",
  29120. "prefer-hardware",
  29121. "prefer-software",
  29122. };
  29123. enum CodecState {
  29124. "unconfigured",
  29125. "configured",
  29126. "closed"
  29127. };
  29128. callback WebCodecsErrorCallback = undefined(DOMException error);
  29129. /* ---------------------- VideoEncoder ----------------------------- */
  29130. /* ./webidl/VideoEncoder.webidl */
  29131. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29132. /* This Source Code Form is subject to the terms of the Mozilla Public
  29133. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29134. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29135. *
  29136. * The origin of this IDL file is
  29137. * https://w3c.github.io/webcodecs/#videoencoder
  29138. *
  29139. * Some members of this API are codec-specific, in which case the source of the
  29140. * IDL are in the codec-specific registry entries, that are listed in
  29141. * https://w3c.github.io/webcodecs/codec_registry.html. Those members are
  29142. * commented with a link of the document in which the member is listed.
  29143. */
  29144. [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
  29145. interface VideoEncoder : EventTarget {
  29146. [Throws]
  29147. constructor(VideoEncoderInit init);
  29148. readonly attribute CodecState state;
  29149. readonly attribute unsigned long encodeQueueSize;
  29150. attribute EventHandler ondequeue;
  29151. [Throws]
  29152. undefined configure(VideoEncoderConfig config);
  29153. [Throws, BinaryName="VideoEncoder::EncodeVideoFrame"]
  29154. undefined encode(VideoFrame frame , optional VideoEncoderEncodeOptions options = {});
  29155. [Throws]
  29156. Promise<undefined> flush();
  29157. [Throws]
  29158. undefined reset();
  29159. [Throws]
  29160. undefined close();
  29161. [NewObject, Throws]
  29162. static Promise<VideoEncoderSupport> isConfigSupported(VideoEncoderConfig config);
  29163. };
  29164. dictionary VideoEncoderInit {
  29165. required EncodedVideoChunkOutputCallback output;
  29166. required WebCodecsErrorCallback error;
  29167. };
  29168. callback EncodedVideoChunkOutputCallback =
  29169. undefined (EncodedVideoChunk chunk,
  29170. optional EncodedVideoChunkMetadata metadata = {});
  29171. // AVC (H264)-specific
  29172. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29173. enum AvcBitstreamFormat {
  29174. "annexb",
  29175. "avc",
  29176. };
  29177. // AVC (H264)-specific
  29178. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29179. dictionary AvcEncoderConfig {
  29180. AvcBitstreamFormat format = "avc";
  29181. };
  29182. dictionary VideoEncoderConfig {
  29183. required DOMString codec;
  29184. required [EnforceRange] unsigned long width;
  29185. required [EnforceRange] unsigned long height;
  29186. [EnforceRange] unsigned long displayWidth;
  29187. [EnforceRange] unsigned long displayHeight;
  29188. [EnforceRange] unsigned long long bitrate;
  29189. double framerate;
  29190. HardwareAcceleration hardwareAcceleration = "no-preference";
  29191. AlphaOption alpha = "discard";
  29192. DOMString scalabilityMode;
  29193. VideoEncoderBitrateMode bitrateMode = "variable";
  29194. LatencyMode latencyMode = "quality";
  29195. DOMString contentHint;
  29196. // AVC (H264)-specific
  29197. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29198. AvcEncoderConfig avc;
  29199. };
  29200. dictionary VideoEncoderEncodeOptions {
  29201. boolean keyFrame = false;
  29202. // AVC (H264)-specific
  29203. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29204. VideoEncoderEncodeOptionsForAvc avc;
  29205. };
  29206. // AVC (H264)-specific
  29207. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29208. dictionary VideoEncoderEncodeOptionsForAvc {
  29209. unsigned short? quantizer;
  29210. };
  29211. enum VideoEncoderBitrateMode {
  29212. "constant",
  29213. "variable",
  29214. // AVC (H264)-specific
  29215. // https://w3c.github.io/webcodecs/avc_codec_registration.html
  29216. "quantizer"
  29217. };
  29218. enum LatencyMode {
  29219. "quality",
  29220. "realtime"
  29221. };
  29222. dictionary VideoEncoderSupport {
  29223. boolean supported;
  29224. VideoEncoderConfig config;
  29225. };
  29226. dictionary EncodedVideoChunkMetadata {
  29227. VideoDecoderConfig decoderConfig;
  29228. SvcOutputMetadata svc;
  29229. // Not implemented https://bugzilla.mozilla.org/show_bug.cgi?id=1867067
  29230. // BufferSource alphaSideData;
  29231. };
  29232. dictionary SvcOutputMetadata {
  29233. unsigned long temporalLayerId;
  29234. };
  29235. /* ---------------------- VideoFrame ----------------------------- */
  29236. /* ./webidl/VideoFrame.webidl */
  29237. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29238. /* This Source Code Form is subject to the terms of the Mozilla Public
  29239. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29240. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29241. *
  29242. * The origin of this IDL file is
  29243. * https://w3c.github.io/webcodecs/#videoframe
  29244. */
  29245. enum AlphaOption {
  29246. "keep",
  29247. "discard",
  29248. };
  29249. // [Serializable, Transferable] are implemented without adding attributes here.
  29250. [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
  29251. interface VideoFrame {
  29252. // The constructors should be shorten to:
  29253. // ```
  29254. // constructor([AllowShared] BufferSource data, VideoFrameBufferInit init);
  29255. // constructor(CanvasImageSource image, optional VideoFrameInit init = {});
  29256. // ```
  29257. // However, `[AllowShared] BufferSource` doesn't work for now (bug 1696216), and
  29258. // `No support for unions as distinguishing arguments yet` error occurs when using
  29259. // `constructor(CanvasImageSource image, optional VideoFrameInit init = {})` and
  29260. // `constructor(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data, VideoFrameBufferInit init)`
  29261. // at the same time (bug 1786410).
  29262. [Throws]
  29263. constructor(HTMLImageElement imageElement, optional VideoFrameInit init = {});
  29264. [Throws]
  29265. constructor(SVGImageElement svgImageElement, optional VideoFrameInit init = {});
  29266. [Throws]
  29267. constructor(HTMLCanvasElement canvasElement, optional VideoFrameInit init = {});
  29268. [Throws]
  29269. constructor(HTMLVideoElement videoElement, optional VideoFrameInit init = {});
  29270. [Throws]
  29271. constructor(OffscreenCanvas offscreenCanvas, optional VideoFrameInit init = {});
  29272. [Throws]
  29273. constructor(ImageBitmap imageBitmap, optional VideoFrameInit init = {});
  29274. [Throws]
  29275. constructor(VideoFrame videoFrame, optional VideoFrameInit init = {});
  29276. [Throws]
  29277. constructor([AllowShared] ArrayBufferView bufferView, VideoFrameBufferInit init);
  29278. [Throws]
  29279. constructor([AllowShared] ArrayBuffer buffer, VideoFrameBufferInit init);
  29280. readonly attribute VideoPixelFormat? format;
  29281. readonly attribute unsigned long codedWidth;
  29282. readonly attribute unsigned long codedHeight;
  29283. readonly attribute DOMRectReadOnly? codedRect;
  29284. readonly attribute DOMRectReadOnly? visibleRect;
  29285. readonly attribute unsigned long displayWidth;
  29286. readonly attribute unsigned long displayHeight;
  29287. readonly attribute unsigned long long? duration; // microseconds
  29288. readonly attribute long long timestamp; // microseconds
  29289. readonly attribute VideoColorSpace colorSpace;
  29290. [Throws]
  29291. unsigned long allocationSize(
  29292. optional VideoFrameCopyToOptions options = {});
  29293. [Throws]
  29294. Promise<sequence<PlaneLayout>> copyTo(
  29295. // bug 1696216: Should be `copyTo([AllowShared] BufferSource destination, ...)`
  29296. ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination,
  29297. optional VideoFrameCopyToOptions options = {});
  29298. [Throws]
  29299. VideoFrame clone();
  29300. undefined close();
  29301. };
  29302. dictionary VideoFrameInit {
  29303. unsigned long long duration; // microseconds
  29304. long long timestamp; // microseconds
  29305. AlphaOption alpha = "keep";
  29306. // Default matches image. May be used to efficiently crop. Will trigger
  29307. // new computation of displayWidth and displayHeight using image’s pixel
  29308. // aspect ratio unless an explicit displayWidth and displayHeight are given.
  29309. DOMRectInit visibleRect;
  29310. // Default matches image unless visibleRect is provided.
  29311. [EnforceRange] unsigned long displayWidth;
  29312. [EnforceRange] unsigned long displayHeight;
  29313. };
  29314. dictionary VideoFrameBufferInit {
  29315. required VideoPixelFormat format;
  29316. required [EnforceRange] unsigned long codedWidth;
  29317. required [EnforceRange] unsigned long codedHeight;
  29318. required [EnforceRange] long long timestamp; // microseconds
  29319. [EnforceRange] unsigned long long duration; // microseconds
  29320. // Default layout is tightly-packed.
  29321. sequence<PlaneLayout> layout;
  29322. // Default visible rect is coded size positioned at (0,0)
  29323. DOMRectInit visibleRect;
  29324. // Default display dimensions match visibleRect.
  29325. [EnforceRange] unsigned long displayWidth;
  29326. [EnforceRange] unsigned long displayHeight;
  29327. VideoColorSpaceInit colorSpace;
  29328. };
  29329. dictionary VideoFrameCopyToOptions {
  29330. DOMRectInit rect;
  29331. sequence<PlaneLayout> layout;
  29332. };
  29333. dictionary PlaneLayout {
  29334. // TODO: https://github.com/w3c/webcodecs/pull/488
  29335. required [EnforceRange] unsigned long offset;
  29336. required [EnforceRange] unsigned long stride;
  29337. };
  29338. enum VideoPixelFormat {
  29339. // 4:2:0 Y, U, V
  29340. "I420",
  29341. // 4:2:0 Y, U, V, A
  29342. "I420A",
  29343. // 4:2:2 Y, U, V
  29344. "I422",
  29345. // 4:4:4 Y, U, V
  29346. "I444",
  29347. // 4:2:0 Y, UV
  29348. "NV12",
  29349. // 32bpp RGBA
  29350. "RGBA",
  29351. // 32bpp RGBX (opaque)
  29352. "RGBX",
  29353. // 32bpp BGRA
  29354. "BGRA",
  29355. // 32bpp BGRX (opaque)
  29356. "BGRX",
  29357. };
  29358. /* ---------------------- VideoPlaybackQuality ----------------------------- */
  29359. /* ./webidl/VideoPlaybackQuality.webidl */
  29360. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29361. /* This Source Code Form is subject to the terms of the Mozilla Public
  29362. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29363. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29364. *
  29365. * The origin of this IDL file is
  29366. * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
  29367. *
  29368. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  29369. * liability, trademark and document use rules apply.
  29370. */
  29371. [Pref="media.mediasource.enabled",
  29372. Exposed=Window]
  29373. interface VideoPlaybackQuality {
  29374. readonly attribute DOMHighResTimeStamp creationTime;
  29375. readonly attribute unsigned long totalVideoFrames;
  29376. readonly attribute unsigned long droppedVideoFrames;
  29377. // At Risk: readonly attribute double totalFrameDelay;
  29378. };
  29379. /* ---------------------- VideoTrack ----------------------------- */
  29380. /* ./webidl/VideoTrack.webidl */
  29381. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29382. /* This Source Code Form is subject to the terms of the Mozilla Public
  29383. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29384. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29385. *
  29386. * The origin of this IDL file is
  29387. * http://www.whatwg.org/specs/web-apps/current-work/#videotrack
  29388. */
  29389. [Pref="media.track.enabled",
  29390. Exposed=Window]
  29391. interface VideoTrack {
  29392. readonly attribute DOMString id;
  29393. readonly attribute DOMString kind;
  29394. readonly attribute DOMString label;
  29395. readonly attribute DOMString language;
  29396. attribute boolean selected;
  29397. };
  29398. /* ---------------------- VideoTrackList ----------------------------- */
  29399. /* ./webidl/VideoTrackList.webidl */
  29400. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29401. /* This Source Code Form is subject to the terms of the Mozilla Public
  29402. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29403. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29404. *
  29405. * The origin of this IDL file is
  29406. * http://www.whatwg.org/specs/web-apps/current-work/#videotracklist
  29407. */
  29408. [Pref="media.track.enabled",
  29409. Exposed=Window]
  29410. interface VideoTrackList : EventTarget {
  29411. readonly attribute unsigned long length;
  29412. getter VideoTrack (unsigned long index);
  29413. VideoTrack? getTrackById(DOMString id);
  29414. readonly attribute long selectedIndex;
  29415. attribute EventHandler onchange;
  29416. attribute EventHandler onaddtrack;
  29417. attribute EventHandler onremovetrack;
  29418. };
  29419. /* ---------------------- VisualViewport ----------------------------- */
  29420. /* ./webidl/VisualViewport.webidl */
  29421. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29422. /* This Source Code Form is subject to the terms of the Mozilla Public
  29423. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29424. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29425. *
  29426. * The origin of this IDL file is:
  29427. * https://wicg.github.io/visual-viewport/#the-visualviewport-interface
  29428. */
  29429. [Exposed=Window]
  29430. interface VisualViewport : EventTarget {
  29431. readonly attribute double offsetLeft;
  29432. readonly attribute double offsetTop;
  29433. readonly attribute double pageLeft;
  29434. readonly attribute double pageTop;
  29435. readonly attribute double width;
  29436. readonly attribute double height;
  29437. readonly attribute double scale;
  29438. attribute EventHandler onresize;
  29439. attribute EventHandler onscroll;
  29440. };
  29441. /* ---------------------- VRDisplay ----------------------------- */
  29442. /* ./webidl/VRDisplay.webidl */
  29443. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29444. /* This Source Code Form is subject to the terms of the Mozilla Public
  29445. * License, v. 2.0. If a copy of the MPL was not distributed with this
  29446. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  29447. *
  29448. * The origin of this IDL file is
  29449. * https://immersive-web.github.io/webvr/spec/1.1/
  29450. */
  29451. enum VREye {
  29452. "left",
  29453. "right"
  29454. };
  29455. [Pref="dom.vr.enabled",
  29456. HeaderFile="mozilla/dom/VRDisplay.h",
  29457. SecureContext,
  29458. Exposed=Window]
  29459. interface VRFieldOfView {
  29460. readonly attribute double upDegrees;
  29461. readonly attribute double rightDegrees;
  29462. readonly attribute double downDegrees;
  29463. readonly attribute double leftDegrees;
  29464. };
  29465. typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
  29466. dictionary VRLayer {
  29467. /**
  29468. * XXX - When WebVR in WebWorkers is implemented, HTMLCanvasElement below
  29469. * should be replaced with VRSource.
  29470. */
  29471. HTMLCanvasElement? source = null;
  29472. /**
  29473. * The left and right viewports contain 4 values defining the viewport
  29474. * rectangles within the canvas to present to the eye in UV space.
  29475. * [0] left offset of the viewport (0.0 - 1.0)
  29476. * [1] top offset of the viewport (0.0 - 1.0)
  29477. * [2] width of the viewport (0.0 - 1.0)
  29478. * [3] height of the viewport (0.0 - 1.0)
  29479. *
  29480. * When no values are passed, they will be processed as though the left
  29481. * and right sides of the viewport were passed:
  29482. *
  29483. * leftBounds: [0.0, 0.0, 0.5, 1.0]
  29484. * rightBounds: [0.5, 0.0, 0.5, 1.0]
  29485. */
  29486. sequence<float> leftBounds = [];
  29487. sequence<float> rightBounds = [];
  29488. };
  29489. /**
  29490. * Values describing the capabilities of a VRDisplay.
  29491. * These are expected to be static per-device/per-user.
  29492. */
  29493. [Pref="dom.vr.enabled",
  29494. HeaderFile="mozilla/dom/VRDisplay.h",
  29495. SecureContext,
  29496. Exposed=Window]
  29497. interface VRDisplayCapabilities {
  29498. /**
  29499. * hasPosition is true if the VRDisplay is capable of tracking its position.
  29500. */
  29501. readonly attribute boolean hasPosition;
  29502. /**
  29503. * hasOrientation is true if the VRDisplay is capable of tracking its orientation.
  29504. */
  29505. readonly attribute boolean hasOrientation;
  29506. /**
  29507. * Whether the VRDisplay is separate from the device’s
  29508. * primary display. If presenting VR content will obscure
  29509. * other content on the device, this should be false. When
  29510. * false, the application should not attempt to mirror VR content
  29511. * or update non-VR UI because that content will not be visible.
  29512. */
  29513. readonly attribute boolean hasExternalDisplay;
  29514. /**
  29515. * Whether the VRDisplay is capable of presenting content to an HMD or similar device.
  29516. * Can be used to indicate “magic window” devices that are capable of 6DoF tracking but for
  29517. * which requestPresent is not meaningful. If false then calls to requestPresent should
  29518. * always fail, and getEyeParameters should return null.
  29519. */
  29520. readonly attribute boolean canPresent;
  29521. /**
  29522. * Indicates the maximum length of the array that requestPresent() will accept. MUST be 1 if
  29523. canPresent is true, 0 otherwise.
  29524. */
  29525. readonly attribute unsigned long maxLayers;
  29526. };
  29527. /**
  29528. * Values describing the the stage / play area for devices
  29529. * that support room-scale experiences.
  29530. */
  29531. [Pref="dom.vr.enabled",
  29532. HeaderFile="mozilla/dom/VRDisplay.h",
  29533. SecureContext,
  29534. Exposed=Window]
  29535. interface VRStageParameters {
  29536. /**
  29537. * A 16-element array containing the components of a column-major 4x4
  29538. * affine transform matrix. This matrix transforms the sitting-space position
  29539. * returned by get{Immediate}Pose() to a standing-space position.
  29540. */
  29541. [Throws] readonly attribute Float32Array sittingToStandingTransform;
  29542. /**
  29543. * Dimensions of the play-area bounds. The bounds are defined
  29544. * as an axis-aligned rectangle on the floor.
  29545. * The center of the rectangle is at (0,0,0) in standing-space
  29546. * coordinates.
  29547. * These bounds are defined for safety purposes.
  29548. * Content should not require the user to move beyond these
  29549. * bounds; however, it is possible for the user to ignore
  29550. * the bounds resulting in position values outside of
  29551. * this rectangle.
  29552. */
  29553. readonly attribute float sizeX;
  29554. readonly attribute float sizeZ;
  29555. };
  29556. [Pref="dom.vr.enabled",
  29557. HeaderFile="mozilla/dom/VRDisplay.h",
  29558. SecureContext,
  29559. Exposed=Window]
  29560. interface VRPose
  29561. {
  29562. /**
  29563. * position, linearVelocity, and linearAcceleration are 3-component vectors.
  29564. * position is relative to a sitting space. Transforming this point with
  29565. * VRStageParameters.sittingToStandingTransform converts this to standing space.
  29566. */
  29567. [Constant, Throws] readonly attribute Float32Array? position;
  29568. [Constant, Throws] readonly attribute Float32Array? linearVelocity;
  29569. [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
  29570. /* orientation is a 4-entry array representing the components of a quaternion. */
  29571. [Constant, Throws] readonly attribute Float32Array? orientation;
  29572. /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
  29573. [Constant, Throws] readonly attribute Float32Array? angularVelocity;
  29574. [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
  29575. };
  29576. [Pref="dom.vr.enabled",
  29577. HeaderFile="mozilla/dom/VRDisplay.h",
  29578. SecureContext,
  29579. Exposed=Window]
  29580. interface VRFrameData {
  29581. constructor();
  29582. readonly attribute DOMHighResTimeStamp timestamp;
  29583. [Throws, Pure] readonly attribute Float32Array leftProjectionMatrix;
  29584. [Throws, Pure] readonly attribute Float32Array leftViewMatrix;
  29585. [Throws, Pure] readonly attribute Float32Array rightProjectionMatrix;
  29586. [Throws, Pure] readonly attribute Float32Array rightViewMatrix;
  29587. [Pure] readonly attribute VRPose pose;
  29588. };
  29589. [Pref="dom.vr.enabled",
  29590. HeaderFile="mozilla/dom/VRDisplay.h",
  29591. SecureContext,
  29592. Exposed=Window]
  29593. interface VREyeParameters {
  29594. /**
  29595. * offset is a 3-component vector representing an offset to
  29596. * translate the eye. This value may vary from frame
  29597. * to frame if the user adjusts their headset ipd.
  29598. */
  29599. [Constant, Throws] readonly attribute Float32Array offset;
  29600. /* These values may vary as the user adjusts their headset ipd. */
  29601. [Constant] readonly attribute VRFieldOfView fieldOfView;
  29602. /**
  29603. * renderWidth and renderHeight specify the recommended render target
  29604. * size of each eye viewport, in pixels. If multiple eyes are rendered
  29605. * in a single render target, then the render target should be made large
  29606. * enough to fit both viewports.
  29607. */
  29608. [Constant] readonly attribute unsigned long renderWidth;
  29609. [Constant] readonly attribute unsigned long renderHeight;
  29610. };
  29611. [Pref="dom.vr.enabled",
  29612. HeaderFile="mozilla/dom/VRDisplay.h",
  29613. SecureContext,
  29614. Exposed=Window]
  29615. interface VRDisplay : EventTarget {
  29616. /**
  29617. * presentingGroups is a bitmask indicating which VR session groups
  29618. * have an active VR presentation.
  29619. */
  29620. [ChromeOnly] readonly attribute unsigned long presentingGroups;
  29621. /**
  29622. * Setting groupMask causes submitted frames by VR sessions that
  29623. * aren't included in the bitmasked groups to be ignored.
  29624. * Non-chrome content is not aware of the value of groupMask.
  29625. * VRDisplay.RequestAnimationFrame will still fire for VR sessions
  29626. * that are hidden by groupMask, enabling their performance to be
  29627. * measured by chrome UI that is presented in other groups.
  29628. * This is expected to be used in cases where chrome UI is presenting
  29629. * information during link traversal or presenting options when content
  29630. * performance is too low for comfort.
  29631. * The VR refresh / VSync cycle is driven by the visible content
  29632. * and the non-visible content may have a throttled refresh rate.
  29633. */
  29634. [ChromeOnly] attribute unsigned long groupMask;
  29635. readonly attribute boolean isConnected;
  29636. readonly attribute boolean isPresenting;
  29637. /**
  29638. * Dictionary of capabilities describing the VRDisplay.
  29639. */
  29640. [Constant] readonly attribute VRDisplayCapabilities capabilities;
  29641. /**
  29642. * If this VRDisplay supports room-scale experiences, the optional
  29643. * stage attribute contains details on the room-scale parameters.
  29644. */
  29645. readonly attribute VRStageParameters? stageParameters;
  29646. /* Return the current VREyeParameters for the given eye. */
  29647. VREyeParameters getEyeParameters(VREye whichEye);
  29648. /**
  29649. * An identifier for this distinct VRDisplay. Used as an
  29650. * association point in the Gamepad API.
  29651. */
  29652. [Constant] readonly attribute unsigned long displayId;
  29653. /**
  29654. * A display name, a user-readable name identifying it.
  29655. */
  29656. [Constant] readonly attribute DOMString displayName;
  29657. /**
  29658. * Populates the passed VRFrameData with the information required to render
  29659. * the current frame.
  29660. */
  29661. boolean getFrameData(VRFrameData frameData);
  29662. /**
  29663. * Return a VRPose containing the future predicted pose of the VRDisplay
  29664. * when the current frame will be presented. Subsequent calls to getPose()
  29665. * MUST return a VRPose with the same values until the next call to
  29666. * submitFrame().
  29667. *
  29668. * The VRPose will contain the position, orientation, velocity,
  29669. * and acceleration of each of these properties.
  29670. */
  29671. [NewObject] VRPose getPose();
  29672. /**
  29673. * Reset the pose for this display, treating its current position and
  29674. * orientation as the "origin/zero" values. VRPose.position,
  29675. * VRPose.orientation, and VRStageParameters.sittingToStandingTransform may be
  29676. * updated when calling resetPose(). This should be called in only
  29677. * sitting-space experiences.
  29678. */
  29679. undefined resetPose();
  29680. /**
  29681. * z-depth defining the near plane of the eye view frustum
  29682. * enables mapping of values in the render target depth
  29683. * attachment to scene coordinates. Initially set to 0.01.
  29684. */
  29685. attribute double depthNear;
  29686. /**
  29687. * z-depth defining the far plane of the eye view frustum
  29688. * enables mapping of values in the render target depth
  29689. * attachment to scene coordinates. Initially set to 10000.0.
  29690. */
  29691. attribute double depthFar;
  29692. /**
  29693. * The callback passed to `requestAnimationFrame` will be called
  29694. * any time a new frame should be rendered. When the VRDisplay is
  29695. * presenting the callback will be called at the native refresh
  29696. * rate of the HMD. When not presenting this function acts
  29697. * identically to how window.requestAnimationFrame acts. Content should
  29698. * make no assumptions of frame rate or vsync behavior as the HMD runs
  29699. * asynchronously from other displays and at differing refresh rates.
  29700. */
  29701. [Throws] long requestAnimationFrame(FrameRequestCallback callback);
  29702. /**
  29703. * Passing the value returned by `requestAnimationFrame` to
  29704. * `cancelAnimationFrame` will unregister the callback.
  29705. */
  29706. [Throws] undefined cancelAnimationFrame(long handle);
  29707. /**
  29708. * Begin presenting to the VRDisplay. Must be called in response to a user gesture.
  29709. * Repeat calls while already presenting will update the VRLayers being displayed.
  29710. */
  29711. [NewObject, NeedsCallerType] Promise<undefined> requestPresent(sequence<VRLayer> layers);
  29712. /**
  29713. * Stops presenting to the VRDisplay.
  29714. */
  29715. [NewObject] Promise<undefined> exitPresent();
  29716. /**
  29717. * Get the layers currently being presented.
  29718. */
  29719. sequence<VRLayer> getLayers();
  29720. /**
  29721. * The VRLayer provided to the VRDisplay will be captured and presented
  29722. * in the HMD. Calling this function has the same effect on the source
  29723. * canvas as any other operation that uses its source image, and canvases
  29724. * created without preserveDrawingBuffer set to true will be cleared.
  29725. */
  29726. undefined submitFrame();
  29727. };
  29728. /* ---------------------- VRDisplayEvent ----------------------------- */
  29729. /* ./webidl/VRDisplayEvent.webidl */
  29730. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29731. /* This Source Code Form is subject to the terms of the Mozilla Public
  29732. * License, v. 2.0. If a copy of the MPL was not distributed with this
  29733. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  29734. enum VRDisplayEventReason {
  29735. "mounted",
  29736. "navigation",
  29737. "requested",
  29738. "unmounted",
  29739. };
  29740. dictionary VRDisplayEventInit : EventInit {
  29741. required VRDisplay display;
  29742. VRDisplayEventReason reason;
  29743. };
  29744. [Pref="dom.vr.enabled",
  29745. SecureContext,
  29746. Exposed=Window]
  29747. interface VRDisplayEvent : Event {
  29748. constructor(DOMString type, VRDisplayEventInit eventInitDict);
  29749. readonly attribute VRDisplay display;
  29750. readonly attribute VRDisplayEventReason? reason;
  29751. };
  29752. /* ---------------------- VRServiceTest ----------------------------- */
  29753. /* ./webidl/VRServiceTest.webidl */
  29754. /* This Source Code Form is subject to the terms of the Mozilla Public
  29755. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29756. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29757. *
  29758. * This WebIDL is just for WebVR testing.
  29759. */
  29760. [Pref="dom.vr.puppet.enabled",
  29761. HeaderFile="mozilla/dom/VRServiceTest.h",
  29762. Exposed=Window]
  29763. interface VRMockDisplay {
  29764. undefined create();
  29765. attribute boolean capPosition;
  29766. attribute boolean capOrientation;
  29767. attribute boolean capPresent;
  29768. attribute boolean capExternal;
  29769. attribute boolean capAngularAcceleration;
  29770. attribute boolean capLinearAcceleration;
  29771. attribute boolean capStageParameters;
  29772. attribute boolean capMountDetection;
  29773. attribute boolean capPositionEmulated;
  29774. undefined setEyeFOV(VREye eye,
  29775. double upDegree, double rightDegree,
  29776. double downDegree, double leftDegree);
  29777. undefined setEyeOffset(VREye eye, double offsetX,
  29778. double offsetY, double offsetZ);
  29779. undefined setEyeResolution(unsigned long renderWidth,
  29780. unsigned long renderHeight);
  29781. undefined setConnected(boolean connected);
  29782. undefined setMounted(boolean mounted);
  29783. undefined setStageSize(double width, double height);
  29784. [Throws] undefined setSittingToStandingTransform(Float32Array sittingToStandingTransform);
  29785. [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
  29786. Float32Array? linearAcceleration, Float32Array? orientation,
  29787. Float32Array? angularVelocity, Float32Array? angularAcceleration);
  29788. };
  29789. [Pref="dom.vr.puppet.enabled",
  29790. HeaderFile="mozilla/dom/VRServiceTest.h",
  29791. Exposed=Window]
  29792. interface VRMockController {
  29793. undefined create();
  29794. undefined clear();
  29795. attribute GamepadHand hand;
  29796. attribute boolean capPosition;
  29797. attribute boolean capOrientation;
  29798. attribute boolean capAngularAcceleration;
  29799. attribute boolean capLinearAcceleration;
  29800. attribute unsigned long axisCount;
  29801. attribute unsigned long buttonCount;
  29802. attribute unsigned long hapticCount;
  29803. [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
  29804. Float32Array? linearAcceleration, Float32Array? orientation,
  29805. Float32Array? angularVelocity, Float32Array? angularAcceleration);
  29806. undefined setButtonPressed(unsigned long buttonIdx, boolean pressed);
  29807. undefined setButtonTouched(unsigned long buttonIdx, boolean touched);
  29808. undefined setButtonTrigger(unsigned long buttonIdx, double trigger);
  29809. undefined setAxisValue(unsigned long axisIdx, double value);
  29810. };
  29811. [Pref="dom.vr.puppet.enabled",
  29812. HeaderFile="mozilla/dom/VRServiceTest.h",
  29813. Exposed=Window]
  29814. interface VRServiceTest {
  29815. VRMockDisplay getVRDisplay();
  29816. [Throws] VRMockController getVRController(unsigned long controllerIdx);
  29817. [NewObject] Promise<undefined> run();
  29818. [NewObject] Promise<undefined> reset();
  29819. undefined commit();
  29820. undefined end();
  29821. undefined clearAll();
  29822. undefined timeout(unsigned long duration);
  29823. undefined wait(unsigned long duration);
  29824. undefined waitSubmit();
  29825. undefined waitPresentationStart();
  29826. undefined waitPresentationEnd();
  29827. [Throws]
  29828. undefined waitHapticIntensity(unsigned long controllerIdx, unsigned long hapticIdx, double intensity);
  29829. undefined captureFrame();
  29830. undefined acknowledgeFrame();
  29831. undefined rejectFrame();
  29832. undefined startTimer();
  29833. undefined stopTimer();
  29834. };
  29835. /* ---------------------- VTTCue ----------------------------- */
  29836. /* ./webidl/VTTCue.webidl */
  29837. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29838. /* This Source Code Form is subject to the terms of the Mozilla Public
  29839. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29840. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29841. *
  29842. * The origin of this IDL file is
  29843. * http://dev.w3.org/html5/webvtt/#the-vttcue-interface
  29844. */
  29845. enum AutoKeyword { "auto" };
  29846. enum LineAlignSetting {
  29847. "start",
  29848. "center",
  29849. "end"
  29850. };
  29851. enum PositionAlignSetting {
  29852. "line-left",
  29853. "center",
  29854. "line-right",
  29855. "auto"
  29856. };
  29857. enum AlignSetting {
  29858. "start",
  29859. "center",
  29860. "end",
  29861. "left",
  29862. "right"
  29863. };
  29864. enum DirectionSetting {
  29865. "",
  29866. "rl",
  29867. "lr"
  29868. };
  29869. [Exposed=Window]
  29870. interface VTTCue : TextTrackCue {
  29871. [Throws]
  29872. constructor(double startTime, double endTime, DOMString text);
  29873. attribute VTTRegion? region;
  29874. attribute DirectionSetting vertical;
  29875. attribute boolean snapToLines;
  29876. attribute (double or AutoKeyword) line;
  29877. [SetterThrows]
  29878. attribute LineAlignSetting lineAlign;
  29879. [SetterThrows]
  29880. attribute (double or AutoKeyword) position;
  29881. [SetterThrows]
  29882. attribute PositionAlignSetting positionAlign;
  29883. [SetterThrows]
  29884. attribute double size;
  29885. attribute AlignSetting align;
  29886. attribute DOMString text;
  29887. DocumentFragment getCueAsHTML();
  29888. };
  29889. // Mozilla extensions.
  29890. partial interface VTTCue {
  29891. [ChromeOnly]
  29892. attribute HTMLDivElement? displayState;
  29893. [ChromeOnly]
  29894. readonly attribute boolean hasBeenReset;
  29895. [ChromeOnly]
  29896. readonly attribute double computedLine;
  29897. [ChromeOnly]
  29898. readonly attribute double computedPosition;
  29899. [ChromeOnly]
  29900. readonly attribute PositionAlignSetting computedPositionAlign;
  29901. [ChromeOnly]
  29902. readonly attribute boolean getActive;
  29903. };
  29904. /* ---------------------- VTTRegion ----------------------------- */
  29905. /* ./webidl/VTTRegion.webidl */
  29906. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29907. /* This Source Code Form is subject to the terms of the Mozilla Public
  29908. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29909. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29910. *
  29911. * The origin of this IDL file is
  29912. * https://w3c.github.io/webvtt/#the-vttregion-interface
  29913. */
  29914. enum ScrollSetting {
  29915. "",
  29916. "up"
  29917. };
  29918. [Exposed=Window]
  29919. interface VTTRegion {
  29920. [Throws]
  29921. constructor();
  29922. attribute DOMString id;
  29923. [SetterThrows]
  29924. attribute double width;
  29925. [SetterThrows]
  29926. attribute long lines;
  29927. [SetterThrows]
  29928. attribute double regionAnchorX;
  29929. [SetterThrows]
  29930. attribute double regionAnchorY;
  29931. [SetterThrows]
  29932. attribute double viewportAnchorX;
  29933. [SetterThrows]
  29934. attribute double viewportAnchorY;
  29935. attribute ScrollSetting scroll;
  29936. };
  29937. /* ---------------------- WakeLock ----------------------------- */
  29938. /* ./webidl/WakeLock.webidl */
  29939. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29940. /* This Source Code Form is subject to the terms of the Mozilla Public
  29941. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29942. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29943. *
  29944. * The origin of this IDL file is
  29945. * https://w3c.github.io/screen-wake-lock/
  29946. */
  29947. [SecureContext, Exposed=(Window), Pref="dom.screenwakelock.enabled"]
  29948. interface WakeLock {
  29949. [Throws]
  29950. Promise<WakeLockSentinel> request(optional WakeLockType type = "screen");
  29951. };
  29952. enum WakeLockType { "screen" };
  29953. /* ---------------------- WakeLockSentinel ----------------------------- */
  29954. /* ./webidl/WakeLockSentinel.webidl */
  29955. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29956. /* This Source Code Form is subject to the terms of the Mozilla Public
  29957. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29958. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29959. *
  29960. * The origin of this IDL file is
  29961. * https://w3c.github.io/screen-wake-lock/
  29962. */
  29963. [SecureContext, Exposed=(Window), Pref="dom.screenwakelock.enabled"]
  29964. interface WakeLockSentinel : EventTarget {
  29965. readonly attribute boolean released;
  29966. readonly attribute WakeLockType type;
  29967. [BinaryName="releaseLock", Throws]
  29968. Promise<undefined> release();
  29969. attribute EventHandler onrelease;
  29970. };
  29971. /* ---------------------- WaveShaperNode ----------------------------- */
  29972. /* ./webidl/WaveShaperNode.webidl */
  29973. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  29974. /* This Source Code Form is subject to the terms of the Mozilla Public
  29975. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  29976. * You can obtain one at http://mozilla.org/MPL/2.0/.
  29977. *
  29978. * The origin of this IDL file is
  29979. * https://webaudio.github.io/web-audio-api/
  29980. *
  29981. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  29982. * liability, trademark and document use rules apply.
  29983. */
  29984. enum OverSampleType {
  29985. "none",
  29986. "2x",
  29987. "4x"
  29988. };
  29989. dictionary WaveShaperOptions : AudioNodeOptions {
  29990. sequence<float> curve;
  29991. OverSampleType oversample = "none";
  29992. };
  29993. [Pref="dom.webaudio.enabled",
  29994. Exposed=Window]
  29995. interface WaveShaperNode : AudioNode {
  29996. [Throws]
  29997. constructor(BaseAudioContext context,
  29998. optional WaveShaperOptions options = {});
  29999. [Cached, Pure, Throws]
  30000. attribute Float32Array? curve;
  30001. attribute OverSampleType oversample;
  30002. };
  30003. // Mozilla extension
  30004. WaveShaperNode includes AudioNodePassThrough;
  30005. /* ---------------------- WebAuthentication ----------------------------- */
  30006. /* ./webidl/WebAuthentication.webidl */
  30007. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  30008. /* This Source Code Form is subject to the terms of the Mozilla Public
  30009. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  30010. * You can obtain one at http://mozilla.org/MPL/2.0/.
  30011. *
  30012. * The origin of this IDL file is
  30013. * https://w3c.github.io/webauthn/
  30014. */
  30015. /***** Interfaces to Data *****/
  30016. [SecureContext, Pref="security.webauth.webauthn",
  30017. Exposed=Window]
  30018. interface PublicKeyCredential : Credential {
  30019. [SameObject, Throws] readonly attribute ArrayBuffer rawId;
  30020. [SameObject] readonly attribute AuthenticatorResponse response;
  30021. readonly attribute DOMString? authenticatorAttachment;
  30022. AuthenticationExtensionsClientOutputs getClientExtensionResults();
  30023. [NewObject] static Promise<boolean> isConditionalMediationAvailable();
  30024. [Throws, Pref="security.webauthn.enable_json_serialization_methods"] object toJSON();
  30025. };
  30026. typedef DOMString Base64URLString;
  30027. [GenerateConversionToJS]
  30028. dictionary RegistrationResponseJSON {
  30029. required Base64URLString id;
  30030. required Base64URLString rawId;
  30031. required AuthenticatorAttestationResponseJSON response;
  30032. DOMString authenticatorAttachment;
  30033. required AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
  30034. required DOMString type;
  30035. };
  30036. [GenerateConversionToJS]
  30037. dictionary AuthenticatorAttestationResponseJSON {
  30038. required Base64URLString clientDataJSON;
  30039. required Base64URLString authenticatorData;
  30040. required sequence<DOMString> transports;
  30041. // The publicKey field will be missing if pubKeyCredParams was used to
  30042. // negotiate a public-key algorithm that the user agent doesn’t
  30043. // understand. (See section “Easily accessing credential data” for a
  30044. // list of which algorithms user agents must support.) If using such an
  30045. // algorithm then the public key must be parsed directly from
  30046. // attestationObject or authenticatorData.
  30047. Base64URLString publicKey;
  30048. required long long publicKeyAlgorithm;
  30049. // This value contains copies of some of the fields above. See
  30050. // section “Easily accessing credential data”.
  30051. required Base64URLString attestationObject;
  30052. };
  30053. [GenerateConversionToJS]
  30054. dictionary AuthenticationResponseJSON {
  30055. required Base64URLString id;
  30056. required Base64URLString rawId;
  30057. required AuthenticatorAssertionResponseJSON response;
  30058. DOMString authenticatorAttachment;
  30059. required AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
  30060. required DOMString type;
  30061. };
  30062. [GenerateConversionToJS]
  30063. dictionary AuthenticatorAssertionResponseJSON {
  30064. required Base64URLString clientDataJSON;
  30065. required Base64URLString authenticatorData;
  30066. required Base64URLString signature;
  30067. Base64URLString userHandle;
  30068. Base64URLString attestationObject;
  30069. };
  30070. [GenerateConversionToJS]
  30071. dictionary AuthenticationExtensionsClientOutputsJSON {
  30072. };
  30073. [SecureContext]
  30074. partial interface PublicKeyCredential {
  30075. [NewObject] static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
  30076. };
  30077. [SecureContext]
  30078. partial interface PublicKeyCredential {
  30079. [Throws, Pref="security.webauthn.enable_json_serialization_methods"] static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options);
  30080. };
  30081. dictionary PublicKeyCredentialCreationOptionsJSON {
  30082. required PublicKeyCredentialRpEntity rp;
  30083. required PublicKeyCredentialUserEntityJSON user;
  30084. required Base64URLString challenge;
  30085. required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
  30086. unsigned long timeout;
  30087. sequence<PublicKeyCredentialDescriptorJSON> excludeCredentials = [];
  30088. AuthenticatorSelectionCriteria authenticatorSelection;
  30089. sequence<DOMString> hints = [];
  30090. DOMString attestation = "none";
  30091. sequence<DOMString> attestationFormats = [];
  30092. AuthenticationExtensionsClientInputsJSON extensions;
  30093. };
  30094. dictionary PublicKeyCredentialUserEntityJSON {
  30095. required Base64URLString id;
  30096. required DOMString name;
  30097. required DOMString displayName;
  30098. };
  30099. dictionary PublicKeyCredentialDescriptorJSON {
  30100. required Base64URLString id;
  30101. required DOMString type;
  30102. sequence<DOMString> transports;
  30103. };
  30104. dictionary AuthenticationExtensionsClientInputsJSON {
  30105. };
  30106. [SecureContext]
  30107. partial interface PublicKeyCredential {
  30108. [Throws, Pref="security.webauthn.enable_json_serialization_methods"] static PublicKeyCredentialRequestOptions parseRequestOptionsFromJSON(PublicKeyCredentialRequestOptionsJSON options);
  30109. };
  30110. dictionary PublicKeyCredentialRequestOptionsJSON {
  30111. required Base64URLString challenge;
  30112. unsigned long timeout;
  30113. DOMString rpId;
  30114. sequence<PublicKeyCredentialDescriptorJSON> allowCredentials = [];
  30115. DOMString userVerification = "preferred";
  30116. sequence<DOMString> hints = [];
  30117. DOMString attestation = "none";
  30118. sequence<DOMString> attestationFormats = [];
  30119. AuthenticationExtensionsClientInputsJSON extensions;
  30120. };
  30121. [SecureContext, Pref="security.webauth.webauthn",
  30122. Exposed=Window]
  30123. interface AuthenticatorResponse {
  30124. [SameObject, Throws] readonly attribute ArrayBuffer clientDataJSON;
  30125. };
  30126. [SecureContext, Pref="security.webauth.webauthn",
  30127. Exposed=Window]
  30128. interface AuthenticatorAttestationResponse : AuthenticatorResponse {
  30129. [SameObject, Throws] readonly attribute ArrayBuffer attestationObject;
  30130. sequence<DOMString> getTransports();
  30131. [Throws] ArrayBuffer getAuthenticatorData();
  30132. [Throws] ArrayBuffer? getPublicKey();
  30133. [Throws] COSEAlgorithmIdentifier getPublicKeyAlgorithm();
  30134. };
  30135. [SecureContext, Pref="security.webauth.webauthn",
  30136. Exposed=Window]
  30137. interface AuthenticatorAssertionResponse : AuthenticatorResponse {
  30138. [SameObject, Throws] readonly attribute ArrayBuffer authenticatorData;
  30139. [SameObject, Throws] readonly attribute ArrayBuffer signature;
  30140. [SameObject, Throws] readonly attribute ArrayBuffer? userHandle;
  30141. };
  30142. dictionary PublicKeyCredentialParameters {
  30143. required DOMString type;
  30144. required COSEAlgorithmIdentifier alg;
  30145. };
  30146. dictionary PublicKeyCredentialCreationOptions {
  30147. required PublicKeyCredentialRpEntity rp;
  30148. required PublicKeyCredentialUserEntity user;
  30149. required BufferSource challenge;
  30150. required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
  30151. unsigned long timeout;
  30152. sequence<PublicKeyCredentialDescriptor> excludeCredentials = [];
  30153. // FIXME: bug 1493860: should this "= {}" be here?
  30154. AuthenticatorSelectionCriteria authenticatorSelection = {};
  30155. DOMString attestation = "none";
  30156. // FIXME: bug 1493860: should this "= {}" be here?
  30157. AuthenticationExtensionsClientInputs extensions = {};
  30158. };
  30159. dictionary PublicKeyCredentialEntity {
  30160. required DOMString name;
  30161. };
  30162. dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity {
  30163. DOMString id;
  30164. };
  30165. dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
  30166. required BufferSource id;
  30167. required DOMString displayName;
  30168. };
  30169. dictionary AuthenticatorSelectionCriteria {
  30170. DOMString authenticatorAttachment;
  30171. DOMString residentKey;
  30172. boolean requireResidentKey = false;
  30173. DOMString userVerification = "preferred";
  30174. };
  30175. dictionary PublicKeyCredentialRequestOptions {
  30176. required BufferSource challenge;
  30177. unsigned long timeout;
  30178. USVString rpId;
  30179. sequence<PublicKeyCredentialDescriptor> allowCredentials = [];
  30180. DOMString userVerification = "preferred";
  30181. // FIXME: bug 1493860: should this "= {}" be here?
  30182. AuthenticationExtensionsClientInputs extensions = {};
  30183. };
  30184. dictionary AuthenticationExtensionsClientInputs {
  30185. };
  30186. dictionary AuthenticationExtensionsClientOutputs {
  30187. };
  30188. typedef record<DOMString, DOMString> AuthenticationExtensionsAuthenticatorInputs;
  30189. [GenerateToJSON]
  30190. dictionary CollectedClientData {
  30191. required DOMString type;
  30192. required DOMString challenge;
  30193. required DOMString origin;
  30194. TokenBinding tokenBinding;
  30195. };
  30196. dictionary TokenBinding {
  30197. required DOMString status;
  30198. DOMString id;
  30199. };
  30200. dictionary PublicKeyCredentialDescriptor {
  30201. required DOMString type;
  30202. required BufferSource id;
  30203. // Transports is a string that is matched against the AuthenticatorTransport
  30204. // enumeration so that we have forward-compatibility for new transports.
  30205. sequence<DOMString> transports;
  30206. };
  30207. typedef long COSEAlgorithmIdentifier;
  30208. typedef sequence<AAGUID> AuthenticatorSelectionList;
  30209. typedef BufferSource AAGUID;
  30210. partial dictionary AuthenticationExtensionsClientInputs {
  30211. USVString appid;
  30212. };
  30213. partial dictionary AuthenticationExtensionsClientOutputs {
  30214. boolean appid;
  30215. };
  30216. // The spec does not define any partial dictionaries that modify
  30217. // AuthenticationExtensionsClientInputsJSON, but this seems to be an error. All changes to
  30218. // AuthenticationExtensionsClientInputs must be accompanied by changes to
  30219. // AuthenticationExtensionsClientInputsJSON for parseCreationOptionsFromJSON and
  30220. // parseRequestOptionsFromJSON to function correctly.
  30221. // (see: https://github.com/w3c/webauthn/issues/1968).
  30222. partial dictionary AuthenticationExtensionsClientInputsJSON {
  30223. USVString appid;
  30224. };
  30225. // We also deviate from the spec by mirroring changes to AuthenticationExtensionsClientOutputs in
  30226. // AuthenticationExtensionsClientOutputsJSON.
  30227. partial dictionary AuthenticationExtensionsClientOutputsJSON {
  30228. boolean appid;
  30229. };
  30230. partial dictionary AuthenticationExtensionsClientInputs {
  30231. boolean credProps;
  30232. };
  30233. partial dictionary AuthenticationExtensionsClientInputsJSON {
  30234. boolean credProps;
  30235. };
  30236. dictionary CredentialPropertiesOutput {
  30237. boolean rk;
  30238. };
  30239. partial dictionary AuthenticationExtensionsClientOutputs {
  30240. CredentialPropertiesOutput credProps;
  30241. };
  30242. partial dictionary AuthenticationExtensionsClientOutputsJSON {
  30243. CredentialPropertiesOutput credProps;
  30244. };
  30245. /*
  30246. * CTAP2 Extensions
  30247. * <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-defined-extensions>
  30248. */
  30249. // hmac-secret
  30250. // <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-hmac-secret-extension>
  30251. // note: we don't support hmac-secret in get(), so we only define the create()
  30252. // inputs and outputs here.
  30253. partial dictionary AuthenticationExtensionsClientInputs {
  30254. boolean hmacCreateSecret;
  30255. };
  30256. partial dictionary AuthenticationExtensionsClientOutputs {
  30257. boolean hmacCreateSecret;
  30258. };
  30259. partial dictionary AuthenticationExtensionsClientInputsJSON {
  30260. boolean hmacCreateSecret;
  30261. };
  30262. partial dictionary AuthenticationExtensionsClientOutputsJSON {
  30263. boolean hmacCreateSecret;
  30264. };
  30265. // hmac-secret
  30266. // <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-minpinlength-extension>
  30267. partial dictionary AuthenticationExtensionsClientInputs {
  30268. boolean minPinLength;
  30269. };
  30270. partial dictionary AuthenticationExtensionsClientInputsJSON {
  30271. boolean minPinLength;
  30272. };
  30273. /* ---------------------- WebGL2RenderingContext ----------------------------- */
  30274. /* ./webidl/WebGL2RenderingContext.webidl */
  30275. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  30276. /* This Source Code Form is subject to the terms of the Mozilla Public
  30277. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  30278. * You can obtain one at http://mozilla.org/MPL/2.0/.
  30279. *
  30280. * The source for this IDL is found at https://www.khronos.org/registry/webgl/specs/latest/2.0
  30281. * This IDL depends on WebGLRenderingContext.webidl
  30282. */
  30283. typedef long long GLint64;
  30284. typedef unsigned long long GLuint64;
  30285. [Pref="webgl.enable-webgl2",
  30286. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
  30287. Exposed=(Window,Worker)]
  30288. interface WebGLSampler {
  30289. };
  30290. [Pref="webgl.enable-webgl2",
  30291. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
  30292. Exposed=(Window,Worker)]
  30293. interface WebGLSync {
  30294. };
  30295. [Pref="webgl.enable-webgl2",
  30296. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
  30297. Exposed=(Window,Worker)]
  30298. interface WebGLTransformFeedback {
  30299. };
  30300. typedef ([AllowShared] Uint32Array or sequence<GLuint>) Uint32List;
  30301. // WebGL2 spec has this as an empty interface that pulls in everything
  30302. // via WebGL2RenderingContextBase.
  30303. [Pref="webgl.enable-webgl2",
  30304. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
  30305. Exposed=(Window,Worker)]
  30306. interface WebGL2RenderingContext
  30307. {
  30308. };
  30309. interface mixin WebGL2RenderingContextBase
  30310. {
  30311. const GLenum READ_BUFFER = 0x0C02;
  30312. const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
  30313. const GLenum UNPACK_SKIP_ROWS = 0x0CF3;
  30314. const GLenum UNPACK_SKIP_PIXELS = 0x0CF4;
  30315. const GLenum PACK_ROW_LENGTH = 0x0D02;
  30316. const GLenum PACK_SKIP_ROWS = 0x0D03;
  30317. const GLenum PACK_SKIP_PIXELS = 0x0D04;
  30318. const GLenum COLOR = 0x1800;
  30319. const GLenum DEPTH = 0x1801;
  30320. const GLenum STENCIL = 0x1802;
  30321. const GLenum RED = 0x1903;
  30322. const GLenum RGB8 = 0x8051;
  30323. const GLenum RGBA8 = 0x8058;
  30324. const GLenum RGB10_A2 = 0x8059;
  30325. const GLenum TEXTURE_BINDING_3D = 0x806A;
  30326. const GLenum UNPACK_SKIP_IMAGES = 0x806D;
  30327. const GLenum UNPACK_IMAGE_HEIGHT = 0x806E;
  30328. const GLenum TEXTURE_3D = 0x806F;
  30329. const GLenum TEXTURE_WRAP_R = 0x8072;
  30330. const GLenum MAX_3D_TEXTURE_SIZE = 0x8073;
  30331. const GLenum UNSIGNED_INT_2_10_10_10_REV = 0x8368;
  30332. const GLenum MAX_ELEMENTS_VERTICES = 0x80E8;
  30333. const GLenum MAX_ELEMENTS_INDICES = 0x80E9;
  30334. const GLenum TEXTURE_MIN_LOD = 0x813A;
  30335. const GLenum TEXTURE_MAX_LOD = 0x813B;
  30336. const GLenum TEXTURE_BASE_LEVEL = 0x813C;
  30337. const GLenum TEXTURE_MAX_LEVEL = 0x813D;
  30338. const GLenum MIN = 0x8007;
  30339. const GLenum MAX = 0x8008;
  30340. const GLenum DEPTH_COMPONENT24 = 0x81A6;
  30341. const GLenum MAX_TEXTURE_LOD_BIAS = 0x84FD;
  30342. const GLenum TEXTURE_COMPARE_MODE = 0x884C;
  30343. const GLenum TEXTURE_COMPARE_FUNC = 0x884D;
  30344. const GLenum CURRENT_QUERY = 0x8865;
  30345. const GLenum QUERY_RESULT = 0x8866;
  30346. const GLenum QUERY_RESULT_AVAILABLE = 0x8867;
  30347. const GLenum STREAM_READ = 0x88E1;
  30348. const GLenum STREAM_COPY = 0x88E2;
  30349. const GLenum STATIC_READ = 0x88E5;
  30350. const GLenum STATIC_COPY = 0x88E6;
  30351. const GLenum DYNAMIC_READ = 0x88E9;
  30352. const GLenum DYNAMIC_COPY = 0x88EA;
  30353. const GLenum MAX_DRAW_BUFFERS = 0x8824;
  30354. const GLenum DRAW_BUFFER0 = 0x8825;
  30355. const GLenum DRAW_BUFFER1 = 0x8826;
  30356. const GLenum DRAW_BUFFER2 = 0x8827;
  30357. const GLenum DRAW_BUFFER3 = 0x8828;
  30358. const GLenum DRAW_BUFFER4 = 0x8829;
  30359. const GLenum DRAW_BUFFER5 = 0x882A;
  30360. const GLenum DRAW_BUFFER6 = 0x882B;
  30361. const GLenum DRAW_BUFFER7 = 0x882C;
  30362. const GLenum DRAW_BUFFER8 = 0x882D;
  30363. const GLenum DRAW_BUFFER9 = 0x882E;
  30364. const GLenum DRAW_BUFFER10 = 0x882F;
  30365. const GLenum DRAW_BUFFER11 = 0x8830;
  30366. const GLenum DRAW_BUFFER12 = 0x8831;
  30367. const GLenum DRAW_BUFFER13 = 0x8832;
  30368. const GLenum DRAW_BUFFER14 = 0x8833;
  30369. const GLenum DRAW_BUFFER15 = 0x8834;
  30370. const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
  30371. const GLenum MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
  30372. const GLenum SAMPLER_3D = 0x8B5F;
  30373. const GLenum SAMPLER_2D_SHADOW = 0x8B62;
  30374. const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
  30375. const GLenum PIXEL_PACK_BUFFER = 0x88EB;
  30376. const GLenum PIXEL_UNPACK_BUFFER = 0x88EC;
  30377. const GLenum PIXEL_PACK_BUFFER_BINDING = 0x88ED;
  30378. const GLenum PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
  30379. const GLenum FLOAT_MAT2x3 = 0x8B65;
  30380. const GLenum FLOAT_MAT2x4 = 0x8B66;
  30381. const GLenum FLOAT_MAT3x2 = 0x8B67;
  30382. const GLenum FLOAT_MAT3x4 = 0x8B68;
  30383. const GLenum FLOAT_MAT4x2 = 0x8B69;
  30384. const GLenum FLOAT_MAT4x3 = 0x8B6A;
  30385. const GLenum SRGB = 0x8C40;
  30386. const GLenum SRGB8 = 0x8C41;
  30387. const GLenum SRGB8_ALPHA8 = 0x8C43;
  30388. const GLenum COMPARE_REF_TO_TEXTURE = 0x884E;
  30389. const GLenum RGBA32F = 0x8814;
  30390. const GLenum RGB32F = 0x8815;
  30391. const GLenum RGBA16F = 0x881A;
  30392. const GLenum RGB16F = 0x881B;
  30393. const GLenum VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
  30394. const GLenum MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
  30395. const GLenum MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
  30396. const GLenum MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
  30397. const GLenum MAX_VARYING_COMPONENTS = 0x8B4B;
  30398. const GLenum TEXTURE_2D_ARRAY = 0x8C1A;
  30399. const GLenum TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
  30400. const GLenum R11F_G11F_B10F = 0x8C3A;
  30401. const GLenum UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
  30402. const GLenum RGB9_E5 = 0x8C3D;
  30403. const GLenum UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
  30404. const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
  30405. const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
  30406. const GLenum TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
  30407. const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
  30408. const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
  30409. const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
  30410. const GLenum RASTERIZER_DISCARD = 0x8C89;
  30411. const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
  30412. const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
  30413. const GLenum INTERLEAVED_ATTRIBS = 0x8C8C;
  30414. const GLenum SEPARATE_ATTRIBS = 0x8C8D;
  30415. const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
  30416. const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
  30417. const GLenum RGBA32UI = 0x8D70;
  30418. const GLenum RGB32UI = 0x8D71;
  30419. const GLenum RGBA16UI = 0x8D76;
  30420. const GLenum RGB16UI = 0x8D77;
  30421. const GLenum RGBA8UI = 0x8D7C;
  30422. const GLenum RGB8UI = 0x8D7D;
  30423. const GLenum RGBA32I = 0x8D82;
  30424. const GLenum RGB32I = 0x8D83;
  30425. const GLenum RGBA16I = 0x8D88;
  30426. const GLenum RGB16I = 0x8D89;
  30427. const GLenum RGBA8I = 0x8D8E;
  30428. const GLenum RGB8I = 0x8D8F;
  30429. const GLenum RED_INTEGER = 0x8D94;
  30430. const GLenum RGB_INTEGER = 0x8D98;
  30431. const GLenum RGBA_INTEGER = 0x8D99;
  30432. const GLenum SAMPLER_2D_ARRAY = 0x8DC1;
  30433. const GLenum SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
  30434. const GLenum SAMPLER_CUBE_SHADOW = 0x8DC5;
  30435. const GLenum UNSIGNED_INT_VEC2 = 0x8DC6;
  30436. const GLenum UNSIGNED_INT_VEC3 = 0x8DC7;
  30437. const GLenum UNSIGNED_INT_VEC4 = 0x8DC8;
  30438. const GLenum INT_SAMPLER_2D = 0x8DCA;
  30439. const GLenum INT_SAMPLER_3D = 0x8DCB;
  30440. const GLenum INT_SAMPLER_CUBE = 0x8DCC;
  30441. const GLenum INT_SAMPLER_2D_ARRAY = 0x8DCF;
  30442. const GLenum UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
  30443. const GLenum UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
  30444. const GLenum UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
  30445. const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
  30446. const GLenum DEPTH_COMPONENT32F = 0x8CAC;
  30447. const GLenum DEPTH32F_STENCIL8 = 0x8CAD;
  30448. const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
  30449. const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
  30450. const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
  30451. const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
  30452. const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
  30453. const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
  30454. const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
  30455. const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
  30456. const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
  30457. const GLenum FRAMEBUFFER_DEFAULT = 0x8218;
  30458. const GLenum UNSIGNED_INT_24_8 = 0x84FA;
  30459. const GLenum DEPTH24_STENCIL8 = 0x88F0;
  30460. const GLenum UNSIGNED_NORMALIZED = 0x8C17;
  30461. const GLenum DRAW_FRAMEBUFFER_BINDING = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */
  30462. const GLenum READ_FRAMEBUFFER = 0x8CA8;
  30463. const GLenum DRAW_FRAMEBUFFER = 0x8CA9;
  30464. const GLenum READ_FRAMEBUFFER_BINDING = 0x8CAA;
  30465. const GLenum RENDERBUFFER_SAMPLES = 0x8CAB;
  30466. const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
  30467. const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF;
  30468. const GLenum COLOR_ATTACHMENT1 = 0x8CE1;
  30469. const GLenum COLOR_ATTACHMENT2 = 0x8CE2;
  30470. const GLenum COLOR_ATTACHMENT3 = 0x8CE3;
  30471. const GLenum COLOR_ATTACHMENT4 = 0x8CE4;
  30472. const GLenum COLOR_ATTACHMENT5 = 0x8CE5;
  30473. const GLenum COLOR_ATTACHMENT6 = 0x8CE6;
  30474. const GLenum COLOR_ATTACHMENT7 = 0x8CE7;
  30475. const GLenum COLOR_ATTACHMENT8 = 0x8CE8;
  30476. const GLenum COLOR_ATTACHMENT9 = 0x8CE9;
  30477. const GLenum COLOR_ATTACHMENT10 = 0x8CEA;
  30478. const GLenum COLOR_ATTACHMENT11 = 0x8CEB;
  30479. const GLenum COLOR_ATTACHMENT12 = 0x8CEC;
  30480. const GLenum COLOR_ATTACHMENT13 = 0x8CED;
  30481. const GLenum COLOR_ATTACHMENT14 = 0x8CEE;
  30482. const GLenum COLOR_ATTACHMENT15 = 0x8CEF;
  30483. const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
  30484. const GLenum MAX_SAMPLES = 0x8D57;
  30485. const GLenum HALF_FLOAT = 0x140B;
  30486. const GLenum RG = 0x8227;
  30487. const GLenum RG_INTEGER = 0x8228;
  30488. const GLenum R8 = 0x8229;
  30489. const GLenum RG8 = 0x822B;
  30490. const GLenum R16F = 0x822D;
  30491. const GLenum R32F = 0x822E;
  30492. const GLenum RG16F = 0x822F;
  30493. const GLenum RG32F = 0x8230;
  30494. const GLenum R8I = 0x8231;
  30495. const GLenum R8UI = 0x8232;
  30496. const GLenum R16I = 0x8233;
  30497. const GLenum R16UI = 0x8234;
  30498. const GLenum R32I = 0x8235;
  30499. const GLenum R32UI = 0x8236;
  30500. const GLenum RG8I = 0x8237;
  30501. const GLenum RG8UI = 0x8238;
  30502. const GLenum RG16I = 0x8239;
  30503. const GLenum RG16UI = 0x823A;
  30504. const GLenum RG32I = 0x823B;
  30505. const GLenum RG32UI = 0x823C;
  30506. const GLenum VERTEX_ARRAY_BINDING = 0x85B5;
  30507. const GLenum R8_SNORM = 0x8F94;
  30508. const GLenum RG8_SNORM = 0x8F95;
  30509. const GLenum RGB8_SNORM = 0x8F96;
  30510. const GLenum RGBA8_SNORM = 0x8F97;
  30511. const GLenum SIGNED_NORMALIZED = 0x8F9C;
  30512. const GLenum COPY_READ_BUFFER = 0x8F36;
  30513. const GLenum COPY_WRITE_BUFFER = 0x8F37;
  30514. const GLenum COPY_READ_BUFFER_BINDING = 0x8F36; /* Same as COPY_READ_BUFFER */
  30515. const GLenum COPY_WRITE_BUFFER_BINDING = 0x8F37; /* Same as COPY_WRITE_BUFFER */
  30516. const GLenum UNIFORM_BUFFER = 0x8A11;
  30517. const GLenum UNIFORM_BUFFER_BINDING = 0x8A28;
  30518. const GLenum UNIFORM_BUFFER_START = 0x8A29;
  30519. const GLenum UNIFORM_BUFFER_SIZE = 0x8A2A;
  30520. const GLenum MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
  30521. const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
  30522. const GLenum MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
  30523. const GLenum MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
  30524. const GLenum MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
  30525. const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
  30526. const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
  30527. const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
  30528. const GLenum ACTIVE_UNIFORM_BLOCKS = 0x8A36;
  30529. const GLenum UNIFORM_TYPE = 0x8A37;
  30530. const GLenum UNIFORM_SIZE = 0x8A38;
  30531. const GLenum UNIFORM_BLOCK_INDEX = 0x8A3A;
  30532. const GLenum UNIFORM_OFFSET = 0x8A3B;
  30533. const GLenum UNIFORM_ARRAY_STRIDE = 0x8A3C;
  30534. const GLenum UNIFORM_MATRIX_STRIDE = 0x8A3D;
  30535. const GLenum UNIFORM_IS_ROW_MAJOR = 0x8A3E;
  30536. const GLenum UNIFORM_BLOCK_BINDING = 0x8A3F;
  30537. const GLenum UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
  30538. const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
  30539. const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
  30540. const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
  30541. const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
  30542. const GLenum INVALID_INDEX = 0xFFFFFFFF;
  30543. const GLenum MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
  30544. const GLenum MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
  30545. const GLenum MAX_SERVER_WAIT_TIMEOUT = 0x9111;
  30546. const GLenum OBJECT_TYPE = 0x9112;
  30547. const GLenum SYNC_CONDITION = 0x9113;
  30548. const GLenum SYNC_STATUS = 0x9114;
  30549. const GLenum SYNC_FLAGS = 0x9115;
  30550. const GLenum SYNC_FENCE = 0x9116;
  30551. const GLenum SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
  30552. const GLenum UNSIGNALED = 0x9118;
  30553. const GLenum SIGNALED = 0x9119;
  30554. const GLenum ALREADY_SIGNALED = 0x911A;
  30555. const GLenum TIMEOUT_EXPIRED = 0x911B;
  30556. const GLenum CONDITION_SATISFIED = 0x911C;
  30557. const GLenum WAIT_FAILED = 0x911D;
  30558. const GLenum SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
  30559. const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
  30560. const GLenum ANY_SAMPLES_PASSED = 0x8C2F;
  30561. const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
  30562. const GLenum SAMPLER_BINDING = 0x8919;
  30563. const GLenum RGB10_A2UI = 0x906F;
  30564. const GLenum INT_2_10_10_10_REV = 0x8D9F;
  30565. const GLenum TRANSFORM_FEEDBACK = 0x8E22;
  30566. const GLenum TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
  30567. const GLenum TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
  30568. const GLenum TRANSFORM_FEEDBACK_BINDING = 0x8E25;
  30569. const GLenum TEXTURE_IMMUTABLE_FORMAT = 0x912F;
  30570. const GLenum MAX_ELEMENT_INDEX = 0x8D6B;
  30571. const GLenum TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
  30572. const GLint64 TIMEOUT_IGNORED = -1;
  30573. /* WebGL-specific enums */
  30574. const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247;
  30575. /* Buffer objects */
  30576. // WebGL1:
  30577. undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
  30578. undefined bufferData(GLenum target, [AllowShared] ArrayBuffer? srcData, GLenum usage);
  30579. undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage);
  30580. undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBuffer srcData);
  30581. undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBufferView srcData);
  30582. // WebGL2:
  30583. undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage,
  30584. GLuint srcOffset, optional GLuint length = 0);
  30585. undefined bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData,
  30586. GLuint srcOffset, optional GLuint length = 0);
  30587. undefined copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
  30588. GLintptr writeOffset, GLsizeiptr size);
  30589. // MapBufferRange, in particular its read-only and write-only modes,
  30590. // can not be exposed safely to JavaScript. GetBufferSubData
  30591. // replaces it for the purpose of fetching data back from the GPU.
  30592. undefined getBufferSubData(GLenum target, GLintptr srcByteOffset, [AllowShared] ArrayBufferView dstData,
  30593. optional GLuint dstOffset = 0, optional GLuint length = 0);
  30594. /* Framebuffer objects */
  30595. undefined blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0,
  30596. GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  30597. undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level,
  30598. GLint layer);
  30599. [Throws]
  30600. undefined invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
  30601. [Throws]
  30602. undefined invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments,
  30603. GLint x, GLint y, GLsizei width, GLsizei height);
  30604. undefined readBuffer(GLenum src);
  30605. /* Renderbuffer objects */
  30606. [Throws]
  30607. any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
  30608. undefined renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat,
  30609. GLsizei width, GLsizei height);
  30610. /* Texture objects */
  30611. undefined texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
  30612. GLsizei height);
  30613. undefined texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
  30614. GLsizei height, GLsizei depth);
  30615. // WebGL1 legacy entrypoints:
  30616. [Throws] // Another overhead throws.
  30617. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30618. GLsizei width, GLsizei height, GLint border, GLenum format,
  30619. GLenum type, [AllowShared] ArrayBufferView? pixels);
  30620. [Throws]
  30621. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30622. GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
  30623. [Throws]
  30624. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30625. GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
  30626. [Throws]
  30627. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30628. GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
  30629. [Throws] // Another overhead throws.
  30630. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30631. GLenum format, GLenum type, ImageBitmap source);
  30632. [Throws] // Another overhead throws.
  30633. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30634. GLenum format, GLenum type, ImageData source);
  30635. [Throws] // Another overhead throws.
  30636. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30637. GLenum format, GLenum type, OffscreenCanvas source);
  30638. [Throws] // Another overhead throws.
  30639. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  30640. GLenum format, GLenum type, VideoFrame source);
  30641. [Throws] // Another overhead throws.
  30642. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30643. GLsizei width, GLsizei height,
  30644. GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
  30645. [Throws]
  30646. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30647. GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
  30648. [Throws]
  30649. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30650. GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
  30651. [Throws]
  30652. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30653. GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
  30654. [Throws] // Another overhead throws.
  30655. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30656. GLenum format, GLenum type, ImageBitmap source);
  30657. [Throws] // Another overhead throws.
  30658. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30659. GLenum format, GLenum type, ImageData source);
  30660. [Throws] // Another overhead throws.
  30661. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30662. GLenum format, GLenum type, OffscreenCanvas source);
  30663. [Throws] // Another overhead throws.
  30664. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30665. GLenum format, GLenum type, VideoFrame source);
  30666. // WebGL2 entrypoints:
  30667. [Throws] // Another overhead throws.
  30668. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30669. GLint border, GLenum format, GLenum type, GLintptr pboOffset);
  30670. [Throws]
  30671. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30672. GLint border, GLenum format, GLenum type,
  30673. HTMLCanvasElement source); // May throw DOMException
  30674. [Throws]
  30675. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30676. GLint border, GLenum format, GLenum type,
  30677. HTMLImageElement source); // May throw DOMException
  30678. [Throws]
  30679. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30680. GLint border, GLenum format, GLenum type,
  30681. HTMLVideoElement source); // May throw DOMException
  30682. [Throws] // Another overhead throws.
  30683. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30684. GLint border, GLenum format, GLenum type,
  30685. ImageBitmap source);
  30686. [Throws] // Another overhead throws.
  30687. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30688. GLint border, GLenum format, GLenum type,
  30689. ImageData source);
  30690. [Throws] // Another overhead throws.
  30691. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30692. GLint border, GLenum format, GLenum type,
  30693. OffscreenCanvas source);
  30694. [Throws] // Another overhead throws.
  30695. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30696. GLint border, GLenum format, GLenum type,
  30697. VideoFrame source);
  30698. [Throws] // Another overhead throws.
  30699. undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30700. GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
  30701. GLuint srcOffset);
  30702. [Throws] // Another overhead throws.
  30703. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30704. GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset);
  30705. [Throws]
  30706. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30707. GLsizei depth, GLint border, GLenum format, GLenum type,
  30708. HTMLCanvasElement source); // May throw DOMException
  30709. [Throws]
  30710. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30711. GLsizei depth, GLint border, GLenum format, GLenum type,
  30712. HTMLImageElement source); // May throw DOMException
  30713. [Throws]
  30714. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30715. GLsizei depth, GLint border, GLenum format, GLenum type,
  30716. HTMLVideoElement source); // May throw DOMException
  30717. [Throws] // Another overhead throws.
  30718. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30719. GLsizei depth, GLint border, GLenum format, GLenum type,
  30720. ImageBitmap source);
  30721. [Throws] // Another overhead throws.
  30722. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30723. GLsizei depth, GLint border, GLenum format, GLenum type,
  30724. ImageData source);
  30725. [Throws] // Another overhead throws.
  30726. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30727. GLsizei depth, GLint border, GLenum format, GLenum type,
  30728. OffscreenCanvas source);
  30729. [Throws] // Another overhead throws.
  30730. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30731. GLsizei depth, GLint border, GLenum format, GLenum type,
  30732. VideoFrame source);
  30733. [Throws] // Another overhead throws.
  30734. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30735. GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? srcData);
  30736. [Throws] // Another overhead throws.
  30737. undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
  30738. GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
  30739. GLuint srcOffset);
  30740. [Throws] // Another overhead throws.
  30741. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30742. GLsizei height, GLenum format, GLenum type, GLintptr pboOffset);
  30743. [Throws]
  30744. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30745. GLsizei height, GLenum format, GLenum type,
  30746. HTMLCanvasElement source); // May throw DOMException
  30747. [Throws]
  30748. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30749. GLsizei height, GLenum format, GLenum type,
  30750. HTMLImageElement source); // May throw DOMException
  30751. [Throws]
  30752. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30753. GLsizei height, GLenum format, GLenum type,
  30754. HTMLVideoElement source); // May throw DOMException
  30755. [Throws] // Another overhead throws.
  30756. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30757. GLsizei height, GLenum format, GLenum type,
  30758. ImageBitmap source);
  30759. [Throws] // Another overhead throws.
  30760. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30761. GLsizei height, GLenum format, GLenum type,
  30762. ImageData source);
  30763. [Throws] // Another overhead throws.
  30764. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30765. GLsizei height, GLenum format, GLenum type,
  30766. OffscreenCanvas source);
  30767. [Throws] // Another overhead throws.
  30768. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30769. GLsizei height, GLenum format, GLenum type,
  30770. VideoFrame source);
  30771. [Throws] // Another overhead throws.
  30772. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
  30773. GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
  30774. GLuint srcOffset);
  30775. [Throws] // Another overhead throws.
  30776. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30777. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30778. GLintptr pboOffset);
  30779. [Throws]
  30780. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30781. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30782. HTMLCanvasElement source); // May throw DOMException
  30783. [Throws]
  30784. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30785. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30786. HTMLImageElement source); // May throw DOMException
  30787. [Throws]
  30788. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30789. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30790. HTMLVideoElement source); // May throw DOMException
  30791. [Throws] // Another overhead throws.
  30792. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30793. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30794. ImageBitmap source);
  30795. [Throws] // Another overhead throws.
  30796. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30797. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30798. ImageData source);
  30799. [Throws] // Another overhead throws.
  30800. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30801. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30802. OffscreenCanvas source);
  30803. [Throws] // Another overhead throws.
  30804. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30805. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30806. VideoFrame source);
  30807. [Throws] // Another overhead throws.
  30808. undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30809. GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
  30810. [AllowShared] ArrayBufferView? srcData, optional GLuint srcOffset = 0);
  30811. undefined copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
  30812. GLint x, GLint y, GLsizei width, GLsizei height);
  30813. undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
  30814. GLsizei height, GLint border, GLsizei imageSize, GLintptr offset);
  30815. undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
  30816. GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData,
  30817. optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
  30818. undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
  30819. GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLintptr offset);
  30820. undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
  30821. GLsizei height, GLsizei depth, GLint border, [AllowShared] ArrayBufferView srcData,
  30822. optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
  30823. undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30824. GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset);
  30825. undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30826. GLsizei width, GLsizei height, GLenum format,
  30827. [AllowShared] ArrayBufferView srcData,
  30828. optional GLuint srcOffset = 0,
  30829. optional GLuint srcLengthOverride = 0);
  30830. undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30831. GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
  30832. GLenum format, GLsizei imageSize, GLintptr offset);
  30833. undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  30834. GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
  30835. GLenum format, [AllowShared] ArrayBufferView srcData,
  30836. optional GLuint srcOffset = 0,
  30837. optional GLuint srcLengthOverride = 0);
  30838. /* Programs and shaders */
  30839. [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name);
  30840. /* Uniforms */
  30841. undefined uniform1ui(WebGLUniformLocation? location, GLuint v0);
  30842. undefined uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
  30843. undefined uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
  30844. undefined uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
  30845. undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
  30846. optional GLuint srcLength = 0);
  30847. undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
  30848. optional GLuint srcLength = 0);
  30849. undefined uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
  30850. optional GLuint srcLength = 0);
  30851. undefined uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
  30852. optional GLuint srcLength = 0);
  30853. undefined uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
  30854. optional GLuint srcLength = 0);
  30855. undefined uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
  30856. optional GLuint srcLength = 0);
  30857. undefined uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
  30858. optional GLuint srcLength = 0);
  30859. undefined uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
  30860. optional GLuint srcLength = 0);
  30861. undefined uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
  30862. optional GLuint srcLength = 0);
  30863. undefined uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
  30864. optional GLuint srcLength = 0);
  30865. undefined uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
  30866. optional GLuint srcLength = 0);
  30867. undefined uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
  30868. optional GLuint srcLength = 0);
  30869. undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30870. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30871. undefined uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30872. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30873. undefined uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30874. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30875. undefined uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30876. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30877. undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30878. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30879. undefined uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30880. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30881. undefined uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30882. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30883. undefined uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30884. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30885. undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
  30886. optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
  30887. /* Vertex attribs */
  30888. undefined vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
  30889. undefined vertexAttribI4iv(GLuint index, Int32List values);
  30890. undefined vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
  30891. undefined vertexAttribI4uiv(GLuint index, Uint32List values);
  30892. undefined vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
  30893. /* Writing to the drawing buffer */
  30894. undefined vertexAttribDivisor(GLuint index, GLuint divisor);
  30895. undefined drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
  30896. undefined drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
  30897. undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
  30898. /* Reading back pixels */
  30899. // WebGL1:
  30900. [Throws, NeedsCallerType] // Throws on readback in a write-only context.
  30901. undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
  30902. [AllowShared] ArrayBufferView? dstData);
  30903. // WebGL2:
  30904. [Throws, NeedsCallerType] // Throws on readback in a write-only context.
  30905. undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
  30906. GLintptr offset);
  30907. [Throws, NeedsCallerType] // Throws on readback in a write-only context.
  30908. undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
  30909. [AllowShared] ArrayBufferView dstData, GLuint dstOffset);
  30910. /* Multiple Render Targets */
  30911. undefined drawBuffers(sequence<GLenum> buffers);
  30912. undefined clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values,
  30913. optional GLuint srcOffset = 0);
  30914. undefined clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values,
  30915. optional GLuint srcOffset = 0);
  30916. undefined clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values,
  30917. optional GLuint srcOffset = 0);
  30918. undefined clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
  30919. /* Query Objects */
  30920. WebGLQuery? createQuery();
  30921. undefined deleteQuery(WebGLQuery? query);
  30922. [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query);
  30923. undefined beginQuery(GLenum target, WebGLQuery query);
  30924. undefined endQuery(GLenum target);
  30925. any getQuery(GLenum target, GLenum pname);
  30926. any getQueryParameter(WebGLQuery query, GLenum pname);
  30927. /* Sampler Objects */
  30928. WebGLSampler? createSampler();
  30929. undefined deleteSampler(WebGLSampler? sampler);
  30930. [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler);
  30931. undefined bindSampler(GLuint unit, WebGLSampler? sampler);
  30932. undefined samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param);
  30933. undefined samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param);
  30934. any getSamplerParameter(WebGLSampler sampler, GLenum pname);
  30935. /* Sync objects */
  30936. WebGLSync? fenceSync(GLenum condition, GLbitfield flags);
  30937. [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync);
  30938. undefined deleteSync(WebGLSync? sync);
  30939. GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
  30940. undefined waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout);
  30941. any getSyncParameter(WebGLSync sync, GLenum pname);
  30942. /* Transform Feedback */
  30943. WebGLTransformFeedback? createTransformFeedback();
  30944. undefined deleteTransformFeedback(WebGLTransformFeedback? tf);
  30945. [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf);
  30946. undefined bindTransformFeedback(GLenum target, WebGLTransformFeedback? tf);
  30947. undefined beginTransformFeedback(GLenum primitiveMode);
  30948. undefined endTransformFeedback();
  30949. undefined transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode);
  30950. [NewObject]
  30951. WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index);
  30952. undefined pauseTransformFeedback();
  30953. undefined resumeTransformFeedback();
  30954. /* Uniform Buffer Objects and Transform Feedback Buffers */
  30955. undefined bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
  30956. undefined bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
  30957. [Throws] // GetOrCreateDOMReflector can fail.
  30958. any getIndexedParameter(GLenum target, GLuint index);
  30959. sequence<GLuint>? getUniformIndices(WebGLProgram program, sequence<DOMString> uniformNames);
  30960. any getActiveUniforms(WebGLProgram program, sequence<GLuint> uniformIndices, GLenum pname);
  30961. GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName);
  30962. [Throws] // Creating a Uint32Array can fail.
  30963. any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname);
  30964. DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex);
  30965. undefined uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
  30966. /* Vertex Array Objects */
  30967. WebGLVertexArrayObject? createVertexArray();
  30968. undefined deleteVertexArray(WebGLVertexArrayObject? vertexArray);
  30969. [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray);
  30970. undefined bindVertexArray(WebGLVertexArrayObject? array);
  30971. };
  30972. WebGL2RenderingContext includes WebGLRenderingContextBase;
  30973. WebGL2RenderingContext includes WebGL2RenderingContextBase;
  30974. [LegacyNoInterfaceObject,
  30975. Exposed=(Window,Worker)]
  30976. interface EXT_color_buffer_float {
  30977. };
  30978. [LegacyNoInterfaceObject,
  30979. Exposed=(Window,Worker)]
  30980. interface OVR_multiview2 {
  30981. const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630;
  30982. const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632;
  30983. const GLenum MAX_VIEWS_OVR = 0x9631;
  30984. const GLenum FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633;
  30985. undefined framebufferTextureMultiviewOVR(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint baseViewIndex, GLsizei numViews);
  30986. };
  30987. /* ---------------------- WebGLContextEvent ----------------------------- */
  30988. /* ./webidl/WebGLContextEvent.webidl */
  30989. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  30990. /* This Source Code Form is subject to the terms of the Mozilla Public
  30991. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  30992. * You can obtain one at http://mozilla.org/MPL/2.0/.
  30993. * The origin of this IDL file is
  30994. * https://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event
  30995. */
  30996. [Exposed=(Window,Worker),
  30997. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  30998. interface WebGLContextEvent : Event {
  30999. constructor(DOMString type, optional WebGLContextEventInit eventInit = {});
  31000. readonly attribute DOMString statusMessage;
  31001. };
  31002. // EventInit is defined in the DOM4 specification.
  31003. dictionary WebGLContextEventInit : EventInit {
  31004. DOMString statusMessage = "";
  31005. };
  31006. /* ---------------------- WebGLRenderingContext ----------------------------- */
  31007. /* ./webidl/WebGLRenderingContext.webidl */
  31008. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  31009. /* This Source Code Form is subject to the terms of the Mozilla Public
  31010. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  31011. * You can obtain one at http://mozilla.org/MPL/2.0/.
  31012. *
  31013. * The origin of this IDL file is
  31014. * https://www.khronos.org/registry/webgl/specs/latest/webgl.idl
  31015. *
  31016. * Copyright © 2012 Khronos Group
  31017. */
  31018. // WebGL IDL definitions scraped from the Khronos specification:
  31019. // https://www.khronos.org/registry/webgl/specs/latest/
  31020. //
  31021. // This IDL depends on the typed array specification defined at:
  31022. // https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl
  31023. typedef unsigned long GLenum;
  31024. typedef boolean GLboolean;
  31025. typedef unsigned long GLbitfield;
  31026. typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */
  31027. typedef short GLshort;
  31028. typedef long GLint;
  31029. typedef long GLsizei;
  31030. typedef long long GLintptr;
  31031. typedef long long GLsizeiptr;
  31032. // Ideally the typedef below would use 'unsigned byte', but that doesn't currently exist in Web IDL.
  31033. typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit type. */
  31034. typedef unsigned short GLushort;
  31035. typedef unsigned long GLuint;
  31036. typedef unrestricted float GLfloat;
  31037. typedef unrestricted float GLclampf;
  31038. typedef unsigned long long GLuint64EXT;
  31039. // The power preference settings are documented in the WebGLContextAttributes
  31040. // section of the specification.
  31041. enum WebGLPowerPreference { "default", "low-power", "high-performance" };
  31042. enum PredefinedColorSpace { "srgb", "display-p3" };
  31043. [GenerateInit]
  31044. dictionary WebGLContextAttributes {
  31045. // We deviate from the spec for alpha and antialias:
  31046. // * alpha: Historically, we might use rgb565 instead of rgb(x)8, for
  31047. // memory bandwidth optimization.
  31048. // * antialias: On Android, DPI is high and mem-bandwidth is low, so we
  31049. // default to antialias:false if it's not set.
  31050. GLboolean alpha; // = true; // Default is controlled by webgl.default-no-alpha.
  31051. GLboolean depth = true;
  31052. GLboolean stencil = false;
  31053. GLboolean antialias; // = true; // Default is controlled by webgl.default-antialias.
  31054. GLboolean premultipliedAlpha = true;
  31055. GLboolean preserveDrawingBuffer = false;
  31056. GLboolean failIfMajorPerformanceCaveat = false;
  31057. WebGLPowerPreference powerPreference = "default";
  31058. // We are experimenting here, though this should be close to where we end up.
  31059. [Pref="webgl.colorspaces.prototype"]
  31060. PredefinedColorSpace colorSpace; // = "srgb"; Default is gfx::ColorSpace2::UNKNOWN for now.
  31061. };
  31062. [Exposed=(Window,Worker),
  31063. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31064. interface WebGLBuffer {
  31065. };
  31066. [Exposed=(Window,Worker),
  31067. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31068. interface WebGLFramebuffer {
  31069. };
  31070. [Exposed=(Window,Worker),
  31071. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31072. interface WebGLProgram {
  31073. };
  31074. [Exposed=(Window,Worker),
  31075. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31076. interface WebGLRenderbuffer {
  31077. };
  31078. [Exposed=(Window,Worker),
  31079. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31080. interface WebGLShader {
  31081. };
  31082. [Exposed=(Window,Worker),
  31083. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31084. interface WebGLTexture {
  31085. };
  31086. [Exposed=(Window,Worker),
  31087. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31088. interface WebGLUniformLocation {
  31089. };
  31090. [Exposed=(Window,Worker),
  31091. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31092. interface WebGLVertexArrayObject {
  31093. };
  31094. [Exposed=(Window,Worker),
  31095. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31096. interface WebGLActiveInfo {
  31097. readonly attribute GLint size;
  31098. readonly attribute GLenum type;
  31099. readonly attribute DOMString name;
  31100. };
  31101. [Exposed=(Window,Worker),
  31102. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31103. interface WebGLShaderPrecisionFormat {
  31104. readonly attribute GLint rangeMin;
  31105. readonly attribute GLint rangeMax;
  31106. readonly attribute GLint precision;
  31107. };
  31108. typedef ([AllowShared] Float32Array or sequence<GLfloat>) Float32List;
  31109. typedef ([AllowShared] Int32Array or sequence<GLint>) Int32List;
  31110. // Shared mixin for the things that WebGLRenderingContext and
  31111. // WebGL2RenderingContext have in common. This doesn't have all the things they
  31112. // have in common, because we don't support splitting multiple overloads of the
  31113. // same method across separate interfaces and pulling them in with "includes".
  31114. [Exposed=(Window, Worker)]
  31115. interface mixin WebGLRenderingContextBase {
  31116. /* ClearBufferMask */
  31117. const GLenum DEPTH_BUFFER_BIT = 0x00000100;
  31118. const GLenum STENCIL_BUFFER_BIT = 0x00000400;
  31119. const GLenum COLOR_BUFFER_BIT = 0x00004000;
  31120. /* BeginMode */
  31121. const GLenum POINTS = 0x0000;
  31122. const GLenum LINES = 0x0001;
  31123. const GLenum LINE_LOOP = 0x0002;
  31124. const GLenum LINE_STRIP = 0x0003;
  31125. const GLenum TRIANGLES = 0x0004;
  31126. const GLenum TRIANGLE_STRIP = 0x0005;
  31127. const GLenum TRIANGLE_FAN = 0x0006;
  31128. /* AlphaFunction (not supported in ES20) */
  31129. /* NEVER */
  31130. /* LESS */
  31131. /* EQUAL */
  31132. /* LEQUAL */
  31133. /* GREATER */
  31134. /* NOTEQUAL */
  31135. /* GEQUAL */
  31136. /* ALWAYS */
  31137. /* BlendingFactorDest */
  31138. const GLenum ZERO = 0;
  31139. const GLenum ONE = 1;
  31140. const GLenum SRC_COLOR = 0x0300;
  31141. const GLenum ONE_MINUS_SRC_COLOR = 0x0301;
  31142. const GLenum SRC_ALPHA = 0x0302;
  31143. const GLenum ONE_MINUS_SRC_ALPHA = 0x0303;
  31144. const GLenum DST_ALPHA = 0x0304;
  31145. const GLenum ONE_MINUS_DST_ALPHA = 0x0305;
  31146. /* BlendingFactorSrc */
  31147. /* ZERO */
  31148. /* ONE */
  31149. const GLenum DST_COLOR = 0x0306;
  31150. const GLenum ONE_MINUS_DST_COLOR = 0x0307;
  31151. const GLenum SRC_ALPHA_SATURATE = 0x0308;
  31152. /* SRC_ALPHA */
  31153. /* ONE_MINUS_SRC_ALPHA */
  31154. /* DST_ALPHA */
  31155. /* ONE_MINUS_DST_ALPHA */
  31156. /* BlendEquationSeparate */
  31157. const GLenum FUNC_ADD = 0x8006;
  31158. const GLenum BLEND_EQUATION = 0x8009;
  31159. const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */
  31160. const GLenum BLEND_EQUATION_ALPHA = 0x883D;
  31161. /* BlendSubtract */
  31162. const GLenum FUNC_SUBTRACT = 0x800A;
  31163. const GLenum FUNC_REVERSE_SUBTRACT = 0x800B;
  31164. /* Separate Blend Functions */
  31165. const GLenum BLEND_DST_RGB = 0x80C8;
  31166. const GLenum BLEND_SRC_RGB = 0x80C9;
  31167. const GLenum BLEND_DST_ALPHA = 0x80CA;
  31168. const GLenum BLEND_SRC_ALPHA = 0x80CB;
  31169. const GLenum CONSTANT_COLOR = 0x8001;
  31170. const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002;
  31171. const GLenum CONSTANT_ALPHA = 0x8003;
  31172. const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004;
  31173. const GLenum BLEND_COLOR = 0x8005;
  31174. /* Buffer Objects */
  31175. const GLenum ARRAY_BUFFER = 0x8892;
  31176. const GLenum ELEMENT_ARRAY_BUFFER = 0x8893;
  31177. const GLenum ARRAY_BUFFER_BINDING = 0x8894;
  31178. const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
  31179. const GLenum STREAM_DRAW = 0x88E0;
  31180. const GLenum STATIC_DRAW = 0x88E4;
  31181. const GLenum DYNAMIC_DRAW = 0x88E8;
  31182. const GLenum BUFFER_SIZE = 0x8764;
  31183. const GLenum BUFFER_USAGE = 0x8765;
  31184. const GLenum CURRENT_VERTEX_ATTRIB = 0x8626;
  31185. /* CullFaceMode */
  31186. const GLenum FRONT = 0x0404;
  31187. const GLenum BACK = 0x0405;
  31188. const GLenum FRONT_AND_BACK = 0x0408;
  31189. /* DepthFunction */
  31190. /* NEVER */
  31191. /* LESS */
  31192. /* EQUAL */
  31193. /* LEQUAL */
  31194. /* GREATER */
  31195. /* NOTEQUAL */
  31196. /* GEQUAL */
  31197. /* ALWAYS */
  31198. /* EnableCap */
  31199. /* TEXTURE_2D */
  31200. const GLenum CULL_FACE = 0x0B44;
  31201. const GLenum BLEND = 0x0BE2;
  31202. const GLenum DITHER = 0x0BD0;
  31203. const GLenum STENCIL_TEST = 0x0B90;
  31204. const GLenum DEPTH_TEST = 0x0B71;
  31205. const GLenum SCISSOR_TEST = 0x0C11;
  31206. const GLenum POLYGON_OFFSET_FILL = 0x8037;
  31207. const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
  31208. const GLenum SAMPLE_COVERAGE = 0x80A0;
  31209. /* ErrorCode */
  31210. const GLenum NO_ERROR = 0;
  31211. const GLenum INVALID_ENUM = 0x0500;
  31212. const GLenum INVALID_VALUE = 0x0501;
  31213. const GLenum INVALID_OPERATION = 0x0502;
  31214. const GLenum OUT_OF_MEMORY = 0x0505;
  31215. /* FrontFaceDirection */
  31216. const GLenum CW = 0x0900;
  31217. const GLenum CCW = 0x0901;
  31218. /* GetPName */
  31219. const GLenum LINE_WIDTH = 0x0B21;
  31220. const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D;
  31221. const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E;
  31222. const GLenum CULL_FACE_MODE = 0x0B45;
  31223. const GLenum FRONT_FACE = 0x0B46;
  31224. const GLenum DEPTH_RANGE = 0x0B70;
  31225. const GLenum DEPTH_WRITEMASK = 0x0B72;
  31226. const GLenum DEPTH_CLEAR_VALUE = 0x0B73;
  31227. const GLenum DEPTH_FUNC = 0x0B74;
  31228. const GLenum STENCIL_CLEAR_VALUE = 0x0B91;
  31229. const GLenum STENCIL_FUNC = 0x0B92;
  31230. const GLenum STENCIL_FAIL = 0x0B94;
  31231. const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95;
  31232. const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96;
  31233. const GLenum STENCIL_REF = 0x0B97;
  31234. const GLenum STENCIL_VALUE_MASK = 0x0B93;
  31235. const GLenum STENCIL_WRITEMASK = 0x0B98;
  31236. const GLenum STENCIL_BACK_FUNC = 0x8800;
  31237. const GLenum STENCIL_BACK_FAIL = 0x8801;
  31238. const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
  31239. const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
  31240. const GLenum STENCIL_BACK_REF = 0x8CA3;
  31241. const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4;
  31242. const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5;
  31243. const GLenum VIEWPORT = 0x0BA2;
  31244. const GLenum SCISSOR_BOX = 0x0C10;
  31245. /* SCISSOR_TEST */
  31246. const GLenum COLOR_CLEAR_VALUE = 0x0C22;
  31247. const GLenum COLOR_WRITEMASK = 0x0C23;
  31248. const GLenum UNPACK_ALIGNMENT = 0x0CF5;
  31249. const GLenum PACK_ALIGNMENT = 0x0D05;
  31250. const GLenum MAX_TEXTURE_SIZE = 0x0D33;
  31251. const GLenum MAX_VIEWPORT_DIMS = 0x0D3A;
  31252. const GLenum SUBPIXEL_BITS = 0x0D50;
  31253. const GLenum RED_BITS = 0x0D52;
  31254. const GLenum GREEN_BITS = 0x0D53;
  31255. const GLenum BLUE_BITS = 0x0D54;
  31256. const GLenum ALPHA_BITS = 0x0D55;
  31257. const GLenum DEPTH_BITS = 0x0D56;
  31258. const GLenum STENCIL_BITS = 0x0D57;
  31259. const GLenum POLYGON_OFFSET_UNITS = 0x2A00;
  31260. /* POLYGON_OFFSET_FILL */
  31261. const GLenum POLYGON_OFFSET_FACTOR = 0x8038;
  31262. const GLenum TEXTURE_BINDING_2D = 0x8069;
  31263. const GLenum SAMPLE_BUFFERS = 0x80A8;
  31264. const GLenum SAMPLES = 0x80A9;
  31265. const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA;
  31266. const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB;
  31267. /* GetTextureParameter */
  31268. /* TEXTURE_MAG_FILTER */
  31269. /* TEXTURE_MIN_FILTER */
  31270. /* TEXTURE_WRAP_S */
  31271. /* TEXTURE_WRAP_T */
  31272. const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3;
  31273. /* HintMode */
  31274. const GLenum DONT_CARE = 0x1100;
  31275. const GLenum FASTEST = 0x1101;
  31276. const GLenum NICEST = 0x1102;
  31277. /* HintTarget */
  31278. const GLenum GENERATE_MIPMAP_HINT = 0x8192;
  31279. /* DataType */
  31280. const GLenum BYTE = 0x1400;
  31281. const GLenum UNSIGNED_BYTE = 0x1401;
  31282. const GLenum SHORT = 0x1402;
  31283. const GLenum UNSIGNED_SHORT = 0x1403;
  31284. const GLenum INT = 0x1404;
  31285. const GLenum UNSIGNED_INT = 0x1405;
  31286. const GLenum FLOAT = 0x1406;
  31287. /* PixelFormat */
  31288. const GLenum DEPTH_COMPONENT = 0x1902;
  31289. const GLenum ALPHA = 0x1906;
  31290. const GLenum RGB = 0x1907;
  31291. const GLenum RGBA = 0x1908;
  31292. const GLenum LUMINANCE = 0x1909;
  31293. const GLenum LUMINANCE_ALPHA = 0x190A;
  31294. /* PixelType */
  31295. /* UNSIGNED_BYTE */
  31296. const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033;
  31297. const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034;
  31298. const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363;
  31299. /* Shaders */
  31300. const GLenum FRAGMENT_SHADER = 0x8B30;
  31301. const GLenum VERTEX_SHADER = 0x8B31;
  31302. const GLenum MAX_VERTEX_ATTRIBS = 0x8869;
  31303. const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
  31304. const GLenum MAX_VARYING_VECTORS = 0x8DFC;
  31305. const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
  31306. const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
  31307. const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872;
  31308. const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
  31309. const GLenum SHADER_TYPE = 0x8B4F;
  31310. const GLenum DELETE_STATUS = 0x8B80;
  31311. const GLenum LINK_STATUS = 0x8B82;
  31312. const GLenum VALIDATE_STATUS = 0x8B83;
  31313. const GLenum ATTACHED_SHADERS = 0x8B85;
  31314. const GLenum ACTIVE_UNIFORMS = 0x8B86;
  31315. const GLenum ACTIVE_ATTRIBUTES = 0x8B89;
  31316. const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C;
  31317. const GLenum CURRENT_PROGRAM = 0x8B8D;
  31318. /* StencilFunction */
  31319. const GLenum NEVER = 0x0200;
  31320. const GLenum LESS = 0x0201;
  31321. const GLenum EQUAL = 0x0202;
  31322. const GLenum LEQUAL = 0x0203;
  31323. const GLenum GREATER = 0x0204;
  31324. const GLenum NOTEQUAL = 0x0205;
  31325. const GLenum GEQUAL = 0x0206;
  31326. const GLenum ALWAYS = 0x0207;
  31327. /* StencilOp */
  31328. /* ZERO */
  31329. const GLenum KEEP = 0x1E00;
  31330. const GLenum REPLACE = 0x1E01;
  31331. const GLenum INCR = 0x1E02;
  31332. const GLenum DECR = 0x1E03;
  31333. const GLenum INVERT = 0x150A;
  31334. const GLenum INCR_WRAP = 0x8507;
  31335. const GLenum DECR_WRAP = 0x8508;
  31336. /* StringName */
  31337. const GLenum VENDOR = 0x1F00;
  31338. const GLenum RENDERER = 0x1F01;
  31339. const GLenum VERSION = 0x1F02;
  31340. /* TextureMagFilter */
  31341. const GLenum NEAREST = 0x2600;
  31342. const GLenum LINEAR = 0x2601;
  31343. /* TextureMinFilter */
  31344. /* NEAREST */
  31345. /* LINEAR */
  31346. const GLenum NEAREST_MIPMAP_NEAREST = 0x2700;
  31347. const GLenum LINEAR_MIPMAP_NEAREST = 0x2701;
  31348. const GLenum NEAREST_MIPMAP_LINEAR = 0x2702;
  31349. const GLenum LINEAR_MIPMAP_LINEAR = 0x2703;
  31350. /* TextureParameterName */
  31351. const GLenum TEXTURE_MAG_FILTER = 0x2800;
  31352. const GLenum TEXTURE_MIN_FILTER = 0x2801;
  31353. const GLenum TEXTURE_WRAP_S = 0x2802;
  31354. const GLenum TEXTURE_WRAP_T = 0x2803;
  31355. /* TextureTarget */
  31356. const GLenum TEXTURE_2D = 0x0DE1;
  31357. const GLenum TEXTURE = 0x1702;
  31358. const GLenum TEXTURE_CUBE_MAP = 0x8513;
  31359. const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514;
  31360. const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
  31361. const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
  31362. const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
  31363. const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
  31364. const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
  31365. const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
  31366. const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
  31367. /* TextureUnit */
  31368. const GLenum TEXTURE0 = 0x84C0;
  31369. const GLenum TEXTURE1 = 0x84C1;
  31370. const GLenum TEXTURE2 = 0x84C2;
  31371. const GLenum TEXTURE3 = 0x84C3;
  31372. const GLenum TEXTURE4 = 0x84C4;
  31373. const GLenum TEXTURE5 = 0x84C5;
  31374. const GLenum TEXTURE6 = 0x84C6;
  31375. const GLenum TEXTURE7 = 0x84C7;
  31376. const GLenum TEXTURE8 = 0x84C8;
  31377. const GLenum TEXTURE9 = 0x84C9;
  31378. const GLenum TEXTURE10 = 0x84CA;
  31379. const GLenum TEXTURE11 = 0x84CB;
  31380. const GLenum TEXTURE12 = 0x84CC;
  31381. const GLenum TEXTURE13 = 0x84CD;
  31382. const GLenum TEXTURE14 = 0x84CE;
  31383. const GLenum TEXTURE15 = 0x84CF;
  31384. const GLenum TEXTURE16 = 0x84D0;
  31385. const GLenum TEXTURE17 = 0x84D1;
  31386. const GLenum TEXTURE18 = 0x84D2;
  31387. const GLenum TEXTURE19 = 0x84D3;
  31388. const GLenum TEXTURE20 = 0x84D4;
  31389. const GLenum TEXTURE21 = 0x84D5;
  31390. const GLenum TEXTURE22 = 0x84D6;
  31391. const GLenum TEXTURE23 = 0x84D7;
  31392. const GLenum TEXTURE24 = 0x84D8;
  31393. const GLenum TEXTURE25 = 0x84D9;
  31394. const GLenum TEXTURE26 = 0x84DA;
  31395. const GLenum TEXTURE27 = 0x84DB;
  31396. const GLenum TEXTURE28 = 0x84DC;
  31397. const GLenum TEXTURE29 = 0x84DD;
  31398. const GLenum TEXTURE30 = 0x84DE;
  31399. const GLenum TEXTURE31 = 0x84DF;
  31400. const GLenum ACTIVE_TEXTURE = 0x84E0;
  31401. /* TextureWrapMode */
  31402. const GLenum REPEAT = 0x2901;
  31403. const GLenum CLAMP_TO_EDGE = 0x812F;
  31404. const GLenum MIRRORED_REPEAT = 0x8370;
  31405. /* Uniform Types */
  31406. const GLenum FLOAT_VEC2 = 0x8B50;
  31407. const GLenum FLOAT_VEC3 = 0x8B51;
  31408. const GLenum FLOAT_VEC4 = 0x8B52;
  31409. const GLenum INT_VEC2 = 0x8B53;
  31410. const GLenum INT_VEC3 = 0x8B54;
  31411. const GLenum INT_VEC4 = 0x8B55;
  31412. const GLenum BOOL = 0x8B56;
  31413. const GLenum BOOL_VEC2 = 0x8B57;
  31414. const GLenum BOOL_VEC3 = 0x8B58;
  31415. const GLenum BOOL_VEC4 = 0x8B59;
  31416. const GLenum FLOAT_MAT2 = 0x8B5A;
  31417. const GLenum FLOAT_MAT3 = 0x8B5B;
  31418. const GLenum FLOAT_MAT4 = 0x8B5C;
  31419. const GLenum SAMPLER_2D = 0x8B5E;
  31420. const GLenum SAMPLER_CUBE = 0x8B60;
  31421. /* Vertex Arrays */
  31422. const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
  31423. const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
  31424. const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
  31425. const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
  31426. const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
  31427. const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
  31428. const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
  31429. /* Read Format */
  31430. const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
  31431. const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
  31432. /* Shader Source */
  31433. const GLenum COMPILE_STATUS = 0x8B81;
  31434. /* Shader Precision-Specified Types */
  31435. const GLenum LOW_FLOAT = 0x8DF0;
  31436. const GLenum MEDIUM_FLOAT = 0x8DF1;
  31437. const GLenum HIGH_FLOAT = 0x8DF2;
  31438. const GLenum LOW_INT = 0x8DF3;
  31439. const GLenum MEDIUM_INT = 0x8DF4;
  31440. const GLenum HIGH_INT = 0x8DF5;
  31441. /* Framebuffer Object. */
  31442. const GLenum FRAMEBUFFER = 0x8D40;
  31443. const GLenum RENDERBUFFER = 0x8D41;
  31444. const GLenum RGBA4 = 0x8056;
  31445. const GLenum RGB5_A1 = 0x8057;
  31446. const GLenum RGB565 = 0x8D62;
  31447. const GLenum DEPTH_COMPONENT16 = 0x81A5;
  31448. const GLenum STENCIL_INDEX8 = 0x8D48;
  31449. const GLenum DEPTH_STENCIL = 0x84F9;
  31450. const GLenum RENDERBUFFER_WIDTH = 0x8D42;
  31451. const GLenum RENDERBUFFER_HEIGHT = 0x8D43;
  31452. const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
  31453. const GLenum RENDERBUFFER_RED_SIZE = 0x8D50;
  31454. const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51;
  31455. const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52;
  31456. const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53;
  31457. const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54;
  31458. const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55;
  31459. const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
  31460. const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
  31461. const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
  31462. const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
  31463. const GLenum COLOR_ATTACHMENT0 = 0x8CE0;
  31464. const GLenum DEPTH_ATTACHMENT = 0x8D00;
  31465. const GLenum STENCIL_ATTACHMENT = 0x8D20;
  31466. const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A;
  31467. const GLenum NONE = 0;
  31468. const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5;
  31469. const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
  31470. const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
  31471. const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
  31472. const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
  31473. const GLenum FRAMEBUFFER_BINDING = 0x8CA6;
  31474. const GLenum RENDERBUFFER_BINDING = 0x8CA7;
  31475. const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8;
  31476. const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506;
  31477. /* WebGL-specific enums */
  31478. const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240;
  31479. const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
  31480. const GLenum CONTEXT_LOST_WEBGL = 0x9242;
  31481. const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
  31482. const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
  31483. // The canvas might actually be null in some cases, apparently.
  31484. readonly attribute CanvasSource? canvas;
  31485. readonly attribute GLsizei drawingBufferWidth;
  31486. readonly attribute GLsizei drawingBufferHeight;
  31487. [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
  31488. [WebGLHandlesContextLoss] boolean isContextLost();
  31489. [NeedsCallerType]
  31490. sequence<DOMString>? getSupportedExtensions();
  31491. [Throws, NeedsCallerType]
  31492. object? getExtension(DOMString name);
  31493. undefined activeTexture(GLenum texture);
  31494. undefined attachShader(WebGLProgram program, WebGLShader shader);
  31495. undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name);
  31496. undefined bindBuffer(GLenum target, WebGLBuffer? buffer);
  31497. undefined bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer);
  31498. undefined bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer);
  31499. undefined bindTexture(GLenum target, WebGLTexture? texture);
  31500. undefined blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  31501. undefined blendEquation(GLenum mode);
  31502. undefined blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
  31503. undefined blendFunc(GLenum sfactor, GLenum dfactor);
  31504. undefined blendFuncSeparate(GLenum srcRGB, GLenum dstRGB,
  31505. GLenum srcAlpha, GLenum dstAlpha);
  31506. [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target);
  31507. undefined clear(GLbitfield mask);
  31508. undefined clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  31509. undefined clearDepth(GLclampf depth);
  31510. undefined clearStencil(GLint s);
  31511. undefined colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  31512. undefined compileShader(WebGLShader shader);
  31513. undefined copyTexImage2D(GLenum target, GLint level, GLenum internalformat,
  31514. GLint x, GLint y, GLsizei width, GLsizei height,
  31515. GLint border);
  31516. undefined copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31517. GLint x, GLint y, GLsizei width, GLsizei height);
  31518. WebGLBuffer? createBuffer();
  31519. WebGLFramebuffer? createFramebuffer();
  31520. WebGLProgram? createProgram();
  31521. WebGLRenderbuffer? createRenderbuffer();
  31522. WebGLShader? createShader(GLenum type);
  31523. WebGLTexture? createTexture();
  31524. undefined cullFace(GLenum mode);
  31525. undefined deleteBuffer(WebGLBuffer? buffer);
  31526. undefined deleteFramebuffer(WebGLFramebuffer? framebuffer);
  31527. undefined deleteProgram(WebGLProgram? program);
  31528. undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer);
  31529. undefined deleteShader(WebGLShader? shader);
  31530. undefined deleteTexture(WebGLTexture? texture);
  31531. undefined depthFunc(GLenum func);
  31532. undefined depthMask(GLboolean flag);
  31533. undefined depthRange(GLclampf zNear, GLclampf zFar);
  31534. undefined detachShader(WebGLProgram program, WebGLShader shader);
  31535. undefined disable(GLenum cap);
  31536. undefined disableVertexAttribArray(GLuint index);
  31537. undefined drawArrays(GLenum mode, GLint first, GLsizei count);
  31538. undefined drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset);
  31539. undefined enable(GLenum cap);
  31540. undefined enableVertexAttribArray(GLuint index);
  31541. undefined finish();
  31542. undefined flush();
  31543. undefined framebufferRenderbuffer(GLenum target, GLenum attachment,
  31544. GLenum renderbuffertarget,
  31545. WebGLRenderbuffer? renderbuffer);
  31546. undefined framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
  31547. WebGLTexture? texture, GLint level);
  31548. undefined frontFace(GLenum mode);
  31549. undefined generateMipmap(GLenum target);
  31550. [NewObject]
  31551. WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index);
  31552. [NewObject]
  31553. WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index);
  31554. sequence<WebGLShader>? getAttachedShaders(WebGLProgram program);
  31555. [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram program, DOMString name);
  31556. any getBufferParameter(GLenum target, GLenum pname);
  31557. [Throws]
  31558. any getParameter(GLenum pname);
  31559. [WebGLHandlesContextLoss] GLenum getError();
  31560. [Throws]
  31561. any getFramebufferAttachmentParameter(GLenum target, GLenum attachment,
  31562. GLenum pname);
  31563. any getProgramParameter(WebGLProgram program, GLenum pname);
  31564. DOMString? getProgramInfoLog(WebGLProgram program);
  31565. any getRenderbufferParameter(GLenum target, GLenum pname);
  31566. any getShaderParameter(WebGLShader shader, GLenum pname);
  31567. [NewObject]
  31568. WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
  31569. DOMString? getShaderInfoLog(WebGLShader shader);
  31570. DOMString? getShaderSource(WebGLShader shader);
  31571. any getTexParameter(GLenum target, GLenum pname);
  31572. any getUniform(WebGLProgram program, WebGLUniformLocation location);
  31573. [NewObject]
  31574. WebGLUniformLocation? getUniformLocation(WebGLProgram program, DOMString name);
  31575. [Throws]
  31576. any getVertexAttrib(GLuint index, GLenum pname);
  31577. [WebGLHandlesContextLoss] GLintptr getVertexAttribOffset(GLuint index, GLenum pname);
  31578. undefined hint(GLenum target, GLenum mode);
  31579. [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer);
  31580. [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap);
  31581. [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer);
  31582. [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program);
  31583. [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer);
  31584. [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader);
  31585. [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture);
  31586. undefined lineWidth(GLfloat width);
  31587. undefined linkProgram(WebGLProgram program);
  31588. undefined pixelStorei(GLenum pname, GLint param);
  31589. undefined polygonOffset(GLfloat factor, GLfloat units);
  31590. undefined renderbufferStorage(GLenum target, GLenum internalformat,
  31591. GLsizei width, GLsizei height);
  31592. undefined sampleCoverage(GLclampf value, GLboolean invert);
  31593. undefined scissor(GLint x, GLint y, GLsizei width, GLsizei height);
  31594. undefined shaderSource(WebGLShader shader, DOMString source);
  31595. undefined stencilFunc(GLenum func, GLint ref, GLuint mask);
  31596. undefined stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
  31597. undefined stencilMask(GLuint mask);
  31598. undefined stencilMaskSeparate(GLenum face, GLuint mask);
  31599. undefined stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
  31600. undefined stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
  31601. undefined texParameterf(GLenum target, GLenum pname, GLfloat param);
  31602. undefined texParameteri(GLenum target, GLenum pname, GLint param);
  31603. undefined uniform1f(WebGLUniformLocation? location, GLfloat x);
  31604. undefined uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y);
  31605. undefined uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z);
  31606. undefined uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  31607. undefined uniform1i(WebGLUniformLocation? location, GLint x);
  31608. undefined uniform2i(WebGLUniformLocation? location, GLint x, GLint y);
  31609. undefined uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z);
  31610. undefined uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w);
  31611. undefined useProgram(WebGLProgram? program);
  31612. undefined validateProgram(WebGLProgram program);
  31613. undefined vertexAttrib1f(GLuint indx, GLfloat x);
  31614. undefined vertexAttrib1fv(GLuint indx, Float32List values);
  31615. undefined vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
  31616. undefined vertexAttrib2fv(GLuint indx, Float32List values);
  31617. undefined vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
  31618. undefined vertexAttrib3fv(GLuint indx, Float32List values);
  31619. undefined vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  31620. undefined vertexAttrib4fv(GLuint indx, Float32List values);
  31621. undefined vertexAttribPointer(GLuint indx, GLint size, GLenum type,
  31622. GLboolean normalized, GLsizei stride, GLintptr offset);
  31623. undefined viewport(GLint x, GLint y, GLsizei width, GLsizei height);
  31624. };
  31625. [Exposed=(Window,Worker),
  31626. Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
  31627. interface WebGLRenderingContext {
  31628. // bufferData has WebGL2 overloads.
  31629. undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
  31630. undefined bufferData(GLenum target, [AllowShared] ArrayBuffer? data, GLenum usage);
  31631. undefined bufferData(GLenum target, [AllowShared] ArrayBufferView data, GLenum usage);
  31632. // bufferSubData has WebGL2 overloads.
  31633. undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBuffer data);
  31634. undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBufferView data);
  31635. // compressedTexImage2D has WebGL2 overloads.
  31636. undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat,
  31637. GLsizei width, GLsizei height, GLint border,
  31638. [AllowShared] ArrayBufferView data);
  31639. // compressedTexSubImage2D has WebGL2 overloads.
  31640. undefined compressedTexSubImage2D(GLenum target, GLint level,
  31641. GLint xoffset, GLint yoffset,
  31642. GLsizei width, GLsizei height, GLenum format,
  31643. [AllowShared] ArrayBufferView data);
  31644. // readPixels has WebGL2 overloads.
  31645. [Throws, NeedsCallerType]
  31646. undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
  31647. GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
  31648. // texImage2D has WebGL2 overloads.
  31649. // Overloads must share [Throws].
  31650. [Throws] // Can't actually throw.
  31651. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31652. GLsizei width, GLsizei height, GLint border, GLenum format,
  31653. GLenum type, [AllowShared] ArrayBufferView? pixels);
  31654. [Throws] // Can't actually throw.
  31655. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31656. GLenum format, GLenum type, ImageBitmap pixels);
  31657. [Throws] // Can't actually throw.
  31658. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31659. GLenum format, GLenum type, ImageData pixels);
  31660. [Throws]
  31661. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31662. GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
  31663. [Throws]
  31664. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31665. GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
  31666. [Throws]
  31667. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31668. GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
  31669. [Throws]
  31670. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31671. GLenum format, GLenum type, OffscreenCanvas canvas); // May throw DOMException
  31672. [Throws]
  31673. undefined texImage2D(GLenum target, GLint level, GLint internalformat,
  31674. GLenum format, GLenum type, VideoFrame videoFrame); // May throw DOMException
  31675. // texSubImage2D has WebGL2 overloads.
  31676. [Throws] // Can't actually throw.
  31677. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31678. GLsizei width, GLsizei height,
  31679. GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
  31680. [Throws] // Can't actually throw.
  31681. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31682. GLenum format, GLenum type, ImageBitmap pixels);
  31683. [Throws] // Can't actually throw.
  31684. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31685. GLenum format, GLenum type, ImageData pixels);
  31686. [Throws]
  31687. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31688. GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
  31689. [Throws]
  31690. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31691. GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
  31692. [Throws]
  31693. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31694. GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
  31695. [Throws]
  31696. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31697. GLenum format, GLenum type, OffscreenCanvas canvas); // May throw DOMException
  31698. [Throws]
  31699. undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
  31700. GLenum format, GLenum type, VideoFrame videoFrame); // May throw DOMException
  31701. // uniform*fv have WebGL2 overloads, or rather extensions, that are not
  31702. // distinguishable from the WebGL1 versions when called with two arguments.
  31703. undefined uniform1fv(WebGLUniformLocation? location, Float32List data);
  31704. undefined uniform2fv(WebGLUniformLocation? location, Float32List data);
  31705. undefined uniform3fv(WebGLUniformLocation? location, Float32List data);
  31706. undefined uniform4fv(WebGLUniformLocation? location, Float32List data);
  31707. // uniform*iv have WebGL2 overloads, or rather extensions, that are not
  31708. // distinguishable from the WebGL1 versions when called with two arguments.
  31709. undefined uniform1iv(WebGLUniformLocation? location, Int32List data);
  31710. undefined uniform2iv(WebGLUniformLocation? location, Int32List data);
  31711. undefined uniform3iv(WebGLUniformLocation? location, Int32List data);
  31712. undefined uniform4iv(WebGLUniformLocation? location, Int32List data);
  31713. // uniformMatrix*fv have WebGL2 overloads, or rather extensions, that are
  31714. // not distinguishable from the WebGL1 versions when called with two
  31715. // arguments.
  31716. undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
  31717. undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
  31718. undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
  31719. };
  31720. WebGLRenderingContext includes WebGLRenderingContextBase;
  31721. ////////////////////////////////////////
  31722. // specific extension interfaces
  31723. [LegacyNoInterfaceObject,
  31724. Exposed=(Window,Worker)]
  31725. interface EXT_texture_compression_bptc {
  31726. const GLenum COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C;
  31727. const GLenum COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D;
  31728. const GLenum COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E;
  31729. const GLenum COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F;
  31730. };
  31731. [LegacyNoInterfaceObject,
  31732. Exposed=(Window,Worker)]
  31733. interface EXT_texture_compression_rgtc {
  31734. const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
  31735. const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
  31736. const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
  31737. const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
  31738. };
  31739. // https://www.khronos.org/registry/webgl/extensions/EXT_texture_norm16/
  31740. [LegacyNoInterfaceObject,
  31741. Exposed=(Window,Worker)]
  31742. interface EXT_texture_norm16 {
  31743. const GLenum R16_EXT = 0x822A;
  31744. const GLenum RG16_EXT = 0x822C;
  31745. const GLenum RGB16_EXT = 0x8054;
  31746. const GLenum RGBA16_EXT = 0x805B;
  31747. const GLenum R16_SNORM_EXT = 0x8F98;
  31748. const GLenum RG16_SNORM_EXT = 0x8F99;
  31749. const GLenum RGB16_SNORM_EXT = 0x8F9A;
  31750. const GLenum RGBA16_SNORM_EXT = 0x8F9B;
  31751. };
  31752. [LegacyNoInterfaceObject,
  31753. Exposed=(Window,Worker)]
  31754. interface WEBGL_compressed_texture_s3tc
  31755. {
  31756. const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
  31757. const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
  31758. const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
  31759. const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
  31760. };
  31761. [LegacyNoInterfaceObject,
  31762. Exposed=(Window,Worker)]
  31763. interface WEBGL_compressed_texture_s3tc_srgb {
  31764. /* Compressed Texture Formats */
  31765. const GLenum COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
  31766. const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D;
  31767. const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E;
  31768. const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F;
  31769. };
  31770. [LegacyNoInterfaceObject,
  31771. Exposed=(Window,Worker)]
  31772. interface WEBGL_compressed_texture_astc {
  31773. /* Compressed Texture Format */
  31774. const GLenum COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
  31775. const GLenum COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1;
  31776. const GLenum COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2;
  31777. const GLenum COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3;
  31778. const GLenum COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4;
  31779. const GLenum COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5;
  31780. const GLenum COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6;
  31781. const GLenum COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7;
  31782. const GLenum COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8;
  31783. const GLenum COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9;
  31784. const GLenum COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA;
  31785. const GLenum COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB;
  31786. const GLenum COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC;
  31787. const GLenum COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD;
  31788. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0;
  31789. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1;
  31790. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2;
  31791. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3;
  31792. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4;
  31793. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5;
  31794. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6;
  31795. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7;
  31796. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8;
  31797. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9;
  31798. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA;
  31799. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB;
  31800. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
  31801. const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
  31802. // Profile query support.
  31803. sequence<DOMString>? getSupportedProfiles();
  31804. };
  31805. [LegacyNoInterfaceObject,
  31806. Exposed=(Window,Worker)]
  31807. interface WEBGL_compressed_texture_etc
  31808. {
  31809. const GLenum COMPRESSED_R11_EAC = 0x9270;
  31810. const GLenum COMPRESSED_SIGNED_R11_EAC = 0x9271;
  31811. const GLenum COMPRESSED_RG11_EAC = 0x9272;
  31812. const GLenum COMPRESSED_SIGNED_RG11_EAC = 0x9273;
  31813. const GLenum COMPRESSED_RGB8_ETC2 = 0x9274;
  31814. const GLenum COMPRESSED_SRGB8_ETC2 = 0x9275;
  31815. const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
  31816. const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
  31817. const GLenum COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
  31818. const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
  31819. };
  31820. [LegacyNoInterfaceObject,
  31821. Exposed=(Window,Worker)]
  31822. interface WEBGL_compressed_texture_etc1
  31823. {
  31824. const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64;
  31825. };
  31826. [LegacyNoInterfaceObject,
  31827. Exposed=(Window,Worker)]
  31828. interface WEBGL_compressed_texture_pvrtc
  31829. {
  31830. const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
  31831. const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01;
  31832. const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
  31833. const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
  31834. };
  31835. [LegacyNoInterfaceObject,
  31836. Exposed=(Window,Worker)]
  31837. interface WEBGL_debug_renderer_info
  31838. {
  31839. const GLenum UNMASKED_VENDOR_WEBGL = 0x9245;
  31840. const GLenum UNMASKED_RENDERER_WEBGL = 0x9246;
  31841. };
  31842. [LegacyNoInterfaceObject,
  31843. Exposed=(Window,Worker)]
  31844. interface WEBGL_debug_shaders
  31845. {
  31846. DOMString getTranslatedShaderSource(WebGLShader shader);
  31847. };
  31848. [LegacyNoInterfaceObject,
  31849. Exposed=(Window,Worker)]
  31850. interface WEBGL_depth_texture
  31851. {
  31852. const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA;
  31853. };
  31854. [LegacyNoInterfaceObject,
  31855. Exposed=(Window,Worker)]
  31856. interface OES_element_index_uint
  31857. {
  31858. };
  31859. [LegacyNoInterfaceObject,
  31860. Exposed=(Window,Worker)]
  31861. interface EXT_frag_depth
  31862. {
  31863. };
  31864. [LegacyNoInterfaceObject,
  31865. Exposed=(Window,Worker)]
  31866. interface WEBGL_lose_context {
  31867. undefined loseContext();
  31868. undefined restoreContext();
  31869. };
  31870. [LegacyNoInterfaceObject,
  31871. Exposed=(Window,Worker)]
  31872. interface EXT_texture_filter_anisotropic
  31873. {
  31874. const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
  31875. const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
  31876. };
  31877. [LegacyNoInterfaceObject,
  31878. Exposed=(Window,Worker)]
  31879. interface EXT_sRGB
  31880. {
  31881. const GLenum SRGB_EXT = 0x8C40;
  31882. const GLenum SRGB_ALPHA_EXT = 0x8C42;
  31883. const GLenum SRGB8_ALPHA8_EXT = 0x8C43;
  31884. const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
  31885. };
  31886. [LegacyNoInterfaceObject,
  31887. Exposed=(Window,Worker)]
  31888. interface OES_standard_derivatives {
  31889. const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
  31890. };
  31891. [LegacyNoInterfaceObject,
  31892. Exposed=(Window,Worker)]
  31893. interface OES_texture_float
  31894. {
  31895. };
  31896. [LegacyNoInterfaceObject,
  31897. Exposed=(Window,Worker)]
  31898. interface WEBGL_draw_buffers {
  31899. const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
  31900. const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
  31901. const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2;
  31902. const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3;
  31903. const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4;
  31904. const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5;
  31905. const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6;
  31906. const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7;
  31907. const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8;
  31908. const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9;
  31909. const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA;
  31910. const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB;
  31911. const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC;
  31912. const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED;
  31913. const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE;
  31914. const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF;
  31915. const GLenum DRAW_BUFFER0_WEBGL = 0x8825;
  31916. const GLenum DRAW_BUFFER1_WEBGL = 0x8826;
  31917. const GLenum DRAW_BUFFER2_WEBGL = 0x8827;
  31918. const GLenum DRAW_BUFFER3_WEBGL = 0x8828;
  31919. const GLenum DRAW_BUFFER4_WEBGL = 0x8829;
  31920. const GLenum DRAW_BUFFER5_WEBGL = 0x882A;
  31921. const GLenum DRAW_BUFFER6_WEBGL = 0x882B;
  31922. const GLenum DRAW_BUFFER7_WEBGL = 0x882C;
  31923. const GLenum DRAW_BUFFER8_WEBGL = 0x882D;
  31924. const GLenum DRAW_BUFFER9_WEBGL = 0x882E;
  31925. const GLenum DRAW_BUFFER10_WEBGL = 0x882F;
  31926. const GLenum DRAW_BUFFER11_WEBGL = 0x8830;
  31927. const GLenum DRAW_BUFFER12_WEBGL = 0x8831;
  31928. const GLenum DRAW_BUFFER13_WEBGL = 0x8832;
  31929. const GLenum DRAW_BUFFER14_WEBGL = 0x8833;
  31930. const GLenum DRAW_BUFFER15_WEBGL = 0x8834;
  31931. const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF;
  31932. const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824;
  31933. undefined drawBuffersWEBGL(sequence<GLenum> buffers);
  31934. };
  31935. [LegacyNoInterfaceObject,
  31936. Exposed=(Window,Worker)]
  31937. interface OES_texture_float_linear
  31938. {
  31939. };
  31940. [LegacyNoInterfaceObject,
  31941. Exposed=(Window,Worker)]
  31942. interface EXT_shader_texture_lod
  31943. {
  31944. };
  31945. [LegacyNoInterfaceObject,
  31946. Exposed=(Window,Worker)]
  31947. interface OES_texture_half_float
  31948. {
  31949. const GLenum HALF_FLOAT_OES = 0x8D61;
  31950. };
  31951. [LegacyNoInterfaceObject,
  31952. Exposed=(Window,Worker)]
  31953. interface OES_texture_half_float_linear
  31954. {
  31955. };
  31956. [LegacyNoInterfaceObject,
  31957. Exposed=(Window,Worker)]
  31958. interface WEBGL_color_buffer_float
  31959. {
  31960. const GLenum RGBA32F_EXT = 0x8814;
  31961. const GLenum RGB32F_EXT = 0x8815;
  31962. const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
  31963. const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
  31964. };
  31965. [LegacyNoInterfaceObject,
  31966. Exposed=(Window,Worker)]
  31967. interface EXT_color_buffer_half_float
  31968. {
  31969. const GLenum RGBA16F_EXT = 0x881A;
  31970. const GLenum RGB16F_EXT = 0x881B;
  31971. const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
  31972. const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
  31973. };
  31974. [LegacyNoInterfaceObject,
  31975. Exposed=(Window,Worker)]
  31976. interface OES_vertex_array_object {
  31977. const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
  31978. WebGLVertexArrayObject? createVertexArrayOES();
  31979. undefined deleteVertexArrayOES(WebGLVertexArrayObject? arrayObject);
  31980. [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObject? arrayObject);
  31981. undefined bindVertexArrayOES(WebGLVertexArrayObject? arrayObject);
  31982. };
  31983. [LegacyNoInterfaceObject,
  31984. Exposed=(Window,Worker)]
  31985. interface ANGLE_instanced_arrays {
  31986. const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
  31987. undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
  31988. undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
  31989. undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
  31990. };
  31991. [LegacyNoInterfaceObject,
  31992. Exposed=(Window,Worker)]
  31993. interface EXT_blend_minmax {
  31994. const GLenum MIN_EXT = 0x8007;
  31995. const GLenum MAX_EXT = 0x8008;
  31996. };
  31997. [Exposed=(Window,Worker)]
  31998. interface WebGLQuery {
  31999. };
  32000. [LegacyNoInterfaceObject,
  32001. Exposed=(Window,Worker)]
  32002. interface EXT_disjoint_timer_query {
  32003. const GLenum QUERY_COUNTER_BITS_EXT = 0x8864;
  32004. const GLenum CURRENT_QUERY_EXT = 0x8865;
  32005. const GLenum QUERY_RESULT_EXT = 0x8866;
  32006. const GLenum QUERY_RESULT_AVAILABLE_EXT = 0x8867;
  32007. const GLenum TIME_ELAPSED_EXT = 0x88BF;
  32008. const GLenum TIMESTAMP_EXT = 0x8E28;
  32009. const GLenum GPU_DISJOINT_EXT = 0x8FBB;
  32010. WebGLQuery? createQueryEXT();
  32011. undefined deleteQueryEXT(WebGLQuery? query);
  32012. [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLQuery? query);
  32013. undefined beginQueryEXT(GLenum target, WebGLQuery query);
  32014. undefined endQueryEXT(GLenum target);
  32015. undefined queryCounterEXT(WebGLQuery query, GLenum target);
  32016. any getQueryEXT(GLenum target, GLenum pname);
  32017. any getQueryObjectEXT(WebGLQuery query, GLenum pname);
  32018. };
  32019. [LegacyNoInterfaceObject,
  32020. Exposed=(Window,Worker)]
  32021. interface MOZ_debug {
  32022. const GLenum EXTENSIONS = 0x1F03;
  32023. const GLenum WSI_INFO = 0x10000;
  32024. const GLenum UNPACK_REQUIRE_FASTPATH = 0x10001;
  32025. const GLenum DOES_INDEX_VALIDATION = 0x10002;
  32026. [Throws]
  32027. any getParameter(GLenum pname);
  32028. };
  32029. [LegacyNoInterfaceObject,
  32030. Exposed=(Window,Worker)]
  32031. interface EXT_float_blend {
  32032. };
  32033. [LegacyNoInterfaceObject,
  32034. Exposed=(Window,Worker)]
  32035. interface OES_fbo_render_mipmap {
  32036. };
  32037. [LegacyNoInterfaceObject,
  32038. Exposed=(Window,Worker)]
  32039. interface WEBGL_explicit_present {
  32040. undefined present();
  32041. };
  32042. // https://www.khronos.org/registry/webgl/extensions/OES_draw_buffers_indexed/
  32043. [Exposed=(Window,Worker), LegacyNoInterfaceObject]
  32044. interface OES_draw_buffers_indexed {
  32045. undefined enableiOES(GLenum target, GLuint index);
  32046. undefined disableiOES(GLenum target, GLuint index);
  32047. undefined blendEquationiOES(GLuint buf, GLenum mode);
  32048. undefined blendEquationSeparateiOES(GLuint buf,
  32049. GLenum modeRGB, GLenum modeAlpha);
  32050. undefined blendFunciOES(GLuint buf,
  32051. GLenum src, GLenum dst);
  32052. undefined blendFuncSeparateiOES(GLuint buf,
  32053. GLenum srcRGB, GLenum dstRGB,
  32054. GLenum srcAlpha, GLenum dstAlpha);
  32055. undefined colorMaskiOES(GLuint buf,
  32056. GLboolean r, GLboolean g, GLboolean b, GLboolean a);
  32057. };
  32058. [Exposed=(Window,Worker), LegacyNoInterfaceObject]
  32059. interface WEBGL_provoking_vertex {
  32060. const GLenum FIRST_VERTEX_CONVENTION_WEBGL = 0x8E4D;
  32061. const GLenum LAST_VERTEX_CONVENTION_WEBGL = 0x8E4E; // default
  32062. const GLenum PROVOKING_VERTEX_WEBGL = 0x8E4F;
  32063. undefined provokingVertexWEBGL(GLenum provokeMode);
  32064. };
  32065. // https://immersive-web.github.io/webxr/#dom-webglcontextattributes-xrcompatible
  32066. partial dictionary WebGLContextAttributes {
  32067. [Pref="dom.vr.webxr.enabled"]
  32068. boolean xrCompatible = false;
  32069. };
  32070. // https://immersive-web.github.io/webxr/#dom-webglrenderingcontextbase-makexrcompatible
  32071. partial interface mixin WebGLRenderingContextBase {
  32072. [NewObject, Pref="dom.vr.webxr.enabled"]
  32073. Promise<undefined> makeXRCompatible();
  32074. };
  32075. /* ---------------------- WebGPU ----------------------------- */
  32076. /* ./webidl/WebGPU.webidl */
  32077. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  32078. /* This Source Code Form is subject to the terms of the Mozilla Public
  32079. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  32080. * You can obtain one at http://mozilla.org/MPL/2.0/.
  32081. *
  32082. * The origin of this IDL file is
  32083. * https://gpuweb.github.io/gpuweb/
  32084. */
  32085. interface mixin GPUObjectBase {
  32086. attribute USVString? label;
  32087. };
  32088. dictionary GPUObjectDescriptorBase {
  32089. USVString label = "";
  32090. };
  32091. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32092. Exposed=(Window, DedicatedWorker), SecureContext]
  32093. interface GPUSupportedLimits {
  32094. readonly attribute unsigned long maxTextureDimension1D;
  32095. readonly attribute unsigned long maxTextureDimension2D;
  32096. readonly attribute unsigned long maxTextureDimension3D;
  32097. readonly attribute unsigned long maxTextureArrayLayers;
  32098. readonly attribute unsigned long maxBindGroups;
  32099. readonly attribute unsigned long maxBindGroupsPlusVertexBuffers;
  32100. readonly attribute unsigned long maxBindingsPerBindGroup;
  32101. readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout;
  32102. readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout;
  32103. readonly attribute unsigned long maxSampledTexturesPerShaderStage;
  32104. readonly attribute unsigned long maxSamplersPerShaderStage;
  32105. readonly attribute unsigned long maxStorageBuffersPerShaderStage;
  32106. readonly attribute unsigned long maxStorageTexturesPerShaderStage;
  32107. readonly attribute unsigned long maxUniformBuffersPerShaderStage;
  32108. readonly attribute unsigned long long maxUniformBufferBindingSize;
  32109. readonly attribute unsigned long long maxStorageBufferBindingSize;
  32110. readonly attribute unsigned long minUniformBufferOffsetAlignment;
  32111. readonly attribute unsigned long minStorageBufferOffsetAlignment;
  32112. readonly attribute unsigned long maxVertexBuffers;
  32113. readonly attribute unsigned long long maxBufferSize;
  32114. readonly attribute unsigned long maxVertexAttributes;
  32115. readonly attribute unsigned long maxVertexBufferArrayStride;
  32116. readonly attribute unsigned long maxInterStageShaderComponents;
  32117. readonly attribute unsigned long maxInterStageShaderVariables;
  32118. readonly attribute unsigned long maxColorAttachments;
  32119. readonly attribute unsigned long maxColorAttachmentBytesPerSample;
  32120. readonly attribute unsigned long maxComputeWorkgroupStorageSize;
  32121. readonly attribute unsigned long maxComputeInvocationsPerWorkgroup;
  32122. readonly attribute unsigned long maxComputeWorkgroupSizeX;
  32123. readonly attribute unsigned long maxComputeWorkgroupSizeY;
  32124. readonly attribute unsigned long maxComputeWorkgroupSizeZ;
  32125. readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
  32126. };
  32127. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32128. Exposed=(Window, DedicatedWorker), SecureContext]
  32129. interface GPUSupportedFeatures {
  32130. readonly setlike<DOMString>;
  32131. };
  32132. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32133. Exposed=(Window, DedicatedWorker), SecureContext]
  32134. interface GPUAdapterInfo {
  32135. readonly attribute DOMString vendor;
  32136. readonly attribute DOMString architecture;
  32137. readonly attribute DOMString device;
  32138. readonly attribute DOMString description;
  32139. // Non-standard; see <https://bugzilla.mozilla.org/show_bug.cgi?id=1831994>.
  32140. [ChromeOnly] readonly attribute DOMString wgpuName;
  32141. [ChromeOnly] readonly attribute unsigned long wgpuVendor;
  32142. [ChromeOnly] readonly attribute unsigned long wgpuDevice;
  32143. [ChromeOnly] readonly attribute DOMString wgpuDeviceType;
  32144. [ChromeOnly] readonly attribute DOMString wgpuDriver;
  32145. [ChromeOnly] readonly attribute DOMString wgpuDriverInfo;
  32146. [ChromeOnly] readonly attribute DOMString wgpuBackend;
  32147. };
  32148. interface mixin NavigatorGPU {
  32149. [SameObject, Func="mozilla::webgpu::Instance::PrefEnabled", Exposed=(Window, DedicatedWorker), SecureContext] readonly attribute GPU gpu;
  32150. };
  32151. // NOTE: see `dom/webidl/Navigator.webidl`
  32152. // Navigator includes NavigatorGPU;
  32153. // NOTE: see `dom/webidl/WorkerNavigator.webidl`
  32154. // WorkerNavigator includes NavigatorGPU;
  32155. [
  32156. Func="mozilla::webgpu::Instance::PrefEnabled",
  32157. Exposed=(Window, DedicatedWorker), SecureContext
  32158. ]
  32159. interface GPU {
  32160. [Throws]
  32161. Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});
  32162. GPUTextureFormat getPreferredCanvasFormat();
  32163. };
  32164. dictionary GPURequestAdapterOptions {
  32165. GPUPowerPreference powerPreference;
  32166. boolean forceFallbackAdapter = false;
  32167. };
  32168. enum GPUPowerPreference {
  32169. "low-power",
  32170. "high-performance",
  32171. };
  32172. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32173. Exposed=(Window, DedicatedWorker), SecureContext]
  32174. interface GPUAdapter {
  32175. [SameObject] readonly attribute GPUSupportedFeatures features;
  32176. [SameObject] readonly attribute GPUSupportedLimits limits;
  32177. readonly attribute boolean isFallbackAdapter;
  32178. [Throws]
  32179. Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
  32180. [Throws]
  32181. Promise<GPUAdapterInfo> requestAdapterInfo(optional sequence<DOMString> unmaskHints = []);
  32182. };
  32183. dictionary GPUDeviceDescriptor
  32184. : GPUObjectDescriptorBase {
  32185. sequence<GPUFeatureName> requiredFeatures = [];
  32186. record<DOMString, GPUSize64> requiredLimits;
  32187. GPUQueueDescriptor defaultQueue = {};
  32188. };
  32189. enum GPUFeatureName {
  32190. "depth-clip-control",
  32191. "depth32float-stencil8",
  32192. "texture-compression-bc",
  32193. "texture-compression-etc2",
  32194. "texture-compression-astc",
  32195. "timestamp-query",
  32196. "indirect-first-instance",
  32197. "shader-f16",
  32198. "rg11b10ufloat-renderable",
  32199. "bgra8unorm-storage",
  32200. "float32-filterable",
  32201. };
  32202. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32203. Exposed=(Window, DedicatedWorker), SecureContext]
  32204. interface GPUDevice : EventTarget {
  32205. [SameObject] readonly attribute GPUSupportedFeatures features;
  32206. [SameObject] readonly attribute GPUSupportedLimits limits;
  32207. [SameObject, BinaryName="getQueue"] readonly attribute GPUQueue queue;
  32208. undefined destroy();
  32209. [Throws]
  32210. GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
  32211. GPUTexture createTexture(GPUTextureDescriptor descriptor);
  32212. GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {});
  32213. GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor);
  32214. GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor);
  32215. GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor);
  32216. [Throws]
  32217. GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor);
  32218. GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor);
  32219. GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor);
  32220. [Throws]
  32221. Promise<GPUComputePipeline> createComputePipelineAsync(GPUComputePipelineDescriptor descriptor);
  32222. [Throws]
  32223. Promise<GPURenderPipeline> createRenderPipelineAsync(GPURenderPipelineDescriptor descriptor);
  32224. GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
  32225. GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
  32226. //GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);
  32227. };
  32228. GPUDevice includes GPUObjectBase;
  32229. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32230. Exposed=(Window, DedicatedWorker), SecureContext]
  32231. interface GPUBuffer {
  32232. readonly attribute GPUSize64Out size;
  32233. readonly attribute GPUFlagsConstant usage;
  32234. readonly attribute GPUBufferMapState mapState;
  32235. [Throws]
  32236. Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
  32237. [Throws]
  32238. ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
  32239. [Throws]
  32240. undefined unmap();
  32241. [Throws]
  32242. undefined destroy();
  32243. };
  32244. GPUBuffer includes GPUObjectBase;
  32245. enum GPUBufferMapState {
  32246. "unmapped",
  32247. "pending",
  32248. "mapped",
  32249. };
  32250. dictionary GPUBufferDescriptor
  32251. : GPUObjectDescriptorBase {
  32252. required GPUSize64 size;
  32253. required GPUBufferUsageFlags usage;
  32254. boolean mappedAtCreation = false;
  32255. };
  32256. typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
  32257. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32258. Exposed=(Window, DedicatedWorker), SecureContext]
  32259. interface GPUBufferUsage {
  32260. const GPUFlagsConstant MAP_READ = 0x0001;
  32261. const GPUFlagsConstant MAP_WRITE = 0x0002;
  32262. const GPUFlagsConstant COPY_SRC = 0x0004;
  32263. const GPUFlagsConstant COPY_DST = 0x0008;
  32264. const GPUFlagsConstant INDEX = 0x0010;
  32265. const GPUFlagsConstant VERTEX = 0x0020;
  32266. const GPUFlagsConstant UNIFORM = 0x0040;
  32267. const GPUFlagsConstant STORAGE = 0x0080;
  32268. const GPUFlagsConstant INDIRECT = 0x0100;
  32269. const GPUFlagsConstant QUERY_RESOLVE = 0x0200;
  32270. };
  32271. typedef [EnforceRange] unsigned long GPUMapModeFlags;
  32272. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32273. Exposed=(Window, DedicatedWorker), SecureContext]
  32274. interface GPUMapMode {
  32275. const GPUFlagsConstant READ = 0x0001;
  32276. const GPUFlagsConstant WRITE = 0x0002;
  32277. };
  32278. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32279. Exposed=(Window, DedicatedWorker), SecureContext]
  32280. interface GPUTexture {
  32281. GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
  32282. undefined destroy();
  32283. readonly attribute GPUIntegerCoordinateOut width;
  32284. readonly attribute GPUIntegerCoordinateOut height;
  32285. readonly attribute GPUIntegerCoordinateOut depthOrArrayLayers;
  32286. readonly attribute GPUIntegerCoordinateOut mipLevelCount;
  32287. readonly attribute GPUSize32Out sampleCount;
  32288. readonly attribute GPUTextureDimension dimension;
  32289. readonly attribute GPUTextureFormat format;
  32290. readonly attribute GPUFlagsConstant usage;
  32291. };
  32292. GPUTexture includes GPUObjectBase;
  32293. dictionary GPUTextureDescriptor
  32294. : GPUObjectDescriptorBase {
  32295. required GPUExtent3D size;
  32296. GPUIntegerCoordinate mipLevelCount = 1;
  32297. GPUSize32 sampleCount = 1;
  32298. GPUTextureDimension dimension = "2d";
  32299. required GPUTextureFormat format;
  32300. required GPUTextureUsageFlags usage;
  32301. sequence<GPUTextureFormat> viewFormats = [];
  32302. };
  32303. enum GPUTextureDimension {
  32304. "1d",
  32305. "2d",
  32306. "3d",
  32307. };
  32308. typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
  32309. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32310. Exposed=(Window, DedicatedWorker), SecureContext]
  32311. interface GPUTextureUsage {
  32312. const GPUFlagsConstant COPY_SRC = 0x01;
  32313. const GPUFlagsConstant COPY_DST = 0x02;
  32314. const GPUFlagsConstant TEXTURE_BINDING = 0x04;
  32315. const GPUFlagsConstant STORAGE_BINDING = 0x08;
  32316. const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;
  32317. };
  32318. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32319. Exposed=(Window, DedicatedWorker), SecureContext]
  32320. interface GPUTextureView {
  32321. };
  32322. GPUTextureView includes GPUObjectBase;
  32323. dictionary GPUTextureViewDescriptor
  32324. : GPUObjectDescriptorBase {
  32325. GPUTextureFormat format;
  32326. GPUTextureViewDimension dimension;
  32327. GPUTextureAspect aspect = "all";
  32328. GPUIntegerCoordinate baseMipLevel = 0;
  32329. GPUIntegerCoordinate mipLevelCount;
  32330. GPUIntegerCoordinate baseArrayLayer = 0;
  32331. GPUIntegerCoordinate arrayLayerCount;
  32332. };
  32333. enum GPUTextureViewDimension {
  32334. "1d",
  32335. "2d",
  32336. "2d-array",
  32337. "cube",
  32338. "cube-array",
  32339. "3d",
  32340. };
  32341. enum GPUTextureAspect {
  32342. "all",
  32343. "stencil-only",
  32344. "depth-only",
  32345. };
  32346. enum GPUTextureFormat {
  32347. // 8-bit formats
  32348. "r8unorm",
  32349. "r8snorm",
  32350. "r8uint",
  32351. "r8sint",
  32352. // 16-bit formats
  32353. "r16uint",
  32354. "r16sint",
  32355. "r16float",
  32356. "rg8unorm",
  32357. "rg8snorm",
  32358. "rg8uint",
  32359. "rg8sint",
  32360. // 32-bit formats
  32361. "r32uint",
  32362. "r32sint",
  32363. "r32float",
  32364. "rg16uint",
  32365. "rg16sint",
  32366. "rg16float",
  32367. "rgba8unorm",
  32368. "rgba8unorm-srgb",
  32369. "rgba8snorm",
  32370. "rgba8uint",
  32371. "rgba8sint",
  32372. "bgra8unorm",
  32373. "bgra8unorm-srgb",
  32374. // Packed 32-bit formats
  32375. "rgb9e5ufloat",
  32376. "rgb10a2unorm",
  32377. "rg11b10ufloat",
  32378. // 64-bit formats
  32379. "rg32uint",
  32380. "rg32sint",
  32381. "rg32float",
  32382. "rgba16uint",
  32383. "rgba16sint",
  32384. "rgba16float",
  32385. // 128-bit formats
  32386. "rgba32uint",
  32387. "rgba32sint",
  32388. "rgba32float",
  32389. // Depth/stencil formats
  32390. "stencil8",
  32391. "depth16unorm",
  32392. "depth24plus",
  32393. "depth24plus-stencil8",
  32394. "depth32float",
  32395. // "depth32float-stencil8" feature
  32396. "depth32float-stencil8",
  32397. // BC compressed formats usable if "texture-compression-bc" is both
  32398. // supported by the device/user agent and enabled in requestDevice.
  32399. "bc1-rgba-unorm",
  32400. "bc1-rgba-unorm-srgb",
  32401. "bc2-rgba-unorm",
  32402. "bc2-rgba-unorm-srgb",
  32403. "bc3-rgba-unorm",
  32404. "bc3-rgba-unorm-srgb",
  32405. "bc4-r-unorm",
  32406. "bc4-r-snorm",
  32407. "bc5-rg-unorm",
  32408. "bc5-rg-snorm",
  32409. "bc6h-rgb-ufloat",
  32410. "bc6h-rgb-float",
  32411. "bc7-rgba-unorm",
  32412. "bc7-rgba-unorm-srgb",
  32413. };
  32414. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32415. Exposed=(Window, DedicatedWorker), SecureContext]
  32416. interface GPUSampler {
  32417. };
  32418. GPUSampler includes GPUObjectBase;
  32419. dictionary GPUSamplerDescriptor
  32420. : GPUObjectDescriptorBase {
  32421. GPUAddressMode addressModeU = "clamp-to-edge";
  32422. GPUAddressMode addressModeV = "clamp-to-edge";
  32423. GPUAddressMode addressModeW = "clamp-to-edge";
  32424. GPUFilterMode magFilter = "nearest";
  32425. GPUFilterMode minFilter = "nearest";
  32426. GPUMipmapFilterMode mipmapFilter = "nearest";
  32427. float lodMinClamp = 0;
  32428. float lodMaxClamp = 1000.0; // TODO: What should this be?
  32429. GPUCompareFunction compare;
  32430. [Clamp] unsigned short maxAnisotropy = 1;
  32431. };
  32432. enum GPUAddressMode {
  32433. "clamp-to-edge",
  32434. "repeat",
  32435. "mirror-repeat",
  32436. };
  32437. enum GPUFilterMode {
  32438. "nearest",
  32439. "linear",
  32440. };
  32441. enum GPUMipmapFilterMode {
  32442. "nearest",
  32443. "linear",
  32444. };
  32445. enum GPUCompareFunction {
  32446. "never",
  32447. "less",
  32448. "equal",
  32449. "less-equal",
  32450. "greater",
  32451. "not-equal",
  32452. "greater-equal",
  32453. "always",
  32454. };
  32455. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32456. Exposed=(Window, DedicatedWorker), SecureContext]
  32457. interface GPUBindGroupLayout {
  32458. };
  32459. GPUBindGroupLayout includes GPUObjectBase;
  32460. dictionary GPUBindGroupLayoutDescriptor
  32461. : GPUObjectDescriptorBase {
  32462. required sequence<GPUBindGroupLayoutEntry> entries;
  32463. };
  32464. dictionary GPUBindGroupLayoutEntry {
  32465. required GPUIndex32 binding;
  32466. required GPUShaderStageFlags visibility;
  32467. GPUBufferBindingLayout buffer;
  32468. GPUSamplerBindingLayout sampler;
  32469. GPUTextureBindingLayout texture;
  32470. GPUStorageTextureBindingLayout storageTexture;
  32471. };
  32472. typedef [EnforceRange] unsigned long GPUShaderStageFlags;
  32473. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32474. Exposed=(Window, DedicatedWorker), SecureContext]
  32475. interface GPUShaderStage {
  32476. const GPUFlagsConstant VERTEX = 0x1;
  32477. const GPUFlagsConstant FRAGMENT = 0x2;
  32478. const GPUFlagsConstant COMPUTE = 0x4;
  32479. };
  32480. enum GPUBufferBindingType {
  32481. "uniform",
  32482. "storage",
  32483. "read-only-storage",
  32484. };
  32485. dictionary GPUBufferBindingLayout {
  32486. GPUBufferBindingType type = "uniform";
  32487. boolean hasDynamicOffset = false;
  32488. GPUSize64 minBindingSize = 0;
  32489. };
  32490. enum GPUSamplerBindingType {
  32491. "filtering",
  32492. "non-filtering",
  32493. "comparison",
  32494. };
  32495. dictionary GPUSamplerBindingLayout {
  32496. GPUSamplerBindingType type = "filtering";
  32497. };
  32498. enum GPUTextureSampleType {
  32499. "float",
  32500. "unfilterable-float",
  32501. "depth",
  32502. "sint",
  32503. "uint",
  32504. };
  32505. dictionary GPUTextureBindingLayout {
  32506. GPUTextureSampleType sampleType = "float";
  32507. GPUTextureViewDimension viewDimension = "2d";
  32508. boolean multisampled = false;
  32509. };
  32510. enum GPUStorageTextureAccess {
  32511. "write-only",
  32512. "read-only",
  32513. "read-write",
  32514. };
  32515. dictionary GPUStorageTextureBindingLayout {
  32516. GPUStorageTextureAccess access = "write-only";
  32517. required GPUTextureFormat format;
  32518. GPUTextureViewDimension viewDimension = "2d";
  32519. };
  32520. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32521. Exposed=(Window, DedicatedWorker), SecureContext]
  32522. interface GPUBindGroup {
  32523. };
  32524. GPUBindGroup includes GPUObjectBase;
  32525. dictionary GPUBindGroupDescriptor
  32526. : GPUObjectDescriptorBase {
  32527. required GPUBindGroupLayout layout;
  32528. required sequence<GPUBindGroupEntry> entries;
  32529. };
  32530. typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
  32531. dictionary GPUBindGroupEntry {
  32532. required GPUIndex32 binding;
  32533. required GPUBindingResource resource;
  32534. };
  32535. dictionary GPUBufferBinding {
  32536. required GPUBuffer buffer;
  32537. GPUSize64 offset = 0;
  32538. GPUSize64 size;
  32539. };
  32540. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32541. Exposed=(Window, DedicatedWorker), SecureContext]
  32542. interface GPUPipelineLayout {
  32543. };
  32544. GPUPipelineLayout includes GPUObjectBase;
  32545. dictionary GPUPipelineLayoutDescriptor
  32546. : GPUObjectDescriptorBase {
  32547. required sequence<GPUBindGroupLayout> bindGroupLayouts;
  32548. };
  32549. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32550. Exposed=(Window, DedicatedWorker), SecureContext]
  32551. interface GPUShaderModule {
  32552. [Throws]
  32553. Promise<GPUCompilationInfo> compilationInfo(); // To be removed with <https://bugzilla.mozilla.org/show_bug.cgi?id=1846892>
  32554. [Throws]
  32555. Promise<GPUCompilationInfo> getCompilationInfo();
  32556. };
  32557. GPUShaderModule includes GPUObjectBase;
  32558. dictionary GPUShaderModuleDescriptor
  32559. : GPUObjectDescriptorBase {
  32560. // UTF8String is not observably different from USVString
  32561. required UTF8String code;
  32562. object sourceMap;
  32563. };
  32564. enum GPUCompilationMessageType {
  32565. "error",
  32566. "warning",
  32567. "info",
  32568. };
  32569. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32570. Exposed=(Window, DedicatedWorker), SecureContext]
  32571. interface GPUCompilationMessage {
  32572. readonly attribute DOMString message;
  32573. readonly attribute GPUCompilationMessageType type;
  32574. readonly attribute unsigned long long lineNum;
  32575. readonly attribute unsigned long long linePos;
  32576. readonly attribute unsigned long long offset;
  32577. readonly attribute unsigned long long length;
  32578. };
  32579. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32580. Exposed=(Window, DedicatedWorker), SecureContext]
  32581. interface GPUCompilationInfo {
  32582. [Cached, Frozen, Pure]
  32583. readonly attribute sequence<GPUCompilationMessage> messages;
  32584. };
  32585. enum GPUAutoLayoutMode {
  32586. "auto",
  32587. };
  32588. dictionary GPUPipelineDescriptorBase
  32589. : GPUObjectDescriptorBase {
  32590. required (GPUPipelineLayout or GPUAutoLayoutMode) layout;
  32591. };
  32592. interface mixin GPUPipelineBase {
  32593. GPUBindGroupLayout getBindGroupLayout(unsigned long index);
  32594. };
  32595. dictionary GPUProgrammableStage {
  32596. required GPUShaderModule module;
  32597. USVString entryPoint;
  32598. };
  32599. //TODO: Serializable
  32600. // https://bugzilla.mozilla.org/show_bug.cgi?id=1696219
  32601. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32602. Exposed=(Window, DedicatedWorker), SecureContext]
  32603. interface GPUComputePipeline {
  32604. };
  32605. GPUComputePipeline includes GPUObjectBase;
  32606. GPUComputePipeline includes GPUPipelineBase;
  32607. dictionary GPUComputePipelineDescriptor
  32608. : GPUPipelineDescriptorBase {
  32609. required GPUProgrammableStage compute;
  32610. };
  32611. //TODO: Serializable
  32612. // https://bugzilla.mozilla.org/show_bug.cgi?id=1696219
  32613. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32614. Exposed=(Window, DedicatedWorker), SecureContext]
  32615. interface GPURenderPipeline {
  32616. };
  32617. GPURenderPipeline includes GPUObjectBase;
  32618. GPURenderPipeline includes GPUPipelineBase;
  32619. dictionary GPURenderPipelineDescriptor
  32620. : GPUPipelineDescriptorBase {
  32621. required GPUVertexState vertex;
  32622. GPUPrimitiveState primitive = {};
  32623. GPUDepthStencilState depthStencil;
  32624. GPUMultisampleState multisample = {};
  32625. GPUFragmentState fragment;
  32626. };
  32627. dictionary GPUPrimitiveState {
  32628. GPUPrimitiveTopology topology = "triangle-list";
  32629. GPUIndexFormat stripIndexFormat;
  32630. GPUFrontFace frontFace = "ccw";
  32631. GPUCullMode cullMode = "none";
  32632. // Requires "depth-clip-control" feature.
  32633. boolean unclippedDepth = false;
  32634. };
  32635. enum GPUPrimitiveTopology {
  32636. "point-list",
  32637. "line-list",
  32638. "line-strip",
  32639. "triangle-list",
  32640. "triangle-strip",
  32641. };
  32642. enum GPUFrontFace {
  32643. "ccw",
  32644. "cw",
  32645. };
  32646. enum GPUCullMode {
  32647. "none",
  32648. "front",
  32649. "back",
  32650. };
  32651. dictionary GPUMultisampleState {
  32652. GPUSize32 count = 1;
  32653. GPUSampleMask mask = 0xFFFFFFFF;
  32654. boolean alphaToCoverageEnabled = false;
  32655. };
  32656. dictionary GPUFragmentState
  32657. : GPUProgrammableStage {
  32658. required sequence<GPUColorTargetState> targets;
  32659. };
  32660. dictionary GPUColorTargetState {
  32661. required GPUTextureFormat format;
  32662. GPUBlendState blend;
  32663. GPUColorWriteFlags writeMask = 0xF; // GPUColorWrite.ALL
  32664. };
  32665. dictionary GPUBlendState {
  32666. required GPUBlendComponent color;
  32667. required GPUBlendComponent alpha;
  32668. };
  32669. typedef [EnforceRange] unsigned long GPUColorWriteFlags;
  32670. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32671. Exposed=(Window, DedicatedWorker), SecureContext]
  32672. interface GPUColorWrite {
  32673. const GPUFlagsConstant RED = 0x1;
  32674. const GPUFlagsConstant GREEN = 0x2;
  32675. const GPUFlagsConstant BLUE = 0x4;
  32676. const GPUFlagsConstant ALPHA = 0x8;
  32677. const GPUFlagsConstant ALL = 0xF;
  32678. };
  32679. dictionary GPUBlendComponent {
  32680. GPUBlendOperation operation = "add";
  32681. GPUBlendFactor srcFactor = "one";
  32682. GPUBlendFactor dstFactor = "zero";
  32683. };
  32684. enum GPUBlendFactor {
  32685. "zero",
  32686. "one",
  32687. "src",
  32688. "one-minus-src",
  32689. "src-alpha",
  32690. "one-minus-src-alpha",
  32691. "dst",
  32692. "one-minus-dst",
  32693. "dst-alpha",
  32694. "one-minus-dst-alpha",
  32695. "src-alpha-saturated",
  32696. "constant",
  32697. "one-minus-constant",
  32698. };
  32699. enum GPUBlendOperation {
  32700. "add",
  32701. "subtract",
  32702. "reverse-subtract",
  32703. "min",
  32704. "max",
  32705. };
  32706. dictionary GPUDepthStencilState {
  32707. required GPUTextureFormat format;
  32708. boolean depthWriteEnabled = false;
  32709. GPUCompareFunction depthCompare = "always";
  32710. GPUStencilFaceState stencilFront = {};
  32711. GPUStencilFaceState stencilBack = {};
  32712. GPUStencilValue stencilReadMask = 0xFFFFFFFF;
  32713. GPUStencilValue stencilWriteMask = 0xFFFFFFFF;
  32714. GPUDepthBias depthBias = 0;
  32715. float depthBiasSlopeScale = 0;
  32716. float depthBiasClamp = 0;
  32717. };
  32718. dictionary GPUStencilFaceState {
  32719. GPUCompareFunction compare = "always";
  32720. GPUStencilOperation failOp = "keep";
  32721. GPUStencilOperation depthFailOp = "keep";
  32722. GPUStencilOperation passOp = "keep";
  32723. };
  32724. enum GPUStencilOperation {
  32725. "keep",
  32726. "zero",
  32727. "replace",
  32728. "invert",
  32729. "increment-clamp",
  32730. "decrement-clamp",
  32731. "increment-wrap",
  32732. "decrement-wrap",
  32733. };
  32734. enum GPUIndexFormat {
  32735. "uint16",
  32736. "uint32",
  32737. };
  32738. enum GPUVertexFormat {
  32739. "uint8x2",
  32740. "uint8x4",
  32741. "sint8x2",
  32742. "sint8x4",
  32743. "unorm8x2",
  32744. "unorm8x4",
  32745. "snorm8x2",
  32746. "snorm8x4",
  32747. "uint16x2",
  32748. "uint16x4",
  32749. "sint16x2",
  32750. "sint16x4",
  32751. "unorm16x2",
  32752. "unorm16x4",
  32753. "snorm16x2",
  32754. "snorm16x4",
  32755. "float16x2",
  32756. "float16x4",
  32757. "float32",
  32758. "float32x2",
  32759. "float32x3",
  32760. "float32x4",
  32761. "uint32",
  32762. "uint32x2",
  32763. "uint32x3",
  32764. "uint32x4",
  32765. "sint32",
  32766. "sint32x2",
  32767. "sint32x3",
  32768. "sint32x4",
  32769. };
  32770. enum GPUVertexStepMode {
  32771. "vertex",
  32772. "instance",
  32773. };
  32774. dictionary GPUVertexState
  32775. : GPUProgrammableStage {
  32776. sequence<GPUVertexBufferLayout?> buffers = [];
  32777. };
  32778. dictionary GPUVertexBufferLayout {
  32779. required GPUSize64 arrayStride;
  32780. GPUVertexStepMode stepMode = "vertex";
  32781. required sequence<GPUVertexAttribute> attributes;
  32782. };
  32783. dictionary GPUVertexAttribute {
  32784. required GPUVertexFormat format;
  32785. required GPUSize64 offset;
  32786. required GPUIndex32 shaderLocation;
  32787. };
  32788. dictionary GPUImageDataLayout {
  32789. GPUSize64 offset = 0;
  32790. GPUSize32 bytesPerRow;
  32791. GPUSize32 rowsPerImage;
  32792. };
  32793. dictionary GPUImageCopyBuffer
  32794. : GPUImageDataLayout {
  32795. required GPUBuffer buffer;
  32796. };
  32797. dictionary GPUImageCopyTexture {
  32798. required GPUTexture texture;
  32799. GPUIntegerCoordinate mipLevel = 0;
  32800. GPUOrigin3D origin;
  32801. GPUTextureAspect aspect = "all";
  32802. };
  32803. dictionary GPUImageCopyTextureTagged
  32804. : GPUImageCopyTexture {
  32805. //GPUPredefinedColorSpace colorSpace = "srgb"; //TODO
  32806. boolean premultipliedAlpha = false;
  32807. };
  32808. dictionary GPUImageCopyExternalImage {
  32809. required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source;
  32810. GPUOrigin2D origin = {};
  32811. boolean flipY = false;
  32812. };
  32813. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32814. Exposed=(Window, DedicatedWorker), SecureContext]
  32815. interface GPUCommandBuffer {
  32816. };
  32817. GPUCommandBuffer includes GPUObjectBase;
  32818. dictionary GPUCommandBufferDescriptor
  32819. : GPUObjectDescriptorBase {
  32820. };
  32821. interface mixin GPUCommandsMixin {
  32822. };
  32823. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32824. Exposed=(Window, DedicatedWorker), SecureContext]
  32825. interface GPUCommandEncoder {
  32826. GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
  32827. GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
  32828. undefined copyBufferToBuffer(
  32829. GPUBuffer source,
  32830. GPUSize64 sourceOffset,
  32831. GPUBuffer destination,
  32832. GPUSize64 destinationOffset,
  32833. GPUSize64 size);
  32834. undefined copyBufferToTexture(
  32835. GPUImageCopyBuffer source,
  32836. GPUImageCopyTexture destination,
  32837. GPUExtent3D copySize);
  32838. undefined copyTextureToBuffer(
  32839. GPUImageCopyTexture source,
  32840. GPUImageCopyBuffer destination,
  32841. GPUExtent3D copySize);
  32842. undefined copyTextureToTexture(
  32843. GPUImageCopyTexture source,
  32844. GPUImageCopyTexture destination,
  32845. GPUExtent3D copySize);
  32846. undefined clearBuffer(
  32847. GPUBuffer buffer,
  32848. optional GPUSize64 offset = 0,
  32849. optional GPUSize64 size);
  32850. GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
  32851. };
  32852. GPUCommandEncoder includes GPUObjectBase;
  32853. GPUCommandEncoder includes GPUCommandsMixin;
  32854. GPUCommandEncoder includes GPUDebugCommandsMixin;
  32855. dictionary GPUCommandEncoderDescriptor
  32856. : GPUObjectDescriptorBase {
  32857. };
  32858. interface mixin GPUBindingCommandsMixin {
  32859. undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
  32860. optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
  32861. };
  32862. interface mixin GPUDebugCommandsMixin {
  32863. undefined pushDebugGroup(USVString groupLabel);
  32864. undefined popDebugGroup();
  32865. undefined insertDebugMarker(USVString markerLabel);
  32866. };
  32867. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32868. Exposed=(Window, DedicatedWorker), SecureContext]
  32869. interface GPUComputePassEncoder {
  32870. undefined setPipeline(GPUComputePipeline pipeline);
  32871. undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1);
  32872. [Pref="dom.webgpu.indirect-dispatch.enabled"]
  32873. undefined dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
  32874. undefined end();
  32875. };
  32876. GPUComputePassEncoder includes GPUObjectBase;
  32877. GPUComputePassEncoder includes GPUCommandsMixin;
  32878. GPUComputePassEncoder includes GPUDebugCommandsMixin;
  32879. GPUComputePassEncoder includes GPUBindingCommandsMixin;
  32880. dictionary GPUComputePassDescriptor
  32881. : GPUObjectDescriptorBase {
  32882. };
  32883. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32884. Exposed=(Window, DedicatedWorker), SecureContext]
  32885. interface GPURenderPassEncoder {
  32886. undefined setViewport(float x, float y,
  32887. float width, float height,
  32888. float minDepth, float maxDepth);
  32889. undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y,
  32890. GPUIntegerCoordinate width, GPUIntegerCoordinate height);
  32891. undefined setBlendConstant(GPUColor color);
  32892. undefined setStencilReference(GPUStencilValue reference);
  32893. //undefined beginOcclusionQuery(GPUSize32 queryIndex);
  32894. //undefined endOcclusionQuery();
  32895. undefined executeBundles(sequence<GPURenderBundle> bundles);
  32896. undefined end();
  32897. };
  32898. GPURenderPassEncoder includes GPUObjectBase;
  32899. GPURenderPassEncoder includes GPUCommandsMixin;
  32900. GPURenderPassEncoder includes GPUDebugCommandsMixin;
  32901. GPURenderPassEncoder includes GPUBindingCommandsMixin;
  32902. GPURenderPassEncoder includes GPURenderCommandsMixin;
  32903. dictionary GPURenderPassDescriptor
  32904. : GPUObjectDescriptorBase {
  32905. required sequence<GPURenderPassColorAttachment> colorAttachments;
  32906. GPURenderPassDepthStencilAttachment depthStencilAttachment;
  32907. GPUQuerySet occlusionQuerySet;
  32908. };
  32909. dictionary GPURenderPassColorAttachment {
  32910. required GPUTextureView view;
  32911. GPUTextureView resolveTarget;
  32912. GPUColor clearValue;
  32913. required GPULoadOp loadOp;
  32914. required GPUStoreOp storeOp;
  32915. };
  32916. dictionary GPURenderPassDepthStencilAttachment {
  32917. required GPUTextureView view;
  32918. float depthClearValue;
  32919. GPULoadOp depthLoadOp;
  32920. GPUStoreOp depthStoreOp;
  32921. boolean depthReadOnly = false;
  32922. GPUStencilValue stencilClearValue = 0;
  32923. GPULoadOp stencilLoadOp;
  32924. GPUStoreOp stencilStoreOp;
  32925. boolean stencilReadOnly = false;
  32926. };
  32927. enum GPULoadOp {
  32928. "load",
  32929. "clear",
  32930. };
  32931. enum GPUStoreOp {
  32932. "store",
  32933. "discard",
  32934. };
  32935. dictionary GPURenderPassLayout
  32936. : GPUObjectDescriptorBase {
  32937. required sequence<GPUTextureFormat> colorFormats;
  32938. GPUTextureFormat depthStencilFormat;
  32939. GPUSize32 sampleCount = 1;
  32940. };
  32941. interface mixin GPURenderCommandsMixin {
  32942. undefined setPipeline(GPURenderPipeline pipeline);
  32943. undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
  32944. undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
  32945. undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
  32946. optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
  32947. undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1,
  32948. optional GPUSize32 firstIndex = 0,
  32949. optional GPUSignedOffset32 baseVertex = 0,
  32950. optional GPUSize32 firstInstance = 0);
  32951. [Pref="dom.webgpu.indirect-dispatch.enabled"]
  32952. undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
  32953. [Pref="dom.webgpu.indirect-dispatch.enabled"]
  32954. undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
  32955. };
  32956. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32957. Exposed=(Window, DedicatedWorker), SecureContext]
  32958. interface GPURenderBundle {
  32959. };
  32960. GPURenderBundle includes GPUObjectBase;
  32961. dictionary GPURenderBundleDescriptor
  32962. : GPUObjectDescriptorBase {
  32963. };
  32964. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32965. Exposed=(Window, DedicatedWorker), SecureContext]
  32966. interface GPURenderBundleEncoder {
  32967. GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
  32968. };
  32969. GPURenderBundleEncoder includes GPUObjectBase;
  32970. GPURenderBundleEncoder includes GPUCommandsMixin;
  32971. GPURenderBundleEncoder includes GPUDebugCommandsMixin;
  32972. GPURenderBundleEncoder includes GPUBindingCommandsMixin;
  32973. GPURenderBundleEncoder includes GPURenderCommandsMixin;
  32974. dictionary GPURenderBundleEncoderDescriptor
  32975. : GPURenderPassLayout {
  32976. boolean depthReadOnly = false;
  32977. boolean stencilReadOnly = false;
  32978. };
  32979. dictionary GPUQueueDescriptor
  32980. : GPUObjectDescriptorBase {
  32981. };
  32982. //TODO: use [AllowShared] on BufferSource
  32983. // https://bugzilla.mozilla.org/show_bug.cgi?id=1696216
  32984. // https://github.com/heycam/webidl/issues/961
  32985. [Func="mozilla::webgpu::Instance::PrefEnabled",
  32986. Exposed=(Window, DedicatedWorker), SecureContext]
  32987. interface GPUQueue {
  32988. undefined submit(sequence<GPUCommandBuffer> buffers);
  32989. [Throws]
  32990. Promise<undefined> onSubmittedWorkDone();
  32991. [Throws]
  32992. undefined writeBuffer(
  32993. GPUBuffer buffer,
  32994. GPUSize64 bufferOffset,
  32995. BufferSource data,
  32996. optional GPUSize64 dataOffset = 0,
  32997. optional GPUSize64 size);
  32998. [Throws]
  32999. undefined writeTexture(
  33000. GPUImageCopyTexture destination,
  33001. BufferSource data,
  33002. GPUImageDataLayout dataLayout,
  33003. GPUExtent3D size);
  33004. [Throws]
  33005. undefined copyExternalImageToTexture(
  33006. GPUImageCopyExternalImage source,
  33007. GPUImageCopyTextureTagged destination,
  33008. GPUExtent3D copySize);
  33009. };
  33010. GPUQueue includes GPUObjectBase;
  33011. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33012. Exposed=(Window, DedicatedWorker), SecureContext]
  33013. interface GPUQuerySet {
  33014. undefined destroy();
  33015. };
  33016. GPUQuerySet includes GPUObjectBase;
  33017. dictionary GPUQuerySetDescriptor
  33018. : GPUObjectDescriptorBase {
  33019. required GPUQueryType type;
  33020. required GPUSize32 count;
  33021. sequence<GPUPipelineStatisticName> pipelineStatistics = [];
  33022. };
  33023. enum GPUPipelineStatisticName {
  33024. "vertex-shader-invocations",
  33025. "clipper-invocations",
  33026. "clipper-primitives-out",
  33027. "fragment-shader-invocations",
  33028. "compute-shader-invocations"
  33029. };
  33030. enum GPUQueryType {
  33031. "occlusion",
  33032. "pipeline-statistics",
  33033. "timestamp",
  33034. };
  33035. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33036. Exposed=(Window, DedicatedWorker), SecureContext]
  33037. interface GPUCanvasContext {
  33038. readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
  33039. undefined configure(GPUCanvasConfiguration configuration);
  33040. undefined unconfigure();
  33041. [Throws]
  33042. GPUTexture getCurrentTexture();
  33043. };
  33044. enum GPUCanvasAlphaMode {
  33045. "opaque",
  33046. "premultiplied",
  33047. };
  33048. dictionary GPUCanvasConfiguration {
  33049. required GPUDevice device;
  33050. required GPUTextureFormat format;
  33051. GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT
  33052. sequence<GPUTextureFormat> viewFormats = [];
  33053. //GPUPredefinedColorSpace colorSpace = "srgb"; //TODO
  33054. GPUCanvasAlphaMode alphaMode = "opaque";
  33055. };
  33056. enum GPUDeviceLostReason {
  33057. "destroyed",
  33058. };
  33059. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33060. Exposed=(Window, DedicatedWorker), SecureContext]
  33061. interface GPUDeviceLostInfo {
  33062. readonly attribute any reason; // GPUDeviceLostReason or undefined
  33063. readonly attribute DOMString message;
  33064. };
  33065. partial interface GPUDevice {
  33066. [Throws]
  33067. readonly attribute Promise<GPUDeviceLostInfo> lost;
  33068. };
  33069. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33070. Exposed=(Window, DedicatedWorker), SecureContext]
  33071. interface GPUError {
  33072. readonly attribute DOMString message;
  33073. };
  33074. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33075. Exposed=(Window, DedicatedWorker), SecureContext]
  33076. interface GPUValidationError
  33077. : GPUError {
  33078. [Throws]
  33079. constructor(DOMString message);
  33080. };
  33081. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33082. Exposed=(Window, DedicatedWorker), SecureContext]
  33083. interface GPUOutOfMemoryError
  33084. : GPUError {
  33085. [Throws]
  33086. constructor(DOMString message);
  33087. };
  33088. [Func="mozilla::webgpu::Instance::PrefEnabled",
  33089. Exposed=(Window, DedicatedWorker), SecureContext]
  33090. interface GPUInternalError
  33091. : GPUError {
  33092. [Throws]
  33093. constructor(DOMString message);
  33094. };
  33095. enum GPUErrorFilter {
  33096. "validation",
  33097. "out-of-memory",
  33098. "internal",
  33099. };
  33100. partial interface GPUDevice {
  33101. undefined pushErrorScope(GPUErrorFilter filter);
  33102. [Throws]
  33103. Promise<GPUError?> popErrorScope();
  33104. };
  33105. partial interface GPUDevice {
  33106. [Exposed=(Window, DedicatedWorker)]
  33107. attribute EventHandler onuncapturederror;
  33108. };
  33109. typedef [EnforceRange] unsigned long GPUBufferDynamicOffset;
  33110. typedef [EnforceRange] unsigned long GPUStencilValue;
  33111. typedef [EnforceRange] unsigned long GPUSampleMask;
  33112. typedef [EnforceRange] long GPUDepthBias;
  33113. typedef [EnforceRange] unsigned long long GPUSize64;
  33114. typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
  33115. typedef [EnforceRange] unsigned long GPUIndex32;
  33116. typedef [EnforceRange] unsigned long GPUSize32;
  33117. typedef [EnforceRange] long GPUSignedOffset32;
  33118. typedef unsigned long long GPUSize64Out;
  33119. typedef unsigned long GPUIntegerCoordinateOut;
  33120. typedef unsigned long GPUSize32Out;
  33121. typedef unsigned long GPUFlagsConstant;
  33122. dictionary GPUColorDict {
  33123. required double r;
  33124. required double g;
  33125. required double b;
  33126. required double a;
  33127. };
  33128. typedef (sequence<double> or GPUColorDict) GPUColor;
  33129. dictionary GPUOrigin2DDict {
  33130. GPUIntegerCoordinate x = 0;
  33131. GPUIntegerCoordinate y = 0;
  33132. };
  33133. typedef (sequence<GPUIntegerCoordinate> or GPUOrigin2DDict) GPUOrigin2D;
  33134. dictionary GPUOrigin3DDict {
  33135. GPUIntegerCoordinate x = 0;
  33136. GPUIntegerCoordinate y = 0;
  33137. GPUIntegerCoordinate z = 0;
  33138. };
  33139. typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
  33140. dictionary GPUExtent3DDict {
  33141. required GPUIntegerCoordinate width;
  33142. GPUIntegerCoordinate height = 1;
  33143. GPUIntegerCoordinate depthOrArrayLayers = 1;
  33144. };
  33145. typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
  33146. /* ---------------------- WebrtcGlobalInformation ----------------------------- */
  33147. /* ./webidl/WebrtcGlobalInformation.webidl */
  33148. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33149. /* This Source Code Form is subject to the terms of the Mozilla Public
  33150. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  33151. * You can obtain one at http://mozilla.org/MPL/2.0/.
  33152. */
  33153. dictionary WebrtcGlobalStatisticsReport {
  33154. sequence<RTCStatsReportInternal> reports = [];
  33155. sequence<RTCSdpHistoryInternal> sdpHistories = [];
  33156. };
  33157. dictionary WebrtcGlobalMediaContext {
  33158. required boolean hasH264Hardware;
  33159. };
  33160. callback WebrtcGlobalStatisticsCallback = undefined (WebrtcGlobalStatisticsReport reports);
  33161. callback WebrtcGlobalStatisticsHistoryPcIdsCallback = undefined (sequence<DOMString> pcIds);
  33162. callback WebrtcGlobalStatisticsHistoryCallback = undefined (WebrtcGlobalStatisticsReport reports);
  33163. callback WebrtcGlobalLoggingCallback = undefined (sequence<DOMString> logMessages);
  33164. [ChromeOnly, Exposed=Window]
  33165. namespace WebrtcGlobalInformation {
  33166. [Throws]
  33167. undefined getAllStats(WebrtcGlobalStatisticsCallback callback,
  33168. optional DOMString pcIdFilter);
  33169. [Throws]
  33170. undefined getStatsHistoryPcIds(WebrtcGlobalStatisticsHistoryPcIdsCallback callback);
  33171. [Throws]
  33172. undefined getStatsHistorySince(WebrtcGlobalStatisticsHistoryCallback callback,
  33173. DOMString pcIdFilter,
  33174. optional DOMHighResTimeStamp after,
  33175. optional DOMHighResTimeStamp sdpAfter);
  33176. WebrtcGlobalMediaContext getMediaContext();
  33177. undefined clearAllStats();
  33178. [Throws]
  33179. undefined getLogging(DOMString pattern, WebrtcGlobalLoggingCallback callback);
  33180. undefined clearLogging();
  33181. // WebRTC AEC debugging enable
  33182. attribute boolean aecDebug;
  33183. readonly attribute DOMString aecDebugLogDir;
  33184. };
  33185. /* ---------------------- WebSocket ----------------------------- */
  33186. /* ./webidl/WebSocket.webidl */
  33187. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33188. /* This Source Code Form is subject to the terms of the Mozilla Public
  33189. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  33190. * You can obtain one at http://mozilla.org/MPL/2.0/.
  33191. *
  33192. * The origin of this IDL file is
  33193. * http://www.whatwg.org/html/#network
  33194. *
  33195. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
  33196. * You are granted a license to use, reproduce and create derivative works of this document.
  33197. */
  33198. enum BinaryType { "blob", "arraybuffer" };
  33199. [Exposed=(Window,Worker)]
  33200. interface WebSocket : EventTarget {
  33201. [Throws]
  33202. constructor(DOMString url, optional (DOMString or sequence<DOMString>) protocols = []);
  33203. readonly attribute DOMString url;
  33204. // ready state
  33205. const unsigned short CONNECTING = 0;
  33206. const unsigned short OPEN = 1;
  33207. const unsigned short CLOSING = 2;
  33208. const unsigned short CLOSED = 3;
  33209. readonly attribute unsigned short readyState;
  33210. readonly attribute unsigned long long bufferedAmount;
  33211. // networking
  33212. attribute EventHandler onopen;
  33213. attribute EventHandler onerror;
  33214. attribute EventHandler onclose;
  33215. readonly attribute DOMString extensions;
  33216. readonly attribute DOMString protocol;
  33217. [Throws]
  33218. undefined close(optional [Clamp] unsigned short code, optional DOMString reason);
  33219. // messaging
  33220. attribute EventHandler onmessage;
  33221. attribute BinaryType binaryType;
  33222. [Throws]
  33223. undefined send(DOMString data);
  33224. [Throws]
  33225. undefined send(Blob data);
  33226. [Throws]
  33227. undefined send(ArrayBuffer data);
  33228. [Throws]
  33229. undefined send(ArrayBufferView data);
  33230. };
  33231. // Support for creating server-side chrome-only WebSocket. Used in
  33232. // devtools remote debugging server.
  33233. interface nsITransportProvider;
  33234. partial interface WebSocket {
  33235. [ChromeOnly, NewObject, Throws]
  33236. static WebSocket createServerWebSocket(DOMString url,
  33237. sequence<DOMString> protocols,
  33238. nsITransportProvider transportProvider,
  33239. DOMString negotiatedExtensions);
  33240. };
  33241. /* ---------------------- WebTaskScheduling ----------------------------- */
  33242. /* ./webidl/WebTaskScheduling.webidl */
  33243. /* This Source Code Form is subject to the terms of the Mozilla Public
  33244. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33245. * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
  33246. enum TaskPriority {
  33247. "user-blocking",
  33248. "user-visible",
  33249. "background"
  33250. };
  33251. [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
  33252. interface TaskSignal : AbortSignal {
  33253. readonly attribute TaskPriority priority;
  33254. attribute EventHandler onprioritychange;
  33255. };
  33256. dictionary SchedulerPostTaskOptions {
  33257. AbortSignal signal;
  33258. TaskPriority priority;
  33259. [EnforceRange] unsigned long long delay = 0;
  33260. };
  33261. callback SchedulerPostTaskCallback = any ();
  33262. [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
  33263. interface Scheduler {
  33264. [UseCounter]
  33265. Promise<any> postTask(
  33266. SchedulerPostTaskCallback callback,
  33267. optional SchedulerPostTaskOptions options = {}
  33268. );
  33269. };
  33270. dictionary TaskControllerInit {
  33271. TaskPriority priority = "user-visible";
  33272. };
  33273. [Exposed=(Window,Worker), Pref="dom.enable_web_task_scheduling"]
  33274. interface TaskController : AbortController {
  33275. [Throws]
  33276. constructor(optional TaskControllerInit init = {});
  33277. [Throws]
  33278. undefined setPriority(TaskPriority priority);
  33279. };
  33280. /* ---------------------- WebTransport ----------------------------- */
  33281. /* ./webidl/WebTransport.webidl */
  33282. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33283. /* This Source Code Form is subject to the terms of the Mozilla Public
  33284. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33285. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  33286. /* https://w3c.github.io/webtransport */
  33287. /* https://w3c.github.io/webtransport/#web-transport-configuration */
  33288. dictionary WebTransportHash {
  33289. DOMString algorithm;
  33290. BufferSource value;
  33291. };
  33292. dictionary WebTransportOptions {
  33293. boolean allowPooling = false;
  33294. boolean requireUnreliable = false;
  33295. sequence<WebTransportHash> serverCertificateHashes;
  33296. WebTransportCongestionControl congestionControl = "default";
  33297. };
  33298. enum WebTransportCongestionControl {
  33299. "default",
  33300. "throughput",
  33301. "low-latency",
  33302. };
  33303. /* https://w3c.github.io/webtransport/#web-transport-close-info */
  33304. dictionary WebTransportCloseInfo {
  33305. unsigned long closeCode = 0;
  33306. UTF8String reason = "";
  33307. };
  33308. /* https://w3c.github.io/webtransport/#uni-stream-options */
  33309. dictionary WebTransportSendStreamOptions {
  33310. long long? sendOrder = null;
  33311. };
  33312. /* https://w3c.github.io/webtransport/#web-transport-stats */
  33313. dictionary WebTransportStats {
  33314. DOMHighResTimeStamp timestamp;
  33315. unsigned long long bytesSent;
  33316. unsigned long long packetsSent;
  33317. unsigned long long packetsLost;
  33318. unsigned long numOutgoingStreamsCreated;
  33319. unsigned long numIncomingStreamsCreated;
  33320. unsigned long long bytesReceived;
  33321. unsigned long long packetsReceived;
  33322. DOMHighResTimeStamp smoothedRtt;
  33323. DOMHighResTimeStamp rttVariation;
  33324. DOMHighResTimeStamp minRtt;
  33325. WebTransportDatagramStats datagrams;
  33326. };
  33327. /* https://w3c.github.io/webtransport/#web-transport-stats%E2%91%A0 */
  33328. dictionary WebTransportDatagramStats {
  33329. DOMHighResTimeStamp timestamp;
  33330. unsigned long long expiredOutgoing;
  33331. unsigned long long droppedIncoming;
  33332. unsigned long long lostOutgoing;
  33333. };
  33334. /* https://w3c.github.io/webtransport/#web-transport */
  33335. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
  33336. interface WebTransport {
  33337. [Throws]
  33338. constructor(USVString url, optional WebTransportOptions options = {});
  33339. [NewObject]
  33340. Promise<WebTransportStats> getStats();
  33341. readonly attribute Promise<undefined> ready;
  33342. readonly attribute WebTransportReliabilityMode reliability;
  33343. readonly attribute WebTransportCongestionControl congestionControl;
  33344. readonly attribute Promise<WebTransportCloseInfo> closed;
  33345. [Throws] undefined close(optional WebTransportCloseInfo closeInfo = {});
  33346. [Throws] readonly attribute WebTransportDatagramDuplexStream datagrams;
  33347. [NewObject]
  33348. Promise<WebTransportBidirectionalStream> createBidirectionalStream(
  33349. optional WebTransportSendStreamOptions options = {});
  33350. /* a ReadableStream of WebTransportBidirectionalStream objects */
  33351. readonly attribute ReadableStream incomingBidirectionalStreams;
  33352. /* XXX spec says this should be WebTransportSendStream */
  33353. [NewObject]
  33354. Promise<WritableStream> createUnidirectionalStream(
  33355. optional WebTransportSendStreamOptions options = {});
  33356. /* a ReadableStream of WebTransportReceiveStream objects */
  33357. readonly attribute ReadableStream incomingUnidirectionalStreams;
  33358. };
  33359. enum WebTransportReliabilityMode {
  33360. "pending",
  33361. "reliable-only",
  33362. "supports-unreliable",
  33363. };
  33364. /* ---------------------- WebTransportDatagramDuplexStream ----------------------------- */
  33365. /* ./webidl/WebTransportDatagramDuplexStream.webidl */
  33366. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33367. /* This Source Code Form is subject to the terms of the Mozilla Public
  33368. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33369. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  33370. /* https://w3c.github.io/webtransport/#duplex-stream */
  33371. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.datagrams.enabled"]
  33372. interface WebTransportDatagramDuplexStream {
  33373. readonly attribute ReadableStream readable;
  33374. readonly attribute WritableStream writable;
  33375. readonly attribute unsigned long maxDatagramSize;
  33376. [Throws] attribute unrestricted double incomingMaxAge;
  33377. [Throws] attribute unrestricted double outgoingMaxAge;
  33378. [Throws] attribute unrestricted double incomingHighWaterMark;
  33379. [Throws] attribute unrestricted double outgoingHighWaterMark;
  33380. };
  33381. /* ---------------------- WebTransportError ----------------------------- */
  33382. /* ./webidl/WebTransportError.webidl */
  33383. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33384. /* This Source Code Form is subject to the terms of the Mozilla Public
  33385. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33386. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  33387. /* https://w3c.github.io/webtransport/#web-transport-error-interface */
  33388. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
  33389. interface WebTransportError : DOMException {
  33390. constructor(optional WebTransportErrorInit init = {});
  33391. readonly attribute WebTransportErrorSource source;
  33392. readonly attribute octet? streamErrorCode;
  33393. };
  33394. dictionary WebTransportErrorInit {
  33395. [Clamp] octet streamErrorCode;
  33396. DOMString message;
  33397. };
  33398. enum WebTransportErrorSource {
  33399. "stream",
  33400. "session",
  33401. };
  33402. /* ---------------------- WebTransportSendReceiveStream ----------------------------- */
  33403. /* ./webidl/WebTransportSendReceiveStream.webidl */
  33404. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33405. /* This Source Code Form is subject to the terms of the Mozilla Public
  33406. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33407. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  33408. /* https://w3c.github.io/webtransport/#send-stream */
  33409. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
  33410. interface WebTransportSendStream : WritableStream {
  33411. attribute long long? sendOrder;
  33412. Promise<WebTransportSendStreamStats> getStats();
  33413. };
  33414. /* https://w3c.github.io/webtransport/#send-stream-stats */
  33415. dictionary WebTransportSendStreamStats {
  33416. DOMHighResTimeStamp timestamp;
  33417. unsigned long long bytesWritten;
  33418. unsigned long long bytesSent;
  33419. unsigned long long bytesAcknowledged;
  33420. };
  33421. /* https://w3c.github.io/webtransport/#receive-stream */
  33422. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
  33423. interface WebTransportReceiveStream : ReadableStream {
  33424. Promise<WebTransportReceiveStreamStats> getStats();
  33425. };
  33426. /* https://w3c.github.io/webtransport/#receive-stream-stats */
  33427. dictionary WebTransportReceiveStreamStats {
  33428. DOMHighResTimeStamp timestamp;
  33429. unsigned long long bytesReceived;
  33430. unsigned long long bytesRead;
  33431. };
  33432. /* https://w3c.github.io/webtransport/#bidirectional-stream */
  33433. [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
  33434. interface WebTransportBidirectionalStream {
  33435. readonly attribute WebTransportReceiveStream readable;
  33436. readonly attribute WebTransportSendStream writable;
  33437. };
  33438. /* ---------------------- WebXR ----------------------------- */
  33439. /* ./webidl/WebXR.webidl */
  33440. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33441. /* This Source Code Form is subject to the terms of the Mozilla Public
  33442. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  33443. * You can obtain one at http://mozilla.org/MPL/2.0/.
  33444. *
  33445. * The origin of this IDL file is
  33446. * https://immersive-web.github.io/webxr/
  33447. */
  33448. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33449. interface XRSystem : EventTarget {
  33450. // Methods
  33451. [NewObject]
  33452. Promise<boolean> isSessionSupported(XRSessionMode mode);
  33453. [NewObject, NeedsCallerType]
  33454. Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit options = {});
  33455. // Events
  33456. attribute EventHandler ondevicechange;
  33457. };
  33458. enum XRSessionMode {
  33459. "inline",
  33460. "immersive-vr",
  33461. "immersive-ar",
  33462. };
  33463. dictionary XRSessionInit {
  33464. sequence<DOMString> requiredFeatures;
  33465. sequence<DOMString> optionalFeatures;
  33466. };
  33467. enum XRVisibilityState {
  33468. "visible",
  33469. "visible-blurred",
  33470. "hidden",
  33471. };
  33472. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33473. interface XRSession : EventTarget {
  33474. // Attributes
  33475. readonly attribute XRVisibilityState visibilityState;
  33476. [SameObject] readonly attribute XRRenderState renderState;
  33477. [SameObject] readonly attribute XRInputSourceArray inputSources;
  33478. readonly attribute float? frameRate;
  33479. readonly attribute Float32Array? supportedFrameRates;
  33480. // Methods
  33481. [Throws]
  33482. undefined updateRenderState(optional XRRenderStateInit state = {});
  33483. [NewObject]
  33484. Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
  33485. [NewObject]
  33486. Promise<undefined> updateTargetFrameRate(float rate);
  33487. [Throws]
  33488. long requestAnimationFrame(XRFrameRequestCallback callback);
  33489. [Throws]
  33490. undefined cancelAnimationFrame(long handle);
  33491. [NewObject]
  33492. Promise<undefined> end();
  33493. // Events
  33494. attribute EventHandler onend;
  33495. attribute EventHandler oninputsourceschange;
  33496. attribute EventHandler onselect;
  33497. attribute EventHandler onselectstart;
  33498. attribute EventHandler onselectend;
  33499. attribute EventHandler onsqueeze;
  33500. attribute EventHandler onsqueezestart;
  33501. attribute EventHandler onsqueezeend;
  33502. attribute EventHandler onvisibilitychange;
  33503. };
  33504. dictionary XRRenderStateInit {
  33505. double depthNear;
  33506. double depthFar;
  33507. double inlineVerticalFieldOfView;
  33508. XRWebGLLayer? baseLayer;
  33509. };
  33510. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33511. interface XRRenderState {
  33512. readonly attribute double depthNear;
  33513. readonly attribute double depthFar;
  33514. readonly attribute double? inlineVerticalFieldOfView;
  33515. readonly attribute XRWebGLLayer? baseLayer;
  33516. };
  33517. callback XRFrameRequestCallback = undefined (DOMHighResTimeStamp time, XRFrame frame);
  33518. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33519. interface XRFrame {
  33520. [SameObject] readonly attribute XRSession session;
  33521. [Throws] XRViewerPose? getViewerPose(XRReferenceSpace referenceSpace);
  33522. [Throws] XRPose? getPose(XRSpace space, XRSpace baseSpace);
  33523. };
  33524. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33525. interface XRSpace : EventTarget {
  33526. };
  33527. enum XRReferenceSpaceType {
  33528. "viewer",
  33529. "local",
  33530. "local-floor",
  33531. "bounded-floor",
  33532. "unbounded"
  33533. };
  33534. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33535. interface XRReferenceSpace : XRSpace {
  33536. [NewObject]
  33537. XRReferenceSpace getOffsetReferenceSpace(XRRigidTransform originOffset);
  33538. attribute EventHandler onreset;
  33539. };
  33540. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33541. interface XRBoundedReferenceSpace : XRReferenceSpace {
  33542. // TODO: Use FrozenArray once available. (Bug 1236777)
  33543. [Frozen, Cached, Pure]
  33544. readonly attribute sequence<DOMPointReadOnly> boundsGeometry;
  33545. };
  33546. enum XREye {
  33547. "none",
  33548. "left",
  33549. "right"
  33550. };
  33551. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33552. interface XRView {
  33553. readonly attribute XREye eye;
  33554. [Throws]
  33555. readonly attribute Float32Array projectionMatrix;
  33556. [Throws, SameObject]
  33557. readonly attribute XRRigidTransform transform;
  33558. };
  33559. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33560. interface XRViewport {
  33561. readonly attribute long x;
  33562. readonly attribute long y;
  33563. readonly attribute long width;
  33564. readonly attribute long height;
  33565. };
  33566. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33567. interface XRRigidTransform {
  33568. [Throws]
  33569. constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {});
  33570. [SameObject] readonly attribute DOMPointReadOnly position;
  33571. [SameObject] readonly attribute DOMPointReadOnly orientation;
  33572. [Throws]
  33573. readonly attribute Float32Array matrix;
  33574. [SameObject] readonly attribute XRRigidTransform inverse;
  33575. };
  33576. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33577. interface XRPose {
  33578. [SameObject] readonly attribute XRRigidTransform transform;
  33579. readonly attribute boolean emulatedPosition;
  33580. };
  33581. [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33582. interface XRViewerPose : XRPose {
  33583. // TODO: Use FrozenArray once available. (Bug 1236777)
  33584. [Constant, Cached, Frozen]
  33585. readonly attribute sequence<XRView> views;
  33586. };
  33587. enum XRHandedness {
  33588. "none",
  33589. "left",
  33590. "right"
  33591. };
  33592. enum XRTargetRayMode {
  33593. "gaze",
  33594. "tracked-pointer",
  33595. "screen"
  33596. };
  33597. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33598. interface XRInputSource {
  33599. readonly attribute XRHandedness handedness;
  33600. readonly attribute XRTargetRayMode targetRayMode;
  33601. [SameObject] readonly attribute XRSpace targetRaySpace;
  33602. [SameObject] readonly attribute XRSpace? gripSpace;
  33603. // TODO: Use FrozenArray once available. (Bug 1236777)
  33604. [Constant, Cached, Frozen]
  33605. readonly attribute sequence<DOMString> profiles;
  33606. // https://immersive-web.github.io/webxr-gamepads-module/
  33607. [SameObject] readonly attribute Gamepad? gamepad;
  33608. };
  33609. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33610. interface XRInputSourceArray {
  33611. iterable<XRInputSource>;
  33612. readonly attribute unsigned long length;
  33613. getter XRInputSource(unsigned long index);
  33614. };
  33615. typedef (WebGLRenderingContext or
  33616. WebGL2RenderingContext) XRWebGLRenderingContext;
  33617. dictionary XRWebGLLayerInit {
  33618. boolean antialias = true;
  33619. boolean depth = true;
  33620. boolean stencil = false;
  33621. boolean alpha = true;
  33622. boolean ignoreDepthValues = false;
  33623. double framebufferScaleFactor = 1.0;
  33624. };
  33625. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  33626. interface XRWebGLLayer {
  33627. [Throws]
  33628. constructor(XRSession session,
  33629. XRWebGLRenderingContext context,
  33630. optional XRWebGLLayerInit layerInit = {});
  33631. // Attributes
  33632. readonly attribute boolean antialias;
  33633. readonly attribute boolean ignoreDepthValues;
  33634. [SameObject] readonly attribute WebGLFramebuffer? framebuffer;
  33635. readonly attribute unsigned long framebufferWidth;
  33636. readonly attribute unsigned long framebufferHeight;
  33637. // Methods
  33638. XRViewport? getViewport(XRView view);
  33639. // Static Methods
  33640. static double getNativeFramebufferScaleFactor(XRSession session);
  33641. };
  33642. /* ---------------------- WheelEvent ----------------------------- */
  33643. /* ./webidl/WheelEvent.webidl */
  33644. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33645. /* This Source Code Form is subject to the terms of the Mozilla Public
  33646. * License, v. 2.0. If a copy of the MPL was not distributed with this
  33647. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  33648. *
  33649. * For more information on this interface please see
  33650. * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
  33651. *
  33652. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  33653. * liability, trademark and document use rules apply.
  33654. */
  33655. [Exposed=Window]
  33656. interface WheelEvent : MouseEvent
  33657. {
  33658. constructor(DOMString type, optional WheelEventInit eventInitDict = {});
  33659. const unsigned long DOM_DELTA_PIXEL = 0x00;
  33660. const unsigned long DOM_DELTA_LINE = 0x01;
  33661. const unsigned long DOM_DELTA_PAGE = 0x02;
  33662. // Legacy MouseWheelEvent API replaced by standard WheelEvent API.
  33663. [NeedsCallerType]
  33664. readonly attribute long wheelDeltaX;
  33665. [NeedsCallerType]
  33666. readonly attribute long wheelDeltaY;
  33667. [NeedsCallerType]
  33668. readonly attribute long wheelDelta;
  33669. [NeedsCallerType] readonly attribute double deltaX;
  33670. [NeedsCallerType] readonly attribute double deltaY;
  33671. [NeedsCallerType] readonly attribute double deltaZ;
  33672. [NeedsCallerType] readonly attribute unsigned long deltaMode;
  33673. };
  33674. dictionary WheelEventInit : MouseEventInit
  33675. {
  33676. double deltaX = 0;
  33677. double deltaY = 0;
  33678. double deltaZ = 0;
  33679. unsigned long deltaMode = 0;
  33680. };
  33681. /* ---------------------- Window ----------------------------- */
  33682. /* ./webidl/Window.webidl */
  33683. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  33684. /* This Source Code Form is subject to the terms of the Mozilla Public
  33685. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  33686. * You can obtain one at http://mozilla.org/MPL/2.0/.
  33687. *
  33688. * The origin of this IDL file is:
  33689. * http://www.whatwg.org/specs/web-apps/current-work/
  33690. * https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
  33691. * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
  33692. * http://dev.w3.org/csswg/cssom/
  33693. * http://dev.w3.org/csswg/cssom-view/
  33694. * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
  33695. * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
  33696. * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
  33697. * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  33698. * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
  33699. * https://w3c.github.io/requestidlecallback/
  33700. * https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
  33701. * https://wicg.github.io/visual-viewport/#the-visualviewport-interface
  33702. */
  33703. interface Principal;
  33704. interface nsIBrowserDOMWindow;
  33705. interface XULControllers;
  33706. interface nsIDOMWindowUtils;
  33707. interface nsIPrintSettings;
  33708. // http://www.whatwg.org/specs/web-apps/current-work/
  33709. [Global, LegacyUnenumerableNamedProperties, NeedResolve,
  33710. Exposed=Window,
  33711. InstrumentedProps=(AbsoluteOrientationSensor,
  33712. Accelerometer,
  33713. BackgroundFetchManager,
  33714. BackgroundFetchRecord,
  33715. BackgroundFetchRegistration,
  33716. BeforeInstallPromptEvent,
  33717. Bluetooth,
  33718. BluetoothCharacteristicProperties,
  33719. BluetoothDevice,
  33720. BluetoothRemoteGATTCharacteristic,
  33721. BluetoothRemoteGATTDescriptor,
  33722. BluetoothRemoteGATTServer,
  33723. BluetoothRemoteGATTService,
  33724. BluetoothUUID,
  33725. CanvasCaptureMediaStreamTrack,
  33726. chrome,
  33727. ClipboardItem,
  33728. CSSImageValue,
  33729. CSSKeywordValue,
  33730. CSSMathClamp,
  33731. CSSMathInvert,
  33732. CSSMathMax,
  33733. CSSMathMin,
  33734. CSSMathNegate,
  33735. CSSMathProduct,
  33736. CSSMathSum,
  33737. CSSMathValue,
  33738. CSSMatrixComponent,
  33739. CSSNumericArray,
  33740. CSSNumericValue,
  33741. CSSPerspective,
  33742. CSSPositionValue,
  33743. CSSPropertyRule,
  33744. CSSRotate,
  33745. CSSScale,
  33746. CSSSkew,
  33747. CSSSkewX,
  33748. CSSSkewY,
  33749. CSSStyleValue,
  33750. CSSTransformComponent,
  33751. CSSTransformValue,
  33752. CSSTranslate,
  33753. CSSUnitValue,
  33754. CSSUnparsedValue,
  33755. CSSVariableReferenceValue,
  33756. defaultStatus,
  33757. // Unfortunately, our telemetry histogram name generator
  33758. // (the one that generates TelemetryHistogramEnums.h) can't
  33759. // handle two DOM methods with names that only differ in
  33760. // case, because it forces everything to uppercase.
  33761. //defaultstatus,
  33762. DeviceMotionEventAcceleration,
  33763. DeviceMotionEventRotationRate,
  33764. DOMError,
  33765. EncodedVideoChunk,
  33766. EnterPictureInPictureEvent,
  33767. External,
  33768. FederatedCredential,
  33769. Gyroscope,
  33770. HTMLContentElement,
  33771. HTMLShadowElement,
  33772. ImageCapture,
  33773. InputDeviceCapabilities,
  33774. InputDeviceInfo,
  33775. Keyboard,
  33776. KeyboardLayoutMap,
  33777. LinearAccelerationSensor,
  33778. MediaSettingsRange,
  33779. MIDIAccess,
  33780. MIDIConnectionEvent,
  33781. MIDIInput,
  33782. MIDIInputMap,
  33783. MIDIMessageEvent,
  33784. MIDIOutput,
  33785. MIDIOutputMap,
  33786. MIDIPort,
  33787. NetworkInformation,
  33788. offscreenBuffering,
  33789. onbeforeinstallprompt,
  33790. oncancel,
  33791. onmousewheel,
  33792. onorientationchange,
  33793. onsearch,
  33794. onselectionchange,
  33795. openDatabase,
  33796. orientation,
  33797. OrientationSensor,
  33798. OverconstrainedError,
  33799. PasswordCredential,
  33800. PaymentAddress,
  33801. PaymentInstruments,
  33802. PaymentManager,
  33803. PaymentMethodChangeEvent,
  33804. PaymentRequest,
  33805. PaymentRequestUpdateEvent,
  33806. PaymentResponse,
  33807. PerformanceLongTaskTiming,
  33808. PhotoCapabilities,
  33809. PictureInPictureEvent,
  33810. PictureInPictureWindow,
  33811. Presentation,
  33812. PresentationAvailability,
  33813. PresentationConnection,
  33814. PresentationConnectionAvailableEvent,
  33815. PresentationConnectionCloseEvent,
  33816. PresentationConnectionList,
  33817. PresentationReceiver,
  33818. PresentationRequest,
  33819. RelativeOrientationSensor,
  33820. RemotePlayback,
  33821. Report,
  33822. ReportBody,
  33823. ReportingObserver,
  33824. RTCError,
  33825. RTCErrorEvent,
  33826. RTCIceTransport,
  33827. RTCPeerConnectionIceErrorEvent,
  33828. Sensor,
  33829. SensorErrorEvent,
  33830. SpeechRecognitionAlternative,
  33831. SpeechRecognitionResult,
  33832. SpeechRecognitionResultList,
  33833. styleMedia,
  33834. StylePropertyMap,
  33835. StylePropertyMapReadOnly,
  33836. SVGDiscardElement,
  33837. SyncManager,
  33838. TaskAttributionTiming,
  33839. TextEvent,
  33840. Touch,
  33841. TouchEvent,
  33842. TouchList,
  33843. USB,
  33844. USBAlternateInterface,
  33845. USBConfiguration,
  33846. USBConnectionEvent,
  33847. USBDevice,
  33848. USBEndpoint,
  33849. USBInterface,
  33850. USBInTransferResult,
  33851. USBIsochronousInTransferPacket,
  33852. USBIsochronousInTransferResult,
  33853. USBIsochronousOutTransferPacket,
  33854. USBIsochronousOutTransferResult,
  33855. USBOutTransferResult,
  33856. UserActivation,
  33857. VideoColorSpace,
  33858. VideoDecoder,
  33859. VideoEncoder,
  33860. VideoFrame,
  33861. WakeLock,
  33862. WakeLockSentinel,
  33863. webkitCancelAnimationFrame,
  33864. webkitMediaStream,
  33865. WebKitMutationObserver,
  33866. webkitRequestAnimationFrame,
  33867. webkitRequestFileSystem,
  33868. webkitResolveLocalFileSystemURL,
  33869. webkitRTCPeerConnection,
  33870. webkitSpeechGrammar,
  33871. webkitSpeechGrammarList,
  33872. webkitSpeechRecognition,
  33873. webkitSpeechRecognitionError,
  33874. webkitSpeechRecognitionEvent,
  33875. webkitStorageInfo)]
  33876. /*sealed*/ interface Window : EventTarget {
  33877. // the current browsing context
  33878. [LegacyUnforgeable, Constant, StoreInSlot,
  33879. CrossOriginReadable] readonly attribute WindowProxy window;
  33880. [Replaceable, Constant, StoreInSlot,
  33881. CrossOriginReadable] readonly attribute WindowProxy self;
  33882. [LegacyUnforgeable, StoreInSlot, Pure] readonly attribute Document? document;
  33883. [Throws] attribute DOMString name;
  33884. [PutForwards=href, LegacyUnforgeable, CrossOriginReadable,
  33885. CrossOriginWritable] readonly attribute Location location;
  33886. [Throws] readonly attribute History history;
  33887. readonly attribute CustomElementRegistry customElements;
  33888. [Replaceable, Throws] readonly attribute BarProp locationbar;
  33889. [Replaceable, Throws] readonly attribute BarProp menubar;
  33890. [Replaceable, Throws] readonly attribute BarProp personalbar;
  33891. [Replaceable, Throws] readonly attribute BarProp scrollbars;
  33892. [Replaceable, Throws] readonly attribute BarProp statusbar;
  33893. [Replaceable, Throws] readonly attribute BarProp toolbar;
  33894. [Throws] attribute DOMString status;
  33895. [Throws, CrossOriginCallable, NeedsCallerType] undefined close();
  33896. [Throws, CrossOriginReadable] readonly attribute boolean closed;
  33897. [Throws] undefined stop();
  33898. [Throws, CrossOriginCallable, NeedsCallerType] undefined focus();
  33899. [Throws, CrossOriginCallable, NeedsCallerType] undefined blur();
  33900. [Replaceable, Pref="dom.window.event.enabled"] readonly attribute (Event or undefined) event;
  33901. // other browsing contexts
  33902. [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy frames;
  33903. [Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
  33904. //[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy top;
  33905. [LegacyUnforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
  33906. [Throws, CrossOriginReadable] attribute any opener;
  33907. //[Throws] readonly attribute WindowProxy parent;
  33908. [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy? parent;
  33909. [Throws, NeedsSubjectPrincipal] readonly attribute Element? frameElement;
  33910. //[Throws] WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "");
  33911. [Throws] WindowProxy? open(optional USVString url = "", optional DOMString target = "", optional [LegacyNullToEmptyString] DOMString features = "");
  33912. getter object (DOMString name);
  33913. // the user agent
  33914. readonly attribute Navigator navigator;
  33915. [Pref="dom.window.clientinformation.enabled", BinaryName="Navigator"]
  33916. readonly attribute Navigator clientInformation;
  33917. [Replaceable] readonly attribute External external;
  33918. // user prompts
  33919. [Throws, NeedsSubjectPrincipal] undefined alert();
  33920. [Throws, NeedsSubjectPrincipal] undefined alert(DOMString message);
  33921. [Throws, NeedsSubjectPrincipal] boolean confirm(optional DOMString message = "");
  33922. [Throws, NeedsSubjectPrincipal] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
  33923. [Throws]
  33924. undefined print();
  33925. // Returns a window that you can use for a print preview.
  33926. //
  33927. // This may reuse an existing window if this window is already a print
  33928. // preview document, or if you pass a docshell explicitly.
  33929. [Throws, Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled"]
  33930. WindowProxy? printPreview(optional nsIPrintSettings? settings = null,
  33931. optional nsIWebProgressListener? listener = null,
  33932. optional nsIDocShell? docShellToPreviewInto = null);
  33933. [Throws, CrossOriginCallable, NeedsSubjectPrincipal,
  33934. BinaryName="postMessageMoz"]
  33935. undefined postMessage(any message, DOMString targetOrigin, optional sequence<object> transfer = []);
  33936. [Throws, CrossOriginCallable, NeedsSubjectPrincipal,
  33937. BinaryName="postMessageMoz"]
  33938. undefined postMessage(any message, optional WindowPostMessageOptions options = {});
  33939. // also has obsolete members
  33940. };
  33941. Window includes GlobalEventHandlers;
  33942. Window includes WindowEventHandlers;
  33943. // http://www.whatwg.org/specs/web-apps/current-work/
  33944. interface mixin WindowSessionStorage {
  33945. //[Throws] readonly attribute Storage sessionStorage;
  33946. [Throws] readonly attribute Storage? sessionStorage;
  33947. };
  33948. Window includes WindowSessionStorage;
  33949. // http://www.whatwg.org/specs/web-apps/current-work/
  33950. interface mixin WindowLocalStorage {
  33951. [Throws] readonly attribute Storage? localStorage;
  33952. };
  33953. Window includes WindowLocalStorage;
  33954. // http://www.whatwg.org/specs/web-apps/current-work/
  33955. partial interface Window {
  33956. undefined captureEvents();
  33957. undefined releaseEvents();
  33958. };
  33959. // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
  33960. partial interface Window {
  33961. //[Throws] Selection getSelection();
  33962. [Throws] Selection? getSelection();
  33963. };
  33964. // https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
  33965. partial interface Window {
  33966. //[NewObject, Throws] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt = "");
  33967. [NewObject, Throws] CSSStyleDeclaration? getComputedStyle(Element elt, optional DOMString? pseudoElt = "");
  33968. };
  33969. // http://dev.w3.org/csswg/cssom-view/
  33970. enum ScrollBehavior { "auto", "instant", "smooth" };
  33971. dictionary ScrollOptions {
  33972. ScrollBehavior behavior = "auto";
  33973. };
  33974. dictionary ScrollToOptions : ScrollOptions {
  33975. unrestricted double left;
  33976. unrestricted double top;
  33977. };
  33978. partial interface Window {
  33979. //[Throws, NewObject, NeedsCallerType] MediaQueryList matchMedia(DOMString query);
  33980. [Throws, NewObject, NeedsCallerType] MediaQueryList? matchMedia(UTF8String query);
  33981. [SameObject, Replaceable] readonly attribute Screen screen;
  33982. // browsing context
  33983. //[Throws] undefined moveTo(double x, double y);
  33984. //[Throws] undefined moveBy(double x, double y);
  33985. //[Throws] undefined resizeTo(double x, double y);
  33986. //[Throws] undefined resizeBy(double x, double y);
  33987. [Throws, NeedsCallerType] undefined moveTo(long x, long y);
  33988. [Throws, NeedsCallerType] undefined moveBy(long x, long y);
  33989. [Throws, NeedsCallerType] undefined resizeTo(long x, long y);
  33990. [Throws, NeedsCallerType] undefined resizeBy(long x, long y);
  33991. // viewport
  33992. [Replaceable, Throws] readonly attribute double innerWidth;
  33993. [Replaceable, Throws] readonly attribute double innerHeight;
  33994. // viewport scrolling
  33995. undefined scroll(unrestricted double x, unrestricted double y);
  33996. undefined scroll(optional ScrollToOptions options = {});
  33997. undefined scrollTo(unrestricted double x, unrestricted double y);
  33998. undefined scrollTo(optional ScrollToOptions options = {});
  33999. undefined scrollBy(unrestricted double x, unrestricted double y);
  34000. undefined scrollBy(optional ScrollToOptions options = {});
  34001. // mozScrollSnap is used by chrome to perform scroll snapping after the
  34002. // user performs actions that may affect scroll position
  34003. // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
  34004. // as an extension to the ScrollOptions dictionary. See bug 1137937.
  34005. [ChromeOnly] undefined mozScrollSnap();
  34006. // The four properties below are double per spec at the moment, but whether
  34007. // that will continue is unclear.
  34008. [Replaceable, Throws] readonly attribute double scrollX;
  34009. [Replaceable, Throws] readonly attribute double pageXOffset;
  34010. [Replaceable, Throws] readonly attribute double scrollY;
  34011. [Replaceable, Throws] readonly attribute double pageYOffset;
  34012. // Aliases for screenX / screenY.
  34013. [Replaceable, Throws, NeedsCallerType] readonly attribute double screenLeft;
  34014. [Replaceable, Throws, NeedsCallerType] readonly attribute double screenTop;
  34015. // client
  34016. [Replaceable, Throws, NeedsCallerType] readonly attribute double screenX;
  34017. [Replaceable, Throws, NeedsCallerType] readonly attribute double screenY;
  34018. [Replaceable, Throws, NeedsCallerType] readonly attribute double outerWidth;
  34019. [Replaceable, Throws, NeedsCallerType] readonly attribute double outerHeight;
  34020. };
  34021. // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
  34022. Window includes AnimationFrameProvider;
  34023. // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
  34024. partial interface Window {
  34025. [Replaceable, Pure, StoreInSlot] readonly attribute Performance? performance;
  34026. };
  34027. // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
  34028. Window includes GlobalCrypto;
  34029. dictionary SizeToContentConstraints {
  34030. long maxWidth = 0;
  34031. long maxHeight = 0;
  34032. long prefWidth = 0;
  34033. };
  34034. #ifdef MOZ_WEBSPEECH
  34035. // http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  34036. interface mixin SpeechSynthesisGetter {
  34037. [Throws, Pref="media.webspeech.synth.enabled"] readonly attribute SpeechSynthesis speechSynthesis;
  34038. };
  34039. Window includes SpeechSynthesisGetter;
  34040. #endif
  34041. // Mozilla-specific stuff
  34042. partial interface Window {
  34043. //[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
  34044. [NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
  34045. // Mozilla extensions
  34046. /**
  34047. * Method for scrolling this window by a number of lines.
  34048. */
  34049. undefined scrollByLines(long numLines, optional ScrollOptions options = {});
  34050. /**
  34051. * Method for scrolling this window by a number of pages.
  34052. */
  34053. undefined scrollByPages(long numPages, optional ScrollOptions options = {});
  34054. // Gecko specific API that allows a web page to resize the browser window.
  34055. // Dropping support in bug 1600400.
  34056. [Throws, NeedsCallerType,
  34057. Deprecated="SizeToContent",
  34058. Func="nsGlobalWindowInner::IsSizeToContentEnabled"]
  34059. undefined sizeToContent();
  34060. /**
  34061. * Chrome-only method for sizing to content with a maximum-size constraint on
  34062. * either (or both) directions.
  34063. */
  34064. [Throws, ChromeOnly] undefined sizeToContentConstrained(optional SizeToContentConstraints constraints = {});
  34065. [ChromeOnly, Replaceable, Throws] readonly attribute XULControllers controllers;
  34066. [ChromeOnly, Throws] readonly attribute Element? realFrameElement;
  34067. [ChromeOnly] readonly attribute nsIDocShell? docShell;
  34068. [ChromeOnly, Constant, CrossOriginReadable, BinaryName="getBrowsingContext"]
  34069. readonly attribute BrowsingContext browsingContext;
  34070. [Throws, NeedsCallerType]
  34071. readonly attribute float mozInnerScreenX;
  34072. [Throws, NeedsCallerType]
  34073. readonly attribute float mozInnerScreenY;
  34074. [Replaceable, Throws, NeedsCallerType]
  34075. readonly attribute double devicePixelRatio;
  34076. // Allows chrome code to convert desktop pixels to device pixels and vice
  34077. // versa. Useful for interacting with the screen manager.
  34078. [ChromeOnly, Throws]
  34079. readonly attribute double desktopToDeviceScale;
  34080. // Returns the amount of CSS pixels relative to this window we're allowed to
  34081. // go out of the screen. This is needed so that SessionRestore is able to
  34082. // position windows that use client-side decorations correctly, but still
  34083. // pull mispositioned windows into the screen.
  34084. [ChromeOnly]
  34085. readonly attribute double screenEdgeSlopX;
  34086. [ChromeOnly]
  34087. readonly attribute double screenEdgeSlopY;
  34088. /* The maximum offset that the window can be scrolled to
  34089. (i.e., the document width/height minus the scrollport width/height) */
  34090. [ChromeOnly, Throws] readonly attribute long scrollMinX;
  34091. [ChromeOnly, Throws] readonly attribute long scrollMinY;
  34092. [Replaceable, Throws] readonly attribute long scrollMaxX;
  34093. [Replaceable, Throws] readonly attribute long scrollMaxY;
  34094. [Throws] attribute boolean fullScreen;
  34095. undefined updateCommands(DOMString action);
  34096. /* Find in page.
  34097. * @param str: the search pattern
  34098. * @param caseSensitive: is the search caseSensitive
  34099. * @param backwards: should we search backwards
  34100. * @param wrapAround: should we wrap the search
  34101. * @param wholeWord: should we search only for whole words
  34102. * @param searchInFrames: should we search through all frames
  34103. * @param showDialog: should we show the Find dialog
  34104. */
  34105. [Throws] boolean find(optional DOMString str = "",
  34106. optional boolean caseSensitive = false,
  34107. optional boolean backwards = false,
  34108. optional boolean wrapAround = false,
  34109. optional boolean wholeWord = false,
  34110. optional boolean searchInFrames = false,
  34111. optional boolean showDialog = false);
  34112. attribute EventHandler ondevicemotion;
  34113. attribute EventHandler ondeviceorientation;
  34114. attribute EventHandler ondeviceorientationabsolute;
  34115. [Pref="device.sensors.proximity.enabled"]
  34116. attribute EventHandler onuserproximity;
  34117. [Pref="device.sensors.ambientLight.enabled"]
  34118. attribute EventHandler ondevicelight;
  34119. undefined dump(DOMString str);
  34120. /**
  34121. * This method is here for backwards compatibility with 4.x only,
  34122. * its implementation is a no-op
  34123. */
  34124. undefined setResizable(boolean resizable);
  34125. /**
  34126. * This is the scriptable version of
  34127. * nsPIDOMWindow::OpenDialog() that takes 3 optional
  34128. * arguments, plus any additional arguments are passed on as
  34129. * arguments on the dialog's window object (window.arguments).
  34130. */
  34131. [Throws, ChromeOnly] WindowProxy? openDialog(optional DOMString url = "",
  34132. optional DOMString name = "",
  34133. optional DOMString options = "",
  34134. any... extraArguments);
  34135. [ChromeOnly,
  34136. NonEnumerable, Replaceable, Throws, NeedsCallerType]
  34137. readonly attribute object? content;
  34138. [Throws, ChromeOnly] any getInterface(any iid);
  34139. /**
  34140. * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
  34141. */
  34142. [ChromeOnly, Throws]
  34143. readonly attribute WindowRoot? windowRoot;
  34144. /**
  34145. * ChromeOnly method to determine if a particular window should see console
  34146. * reports from service workers of the given scope.
  34147. */
  34148. [ChromeOnly]
  34149. boolean shouldReportForServiceWorkerScope(USVString aScope);
  34150. /**
  34151. * InstallTrigger is used for extension installs. Ideally it would
  34152. * be something like a WebIDL namespace, but we don't support
  34153. * JS-implemented static things yet. See bug 863952.
  34154. */
  34155. [Replaceable, Deprecated="InstallTriggerDeprecated", Pref="extensions.InstallTrigger.enabled"]
  34156. readonly attribute InstallTriggerImpl? InstallTrigger;
  34157. /**
  34158. * Get the nsIDOMWindowUtils for this window.
  34159. */
  34160. [Constant, Throws, ChromeOnly]
  34161. readonly attribute nsIDOMWindowUtils windowUtils;
  34162. [Pure, ChromeOnly]
  34163. readonly attribute WindowGlobalChild? windowGlobalChild;
  34164. /**
  34165. * The principal of the client source of the window. This is supposed to be
  34166. * used for the service worker.
  34167. *
  34168. * This is used for APIs like https://w3c.github.io/push-api/ that extend
  34169. * ServiceWorkerRegistration and therefore need to operate consistently with
  34170. * ServiceWorkers and its Clients API. The client principal is the appropriate
  34171. * principal to pass to all nsIServiceWorkerManager APIs.
  34172. *
  34173. * Note that the client principal will be different from the node principal of
  34174. * the window's document if the window is in a third-party context when dFPI
  34175. * is enabled. In this case, the client principal will be the partitioned
  34176. * principal to support the service worker partitioning.
  34177. */
  34178. [ChromeOnly]
  34179. readonly attribute Principal? clientPrincipal;
  34180. /**
  34181. * Whether the chrome window is currently in a full screen transition. This
  34182. * flag is updated from FullscreenTransitionTask.
  34183. * Always set to false for non-chrome windows.
  34184. */
  34185. [ChromeOnly]
  34186. readonly attribute boolean isInFullScreenTransition;
  34187. };
  34188. Window includes TouchEventHandlers;
  34189. Window includes OnErrorEventHandlerForWindow;
  34190. #if defined(MOZ_WIDGET_ANDROID)
  34191. // https://compat.spec.whatwg.org/#windoworientation-interface
  34192. partial interface Window {
  34193. [NeedsCallerType]
  34194. readonly attribute short orientation;
  34195. attribute EventHandler onorientationchange;
  34196. };
  34197. #endif
  34198. [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
  34199. callback PromiseDocumentFlushedCallback = any ();
  34200. // Mozilla extensions for Chrome windows.
  34201. partial interface Window {
  34202. // The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp.
  34203. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34204. const unsigned short STATE_MAXIMIZED = 1;
  34205. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34206. const unsigned short STATE_MINIMIZED = 2;
  34207. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34208. const unsigned short STATE_NORMAL = 3;
  34209. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34210. const unsigned short STATE_FULLSCREEN = 4;
  34211. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34212. readonly attribute unsigned short windowState;
  34213. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34214. readonly attribute boolean isFullyOccluded;
  34215. /**
  34216. * browserDOMWindow provides access to yet another layer of
  34217. * utility functions implemented by chrome script. It will be null
  34218. * for DOMWindows not corresponding to browsers.
  34219. */
  34220. [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34221. attribute nsIBrowserDOMWindow? browserDOMWindow;
  34222. [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34223. undefined getAttention();
  34224. [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34225. undefined getAttentionWithCycleCount(long aCycleCount);
  34226. [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34227. undefined setCursor(UTF8String cursor);
  34228. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34229. undefined maximize();
  34230. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34231. undefined minimize();
  34232. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34233. undefined restore();
  34234. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34235. DOMString getWorkspaceID();
  34236. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34237. undefined moveToWorkspace(DOMString workspaceID);
  34238. /**
  34239. * Notify a default button is loaded on a dialog or a wizard.
  34240. * defaultButton is the default button.
  34241. */
  34242. [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34243. undefined notifyDefaultButtonLoaded(Element defaultButton);
  34244. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34245. readonly attribute ChromeMessageBroadcaster messageManager;
  34246. /**
  34247. * Returns the message manager identified by the given group name that
  34248. * manages all frame loaders belonging to that group.
  34249. */
  34250. [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34251. ChromeMessageBroadcaster getGroupMessageManager(DOMString aGroup);
  34252. /**
  34253. * Calls the given function as soon as a style or layout flush for the
  34254. * top-level document is not necessary, and returns a Promise which
  34255. * resolves to the callback's return value after it executes.
  34256. *
  34257. * In the event that the window goes away before a flush can occur, the
  34258. * callback will still be called and the Promise resolved as the window
  34259. * tears itself down.
  34260. *
  34261. * The callback _must not modify the DOM for any window in any way_. If it
  34262. * does, after finishing executing, the Promise returned by
  34263. * promiseDocumentFlushed will reject with
  34264. * NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR.
  34265. *
  34266. * Note that the callback can be called either synchronously or asynchronously
  34267. * depending on whether or not flushes are pending:
  34268. *
  34269. * The callback will be called synchronously when calling
  34270. * promiseDocumentFlushed when NO flushes are already pending. This is
  34271. * to ensure that no script has a chance to dirty the DOM before the callback
  34272. * is called.
  34273. *
  34274. * The callback will be called asynchronously if a flush is pending.
  34275. *
  34276. * The expected execution order is that all pending callbacks will
  34277. * be fired first (and in the order that they were queued) and then the
  34278. * Promise resolution handlers will all be invoked later on during the
  34279. * next microtask checkpoint.
  34280. *
  34281. * Using window.top.promiseDocumentFlushed in combination with a callback
  34282. * that is querying items in a window that might be swapped out via
  34283. * nsFrameLoader::SwapWithOtherLoader is highly discouraged. For example:
  34284. *
  34285. * let result = await window.top.promiseDocumentFlushed(() => {
  34286. * return window.document.body.getBoundingClientRect();
  34287. * });
  34288. *
  34289. * If "window" might get swapped out via nsFrameLoader::SwapWithOtherLoader
  34290. * at any time, then the callback might get called when the new host window
  34291. * will still incur layout flushes, since it's only the original host window
  34292. * that's being monitored via window.top.promiseDocumentFlushed.
  34293. *
  34294. * See bug 1519407 for further details.
  34295. *
  34296. * promiseDocumentFlushed does not support re-entrancy - so calling it from
  34297. * within a promiseDocumentFlushed callback will result in the inner call
  34298. * throwing an NS_ERROR_FAILURE exception, and the outer Promise rejecting
  34299. * with that exception.
  34300. *
  34301. * The callback function *must not make any changes which would require
  34302. * a style or layout flush*.
  34303. *
  34304. * Also throws NS_ERROR_FAILURE if the window is not in a state where flushes
  34305. * can be waited for (for example, the PresShell has not yet been created).
  34306. *
  34307. * @param {function} callback
  34308. * @returns {Promise}
  34309. */
  34310. [NewObject, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
  34311. Promise<any> promiseDocumentFlushed(PromiseDocumentFlushedCallback callback);
  34312. [Func="IsChromeOrUAWidget"]
  34313. readonly attribute boolean isChromeWindow;
  34314. [Func="nsGlobalWindowInner::IsGleanNeeded"]
  34315. readonly attribute GleanImpl Glean;
  34316. [Func="nsGlobalWindowInner::IsGleanNeeded"]
  34317. readonly attribute GleanPingsImpl GleanPings;
  34318. };
  34319. partial interface Window {
  34320. [Pref="dom.vr.enabled"]
  34321. attribute EventHandler onvrdisplayconnect;
  34322. [Pref="dom.vr.enabled"]
  34323. attribute EventHandler onvrdisplaydisconnect;
  34324. [Pref="dom.vr.enabled"]
  34325. attribute EventHandler onvrdisplayactivate;
  34326. [Pref="dom.vr.enabled"]
  34327. attribute EventHandler onvrdisplaydeactivate;
  34328. [Pref="dom.vr.enabled"]
  34329. attribute EventHandler onvrdisplaypresentchange;
  34330. };
  34331. #ifndef RELEASE_OR_BETA
  34332. // https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
  34333. partial interface Window {
  34334. [Pref="dom.paintWorklet.enabled", Throws]
  34335. readonly attribute Worklet paintWorklet;
  34336. };
  34337. #endif
  34338. Window includes WindowOrWorkerGlobalScope;
  34339. partial interface Window {
  34340. [Throws]
  34341. unsigned long requestIdleCallback(IdleRequestCallback callback,
  34342. optional IdleRequestOptions options = {});
  34343. undefined cancelIdleCallback(unsigned long handle);
  34344. };
  34345. dictionary IdleRequestOptions {
  34346. unsigned long timeout;
  34347. };
  34348. callback IdleRequestCallback = undefined (IdleDeadline deadline);
  34349. partial interface Window {
  34350. /**
  34351. * Returns a list of locales that the internationalization components
  34352. * should be localized to.
  34353. *
  34354. * The function name refers to Regional Preferences which can be either
  34355. * fetched from the internal internationalization database (CLDR), or
  34356. * from the host environment.
  34357. *
  34358. * The result is a sorted list of valid locale IDs and it should be
  34359. * used for all APIs that accept list of locales, like ECMA402 and L10n APIs.
  34360. *
  34361. * This API always returns at least one locale.
  34362. *
  34363. * Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
  34364. */
  34365. [Func="IsChromeOrUAWidget"]
  34366. sequence<DOMString> getRegionalPrefsLocales();
  34367. /**
  34368. * Returns a list of locales that the web content would know from the user.
  34369. *
  34370. * One of the fingerprinting technique is to recognize users from their locales
  34371. * exposed to web content. For those components that would be fingerprintable
  34372. * from the locale should call this API instead of |getRegionalPrefsLocales()|.
  34373. *
  34374. * If the pref is set to spoof locale setting, this function will return the
  34375. * spoofed locale, otherwise it returns what |getRegionalPrefsLocales()| returns.
  34376. *
  34377. * This API always returns at least one locale.
  34378. *
  34379. * Example: ["en-US"]
  34380. */
  34381. [Func="IsChromeOrUAWidget"]
  34382. sequence<DOMString> getWebExposedLocales();
  34383. /**
  34384. * Getter funcion for IntlUtils, which provides helper functions for
  34385. * localization.
  34386. */
  34387. [Throws, Func="IsChromeOrUAWidget"]
  34388. readonly attribute IntlUtils intlUtils;
  34389. };
  34390. partial interface Window {
  34391. [SameObject, Replaceable]
  34392. readonly attribute VisualViewport visualViewport;
  34393. };
  34394. // Used to assign marks to appear on the scrollbar when
  34395. // finding on a page.
  34396. partial interface Window {
  34397. // The marks are values between 0 and scrollMax{X,Y} - scrollMin{X,Y}.
  34398. [ChromeOnly]
  34399. undefined setScrollMarks(sequence<unsigned long> marks,
  34400. optional boolean onHorizontalScrollbar = false);
  34401. };
  34402. dictionary WindowPostMessageOptions : StructuredSerializeOptions {
  34403. USVString targetOrigin = "/";
  34404. };
  34405. /* ---------------------- WindowOrWorkerGlobalScope ----------------------------- */
  34406. /* ./webidl/WindowOrWorkerGlobalScope.webidl */
  34407. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34408. /* This Source Code Form is subject to the terms of the Mozilla Public
  34409. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34410. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34411. *
  34412. * The origin of this IDL file is:
  34413. * https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
  34414. * https://fetch.spec.whatwg.org/#fetch-method
  34415. * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
  34416. * https://w3c.github.io/ServiceWorker/#self-caches
  34417. */
  34418. // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
  34419. [Exposed=(Window,Worker)]
  34420. interface mixin WindowOrWorkerGlobalScope {
  34421. [Replaceable] readonly attribute USVString origin;
  34422. readonly attribute boolean crossOriginIsolated;
  34423. [Throws, NeedsCallerType]
  34424. undefined reportError(any e);
  34425. // base64 utility methods
  34426. [Throws]
  34427. DOMString btoa(DOMString btoa);
  34428. [Throws]
  34429. DOMString atob(DOMString atob);
  34430. // timers
  34431. // NOTE: We're using overloads where the spec uses a union. Should
  34432. // be black-box the same.
  34433. [Throws]
  34434. long setTimeout(Function handler, optional long timeout = 0, any... arguments);
  34435. [Throws]
  34436. long setTimeout(DOMString handler, optional long timeout = 0, any... unused);
  34437. undefined clearTimeout(optional long handle = 0);
  34438. [Throws]
  34439. long setInterval(Function handler, optional long timeout = 0, any... arguments);
  34440. [Throws]
  34441. long setInterval(DOMString handler, optional long timeout = 0, any... unused);
  34442. undefined clearInterval(optional long handle = 0);
  34443. // microtask queuing
  34444. undefined queueMicrotask(VoidFunction callback);
  34445. // ImageBitmap
  34446. [Throws]
  34447. Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage,
  34448. optional ImageBitmapOptions aOptions = {});
  34449. [Throws]
  34450. Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage,
  34451. long aSx, long aSy, long aSw, long aSh,
  34452. optional ImageBitmapOptions aOptions = {});
  34453. // structured cloning
  34454. [Throws]
  34455. any structuredClone(any value, optional StructuredSerializeOptions options = {});
  34456. };
  34457. // https://fetch.spec.whatwg.org/#fetch-method
  34458. partial interface mixin WindowOrWorkerGlobalScope {
  34459. [NewObject, NeedsCallerType]
  34460. Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
  34461. };
  34462. // https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
  34463. partial interface mixin WindowOrWorkerGlobalScope {
  34464. readonly attribute boolean isSecureContext;
  34465. };
  34466. // http://w3c.github.io/IndexedDB/#factory-interface
  34467. partial interface mixin WindowOrWorkerGlobalScope {
  34468. // readonly attribute IDBFactory indexedDB; // bug 1776789
  34469. [Throws]
  34470. readonly attribute IDBFactory? indexedDB;
  34471. };
  34472. // https://w3c.github.io/ServiceWorker/#self-caches
  34473. partial interface mixin WindowOrWorkerGlobalScope {
  34474. [Throws, Func="nsGlobalWindowInner::CachesEnabled", SameObject]
  34475. readonly attribute CacheStorage caches;
  34476. };
  34477. // https://wicg.github.io/scheduling-apis/#ref-for-windoworworkerglobalscope-scheduler
  34478. partial interface mixin WindowOrWorkerGlobalScope {
  34479. [Replaceable, Pref="dom.enable_web_task_scheduling", SameObject]
  34480. readonly attribute Scheduler scheduler;
  34481. };
  34482. // https://w3c.github.io/trusted-types/dist/spec/#extensions-to-the-windoworworkerglobalscope-interface
  34483. partial interface mixin WindowOrWorkerGlobalScope {
  34484. [Pref="dom.security.trusted_types.enabled"]
  34485. readonly attribute TrustedTypePolicyFactory trustedTypes;
  34486. };
  34487. /* ---------------------- Worker ----------------------------- */
  34488. /* ./webidl/Worker.webidl */
  34489. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34490. /* This Source Code Form is subject to the terms of the Mozilla Public
  34491. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34492. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  34493. *
  34494. * The origin of this IDL file is
  34495. * https://html.spec.whatwg.org/multipage/workers.html
  34496. *
  34497. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  34498. * Software ASA.
  34499. * You are granted a license to use, reproduce and create derivative works of
  34500. * this document.
  34501. */
  34502. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  34503. interface Worker : EventTarget {
  34504. [Throws]
  34505. constructor(USVString scriptURL, optional WorkerOptions options = {});
  34506. undefined terminate();
  34507. [Throws]
  34508. undefined postMessage(any message, sequence<object> transfer);
  34509. [Throws]
  34510. undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {});
  34511. attribute EventHandler onmessage;
  34512. attribute EventHandler onmessageerror;
  34513. };
  34514. Worker includes AbstractWorker;
  34515. dictionary WorkerOptions {
  34516. [Pref="dom.workers.modules.enabled"]
  34517. WorkerType type = "classic";
  34518. [Pref="dom.workers.modules.enabled"]
  34519. RequestCredentials credentials = "same-origin"; // credentials is only used if type is "module"
  34520. DOMString name = "";
  34521. };
  34522. enum WorkerType { "classic", "module" };
  34523. [Func="mozilla::dom::ChromeWorker::WorkerAvailable",
  34524. Exposed=(Window,DedicatedWorker,SharedWorker)]
  34525. interface ChromeWorker : Worker {
  34526. [Throws]
  34527. constructor(USVString scriptURL, optional WorkerOptions options = {});
  34528. };
  34529. /* ---------------------- WorkerDebuggerGlobalScope ----------------------------- */
  34530. /* ./webidl/WorkerDebuggerGlobalScope.webidl */
  34531. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34532. /* This Source Code Form is subject to the terms of the Mozilla Public
  34533. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34534. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  34535. [Global=(WorkerDebugger), Exposed=WorkerDebugger]
  34536. interface WorkerDebuggerGlobalScope : EventTarget {
  34537. [Throws]
  34538. readonly attribute object global;
  34539. [Throws]
  34540. object createSandbox(DOMString name, object prototype);
  34541. [Throws]
  34542. undefined loadSubScript(DOMString url, optional object sandbox);
  34543. undefined enterEventLoop();
  34544. undefined leaveEventLoop();
  34545. undefined postMessage(DOMString message);
  34546. attribute EventHandler onmessage;
  34547. attribute EventHandler onmessageerror;
  34548. [Throws]
  34549. undefined setImmediate(Function handler);
  34550. undefined reportError(DOMString message);
  34551. [Throws]
  34552. sequence<any> retrieveConsoleEvents();
  34553. [Throws]
  34554. undefined setConsoleEventHandler(AnyCallback? handler);
  34555. [Throws]
  34556. undefined clearConsoleEvents();
  34557. // base64 utility methods
  34558. [Throws]
  34559. DOMString btoa(DOMString btoa);
  34560. [Throws]
  34561. DOMString atob(DOMString atob);
  34562. };
  34563. // So you can debug while you debug
  34564. partial interface WorkerDebuggerGlobalScope {
  34565. undefined dump(optional DOMString string);
  34566. };
  34567. /* ---------------------- WorkerGlobalScope ----------------------------- */
  34568. /* ./webidl/WorkerGlobalScope.webidl */
  34569. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34570. /* This Source Code Form is subject to the terms of the Mozilla Public
  34571. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34572. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34573. *
  34574. * The origin of this IDL file is
  34575. * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
  34576. *
  34577. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  34578. * Software ASA.
  34579. * You are granted a license to use, reproduce and create derivative works of
  34580. * this document.
  34581. */
  34582. [Exposed=(Worker)]
  34583. interface WorkerGlobalScope : EventTarget {
  34584. [Constant, Cached]
  34585. readonly attribute WorkerGlobalScope self;
  34586. readonly attribute WorkerLocation location;
  34587. readonly attribute WorkerNavigator navigator;
  34588. [Throws]
  34589. undefined importScripts(DOMString... urls);
  34590. attribute OnErrorEventHandler onerror;
  34591. attribute EventHandler onlanguagechange;
  34592. attribute EventHandler onoffline;
  34593. attribute EventHandler ononline;
  34594. attribute EventHandler onrejectionhandled;
  34595. attribute EventHandler onunhandledrejection;
  34596. // also has additional members in a partial interface
  34597. };
  34598. WorkerGlobalScope includes GlobalCrypto;
  34599. WorkerGlobalScope includes FontFaceSource;
  34600. WorkerGlobalScope includes WindowOrWorkerGlobalScope;
  34601. // Mozilla extensions
  34602. partial interface WorkerGlobalScope {
  34603. undefined dump(optional DOMString str);
  34604. // https://w3c.github.io/hr-time/#the-performance-attribute
  34605. [Constant, Cached, Replaceable, BinaryName="getPerformance"]
  34606. readonly attribute Performance performance;
  34607. [Func="WorkerGlobalScope::IsInAutomation", Throws]
  34608. object getJSTestingFunctions();
  34609. };
  34610. /* ---------------------- WorkerLocation ----------------------------- */
  34611. /* ./webidl/WorkerLocation.webidl */
  34612. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34613. /* This Source Code Form is subject to the terms of the Mozilla Public
  34614. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34615. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  34616. *
  34617. * The origin of this IDL file is
  34618. * https://html.spec.whatwg.org/multipage/workers.html#worker-locations
  34619. *
  34620. * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  34621. * Software ASA.
  34622. * You are granted a license to use, reproduce and create derivative works of
  34623. * this document.
  34624. */
  34625. [Exposed=Worker]
  34626. interface WorkerLocation {
  34627. stringifier readonly attribute USVString href;
  34628. readonly attribute USVString origin;
  34629. readonly attribute USVString protocol;
  34630. readonly attribute USVString host;
  34631. readonly attribute USVString hostname;
  34632. readonly attribute USVString port;
  34633. readonly attribute USVString pathname;
  34634. readonly attribute USVString search;
  34635. readonly attribute USVString hash;
  34636. };
  34637. /* ---------------------- WorkerNavigator ----------------------------- */
  34638. /* ./webidl/WorkerNavigator.webidl */
  34639. /* This Source Code Form is subject to the terms of the Mozilla Public
  34640. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34641. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  34642. [Exposed=Worker,
  34643. InstrumentedProps=(permissions)]
  34644. interface WorkerNavigator {
  34645. };
  34646. WorkerNavigator includes NavigatorID;
  34647. WorkerNavigator includes NavigatorLanguage;
  34648. WorkerNavigator includes NavigatorOnLine;
  34649. WorkerNavigator includes NavigatorConcurrentHardware;
  34650. WorkerNavigator includes NavigatorStorage;
  34651. WorkerNavigator includes GlobalPrivacyControl;
  34652. // http://wicg.github.io/netinfo/#extensions-to-the-navigator-interface
  34653. [Exposed=Worker]
  34654. partial interface WorkerNavigator {
  34655. [Pref="dom.netinfo.enabled", Throws]
  34656. readonly attribute NetworkInformation connection;
  34657. };
  34658. // https://wicg.github.io/media-capabilities/#idl-index
  34659. [Exposed=Worker]
  34660. partial interface WorkerNavigator {
  34661. [SameObject, Func="mozilla::dom::MediaCapabilities::Enabled"]
  34662. readonly attribute MediaCapabilities mediaCapabilities;
  34663. };
  34664. // https://w3c.github.io/web-locks/#navigator-mixins
  34665. WorkerNavigator includes NavigatorLocks;
  34666. // https://gpuweb.github.io/gpuweb/#navigator-gpu
  34667. WorkerNavigator includes NavigatorGPU;
  34668. /* ---------------------- WorkerTestUtils ----------------------------- */
  34669. /* ./webidl/WorkerTestUtils.webidl */
  34670. /* This Source Code Form is subject to the terms of the Mozilla Public
  34671. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34672. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  34673. [Exposed=Worker, Pref="dom.workers.testing.enabled"]
  34674. namespace WorkerTestUtils {
  34675. [Throws]
  34676. unsigned long currentTimerNestingLevel();
  34677. };
  34678. /* ---------------------- Worklet ----------------------------- */
  34679. /* ./webidl/Worklet.webidl */
  34680. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34681. /* This Source Code Form is subject to the terms of the Mozilla Public
  34682. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34683. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  34684. *
  34685. * The origin of this IDL file is
  34686. * https://drafts.css-houdini.org/worklets/#idl-index
  34687. */
  34688. [SecureContext, Exposed=Window]
  34689. interface Worklet {
  34690. [NewObject, Throws, NeedsCallerType]
  34691. Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {});
  34692. };
  34693. dictionary WorkletOptions {
  34694. RequestCredentials credentials = "same-origin";
  34695. };
  34696. /* ---------------------- WorkletGlobalScope ----------------------------- */
  34697. /* ./webidl/WorkletGlobalScope.webidl */
  34698. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34699. /* This Source Code Form is subject to the terms of the Mozilla Public
  34700. * License, v. 2.0. If a copy of the MPL was not distributed with this
  34701. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  34702. *
  34703. * The origin of this IDL file is
  34704. * https://drafts.css-houdini.org/worklets/#idl-index
  34705. */
  34706. [Exposed=Worklet]
  34707. interface WorkletGlobalScope {
  34708. };
  34709. // Mozilla extensions
  34710. partial interface WorkletGlobalScope {
  34711. undefined dump(optional DOMString str);
  34712. };
  34713. /* ---------------------- WritableStream ----------------------------- */
  34714. /* ./webidl/WritableStream.webidl */
  34715. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34716. /* This Source Code Form is subject to the terms of the Mozilla Public
  34717. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34718. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34719. *
  34720. * The origin of this IDL file is
  34721. * https://streams.spec.whatwg.org/#ws-class-definition
  34722. */
  34723. [Exposed=*] // [Transferable] - See Bug 1562065
  34724. interface WritableStream {
  34725. [Throws]
  34726. constructor(optional object underlyingSink, optional QueuingStrategy strategy = {});
  34727. readonly attribute boolean locked;
  34728. [Throws]
  34729. Promise<undefined> abort(optional any reason);
  34730. [NewObject]
  34731. Promise<undefined> close();
  34732. [Throws]
  34733. WritableStreamDefaultWriter getWriter();
  34734. };
  34735. /* ---------------------- WritableStreamDefaultController ----------------------------- */
  34736. /* ./webidl/WritableStreamDefaultController.webidl */
  34737. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34738. /* This Source Code Form is subject to the terms of the Mozilla Public
  34739. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34740. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34741. *
  34742. * The origin of this IDL file is
  34743. * https://streams.spec.whatwg.org/#ws-default-controller-class-definition
  34744. */
  34745. [Exposed=*]
  34746. interface WritableStreamDefaultController {
  34747. readonly attribute AbortSignal signal;
  34748. [Throws]
  34749. undefined error(optional any e);
  34750. };
  34751. /* ---------------------- WritableStreamDefaultWriter ----------------------------- */
  34752. /* ./webidl/WritableStreamDefaultWriter.webidl */
  34753. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34754. /* This Source Code Form is subject to the terms of the Mozilla Public
  34755. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34756. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34757. *
  34758. * The origin of this IDL file is
  34759. * https://streams.spec.whatwg.org/#default-writer-class-definition
  34760. */
  34761. [Exposed=*]
  34762. interface WritableStreamDefaultWriter {
  34763. [Throws]
  34764. constructor(WritableStream stream);
  34765. readonly attribute Promise<undefined> closed;
  34766. [Throws] readonly attribute unrestricted double? desiredSize;
  34767. readonly attribute Promise<undefined> ready;
  34768. [Throws]
  34769. Promise<undefined> abort(optional any reason);
  34770. [NewObject]
  34771. Promise<undefined> close();
  34772. undefined releaseLock();
  34773. [NewObject]
  34774. Promise<undefined> write(optional any chunk);
  34775. };
  34776. /* ---------------------- XMLDocument ----------------------------- */
  34777. /* ./webidl/XMLDocument.webidl */
  34778. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34779. /* This Source Code Form is subject to the terms of the Mozilla Public
  34780. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34781. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34782. *
  34783. * The origin of this IDL file is:
  34784. * http://dom.spec.whatwg.org/#xmldocument
  34785. */
  34786. // http://dom.spec.whatwg.org/#xmldocument
  34787. [Exposed=Window]
  34788. interface XMLDocument : Document {};
  34789. /* ---------------------- XMLHttpRequest ----------------------------- */
  34790. /* ./webidl/XMLHttpRequest.webidl */
  34791. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34792. /* This Source Code Form is subject to the terms of the Mozilla Public
  34793. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34794. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34795. *
  34796. * The origin of this IDL file is
  34797. * https://xhr.spec.whatwg.org/#interface-xmlhttprequest
  34798. *
  34799. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  34800. * liability, trademark and document use rules apply.
  34801. */
  34802. interface InputStream;
  34803. interface MozChannel;
  34804. enum XMLHttpRequestResponseType {
  34805. "",
  34806. "arraybuffer",
  34807. "blob",
  34808. "document",
  34809. "json",
  34810. "text",
  34811. };
  34812. /**
  34813. * Parameters for instantiating an XMLHttpRequest. They are passed as an
  34814. * optional argument to the constructor:
  34815. *
  34816. * new XMLHttpRequest({anon: true, system: true});
  34817. */
  34818. dictionary MozXMLHttpRequestParameters
  34819. {
  34820. /**
  34821. * If true, the request will be sent without cookie and authentication
  34822. * headers. Defaults to true for system/privileged/chrome requests,
  34823. * and to false otherwise.
  34824. * Note that even if set to true, for system/privileged/chrome requests,
  34825. * manually-set 'Cookie' headers are not removed.
  34826. */
  34827. boolean mozAnon;
  34828. /**
  34829. * If true, the same origin policy will not be enforced on the request.
  34830. */
  34831. boolean mozSystem = false;
  34832. };
  34833. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  34834. interface XMLHttpRequest : XMLHttpRequestEventTarget {
  34835. [Throws]
  34836. constructor(optional MozXMLHttpRequestParameters params = {});
  34837. // There are apparently callers, specifically CoffeeScript, who do
  34838. // things like this:
  34839. // c = new(window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP")
  34840. // To handle that, we need a constructor that takes a string.
  34841. [Throws]
  34842. constructor(DOMString ignored);
  34843. // event handler
  34844. attribute EventHandler onreadystatechange;
  34845. // states
  34846. const unsigned short UNSENT = 0;
  34847. const unsigned short OPENED = 1;
  34848. const unsigned short HEADERS_RECEIVED = 2;
  34849. const unsigned short LOADING = 3;
  34850. const unsigned short DONE = 4;
  34851. readonly attribute unsigned short readyState;
  34852. // request
  34853. [Throws]
  34854. undefined open(ByteString method, USVString url);
  34855. [Throws]
  34856. undefined open(ByteString method, USVString url, boolean async,
  34857. optional USVString? user=null, optional USVString? password=null);
  34858. [Throws]
  34859. undefined setRequestHeader(ByteString header, ByteString value);
  34860. [SetterThrows]
  34861. attribute unsigned long timeout;
  34862. [SetterThrows]
  34863. attribute boolean withCredentials;
  34864. [Throws]
  34865. readonly attribute XMLHttpRequestUpload upload;
  34866. [Throws]
  34867. undefined send(optional (Document or XMLHttpRequestBodyInit)? body = null);
  34868. [Throws]
  34869. undefined abort();
  34870. // response
  34871. readonly attribute USVString responseURL;
  34872. [Throws]
  34873. readonly attribute unsigned short status;
  34874. [Throws]
  34875. readonly attribute ByteString statusText;
  34876. [Throws]
  34877. ByteString? getResponseHeader(ByteString header);
  34878. [Throws]
  34879. ByteString getAllResponseHeaders();
  34880. [Throws]
  34881. undefined overrideMimeType(DOMString mime);
  34882. [SetterThrows]
  34883. attribute XMLHttpRequestResponseType responseType;
  34884. [Throws]
  34885. readonly attribute any response;
  34886. [Cached, Pure, Throws]
  34887. readonly attribute USVString? responseText;
  34888. [Throws, Exposed=Window]
  34889. readonly attribute Document? responseXML;
  34890. // Mozilla-specific stuff
  34891. [ChromeOnly, SetterThrows]
  34892. attribute boolean mozBackgroundRequest;
  34893. [ChromeOnly, Exposed=Window]
  34894. readonly attribute MozChannel? channel;
  34895. [Throws, ChromeOnly, Exposed=Window]
  34896. any getInterface(any iid);
  34897. [ChromeOnly, Exposed=Window]
  34898. undefined setOriginAttributes(optional OriginAttributesDictionary originAttributes = {});
  34899. [ChromeOnly, Throws]
  34900. undefined sendInputStream(InputStream body);
  34901. // Only works on MainThread.
  34902. // Its permanence is to be evaluated in bug 1368540 for Firefox 60.
  34903. [ChromeOnly]
  34904. readonly attribute unsigned short errorCode;
  34905. readonly attribute boolean mozAnon;
  34906. readonly attribute boolean mozSystem;
  34907. };
  34908. /* ---------------------- XMLHttpRequestEventTarget ----------------------------- */
  34909. /* ./webidl/XMLHttpRequestEventTarget.webidl */
  34910. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34911. /* This Source Code Form is subject to the terms of the Mozilla Public
  34912. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34913. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34914. *
  34915. * The origin of this IDL file is
  34916. * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
  34917. *
  34918. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  34919. * liability, trademark and document use rules apply.
  34920. */
  34921. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  34922. interface XMLHttpRequestEventTarget : EventTarget {
  34923. // event handlers
  34924. attribute EventHandler onloadstart;
  34925. attribute EventHandler onprogress;
  34926. attribute EventHandler onabort;
  34927. attribute EventHandler onerror;
  34928. attribute EventHandler onload;
  34929. attribute EventHandler ontimeout;
  34930. attribute EventHandler onloadend;
  34931. };
  34932. /* ---------------------- XMLHttpRequestUpload ----------------------------- */
  34933. /* ./webidl/XMLHttpRequestUpload.webidl */
  34934. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34935. /* This Source Code Form is subject to the terms of the Mozilla Public
  34936. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34937. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34938. *
  34939. * The origin of this IDL file is
  34940. * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
  34941. *
  34942. * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  34943. * liability, trademark and document use rules apply.
  34944. */
  34945. [Exposed=(Window,DedicatedWorker,SharedWorker)]
  34946. interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
  34947. };
  34948. /* ---------------------- XMLSerializer ----------------------------- */
  34949. /* ./webidl/XMLSerializer.webidl */
  34950. /* This Source Code Form is subject to the terms of the Mozilla Public
  34951. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34952. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34953. *
  34954. * The origin of this IDL file is
  34955. * http://domparsing.spec.whatwg.org/#the-xmlserializer-interface
  34956. */
  34957. interface OutputStream;
  34958. [Exposed=Window]
  34959. interface XMLSerializer {
  34960. constructor();
  34961. /**
  34962. * The subtree rooted by the specified element is serialized to
  34963. * a string.
  34964. *
  34965. * @param root The root of the subtree to be serialized. This could
  34966. * be any node, including a Document.
  34967. * @returns The serialized subtree in the form of a Unicode string
  34968. */
  34969. [Throws]
  34970. DOMString serializeToString(Node root);
  34971. // Mozilla-specific stuff
  34972. /**
  34973. * The subtree rooted by the specified element is serialized to
  34974. * a byte stream using the character set specified.
  34975. * @param root The root of the subtree to be serialized. This could
  34976. * be any node, including a Document.
  34977. * @param stream The byte stream to which the subtree is serialized.
  34978. * @param charset The name of the character set to use for the encoding
  34979. * to a byte stream. If this string is empty and root is
  34980. * a document, the document's character set will be used.
  34981. */
  34982. [Throws, ChromeOnly]
  34983. undefined serializeToStream(Node root, OutputStream stream, DOMString? charset);
  34984. };
  34985. /* ---------------------- XPathEvaluator ----------------------------- */
  34986. /* ./webidl/XPathEvaluator.webidl */
  34987. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  34988. /* This Source Code Form is subject to the terms of the Mozilla Public
  34989. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  34990. * You can obtain one at http://mozilla.org/MPL/2.0/.
  34991. */
  34992. [Exposed=Window]
  34993. interface XPathEvaluator {
  34994. constructor();
  34995. };
  34996. XPathEvaluator includes XPathEvaluatorMixin;
  34997. interface mixin XPathEvaluatorMixin {
  34998. [NewObject, Throws]
  34999. XPathExpression createExpression(DOMString expression,
  35000. optional XPathNSResolver? resolver = null);
  35001. [Pure]
  35002. Node createNSResolver(Node nodeResolver);
  35003. [Throws]
  35004. XPathResult evaluate(DOMString expression,
  35005. Node contextNode,
  35006. optional XPathNSResolver? resolver = null,
  35007. optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
  35008. optional object? result = null);
  35009. };
  35010. /* ---------------------- XPathExpression ----------------------------- */
  35011. /* ./webidl/XPathExpression.webidl */
  35012. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35013. /* This Source Code Form is subject to the terms of the Mozilla Public
  35014. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35015. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35016. */
  35017. [Exposed=Window]
  35018. interface XPathExpression {
  35019. // The result specifies a specific result object which may be reused and
  35020. // returned by this method. If this is specified as null or it's not an
  35021. // XPathResult object, a new result object will be constructed and returned.
  35022. [Throws]
  35023. XPathResult evaluate(Node contextNode,
  35024. optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
  35025. optional object? result = null);
  35026. // The result specifies a specific result object which may be reused and
  35027. // returned by this method. If this is specified as null or it's not an
  35028. // XPathResult object, a new result object will be constructed and returned.
  35029. [Throws, ChromeOnly]
  35030. XPathResult evaluateWithContext(Node contextNode,
  35031. unsigned long contextPosition,
  35032. unsigned long contextSize,
  35033. optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
  35034. optional object? result = null);
  35035. };
  35036. /* ---------------------- XPathNSResolver ----------------------------- */
  35037. /* ./webidl/XPathNSResolver.webidl */
  35038. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35039. /* This Source Code Form is subject to the terms of the Mozilla Public
  35040. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35041. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35042. */
  35043. [Exposed=Window]
  35044. callback interface XPathNSResolver
  35045. {
  35046. DOMString? lookupNamespaceURI(DOMString? prefix);
  35047. };
  35048. /* ---------------------- XPathResult ----------------------------- */
  35049. /* ./webidl/XPathResult.webidl */
  35050. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35051. /* This Source Code Form is subject to the terms of the Mozilla Public
  35052. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35053. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35054. *
  35055. * Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
  35056. */
  35057. [Exposed=Window]
  35058. interface XPathResult {
  35059. // XPathResultType
  35060. const unsigned short ANY_TYPE = 0;
  35061. const unsigned short NUMBER_TYPE = 1;
  35062. const unsigned short STRING_TYPE = 2;
  35063. const unsigned short BOOLEAN_TYPE = 3;
  35064. const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
  35065. const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
  35066. const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
  35067. const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
  35068. const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
  35069. const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
  35070. readonly attribute unsigned short resultType;
  35071. [Throws]
  35072. readonly attribute double numberValue;
  35073. [Throws]
  35074. readonly attribute DOMString stringValue;
  35075. [Throws]
  35076. readonly attribute boolean booleanValue;
  35077. [Throws]
  35078. readonly attribute Node? singleNodeValue;
  35079. readonly attribute boolean invalidIteratorState;
  35080. [Throws]
  35081. readonly attribute unsigned long snapshotLength;
  35082. [Throws]
  35083. Node? iterateNext();
  35084. [Throws]
  35085. Node? snapshotItem(unsigned long index);
  35086. };
  35087. /* ---------------------- XRInputSourceEvent ----------------------------- */
  35088. /* ./webidl/XRInputSourceEvent.webidl */
  35089. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35090. /* This Source Code Form is subject to the terms of the Mozilla Public
  35091. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35092. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35093. *
  35094. * The origin of this IDL file is
  35095. * https://immersive-web.github.io/webxr/#xrinputsourceevent-interface
  35096. */
  35097. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  35098. interface XRInputSourceEvent : Event {
  35099. constructor(DOMString type, XRInputSourceEventInit eventInitDict);
  35100. [SameObject] readonly attribute XRFrame frame;
  35101. [SameObject] readonly attribute XRInputSource inputSource;
  35102. };
  35103. dictionary XRInputSourceEventInit : EventInit {
  35104. required XRFrame frame;
  35105. required XRInputSource inputSource;
  35106. };
  35107. /* ---------------------- XRInputSourcesChangeEvent ----------------------------- */
  35108. /* ./webidl/XRInputSourcesChangeEvent.webidl */
  35109. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35110. /* This Source Code Form is subject to the terms of the Mozilla Public
  35111. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35112. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35113. *
  35114. * The origin of this IDL file is
  35115. * https://immersive-web.github.io/webxr/#xrinputsourceschangeevent-interface
  35116. */
  35117. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  35118. interface XRInputSourcesChangeEvent : Event {
  35119. constructor(DOMString type, XRInputSourcesChangeEventInit eventInitDict);
  35120. [SameObject] readonly attribute XRSession session;
  35121. // TODO: Use FrozenArray once available. (Bug 1236777)
  35122. [Constant, Cached, Frozen]
  35123. readonly attribute sequence<XRInputSource> added;
  35124. // TODO: Use FrozenArray once available. (Bug 1236777)
  35125. [Constant, Cached, Frozen]
  35126. readonly attribute sequence<XRInputSource> removed;
  35127. };
  35128. dictionary XRInputSourcesChangeEventInit : EventInit {
  35129. required XRSession session;
  35130. // TODO: Use FrozenArray once available. (Bug 1236777)
  35131. required sequence<XRInputSource> added;
  35132. // TODO: Use FrozenArray once available. (Bug 1236777)
  35133. required sequence<XRInputSource> removed;
  35134. };
  35135. /* ---------------------- XRReferenceSpaceEvent ----------------------------- */
  35136. /* ./webidl/XRReferenceSpaceEvent.webidl */
  35137. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35138. /* This Source Code Form is subject to the terms of the Mozilla Public
  35139. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35140. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35141. *
  35142. * The origin of this IDL file is
  35143. * https://immersive-web.github.io/webxr/#xrreferencespaceevent-interface
  35144. */
  35145. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  35146. interface XRReferenceSpaceEvent : Event {
  35147. constructor(DOMString type, XRReferenceSpaceEventInit eventInitDict);
  35148. [SameObject] readonly attribute XRReferenceSpace referenceSpace;
  35149. [SameObject] readonly attribute XRRigidTransform? transform;
  35150. };
  35151. dictionary XRReferenceSpaceEventInit : EventInit {
  35152. required XRReferenceSpace referenceSpace;
  35153. /*
  35154. * Changed from "XRRigidTransform transform;" in order to work with the
  35155. * event code generation.
  35156. */
  35157. XRRigidTransform? transform = null;
  35158. };
  35159. /* ---------------------- XRSessionEvent ----------------------------- */
  35160. /* ./webidl/XRSessionEvent.webidl */
  35161. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  35162. /* This Source Code Form is subject to the terms of the Mozilla Public
  35163. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  35164. * You can obtain one at http://mozilla.org/MPL/2.0/.
  35165. *
  35166. * The origin of this IDL file is
  35167. * https://immersive-web.github.io/webxr/#xrsessionevent-interface
  35168. */
  35169. [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
  35170. interface XRSessionEvent : Event {
  35171. constructor(DOMString type, XRSessionEventInit eventInitDict);
  35172. readonly attribute XRSession session;
  35173. };
  35174. dictionary XRSessionEventInit : EventInit {
  35175. required XRSession session;
  35176. };
  35177. /* ---------------------- XSLTProcessor ----------------------------- */
  35178. /* ./webidl/XSLTProcessor.webidl */
  35179. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  35180. /* This Source Code Form is subject to the terms of the Mozilla Public
  35181. * License, v. 2.0. If a copy of the MPL was not distributed with this
  35182. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  35183. typedef (unrestricted double or boolean or DOMString or Node or sequence<Node> or XPathResult) XSLTParameterValue;
  35184. [Exposed=Window]
  35185. interface XSLTProcessor {
  35186. [UseCounter]
  35187. constructor();
  35188. /**
  35189. * Import the stylesheet into this XSLTProcessor for transformations.
  35190. *
  35191. * @param style The root-node of a XSLT stylesheet. This can be either
  35192. * a document node or an element node. If a document node
  35193. * then the document can contain either a XSLT stylesheet
  35194. * or a LRE stylesheet.
  35195. * If the argument is an element node it must be the
  35196. * xsl:stylesheet (or xsl:transform) element of an XSLT
  35197. * stylesheet.
  35198. */
  35199. [Throws]
  35200. undefined importStylesheet(Node style);
  35201. /**
  35202. * Transforms the node source applying the stylesheet given by
  35203. * the importStylesheet() function. The owner document of the output node
  35204. * owns the returned document fragment.
  35205. *
  35206. * @param source The node to be transformed
  35207. * @param output This document is used to generate the output
  35208. * @return DocumentFragment The result of the transformation
  35209. */
  35210. [CEReactions, Throws]
  35211. DocumentFragment transformToFragment(Node source,
  35212. Document output);
  35213. /**
  35214. * Transforms the node source applying the stylesheet given by the
  35215. * importStylesheet() function.
  35216. *
  35217. * @param source The node to be transformed
  35218. * @return Document The result of the transformation
  35219. */
  35220. [CEReactions, Throws]
  35221. Document transformToDocument(Node source);
  35222. /**
  35223. * Sets a parameter to be used in subsequent transformations with this
  35224. * XSLTProcessor. If the parameter doesn't exist in the stylesheet the
  35225. * parameter will be ignored.
  35226. *
  35227. * @param namespaceURI The namespaceURI of the XSLT parameter
  35228. * @param localName The local name of the XSLT parameter
  35229. * @param value The new value of the XSLT parameter
  35230. */
  35231. [Throws]
  35232. undefined setParameter([LegacyNullToEmptyString] DOMString namespaceURI,
  35233. DOMString localName,
  35234. XSLTParameterValue value);
  35235. /**
  35236. * Gets a parameter if previously set by setParameter. Returns null
  35237. * otherwise.
  35238. *
  35239. * @param namespaceURI The namespaceURI of the XSLT parameter
  35240. * @param localName The local name of the XSLT parameter
  35241. * @return ParameterValue The value of the XSLT parameter
  35242. */
  35243. [Throws]
  35244. XSLTParameterValue? getParameter([LegacyNullToEmptyString] DOMString namespaceURI,
  35245. DOMString localName);
  35246. /**
  35247. * Removes a parameter, if set. This will make the processor use the
  35248. * default-value for the parameter as specified in the stylesheet.
  35249. *
  35250. * @param namespaceURI The namespaceURI of the XSLT parameter
  35251. * @param localName The local name of the XSLT parameter
  35252. */
  35253. [Throws]
  35254. undefined removeParameter([LegacyNullToEmptyString] DOMString namespaceURI,
  35255. DOMString localName);
  35256. /**
  35257. * Removes all set parameters from this XSLTProcessor. This will make
  35258. * the processor use the default-value for all parameters as specified in
  35259. * the stylesheet.
  35260. */
  35261. undefined clearParameters();
  35262. /**
  35263. * Remove all parameters and stylesheets from this XSLTProcessor.
  35264. */
  35265. undefined reset();
  35266. /**
  35267. * Disables all loading of external documents, such as from
  35268. * <xsl:import> and document()
  35269. * Defaults to off and is *not* reset by calls to reset()
  35270. */
  35271. [ChromeOnly]
  35272. const unsigned long DISABLE_ALL_LOADS = 1;
  35273. /**
  35274. * Flags for this processor. Defaults to 0. See individual flags above
  35275. * for documentation for effect of reset()
  35276. */
  35277. [ChromeOnly, NeedsCallerType]
  35278. attribute unsigned long flags;
  35279. };
  35280. /* ---------------------- EOF ----------------------------- */