1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267 |
- /*
- * This software has been developed by TIXEO.
- *
- * Copyright (c) 2004-2024 TIXE - All Rights Reserved.
- *
- * COPYRIGHT:
- * This file is the property of TIXEO.
- * It can not be used, modified, copied without the explicit written
- * authorization from a mandated member of TIXEO.
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * WARRANTY:
- * This software is provided "AS IS" and any express or implied warranties,
- * including, but not limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no no event shall copyright
- * holders be liable for any direct, indirect, incidental, special, exemplary
- * or consequential damages (including, but not limited to, procurement of
- * substitute goods or services; loss of use, data, or profits; or business
- * interruption) however caused and on any theory of liability, whether in
- * contract, strict liability, or tort (including negligence or otherwise)
- * arising in any way out of the use of this software, even if advised or the
- * possibility of such damage.
- *
- * SOURCE : https://github.com/othree/webidl.git
- * WEBIDL LISTING :
- * AbortController
- * AbortSignal
- * AbstractRange
- * AbstractWorker
- * AccessibleNode
- * AddonEvent
- * AddonManager
- * AnalyserNode
- * Animatable
- * Animation
- * AnimationEffect
- * AnimationEvent
- * AnimationFrameProvider
- * AnimationPlaybackEvent
- * AnimationTimeline
- * AnonymousContent
- * AppInfo
- * AppNotificationServiceOptions
- * APZTestData
- * ARIAMixin
- * Attr
- * AudioBuffer
- * AudioBufferSourceNode
- * AudioContext
- * AudioData
- * AudioDecoder
- * AudioDestinationNode
- * AudioEncoder
- * AudioListener
- * AudioNode
- * AudioParam
- * AudioParamDescriptor
- * AudioParamMap
- * AudioProcessingEvent
- * AudioScheduledSourceNode
- * AudioTrack
- * AudioTrackList
- * AudioWorklet
- * AudioWorkletGlobalScope
- * AudioWorkletNode
- * AudioWorkletProcessor
- * AutocompleteInfo
- * BarProp
- * BaseAudioContext
- * BaseKeyframeTypes
- * BasicCardPayment
- * BatteryManager
- * BeforeUnloadEvent
- * BiquadFilterNode
- * Blob
- * BlobEvent
- * BroadcastChannel
- * BrowserElementDictionaries
- * Cache
- * CacheStorage
- * CancelContentJSOptions
- * CanvasCaptureMediaStream
- * CanvasRenderingContext2D
- * CaretPosition
- * CaretStateChangedEvent
- * CDATASection
- * ChannelMergerNode
- * ChannelSplitterNode
- * CharacterData
- * CheckerboardReportService
- * ChildNode
- * Client
- * Clients
- * Clipboard
- * ClipboardEvent
- * CloseEvent
- * Comment
- * CompositionEvent
- * CompressionStream
- * Console
- * ConstantSourceNode
- * ContentVisibilityAutoStateChangeEvent
- * ConvolverNode
- * CreateOfferRequest
- * CredentialManagement
- * Crypto
- * CSPDictionaries
- * CSPReport
- * CSS
- * CSSAnimation
- * CSSConditionRule
- * CSSContainerRule
- * CSSCounterStyleRule
- * CSSFontFaceRule
- * CSSFontFeatureValuesRule
- * CSSFontPaletteValuesRule
- * CSSGroupingRule
- * CSSImportRule
- * CSSKeyframeRule
- * CSSKeyframesRule
- * CSSLayerBlockRule
- * CSSLayerStatementRule
- * CSSMediaRule
- * CSSMozDocumentRule
- * CSSNamespaceRule
- * CSSPageRule
- * CSSPropertyRule
- * CSSPseudoElement
- * CSSRule
- * CSSRuleList
- * CSSScopeRule
- * CSSStyleDeclaration
- * CSSStyleRule
- * CSSStyleSheet
- * CSSSupportsRule
- * CSSTransition
- * CustomElementRegistry
- * CustomEvent
- * DataTransfer
- * DataTransferItem
- * DataTransferItemList
- * DecoderDoctorNotification
- * DecompressionStream
- * DedicatedWorkerGlobalScope
- * DelayNode
- * DeviceLightEvent
- * DeviceMotionEvent
- * DeviceOrientationEvent
- * Directory
- * Document
- * DocumentFragment
- * DocumentOrShadowRoot
- * DocumentTimeline
- * DocumentType
- * DOMException
- * DOMImplementation
- * DOMLocalization
- * DOMMatrix
- * DOMParser
- * DOMPoint
- * DOMQuad
- * DOMRect
- * DOMRectList
- * DOMStringList
- * DOMStringMap
- * DOMTokenList
- * DragEvent
- * DynamicsCompressorNode
- * Element
- * ElementInternals
- * EncodedAudioChunk
- * EncodedVideoChunk
- * ErrorEvent
- * Event
- * EventHandler
- * EventListener
- * EventSource
- * EventTarget
- * ExtendableEvent
- * ExtendableMessageEvent
- * ExtensionAlarms
- * ExtensionBrowser
- * ExtensionBrowserSettings
- * ExtensionBrowserSettingsColorManagement
- * ExtensionDns
- * ExtensionEventManager
- * ExtensionMockAPI
- * ExtensionPort
- * ExtensionProxy
- * ExtensionRuntime
- * ExtensionScripting
- * ExtensionSetting
- * ExtensionTest
- * External
- * FailedCertSecurityInfo
- * FakePluginTagInit
- * FeaturePolicy
- * Fetch
- * FetchEvent
- * FetchObserver
- * File
- * FileList
- * FileMode
- * FileReader
- * FileReaderSync
- * FileSystem
- * FileSystemDirectoryEntry
- * FileSystemDirectoryHandle
- * FileSystemDirectoryIterator
- * FileSystemDirectoryReader
- * FileSystemEntry
- * FileSystemFileEntry
- * FileSystemFileHandle
- * FileSystemHandle
- * FileSystemSyncAccessHandle
- * FileSystemWritableFileStream
- * FinalizationRegistry
- * FocusEvent
- * FontFace
- * FontFaceSet
- * FontFaceSetLoadEvent
- * FontFaceSource
- * FormData
- * FormDataEvent
- * FragmentDirective
- * FrameCrashedEvent
- * Function
- * FuzzingFunctions
- * GainNode
- * Gamepad
- * GamepadAxisMoveEvent
- * GamepadButtonEvent
- * GamepadEvent
- * GamepadHapticActuator
- * GamepadLightIndicator
- * GamepadPose
- * GamepadServiceTest
- * GamepadTouch
- * GenericTransformStream
- * Geolocation
- * GeolocationCoordinates
- * GeolocationPosition
- * GeolocationPositionError
- * GeometryUtils
- * GetUserMediaRequest
- * Glean
- * GleanMetrics
- * GleanPings
- * GPUUncapturedErrorEvent
- * HashChangeEvent
- * Headers
- * Highlight
- * History
- * HTMLAllCollection
- * HTMLAnchorElement
- * HTMLAreaElement
- * HTMLAudioElement
- * HTMLBaseElement
- * HTMLBodyElement
- * HTMLBRElement
- * HTMLButtonElement
- * HTMLCanvasElement
- * HTMLCollection
- * HTMLDataElement
- * HTMLDataListElement
- * HTMLDetailsElement
- * HTMLDialogElement
- * HTMLDirectoryElement
- * HTMLDivElement
- * HTMLDListElement
- * HTMLDocument
- * HTMLElement
- * HTMLEmbedElement
- * HTMLFieldSetElement
- * HTMLFontElement
- * HTMLFormControlsCollection
- * HTMLFormElement
- * HTMLFrameElement
- * HTMLFrameSetElement
- * HTMLHeadElement
- * HTMLHeadingElement
- * HTMLHRElement
- * HTMLHtmlElement
- * HTMLHyperlinkElementUtils
- * HTMLIFrameElement
- * HTMLImageElement
- * HTMLInputElement
- * HTMLLabelElement
- * HTMLLegendElement
- * HTMLLIElement
- * HTMLLinkElement
- * HTMLMapElement
- * HTMLMarqueeElement
- * HTMLMediaElement
- * HTMLMenuElement
- * HTMLMetaElement
- * HTMLMeterElement
- * HTMLModElement
- * HTMLObjectElement
- * HTMLOListElement
- * HTMLOptGroupElement
- * HTMLOptionElement
- * HTMLOptionsCollection
- * HTMLOutputElement
- * HTMLParagraphElement
- * HTMLParamElement
- * HTMLPictureElement
- * HTMLPreElement
- * HTMLProgressElement
- * HTMLQuoteElement
- * HTMLScriptElement
- * HTMLSelectElement
- * HTMLSlotElement
- * HTMLSourceElement
- * HTMLSpanElement
- * HTMLStyleElement
- * HTMLTableCaptionElement
- * HTMLTableCellElement
- * HTMLTableColElement
- * HTMLTableElement
- * HTMLTableRowElement
- * HTMLTableSectionElement
- * HTMLTemplateElement
- * HTMLTextAreaElement
- * HTMLTimeElement
- * HTMLTitleElement
- * HTMLTrackElement
- * HTMLUListElement
- * HTMLVideoElement
- * IDBCursor
- * IDBDatabase
- * IDBFactory
- * IDBIndex
- * IDBKeyRange
- * IDBObjectStore
- * IDBOpenDBRequest
- * IDBRequest
- * IDBTransaction
- * IDBVersionChangeEvent
- * IdentityCredential
- * IdleDeadline
- * IIRFilterNode
- * ImageBitmap
- * ImageBitmapRenderingContext
- * ImageCapture
- * ImageCaptureErrorEvent
- * ImageData
- * ImageDocument
- * InputEvent
- * InstallTrigger
- * IntersectionObserver
- * IntlUtils
- * InvokeEvent
- * InvokerElement
- * IterableIterator
- * KeyAlgorithm
- * KeyboardEvent
- * KeyEvent
- * KeyframeAnimationOptions
- * KeyframeEffect
- * KeyIdsInitData
- * LinkStyle
- * Localization
- * Location
- * Lock
- * LockManager
- * MathMLElement
- * MediaCapabilities
- * MediaDebugInfo
- * MediaDeviceInfo
- * MediaDevices
- * MediaElementAudioSourceNode
- * MediaEncryptedEvent
- * MediaError
- * MediaKeyError
- * MediaKeyMessageEvent
- * MediaKeys
- * MediaKeySession
- * MediaKeysRequestStatus
- * MediaKeyStatusMap
- * MediaKeySystemAccess
- * MediaList
- * MediaQueryList
- * MediaQueryListEvent
- * MediaRecorder
- * MediaRecorderErrorEvent
- * MediaSession
- * MediaSource
- * MediaStream
- * MediaStreamAudioDestinationNode
- * MediaStreamAudioSourceNode
- * MediaStreamError
- * MediaStreamEvent
- * MediaStreamTrack
- * MediaStreamTrackAudioSourceNode
- * MediaStreamTrackEvent
- * MediaTrackSettings
- * MediaTrackSupportedConstraints
- * MerchantValidationEvent
- * MessageChannel
- * MessageEvent
- * MessagePort
- * MIDIAccess
- * MIDIConnectionEvent
- * MIDIInput
- * MIDIInputMap
- * MIDIMessageEvent
- * MIDIOptions
- * MIDIOutput
- * MIDIOutputMap
- * MIDIPort
- * MimeType
- * MimeTypeArray
- * MouseEvent
- * MouseScrollEvent
- * MozApplicationEvent
- * MozFrameLoaderOwner
- * MutationEvent
- * MutationObserver
- * NamedNodeMap
- * NavigationPreloadManager
- * Navigator
- * NetErrorInfo
- * NetworkInformation
- * NetworkOptions
- * Node
- * NodeFilter
- * NodeIterator
- * NodeList
- * NonElementParentNode
- * Notification
- * NotificationEvent
- * NotifyPaintEvent
- * OfflineAudioCompletionEvent
- * OfflineAudioContext
- * OffscreenCanvas
- * OffscreenCanvasRenderingContext2D
- * OscillatorNode
- * PageTransitionEvent
- * PaintRequest
- * PaintRequestList
- * PaintWorkletGlobalScope
- * PannerNode
- * ParentNode
- * PaymentAddress
- * PaymentMethodChangeEvent
- * PaymentRequest
- * PaymentRequestUpdateEvent
- * PaymentResponse
- * PeerConnectionImpl
- * PeerConnectionObserver
- * PeerConnectionObserverEnums
- * Performance
- * PerformanceEntry
- * PerformanceEntryEvent
- * PerformanceEventTiming
- * PerformanceLargestContentfulPaint
- * PerformanceMark
- * PerformanceMeasure
- * PerformanceNavigation
- * PerformanceNavigationTiming
- * PerformanceObserver
- * PerformanceObserverEntryList
- * PerformancePaintTiming
- * PerformanceResourceTiming
- * PerformanceServerTiming
- * PerformanceTiming
- * PeriodicWave
- * Permissions
- * PermissionStatus
- * Plugin
- * PluginArray
- * PointerEvent
- * PopoverInvokerElement
- * PopStateEvent
- * PopupBlockedEvent
- * PositionStateEvent
- * ProcessingInstruction
- * ProgressEvent
- * Promise
- * PromiseRejectionEvent
- * PushEvent
- * PushManager
- * PushMessageData
- * PushSubscription
- * PushSubscriptionOptions
- * QueuingStrategy
- * RadioNodeList
- * Range
- * ReadableByteStreamController
- * ReadableStream
- * ReadableStreamBYOBReader
- * ReadableStreamBYOBRequest
- * ReadableStreamDefaultController
- * ReadableStreamDefaultReader
- * ReferrerPolicy
- * Reporting
- * Request
- * ResizeObserver
- * Response
- * RTCCertificate
- * RTCConfiguration
- * RTCDataChannel
- * RTCDataChannelEvent
- * RTCDtlsTransport
- * RTCDTMFSender
- * RTCDTMFToneChangeEvent
- * RTCEncodedAudioFrame
- * RTCEncodedVideoFrame
- * RTCIceCandidate
- * RTCIceTransport
- * RTCIdentityAssertion
- * RTCIdentityProvider
- * RTCPeerConnection
- * RTCPeerConnectionIceEvent
- * RTCPeerConnectionStatic
- * RTCRtpCapabilities
- * RTCRtpParameters
- * RTCRtpReceiver
- * RTCRtpScriptTransform
- * RTCRtpScriptTransformer
- * RTCRtpSender
- * RTCRtpSources
- * RTCRtpTransceiver
- * RTCSctpTransport
- * RTCSessionDescription
- * RTCStatsReport
- * RTCTrackEvent
- * RTCTransformEvent
- * Sanitizer
- * Screen
- * ScreenOrientation
- * ScriptProcessorNode
- * ScrollAreaEvent
- * ScrollViewChangeEvent
- * SecurityPolicyViolationEvent
- * Selection
- * ServiceWorker
- * ServiceWorkerContainer
- * ServiceWorkerGlobalScope
- * ServiceWorkerRegistration
- * ShadowRealmGlobalScope
- * ShadowRoot
- * SharedWorker
- * SharedWorkerGlobalScope
- * SimpleGestureEvent
- * SocketCommon
- * SourceBuffer
- * SourceBufferList
- * SpeechGrammar
- * SpeechGrammarList
- * SpeechRecognition
- * SpeechRecognitionAlternative
- * SpeechRecognitionError
- * SpeechRecognitionEvent
- * SpeechRecognitionResult
- * SpeechRecognitionResultList
- * SpeechSynthesis
- * SpeechSynthesisErrorEvent
- * SpeechSynthesisEvent
- * SpeechSynthesisUtterance
- * SpeechSynthesisVoice
- * StaticRange
- * StereoPannerNode
- * Storage
- * StorageEvent
- * StorageManager
- * StreamFilter
- * StreamFilterDataEvent
- * StructuredCloneTester
- * StyleSheet
- * StyleSheetList
- * SubmitEvent
- * SubtleCrypto
- * SVGAElement
- * SVGAngle
- * SVGAnimatedAngle
- * SVGAnimatedBoolean
- * SVGAnimatedEnumeration
- * SVGAnimatedInteger
- * SVGAnimatedLength
- * SVGAnimatedLengthList
- * SVGAnimatedNumber
- * SVGAnimatedNumberList
- * SVGAnimatedPathData
- * SVGAnimatedPoints
- * SVGAnimatedPreserveAspectRatio
- * SVGAnimatedRect
- * SVGAnimatedString
- * SVGAnimatedTransformList
- * SVGAnimateElement
- * SVGAnimateMotionElement
- * SVGAnimateTransformElement
- * SVGAnimationElement
- * SVGCircleElement
- * SVGClipPathElement
- * SVGComponentTransferFunctionElement
- * SVGDefsElement
- * SVGDescElement
- * SVGElement
- * SVGEllipseElement
- * SVGFEBlendElement
- * SVGFEColorMatrixElement
- * SVGFEComponentTransferElement
- * SVGFECompositeElement
- * SVGFEConvolveMatrixElement
- * SVGFEDiffuseLightingElement
- * SVGFEDisplacementMapElement
- * SVGFEDistantLightElement
- * SVGFEDropShadowElement
- * SVGFEFloodElement
- * SVGFEFuncAElement
- * SVGFEFuncBElement
- * SVGFEFuncGElement
- * SVGFEFuncRElement
- * SVGFEGaussianBlurElement
- * SVGFEImageElement
- * SVGFEMergeElement
- * SVGFEMergeNodeElement
- * SVGFEMorphologyElement
- * SVGFEOffsetElement
- * SVGFEPointLightElement
- * SVGFESpecularLightingElement
- * SVGFESpotLightElement
- * SVGFETileElement
- * SVGFETurbulenceElement
- * SVGFilterElement
- * SVGFilterPrimitiveStandardAttributes
- * SVGFitToViewBox
- * SVGForeignObjectElement
- * SVGGElement
- * SVGGeometryElement
- * SVGGradientElement
- * SVGGraphicsElement
- * SVGImageElement
- * SVGLength
- * SVGLengthList
- * SVGLinearGradientElement
- * SVGLineElement
- * SVGMarkerElement
- * SVGMaskElement
- * SVGMatrix
- * SVGMetadataElement
- * SVGMPathElement
- * SVGNumber
- * SVGNumberList
- * SVGPathElement
- * SVGPathSeg
- * SVGPathSegList
- * SVGPatternElement
- * SVGPoint
- * SVGPointList
- * SVGPolygonElement
- * SVGPolylineElement
- * SVGPreserveAspectRatio
- * SVGRadialGradientElement
- * SVGRect
- * SVGRectElement
- * SVGScriptElement
- * SVGSetElement
- * SVGStopElement
- * SVGStringList
- * SVGStyleElement
- * SVGSVGElement
- * SVGSwitchElement
- * SVGSymbolElement
- * SVGTests
- * SVGTextContentElement
- * SVGTextElement
- * SVGTextPathElement
- * SVGTextPositioningElement
- * SVGTitleElement
- * SVGTransform
- * SVGTransformList
- * SVGTSpanElement
- * SVGUnitTypes
- * SVGURIReference
- * SVGUseElement
- * SVGViewElement
- * SVGZoomAndPan
- * TaskPriorityChangeEvent
- * TCPServerSocket
- * TCPServerSocketEvent
- * TCPSocket
- * TCPSocketErrorEvent
- * TCPSocketEvent
- * TestFunctions
- * TestInterfaceJS
- * TestInterfaceJSDictionaries
- * TestInterfaceJSMaplikeSetlikeIterable
- * TestInterfaceObservableArray
- * TestUtils
- * Text
- * TextClause
- * TextDecoder
- * TextDecoderStream
- * TextEncoder
- * TextEncoderStream
- * TextTrack
- * TextTrackCue
- * TextTrackCueList
- * TextTrackList
- * TimeEvent
- * TimeRanges
- * ToggleEvent
- * Touch
- * TouchEvent
- * TouchList
- * TrackEvent
- * Transformer
- * TransformStream
- * TransformStreamDefaultController
- * TransitionEvent
- * TreeWalker
- * TrustedTypes
- * UDPMessageEvent
- * UDPSocket
- * UIEvent
- * UnderlyingSink
- * UnderlyingSource
- * URL
- * URLSearchParams
- * UserActivation
- * UserProximityEvent
- * ValidityState
- * VideoColorSpace
- * VideoDecoder
- * VideoEncoder
- * VideoFrame
- * VideoPlaybackQuality
- * VideoTrack
- * VideoTrackList
- * VisualViewport
- * VRDisplay
- * VRDisplayEvent
- * VRServiceTest
- * VTTCue
- * VTTRegion
- * WakeLock
- * WakeLockSentinel
- * WaveShaperNode
- * WebAuthentication
- * WebGL2RenderingContext
- * WebGLContextEvent
- * WebGLRenderingContext
- * WebGPU
- * WebrtcGlobalInformation
- * WebSocket
- * WebTaskScheduling
- * WebTransport
- * WebTransportDatagramDuplexStream
- * WebTransportError
- * WebTransportSendReceiveStream
- * WebXR
- * WheelEvent
- * Window
- * WindowOrWorkerGlobalScope
- * Worker
- * WorkerDebuggerGlobalScope
- * WorkerGlobalScope
- * WorkerLocation
- * WorkerNavigator
- * WorkerTestUtils
- * Worklet
- * WorkletGlobalScope
- * WritableStream
- * WritableStreamDefaultController
- * WritableStreamDefaultWriter
- * XMLDocument
- * XMLHttpRequest
- * XMLHttpRequestEventTarget
- * XMLHttpRequestUpload
- * XMLSerializer
- * XPathEvaluator
- * XPathExpression
- * XPathNSResolver
- * XPathResult
- * XRInputSourceEvent
- * XRInputSourcesChangeEvent
- * XRReferenceSpaceEvent
- * XRSessionEvent
- * XSLTProcessor
- */
-
- /* ---------------------- AbortController ----------------------------- */
- /* ./webidl/AbortController.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#abortcontroller
- */
- [Exposed=*]
- interface AbortController {
- [Throws]
- constructor();
- [SameObject] readonly attribute AbortSignal signal;
- undefined abort(optional any reason);
- };
-
- /* ---------------------- AbortSignal ----------------------------- */
- /* ./webidl/AbortSignal.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#abortsignal
- */
- [Exposed=*]
- interface AbortSignal : EventTarget {
- [NewObject] static AbortSignal abort(optional any reason);
- [Exposed=(Window,Worker), NewObject, Throws]
- static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
- [NewObject] static AbortSignal _any(sequence<AbortSignal> signals);
- readonly attribute boolean aborted;
- readonly attribute any reason;
- [Throws] undefined throwIfAborted();
- attribute EventHandler onabort;
- };
-
- /* ---------------------- AbstractRange ----------------------------- */
- /* ./webidl/AbstractRange.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#abstractrange
- *
- * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface AbstractRange {
- [BinaryName="GetStartContainer"]
- readonly attribute Node startContainer;
- readonly attribute unsigned long startOffset;
- [BinaryName="GetEndContainer"]
- readonly attribute Node endContainer;
- readonly attribute unsigned long endOffset;
- readonly attribute boolean collapsed;
- };
-
- /* ---------------------- AbstractWorker ----------------------------- */
- /* ./webidl/AbstractWorker.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=(Window,Worker)]
- interface mixin AbstractWorker {
- attribute EventHandler onerror;
- };
-
- /* ---------------------- AccessibleNode ----------------------------- */
- /* ./webidl/AccessibleNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Func="mozilla::dom::AccessibleNode::IsAOMEnabled",
- Exposed=Window]
- interface AccessibleNode {
- readonly attribute DOMString computedRole;
- [Frozen, Cached, Pure]
- readonly attribute sequence<DOMString> states;
- [Frozen, Cached, Pure]
- readonly attribute sequence<DOMString> attributes;
- readonly attribute Node? DOMNode;
- boolean is(DOMString... states);
- boolean has(DOMString... attributes);
- [Throws]
- any get(DOMString attribute);
- attribute DOMString? role;
- attribute DOMString? roleDescription;
- // Accessible label and descriptor
- attribute DOMString? label;
- // Global states and properties
- attribute DOMString? current;
- // Accessible properties
- attribute DOMString? autocomplete;
- attribute DOMString? keyShortcuts;
- attribute boolean? modal;
- attribute boolean? multiline;
- attribute boolean? multiselectable;
- attribute DOMString? orientation;
- attribute boolean? readOnly;
- attribute boolean? required;
- attribute DOMString? sort;
- // Range values
- attribute DOMString? placeholder;
- attribute double? valueMax;
- attribute double? valueMin;
- attribute double? valueNow;
- attribute DOMString? valueText;
- // Accessible states
- attribute DOMString? checked;
- attribute boolean? disabled;
- attribute boolean? expanded;
- attribute DOMString? hasPopUp;
- attribute boolean? hidden;
- attribute DOMString? invalid;
- attribute DOMString? pressed;
- attribute boolean? selected;
- // Live regions
- attribute boolean? atomic;
- attribute boolean? busy;
- attribute DOMString? live;
- attribute DOMString? relevant;
- // Other relationships
- attribute AccessibleNode? activeDescendant;
- attribute AccessibleNode? details;
- attribute AccessibleNode? errorMessage;
- // Collections.
- attribute long? colCount;
- attribute unsigned long? colIndex;
- attribute unsigned long? colSpan;
- attribute unsigned long? level;
- attribute unsigned long? posInSet;
- attribute long? rowCount;
- attribute unsigned long? rowIndex;
- attribute unsigned long? rowSpan;
- attribute long? setSize;
- };
-
- /* ---------------------- AddonEvent ----------------------------- */
- /* ./webidl/AddonEvent.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
- [Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
- Exposed=Window]
- interface AddonEvent : Event {
- constructor(DOMString type, AddonEventInit eventInitDict);
- readonly attribute DOMString id;
- };
- dictionary AddonEventInit : EventInit {
- required DOMString id;
- };
-
- /* ---------------------- AddonManager ----------------------------- */
- /* ./webidl/AddonManager.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /* We need a JSImplementation but cannot get one without a contract ID.
- Since Addon and AddonInstall are only ever created from JS they don't need
- real contract IDs. */
- [ChromeOnly, JSImplementation="dummy",
- Exposed=Window]
- interface Addon {
- // The add-on's ID.
- readonly attribute DOMString id;
- // The add-on's version.
- readonly attribute DOMString version;
- // The add-on's type (extension, theme, etc.).
- readonly attribute DOMString type;
- // The add-on's name in the current locale.
- readonly attribute DOMString name;
- // The add-on's description in the current locale.
- readonly attribute DOMString description;
- // If the user has enabled this add-on, note that it still may not be running
- // depending on whether enabling requires a restart or if the add-on is
- // incompatible in some way.
- readonly attribute boolean isEnabled;
- // If the add-on is currently active in the browser.
- readonly attribute boolean isActive;
- // If the add-on may be uninstalled
- readonly attribute boolean canUninstall;
- Promise<boolean> uninstall();
- Promise<undefined> setEnabled(boolean value);
- };
- [ChromeOnly, JSImplementation="dummy",
- Exposed=Window]
- interface AddonInstall : EventTarget {
- // One of the STATE_* symbols from AddonManager.sys.mjs
- readonly attribute DOMString state;
- // One of the ERROR_* symbols from AddonManager.sys.mjs, or null
- readonly attribute DOMString? error;
- // How many bytes have been downloaded
- readonly attribute long long progress;
- // How many total bytes will need to be downloaded or -1 if unknown
- readonly attribute long long maxProgress;
- Promise<undefined> install();
- Promise<undefined> cancel();
- };
- dictionary addonInstallOptions {
- required DOMString url;
- // If a non-empty string is passed for "hash", it is used to verify the
- // checksum of the downloaded XPI before installing. If is omitted or if
- // it is null or empty string, no checksum verification is performed.
- DOMString? hash = null;
- };
- [HeaderFile="mozilla/AddonManagerWebAPI.h",
- Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
- JSImplementation="@mozilla.org/addon-web-api/manager;1",
- WantsEventListenerHooks,
- Exposed=Window]
- interface AddonManager : EventTarget {
- /**
- * Gets information about an add-on
- *
- * @param id
- * The ID of the add-on to test for.
- * @return A promise. It will resolve to an Addon if the add-on is installed.
- */
- Promise<Addon> getAddonByID(DOMString id);
- /**
- * Creates an AddonInstall object for a given URL.
- *
- * @param options
- * Only one supported option: 'url', the URL of the addon to install.
- * @return A promise that resolves to an instance of AddonInstall.
- */
- Promise<AddonInstall> createInstall(optional addonInstallOptions options = {});
- /**
- * Opens an Abuse Report dialog window for the addon with the given id.
- * The addon may be currently installed (in which case the report will
- * include the details available locally), or not (in which case the report
- * will include the details that can be retrieved from the AMO API endpoint).
- *
- * @param id
- * The ID of the add-on to report.
- * @return A promise that resolves to a boolean (true when the report
- * has been submitted successfully, false if the user cancelled
- * the report). The Promise is rejected is the report fails
- * for a reason other than user cancellation.
- */
- Promise<boolean> reportAbuse(DOMString id);
- // Indicator to content whether handing off the reports to the integrated
- // abuse report panel is enabled.
- readonly attribute boolean abuseReportPanelEnabled;
- };
- [ChromeOnly,Exposed=Window,HeaderFile="mozilla/AddonManagerWebAPI.h"]
- namespace AddonManagerPermissions {
- boolean isHostPermitted(DOMString host);
- };
-
- /* ---------------------- AnalyserNode ----------------------------- */
- /* ./webidl/AnalyserNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary AnalyserOptions : AudioNodeOptions {
- unsigned long fftSize = 2048;
- double maxDecibels = -30;
- double minDecibels = -100;
- double smoothingTimeConstant = 0.8;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AnalyserNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional AnalyserOptions options = {});
- // Real-time frequency-domain data
- undefined getFloatFrequencyData(Float32Array array);
- undefined getByteFrequencyData(Uint8Array array);
- // Real-time waveform data
- undefined getFloatTimeDomainData(Float32Array array);
- undefined getByteTimeDomainData(Uint8Array array);
- [SetterThrows, Pure]
- attribute unsigned long fftSize;
- [Pure]
- readonly attribute unsigned long frequencyBinCount;
- [SetterThrows, Pure]
- attribute double minDecibels;
- [SetterThrows, Pure]
- attribute double maxDecibels;
- [SetterThrows, Pure]
- attribute double smoothingTimeConstant;
- };
- // Mozilla extension
- AnalyserNode includes AudioNodePassThrough;
-
- /* ---------------------- Animatable ----------------------------- */
- /* ./webidl/Animatable.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
- DOMString id = "";
- };
- dictionary GetAnimationsOptions {
- boolean subtree = false;
- };
- interface mixin Animatable {
- [Throws]
- Animation animate(object? keyframes,
- optional UnrestrictedDoubleOrKeyframeAnimationOptions options = {});
- sequence<Animation> getAnimations(optional GetAnimationsOptions options = {});
- };
-
- /* ---------------------- Animation ----------------------------- */
- /* ./webidl/Animation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animation
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum AnimationPlayState { "idle", "running", "paused", "finished" };
- enum AnimationReplaceState { "active", "removed", "persisted" };
- [Exposed=Window]
- interface Animation : EventTarget {
- [Throws]
- constructor(optional AnimationEffect? effect = null,
- optional AnimationTimeline? timeline);
- attribute DOMString id;
- [Pure]
- attribute AnimationEffect? effect;
- // Bug 1676794. Drop BinaryName once we support ScrollTimeline interface.
- [Func="Document::AreWebAnimationsTimelinesEnabled",
- BinaryName="timelineFromJS"]
- attribute AnimationTimeline? timeline;
- [BinaryName="startTimeAsDouble"]
- attribute double? startTime;
- [SetterThrows, BinaryName="currentTimeAsDouble"]
- attribute double? currentTime;
- attribute double playbackRate;
- [BinaryName="playStateFromJS"]
- readonly attribute AnimationPlayState playState;
- [BinaryName="pendingFromJS"]
- readonly attribute boolean pending;
- readonly attribute AnimationReplaceState replaceState;
- [Throws]
- readonly attribute Promise<Animation> ready;
- [Throws]
- readonly attribute Promise<Animation> finished;
- attribute EventHandler onfinish;
- attribute EventHandler oncancel;
- attribute EventHandler onremove;
- undefined cancel();
- [Throws]
- undefined finish();
- [Throws, BinaryName="playFromJS"]
- undefined play();
- [Throws, BinaryName="pauseFromJS"]
- undefined pause();
- undefined updatePlaybackRate (double playbackRate);
- [Throws]
- undefined reverse();
- undefined persist();
- [CEReactions, Throws]
- undefined commitStyles();
- };
- // Non-standard extensions
- partial interface Animation {
- [ChromeOnly] readonly attribute boolean isRunningOnCompositor;
- };
-
- /* ---------------------- AnimationEffect ----------------------------- */
- /* ./webidl/AnimationEffect.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animationeffectreadonly
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum FillMode {
- "none",
- "forwards",
- "backwards",
- "both",
- "auto"
- };
- enum PlaybackDirection {
- "normal",
- "reverse",
- "alternate",
- "alternate-reverse"
- };
- dictionary EffectTiming {
- double delay = 0.0;
- double endDelay = 0.0;
- FillMode fill = "auto";
- double iterationStart = 0.0;
- unrestricted double iterations = 1.0;
- (unrestricted double or DOMString) duration = "auto";
- PlaybackDirection direction = "normal";
- UTF8String easing = "linear";
- };
- dictionary OptionalEffectTiming {
- double delay;
- double endDelay;
- FillMode fill;
- double iterationStart;
- unrestricted double iterations;
- (unrestricted double or DOMString) duration;
- PlaybackDirection direction;
- UTF8String easing;
- };
- dictionary ComputedEffectTiming : EffectTiming {
- unrestricted double endTime = 0.0;
- unrestricted double activeDuration = 0.0;
- double? localTime = null;
- double? progress = null;
- unrestricted double? currentIteration = null;
- };
- [Exposed=Window]
- interface AnimationEffect {
- EffectTiming getTiming();
- [BinaryName="getComputedTimingAsDict"]
- ComputedEffectTiming getComputedTiming();
- [Throws]
- undefined updateTiming(optional OptionalEffectTiming timing = {});
- };
-
- /* ---------------------- AnimationEvent ----------------------------- */
- /* ./webidl/AnimationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/css3-animations/#animation-events-
- * http://dev.w3.org/csswg/css3-animations/#animation-events-
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface AnimationEvent : Event {
- constructor(DOMString type, optional AnimationEventInit eventInitDict = {});
- readonly attribute DOMString animationName;
- readonly attribute float elapsedTime;
- readonly attribute DOMString pseudoElement;
- };
- dictionary AnimationEventInit : EventInit {
- DOMString animationName = "";
- float elapsedTime = 0;
- DOMString pseudoElement = "";
- };
-
- /* ---------------------- AnimationFrameProvider ----------------------------- */
- /* ./webidl/AnimationFrameProvider.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
- */
- callback FrameRequestCallback = undefined (DOMHighResTimeStamp time);
- interface mixin AnimationFrameProvider {
- [Throws] long requestAnimationFrame(FrameRequestCallback callback);
- [Throws] undefined cancelAnimationFrame(long handle);
- };
-
- /* ---------------------- AnimationPlaybackEvent ----------------------------- */
- /* ./webidl/AnimationPlaybackEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animationplaybackevent
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface AnimationPlaybackEvent : Event {
- constructor(DOMString type,
- optional AnimationPlaybackEventInit eventInitDict = {});
- readonly attribute double? currentTime;
- readonly attribute double? timelineTime;
- };
- dictionary AnimationPlaybackEventInit : EventInit {
- double? currentTime = null;
- double? timelineTime = null;
- };
-
- /* ---------------------- AnimationTimeline ----------------------------- */
- /* ./webidl/AnimationTimeline.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animationtimeline
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Func="Document::AreWebAnimationsTimelinesEnabled",
- Exposed=Window]
- interface AnimationTimeline {
- [BinaryName="currentTimeAsDouble"]
- readonly attribute double? currentTime;
- };
-
- /* ---------------------- AnonymousContent ----------------------------- */
- /* ./webidl/AnonymousContent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * This file declares the AnonymousContent interface which is used to
- * manipulate content that has been inserted into the document's canvasFrame
- * anonymous container. See Document.insertAnonymousContent.
- * Users of this API must never remove the host of the shadow root.
- */
- [ChromeOnly, Exposed=Window]
- interface AnonymousContent {
- readonly attribute ShadowRoot root;
- };
-
- /* ---------------------- AppInfo ----------------------------- */
- /* ./webidl/AppInfo.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * This dictionnary holds the parameters supporting the app:// protocol.
- */
- dictionary AppInfo
- {
- DOMString path = "";
- boolean isCoreApp = false;
- };
-
- /* ---------------------- AppNotificationServiceOptions ----------------------------- */
- /* ./webidl/AppNotificationServiceOptions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- interface MozObserver;
- dictionary AppNotificationServiceOptions {
- boolean textClickable = false;
- DOMString manifestURL = "";
- DOMString id = "";
- DOMString dbId = "";
- DOMString dir = "";
- DOMString lang = "";
- DOMString tag = "";
- DOMString data = "";
- NotificationBehavior mozbehavior = {};
- };
-
- /* ---------------------- APZTestData ----------------------------- */
- /* ./webidl/APZTestData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * This file declares data structures used to communicate data logged by
- * various components for the purpose of APZ testing (see bug 961289 and
- * gfx/layers/apz/test/APZTestData.h) to JS test code.
- */
- // A single key-value pair in the data.
- dictionary ScrollFrameDataEntry {
- DOMString key;
- DOMString value;
- };
- // All the key-value pairs associated with a given scrollable frame.
- // The scrollable frame is identified by a scroll id.
- dictionary ScrollFrameData {
- unsigned long long scrollId;
- sequence<ScrollFrameDataEntry> entries;
- };
- // All the scrollable frames associated with a given paint or repaint request.
- // The paint or repaint request is identified by a sequence number.
- dictionary APZBucket {
- unsigned long sequenceNumber;
- sequence<ScrollFrameData> scrollFrames;
- };
- [Pref="apz.test.logging_enabled",
- Exposed=Window]
- namespace APZHitResultFlags {
- // These constants should be kept in sync with mozilla::gfx::CompositorHitTestInfo
- const unsigned short INVISIBLE = 0;
- const unsigned short VISIBLE = 0x0001;
- const unsigned short IRREGULAR_AREA = 0x0002;
- const unsigned short APZ_AWARE_LISTENERS = 0x0004;
- const unsigned short INACTIVE_SCROLLFRAME = 0x0008;
- const unsigned short PAN_X_DISABLED = 0x0010;
- const unsigned short PAN_Y_DISABLED = 0x0020;
- const unsigned short PINCH_ZOOM_DISABLED = 0x0040;
- const unsigned short DOUBLE_TAP_ZOOM_DISABLED = 0x0080;
- const unsigned short SCROLLBAR = 0x0100;
- const unsigned short SCROLLBAR_THUMB = 0x0200;
- const unsigned short SCROLLBAR_VERTICAL = 0x0400;
- const unsigned short REQUIRES_TARGET_CONFIRMATION = 0x0800;
- };
- dictionary APZHitResult {
- float screenX;
- float screenY;
- unsigned short hitResult; // combination of the APZHitResultFlags.* flags
- unsigned long long layersId;
- unsigned long long scrollId;
- };
- dictionary APZSampledResult {
- float scrollOffsetX;
- float scrollOffsetY;
- DOMHighResTimeStamp sampledTimeStamp;
- unsigned long long layersId;
- unsigned long long scrollId;
- };
- dictionary AdditionalDataEntry {
- DOMString key;
- DOMString value;
- };
- // All the paints and repaint requests. This is the top-level data structure.
- [GenerateConversionToJS]
- dictionary APZTestData {
- sequence<APZBucket> paints;
- sequence<APZBucket> repaintRequests;
- sequence<APZHitResult> hitResults;
- sequence<APZSampledResult> sampledResults;
- sequence<AdditionalDataEntry> additionalData;
- };
- // A frame uniformity measurement for every scrollable layer
- dictionary FrameUniformity {
- unsigned long layerAddress;
- float frameUniformity;
- };
- [GenerateConversionToJS]
- dictionary FrameUniformityResults {
- sequence<FrameUniformity> layerUniformities;
- };
-
- /* ---------------------- ARIAMixin ----------------------------- */
- /* ./webidl/ARIAMixin.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/aria/#ARIAMixin
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin ARIAMixin {
- [Pref="accessibility.ARIAElementReflection.enabled", CEReactions]
- attribute Element? ariaActiveDescendantElement;
- [CEReactions, SetterThrows]
- attribute DOMString? role;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaAtomic;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaAutoComplete;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaBrailleLabel;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaBrailleRoleDescription;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaBusy;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaChecked;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaColCount;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaColIndex;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaColIndexText;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaColSpan;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaCurrent;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaDescription;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaDisabled;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaExpanded;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaHasPopup;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaHidden;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaInvalid;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaKeyShortcuts;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaLabel;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaLevel;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaLive;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaModal;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaMultiLine;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaMultiSelectable;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaOrientation;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaPlaceholder;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaPosInSet;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaPressed;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaReadOnly;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRelevant;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRequired;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRoleDescription;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRowCount;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRowIndex;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRowIndexText;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaRowSpan;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaSelected;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaSetSize;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaSort;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaValueMax;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaValueMin;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaValueNow;
- [CEReactions, SetterThrows]
- attribute DOMString? ariaValueText;
- };
-
- /* ---------------------- Attr ----------------------------- */
- /* ./webidl/Attr.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface Attr : Node {
- readonly attribute DOMString localName;
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString value;
- [Constant]
- readonly attribute DOMString name;
- [Constant]
- readonly attribute DOMString? namespaceURI;
- [Constant]
- readonly attribute DOMString? prefix;
- readonly attribute boolean specified;
- };
- // Mozilla extensions
- partial interface Attr {
- readonly attribute Element? ownerElement;
- };
-
- /* ---------------------- AudioBuffer ----------------------------- */
- /* ./webidl/AudioBuffer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary AudioBufferOptions {
- unsigned long numberOfChannels = 1;
- required unsigned long length;
- required float sampleRate;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioBuffer {
- [Throws]
- constructor(AudioBufferOptions options);
- readonly attribute float sampleRate;
- readonly attribute unsigned long length;
- // in seconds
- readonly attribute double duration;
- readonly attribute unsigned long numberOfChannels;
- [Throws]
- Float32Array getChannelData(unsigned long channel);
- [Throws]
- undefined copyFromChannel(Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0);
- [Throws]
- undefined copyToChannel(Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0);
- };
-
- /* ---------------------- AudioBufferSourceNode ----------------------------- */
- /* ./webidl/AudioBufferSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary AudioBufferSourceOptions {
- AudioBuffer? buffer;
- float detune = 0;
- boolean loop = false;
- double loopEnd = 0;
- double loopStart = 0;
- float playbackRate = 1;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioBufferSourceNode : AudioScheduledSourceNode {
- constructor(BaseAudioContext context,
- optional AudioBufferSourceOptions options = {});
- [SetterThrows]
- attribute AudioBuffer? buffer;
- readonly attribute AudioParam playbackRate;
- readonly attribute AudioParam detune;
- attribute boolean loop;
- attribute double loopStart;
- attribute double loopEnd;
- [Throws]
- undefined start(optional double when = 0, optional double grainOffset = 0,
- optional double grainDuration);
- };
- // Mozilla extensions
- AudioBufferSourceNode includes AudioNodePassThrough;
-
- /* ---------------------- AudioContext ----------------------------- */
- /* ./webidl/AudioContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary AudioContextOptions {
- float sampleRate;
- };
- dictionary AudioTimestamp {
- double contextTime;
- DOMHighResTimeStamp performanceTime;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioContext : BaseAudioContext {
- [Throws]
- constructor(optional AudioContextOptions contextOptions = {});
- readonly attribute double baseLatency;
- readonly attribute double outputLatency;
- AudioTimestamp getOutputTimestamp();
- [NewObject]
- Promise<undefined> suspend();
- [NewObject]
- Promise<undefined> close();
- [NewObject, Throws]
- MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
- [NewObject, Throws]
- MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
- [NewObject, Throws]
- MediaStreamTrackAudioSourceNode createMediaStreamTrackSource(MediaStreamTrack mediaStreamTrack);
- [NewObject, Throws]
- MediaStreamAudioDestinationNode createMediaStreamDestination();
- };
-
- /* ---------------------- AudioData ----------------------------- */
- /* ./webidl/AudioData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#audiodata
- */
- // [Serializable, Transferable] are implemented without adding attributes here,
- // but directly with {Read,Write}StructuredClone and Transfer/FromTransfered.
- [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
- interface AudioData {
- [Throws]
- constructor(AudioDataInit init);
- readonly attribute AudioSampleFormat? format;
- readonly attribute float sampleRate;
- readonly attribute unsigned long numberOfFrames;
- readonly attribute unsigned long numberOfChannels;
- readonly attribute unsigned long long duration; // microseconds
- readonly attribute long long timestamp; // microseconds
- [Throws]
- unsigned long allocationSize(AudioDataCopyToOptions options);
- [Throws]
- undefined copyTo(
- // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)`
- ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination,
- AudioDataCopyToOptions options);
- [Throws]
- AudioData clone();
- undefined close();
- };
- dictionary AudioDataInit {
- required AudioSampleFormat format;
- required float sampleRate;
- required [EnforceRange] unsigned long numberOfFrames;
- required [EnforceRange] unsigned long numberOfChannels;
- required [EnforceRange] long long timestamp; // microseconds
- // bug 1696216: Should be AllowSharedBufferSource
- required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
- sequence<ArrayBuffer> transfer = [];
- };
- enum AudioSampleFormat {
- "u8",
- "s16",
- "s32",
- "f32",
- "u8-planar",
- "s16-planar",
- "s32-planar",
- "f32-planar",
- };
- dictionary AudioDataCopyToOptions {
- required [EnforceRange] unsigned long planeIndex;
- [EnforceRange] unsigned long frameOffset = 0;
- [EnforceRange] unsigned long frameCount;
- AudioSampleFormat format;
- };
-
- /* ---------------------- AudioDecoder ----------------------------- */
- /* ./webidl/AudioDecoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#audiodecoder
- */
- [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
- interface AudioDecoder : EventTarget {
- [Throws]
- constructor(AudioDecoderInit init);
- readonly attribute CodecState state;
- readonly attribute unsigned long decodeQueueSize;
- attribute EventHandler ondequeue;
- [Throws]
- undefined configure(AudioDecoderConfig config);
- [Throws]
- undefined decode(EncodedAudioChunk chunk);
- [NewObject, Throws]
- Promise<undefined> flush();
- [Throws]
- undefined reset();
- [Throws]
- undefined close();
- [NewObject, Throws]
- static Promise<AudioDecoderSupport> isConfigSupported(AudioDecoderConfig config);
- };
- dictionary AudioDecoderInit {
- required AudioDataOutputCallback output;
- required WebCodecsErrorCallback error;
- };
- callback AudioDataOutputCallback = undefined(AudioData output);
- dictionary AudioDecoderSupport {
- boolean supported;
- AudioDecoderConfig config;
- };
- dictionary AudioDecoderConfig {
- required DOMString codec;
- required [EnforceRange] unsigned long sampleRate;
- required [EnforceRange] unsigned long numberOfChannels;
- // Bug 1696216: Should be AllowSharedBufferSource
- ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description;
- };
-
- /* ---------------------- AudioDestinationNode ----------------------------- */
- /* ./webidl/AudioDestinationNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioDestinationNode : AudioNode {
- readonly attribute unsigned long maxChannelCount;
- };
-
- /* ---------------------- AudioEncoder ----------------------------- */
- /* ./webidl/AudioEncoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#audioencoder
- * Some members of this API are codec-specific, in which case the source of the
- * IDL are in the codec-specific registry entries, that are listed in
- * https://w3c.github.io/webcodecs/codec_registry.html. Those members are
- * commented with a link of the document in which the member is listed.
- */
- dictionary AudioEncoderSupport {
- boolean supported;
- AudioEncoderConfig config;
- };
- dictionary AudioEncoderConfig {
- required DOMString codec;
- [EnforceRange] unsigned long sampleRate;
- [EnforceRange] unsigned long numberOfChannels;
- [EnforceRange] unsigned long long bitrate;
- BitrateMode bitrateMode = "variable";
- OpusEncoderConfig opus;
- };
- // Opus specific configuration options:
- // https://w3c.github.io/webcodecs/opus_codec_registration.html
- enum OpusBitstreamFormat {
- "opus",
- "ogg",
- };
- dictionary OpusEncoderConfig {
- OpusBitstreamFormat format = "opus";
- [EnforceRange] unsigned long long frameDuration = 20000;
- [EnforceRange] unsigned long complexity;
- [EnforceRange] unsigned long packetlossperc = 0;
- boolean useinbandfec = false;
- boolean usedtx = false;
- };
- [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
- interface AudioEncoder : EventTarget {
- [Throws]
- constructor(AudioEncoderInit init);
- readonly attribute CodecState state;
- readonly attribute unsigned long encodeQueueSize;
- attribute EventHandler ondequeue;
- [Throws]
- undefined configure(AudioEncoderConfig config);
- [Throws, BinaryName="AudioEncoder::EncodeAudioData"]
- undefined encode(AudioData data);
- [Throws]
- Promise<undefined> flush();
- [Throws]
- undefined reset();
- [Throws]
- undefined close();
- [NewObject, Throws]
- static Promise<AudioEncoderSupport> isConfigSupported(AudioEncoderConfig config);
- };
- dictionary AudioEncoderInit {
- required EncodedAudioChunkOutputCallback output;
- required WebCodecsErrorCallback error;
- };
- callback EncodedAudioChunkOutputCallback =
- undefined (EncodedAudioChunk output,
- optional EncodedAudioChunkMetadata metadata = {});
- dictionary EncodedAudioChunkMetadata {
- AudioDecoderConfig decoderConfig;
- };
-
- /* ---------------------- AudioListener ----------------------------- */
- /* ./webidl/AudioListener.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioListener {
- // Uses a 3D cartesian coordinate system
- undefined setPosition(double x, double y, double z);
- undefined setOrientation(double x, double y, double z, double xUp, double yUp, double zUp);
- };
-
- /* ---------------------- AudioNode ----------------------------- */
- /* ./webidl/AudioNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum ChannelCountMode {
- "max",
- "clamped-max",
- "explicit"
- };
- enum ChannelInterpretation {
- "speakers",
- "discrete"
- };
- dictionary AudioNodeOptions {
- unsigned long channelCount;
- ChannelCountMode channelCountMode;
- ChannelInterpretation channelInterpretation;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioNode : EventTarget {
- [Throws]
- AudioNode connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
- [Throws]
- undefined connect(AudioParam destination, optional unsigned long output = 0);
- [Throws]
- undefined disconnect();
- [Throws]
- undefined disconnect(unsigned long output);
- [Throws]
- undefined disconnect(AudioNode destination);
- [Throws]
- undefined disconnect(AudioNode destination, unsigned long output);
- [Throws]
- undefined disconnect(AudioNode destination, unsigned long output, unsigned long input);
- [Throws]
- undefined disconnect(AudioParam destination);
- [Throws]
- undefined disconnect(AudioParam destination, unsigned long output);
- readonly attribute BaseAudioContext context;
- readonly attribute unsigned long numberOfInputs;
- readonly attribute unsigned long numberOfOutputs;
- // Channel up-mixing and down-mixing rules for all inputs.
- [SetterThrows]
- attribute unsigned long channelCount;
- [SetterThrows, BinaryName="channelCountModeValue"]
- attribute ChannelCountMode channelCountMode;
- [SetterThrows, BinaryName="channelInterpretationValue"]
- attribute ChannelInterpretation channelInterpretation;
- };
- // Mozilla extension
- partial interface AudioNode {
- [ChromeOnly]
- readonly attribute unsigned long id;
- };
- interface mixin AudioNodePassThrough {
- [ChromeOnly]
- attribute boolean passThrough;
- };
-
- /* ---------------------- AudioParam ----------------------------- */
- /* ./webidl/AudioParam.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#enumdef-automationrate
- * https://webaudio.github.io/web-audio-api/#audioparam
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum AutomationRate {
- "a-rate",
- "k-rate"
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioParam {
- [SetterThrows]
- attribute float value;
- readonly attribute float defaultValue;
- readonly attribute float minValue;
- readonly attribute float maxValue;
- // Parameter automation.
- [Throws]
- AudioParam setValueAtTime(float value, double startTime);
- [Throws]
- AudioParam linearRampToValueAtTime(float value, double endTime);
- [Throws]
- AudioParam exponentialRampToValueAtTime(float value, double endTime);
- // Exponentially approach the target value with a rate having the given time constant.
- [Throws]
- AudioParam setTargetAtTime(float target, double startTime, double timeConstant);
- // Sets an array of arbitrary parameter values starting at time for the given duration.
- // The number of values will be scaled to fit into the desired duration.
- [Throws]
- AudioParam setValueCurveAtTime(sequence<float> values, double startTime, double duration);
- // Cancels all scheduled parameter changes with times greater than or equal to startTime.
- [Throws]
- AudioParam cancelScheduledValues(double startTime);
- };
- // Mozilla extension
- partial interface AudioParam {
- // The ID of the AudioNode this AudioParam belongs to.
- [ChromeOnly]
- readonly attribute unsigned long parentNodeId;
- // The name of the AudioParam
- [ChromeOnly]
- readonly attribute DOMString name;
- };
- partial interface AudioParam {
- // This attribute is used for mochitest only.
- [ChromeOnly]
- readonly attribute boolean isTrackSuspended;
- };
-
- /* ---------------------- AudioParamDescriptor ----------------------------- */
- /* ./webidl/AudioParamDescriptor.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#dictdef-audioparamdescriptor
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [GenerateInit]
- dictionary AudioParamDescriptor {
- required DOMString name;
- float defaultValue = 0;
- float minValue = -3.4028235e38;
- float maxValue = 3.4028235e38;
- // AutomationRate for AudioWorklet is not needed until bug 1504984 is
- // implemented
- // AutomationRate automationRate = "a-rate";
- };
-
- /* ---------------------- AudioParamMap ----------------------------- */
- /* ./webidl/AudioParamMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#audioparammap
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext, Exposed=Window]
- interface AudioParamMap {
- readonly maplike<DOMString, AudioParam>;
- };
-
- /* ---------------------- AudioProcessingEvent ----------------------------- */
- /* ./webidl/AudioProcessingEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface AudioProcessingEvent : Event {
- readonly attribute double playbackTime;
- [Throws]
- readonly attribute AudioBuffer inputBuffer;
- [Throws]
- readonly attribute AudioBuffer outputBuffer;
- };
-
- /* ---------------------- AudioScheduledSourceNode ----------------------------- */
- /* ./webidl/AudioScheduledSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#idl-def-AudioScheduledSourceNode
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface AudioScheduledSourceNode : AudioNode {
- attribute EventHandler onended;
- [Throws]
- undefined start (optional double when = 0);
- [Throws]
- undefined stop (optional double when = 0);
- };
-
- /* ---------------------- AudioTrack ----------------------------- */
- /* ./webidl/AudioTrack.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#audiotrack
- */
- [Pref="media.track.enabled",
- Exposed=Window]
- interface AudioTrack {
- readonly attribute DOMString id;
- readonly attribute DOMString kind;
- readonly attribute DOMString label;
- readonly attribute DOMString language;
- attribute boolean enabled;
- };
-
- /* ---------------------- AudioTrackList ----------------------------- */
- /* ./webidl/AudioTrackList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist
- */
- [Pref="media.track.enabled",
- Exposed=Window]
- interface AudioTrackList : EventTarget {
- readonly attribute unsigned long length;
- getter AudioTrack (unsigned long index);
- AudioTrack? getTrackById(DOMString id);
- attribute EventHandler onchange;
- attribute EventHandler onaddtrack;
- attribute EventHandler onremovetrack;
- };
-
- /* ---------------------- AudioWorklet ----------------------------- */
- /* ./webidl/AudioWorklet.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window, SecureContext]
- interface AudioWorklet : Worklet {
- };
-
- /* ---------------------- AudioWorkletGlobalScope ----------------------------- */
- /* ./webidl/AudioWorkletGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#audioworkletglobalscope
- */
- callback constructor AudioWorkletProcessorConstructor = AudioWorkletProcessor (object options);
- [Global=(Worklet,AudioWorklet),Exposed=AudioWorklet]
- interface AudioWorkletGlobalScope : WorkletGlobalScope {
- [Throws]
- undefined registerProcessor (DOMString name, AudioWorkletProcessorConstructor processorCtor);
- readonly attribute unsigned long long currentFrame;
- readonly attribute double currentTime;
- readonly attribute float sampleRate;
- };
-
- /* ---------------------- AudioWorkletNode ----------------------------- */
- /* ./webidl/AudioWorkletNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [GenerateConversionToJS]
- dictionary AudioWorkletNodeOptions : AudioNodeOptions {
- unsigned long numberOfInputs = 1;
- unsigned long numberOfOutputs = 1;
- sequence<unsigned long> outputChannelCount;
- record<DOMString, double> parameterData;
- object processorOptions;
- };
- [SecureContext, Exposed=Window]
- interface AudioWorkletNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, DOMString name,
- optional AudioWorkletNodeOptions options = {});
- [Throws]
- readonly attribute AudioParamMap parameters;
- readonly attribute MessagePort port;
- attribute EventHandler onprocessorerror;
- };
-
- /* ---------------------- AudioWorkletProcessor ----------------------------- */
- /* ./webidl/AudioWorkletProcessor.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#audioworkletprocessor
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=AudioWorklet]
- interface AudioWorkletProcessor {
- [Throws]
- constructor();
- readonly attribute MessagePort port;
- };
-
- /* ---------------------- AutocompleteInfo ----------------------------- */
- /* ./webidl/AutocompleteInfo.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * This dictionary is used for the input, textarea and select element's
- * getAutocompleteInfo method.
- */
- dictionary AutocompleteInfo {
- DOMString section = "";
- DOMString addressType = "";
- DOMString contactType = "";
- DOMString fieldName = "";
- DOMString credentialType = "";
- boolean canAutomaticallyPersist = true;
- };
-
- /* ---------------------- BarProp ----------------------------- */
- /* ./webidl/BarProp.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface BarProp
- {
- [Throws, NeedsCallerType]
- attribute boolean visible;
- };
-
- /* ---------------------- BaseAudioContext ----------------------------- */
- /* ./webidl/BaseAudioContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/#idl-def-BaseAudioContext
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- callback DecodeSuccessCallback = undefined (AudioBuffer decodedData);
- callback DecodeErrorCallback = undefined (DOMException error);
- enum AudioContextState {
- "suspended",
- "running",
- "closed"
- };
- [Exposed=Window]
- interface BaseAudioContext : EventTarget {
- readonly attribute AudioDestinationNode destination;
- readonly attribute float sampleRate;
- readonly attribute double currentTime;
- readonly attribute AudioListener listener;
- readonly attribute AudioContextState state;
- [Throws, SameObject, SecureContext]
- readonly attribute AudioWorklet audioWorklet;
- [NewObject]
- Promise<undefined> resume();
- attribute EventHandler onstatechange;
- [NewObject, Throws]
- AudioBuffer createBuffer (unsigned long numberOfChannels,
- unsigned long length,
- float sampleRate);
- [NewObject]
- Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData,
- optional DecodeSuccessCallback successCallback,
- optional DecodeErrorCallback errorCallback);
- // AudioNode creation
- [NewObject]
- AudioBufferSourceNode createBufferSource();
- [NewObject]
- ConstantSourceNode createConstantSource();
- [NewObject, Throws]
- ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
- optional unsigned long numberOfInputChannels = 2,
- optional unsigned long numberOfOutputChannels = 2);
- [NewObject, Throws]
- AnalyserNode createAnalyser();
- [NewObject, Throws]
- GainNode createGain();
- [NewObject, Throws]
- DelayNode createDelay(optional double maxDelayTime = 1); // TODO: no = 1
- [NewObject, Throws]
- BiquadFilterNode createBiquadFilter();
- [NewObject, Throws]
- IIRFilterNode createIIRFilter(sequence<double> feedforward, sequence<double> feedback);
- [NewObject, Throws]
- WaveShaperNode createWaveShaper();
- [NewObject, Throws]
- PannerNode createPanner();
- [NewObject, Throws]
- StereoPannerNode createStereoPanner();
- [NewObject, Throws]
- ConvolverNode createConvolver();
- [NewObject, Throws]
- ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
- [NewObject, Throws]
- ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
- [NewObject, Throws]
- DynamicsCompressorNode createDynamicsCompressor();
- [NewObject, Throws]
- OscillatorNode createOscillator();
- [NewObject, Throws]
- PeriodicWave createPeriodicWave(sequence<float> real,
- sequence<float> imag,
- optional PeriodicWaveConstraints constraints = {});
- };
-
- /* ---------------------- BaseKeyframeTypes ----------------------------- */
- /* ./webidl/BaseKeyframeTypes.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#the-compositeoperation-enumeration
- * https://drafts.csswg.org/web-animations/#dictdef-basepropertyindexedkeyframe
- * https://drafts.csswg.org/web-animations/#dictdef-basekeyframe
- * https://drafts.csswg.org/web-animations/#dictdef-basecomputedkeyframe
- *
- * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum CompositeOperation { "replace", "add", "accumulate" };
- // NOTE: The order of the values in this enum are important.
- //
- // We assume that CompositeOperation is a subset of CompositeOperationOrAuto so
- // that we can cast between the two types (provided the value is not "auto").
- //
- // If that assumption ceases to hold we will need to update the conversion
- // in KeyframeUtils::GetAnimationPropertiesFromKeyframes.
- enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
- // The following dictionary types are not referred to by other .webidl files,
- // but we use it for manual JS->IDL and IDL->JS conversions in KeyframeEffect's
- // implementation.
- [GenerateInit]
- dictionary BasePropertyIndexedKeyframe {
- (double? or sequence<double?>) offset = [];
- (UTF8String or sequence<UTF8String>) easing = [];
- (CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
- };
- [GenerateInit]
- dictionary BaseKeyframe {
- double? offset = null;
- UTF8String easing = "linear";
- [Pref="dom.animations-api.compositing.enabled"]
- CompositeOperationOrAuto composite = "auto";
- // Non-standard extensions
- // Member to allow testing when StyleAnimationValue::ComputeValues fails.
- //
- // Note that we currently only apply this to shorthand properties since
- // it's easier to annotate shorthand property values and because we have
- // only ever observed ComputeValues failing on shorthand values.
- //
- // Bug 1216844 should remove this member since after that bug is fixed we will
- // have a well-defined behavior to use when animation endpoints are not
- // available.
- [ChromeOnly] boolean simulateComputeValuesFailure = false;
- };
- [GenerateConversionToJS]
- dictionary BaseComputedKeyframe : BaseKeyframe {
- double computedOffset;
- };
-
- /* ---------------------- BasicCardPayment ----------------------------- */
- /* ./webidl/BasicCardPayment.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://www.w3.org/TR/payment-method-basic-card/
- */
- [GenerateInit]
- dictionary BasicCardRequest {
- sequence<DOMString> supportedNetworks = [];
- boolean requestSecurityCode = true;
- };
- [GenerateConversionToJS]
- dictionary BasicCardResponse {
- DOMString cardholderName = "";
- required DOMString cardNumber;
- DOMString expiryMonth = "";
- DOMString expiryYear = "";
- DOMString cardSecurityCode = "";
- PaymentAddress? billingAddress = null;
- };
- [GenerateConversionToJS]
- dictionary BasicCardChangeDetails {
- PaymentAddress? billingAddress = null;
- };
- [GenerateInit]
- dictionary BasicCardErrors {
- DOMString cardNumber;
- DOMString cardholderName;
- DOMString cardSecurityCode;
- DOMString expiryMonth;
- DOMString expiryYear;
- AddressErrors billingAddress;
- };
-
- /* ---------------------- BatteryManager ----------------------------- */
- /* ./webidl/BatteryManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/battery-status/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [ChromeOnly, Exposed=Window]
- interface BatteryManager : EventTarget {
- readonly attribute boolean charging;
- readonly attribute unrestricted double chargingTime;
- readonly attribute unrestricted double dischargingTime;
- readonly attribute double level;
- attribute EventHandler onchargingchange;
- attribute EventHandler onchargingtimechange;
- attribute EventHandler ondischargingtimechange;
- attribute EventHandler onlevelchange;
- };
-
- /* ---------------------- BeforeUnloadEvent ----------------------------- */
- /* ./webidl/BeforeUnloadEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
- */
- [Exposed=Window]
- interface BeforeUnloadEvent : Event {
- attribute DOMString returnValue;
- };
-
- /* ---------------------- BiquadFilterNode ----------------------------- */
- /* ./webidl/BiquadFilterNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum BiquadFilterType {
- "lowpass",
- "highpass",
- "bandpass",
- "lowshelf",
- "highshelf",
- "peaking",
- "notch",
- "allpass"
- };
- dictionary BiquadFilterOptions : AudioNodeOptions {
- BiquadFilterType type = "lowpass";
- float Q = 1;
- float detune = 0;
- float frequency = 350;
- float gain = 0;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface BiquadFilterNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional BiquadFilterOptions options = {});
- attribute BiquadFilterType type;
- readonly attribute AudioParam frequency; // in Hertz
- readonly attribute AudioParam detune; // in Cents
- readonly attribute AudioParam Q; // Quality factor
- readonly attribute AudioParam gain; // in Decibels
- [Throws]
- undefined getFrequencyResponse(Float32Array frequencyHz,
- Float32Array magResponse,
- Float32Array phaseResponse);
- };
- // Mozilla extension
- BiquadFilterNode includes AudioNodePassThrough;
-
- /* ---------------------- Blob ----------------------------- */
- /* ./webidl/Blob.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/FileAPI/#blob
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- typedef (BufferSource or Blob or UTF8String) BlobPart;
- [Exposed=(Window,Worker)]
- interface Blob {
- [Throws]
- constructor(optional sequence<BlobPart> blobParts,
- optional BlobPropertyBag options = {});
- [GetterThrows]
- readonly attribute unsigned long long size;
- readonly attribute DOMString type;
- //slice Blob into byte-ranged chunks
- [Throws]
- Blob slice(optional [Clamp] long long start,
- optional [Clamp] long long end,
- optional DOMString contentType);
- // read from the Blob.
- [NewObject, Throws] ReadableStream stream();
- [NewObject] Promise<USVString> text();
- [NewObject] Promise<ArrayBuffer> arrayBuffer();
- };
- enum EndingType { "transparent", "native" };
- dictionary BlobPropertyBag {
- DOMString type = "";
- EndingType endings = "transparent";
- };
- partial interface Blob {
- // This returns the type of BlobImpl used for this Blob.
- [ChromeOnly]
- readonly attribute DOMString blobImplType;
- };
-
- /* ---------------------- BlobEvent ----------------------------- */
- /* ./webidl/BlobEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://w3c.github.io/mediacapture-record/#blobevent-section
- */
- [Exposed=Window]
- interface BlobEvent : Event
- {
- constructor(DOMString type, BlobEventInit eventInitDict);
- readonly attribute Blob data;
- };
- dictionary BlobEventInit : EventInit
- {
- required Blob data;
- };
-
- /* ---------------------- BroadcastChannel ----------------------------- */
- /* ./webidl/BroadcastChannel.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://html.spec.whatwg.org/#broadcastchannel
- */
- [Exposed=(Window,Worker)]
- interface BroadcastChannel : EventTarget {
- [Throws]
- constructor(DOMString channel);
- readonly attribute DOMString name;
- [Throws]
- undefined postMessage(any message);
- undefined close();
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
-
- /* ---------------------- BrowserElementDictionaries ----------------------------- */
- /* ./webidl/BrowserElementDictionaries.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [GenerateConversionToJS]
- dictionary OpenWindowEventDetail {
- DOMString url = "";
- DOMString name = "";
- DOMString features = "";
- Node? frameElement = null;
- boolean forceNoReferrer = false;
- };
- [GenerateConversionToJS]
- dictionary DOMWindowResizeEventDetail {
- long width = 0;
- long height = 0;
- };
-
- /* ---------------------- Cache ----------------------------- */
- /* ./webidl/Cache.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/ServiceWorker/#cache-interface
- */
- [Exposed=(Window,Worker),
- Func="nsGlobalWindowInner::CachesEnabled"]
- interface Cache {
- [NewObject]
- Promise<Response> match(RequestInfo request, optional CacheQueryOptions options = {});
- [NewObject]
- Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {});
- [NewObject, NeedsCallerType]
- Promise<undefined> add(RequestInfo request);
- [NewObject, NeedsCallerType]
- Promise<undefined> addAll(sequence<RequestInfo> requests);
- [NewObject]
- Promise<undefined> put(RequestInfo request, Response response);
- [NewObject]
- Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {});
- [NewObject]
- Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options = {});
- };
- dictionary CacheQueryOptions {
- boolean ignoreSearch = false;
- boolean ignoreMethod = false;
- boolean ignoreVary = false;
- };
- dictionary CacheBatchOperation {
- DOMString type;
- Request request;
- Response response;
- CacheQueryOptions options;
- };
-
- /* ---------------------- CacheStorage ----------------------------- */
- /* ./webidl/CacheStorage.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/ServiceWorker/#cachestorage-interface
- */
- interface Principal;
- [Exposed=(Window,Worker),
- Func="nsGlobalWindowInner::CachesEnabled"]
- interface CacheStorage {
- [Throws, ChromeOnly]
- constructor(CacheStorageNamespace namespace, Principal principal);
- [NewObject]
- Promise<Response> match(RequestInfo request, optional MultiCacheQueryOptions options = {});
- [NewObject]
- Promise<boolean> has(DOMString cacheName);
- [NewObject]
- Promise<Cache> open(DOMString cacheName);
- [NewObject]
- Promise<boolean> delete(DOMString cacheName);
- [NewObject]
- Promise<sequence<DOMString>> keys();
- };
- dictionary MultiCacheQueryOptions : CacheQueryOptions {
- DOMString cacheName;
- };
- // chrome-only, gecko specific extension
- enum CacheStorageNamespace {
- "content", "chrome"
- };
-
- /* ---------------------- CancelContentJSOptions ----------------------------- */
- /* ./webidl/CancelContentJSOptions.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- [GenerateInit]
- dictionary CancelContentJSOptions {
- long index = 0;
- URI? uri = null;
- long epoch = 0;
- };
-
- /* ---------------------- CanvasCaptureMediaStream ----------------------------- */
- /* ./webidl/CanvasCaptureMediaStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/mediacapture-fromelement/index.html
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface CanvasCaptureMediaStream : MediaStream {
- readonly attribute HTMLCanvasElement canvas;
- undefined requestFrame();
- };
-
- /* ---------------------- CanvasRenderingContext2D ----------------------------- */
- /* ./webidl/CanvasRenderingContext2D.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- enum CanvasWindingRule { "nonzero", "evenodd" };
- enum CanvasLineCap { "butt", "round", "square" };
- enum CanvasLineJoin { "round", "bevel", "miter" };
- enum CanvasTextAlign { "start", "end", "left", "right", "center" };
- enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
- enum CanvasDirection { "ltr", "rtl", "inherit" };
- enum CanvasFontKerning { "auto", "normal", "none" };
- enum CanvasFontStretch { "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" };
- enum CanvasFontVariantCaps { "normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps" };
- enum CanvasTextRendering { "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" };
- [GenerateInit]
- dictionary CanvasRenderingContext2DSettings {
- // signal if the canvas contains an alpha channel
- boolean alpha = true;
- boolean desynchronized = false;
- PredefinedColorSpace colorSpace = "srgb";
- // whether or not we're planning to do a lot of readback operations
- boolean willReadFrequently = false;
- };
- dictionary HitRegionOptions {
- Path2D? path = null;
- DOMString id = "";
- Element? control = null;
- };
- typedef (HTMLImageElement or
- SVGImageElement) HTMLOrSVGImageElement;
- typedef (HTMLOrSVGImageElement or
- HTMLCanvasElement or
- HTMLVideoElement or
- OffscreenCanvas or
- ImageBitmap or
- VideoFrame) CanvasImageSource;
- [Exposed=Window]
- interface CanvasRenderingContext2D {
- // back-reference to the canvas. Might be null if we're not
- // associated with a canvas.
- readonly attribute HTMLCanvasElement? canvas;
- CanvasRenderingContext2DSettings getContextAttributes();
- // Show the caret if appropriate when drawing
- [Func="CanvasUtils::HasDrawWindowPrivilege"]
- const unsigned long DRAWWINDOW_DRAW_CARET = 0x01;
- // Don't flush pending layout notifications that could otherwise
- // be batched up
- [Func="CanvasUtils::HasDrawWindowPrivilege"]
- const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
- // Draw scrollbars and scroll the viewport if they are present
- [Func="CanvasUtils::HasDrawWindowPrivilege"]
- const unsigned long DRAWWINDOW_DRAW_VIEW = 0x04;
- // Use the widget layer manager if available. This means hardware
- // acceleration may be used, but it might actually be slower or
- // lower quality than normal. It will however more accurately reflect
- // the pixels rendered to the screen.
- [Func="CanvasUtils::HasDrawWindowPrivilege"]
- const unsigned long DRAWWINDOW_USE_WIDGET_LAYERS = 0x08;
- // Don't synchronously decode images - draw what we have
- [Func="CanvasUtils::HasDrawWindowPrivilege"]
- const unsigned long DRAWWINDOW_ASYNC_DECODE_IMAGES = 0x10;
- /**
- * Renders a region of a window into the canvas. The contents of
- * the window's viewport are rendered, ignoring viewport clipping
- * and scrolling.
- *
- * @param x
- * @param y
- * @param w
- * @param h specify the area of the window to render, in CSS
- * pixels.
- *
- * @param backgroundColor the canvas is filled with this color
- * before we render the window into it. This color may be
- * transparent/translucent. It is given as a CSS color string
- * (e.g., rgb() or rgba()).
- *
- * @param flags Used to better control the drawWindow call.
- * Flags can be ORed together.
- *
- * Of course, the rendering obeys the current scale, transform and
- * globalAlpha values.
- *
- * Hints:
- * -- If 'rgba(0,0,0,0)' is used for the background color, the
- * drawing will be transparent wherever the window is transparent.
- * -- Top-level browsed documents are usually not transparent
- * because the user's background-color preference is applied,
- * but IFRAMEs are transparent if the page doesn't set a background.
- * -- If an opaque color is used for the background color, rendering
- * will be faster because we won't have to compute the window's
- * transparency.
- *
- * This API cannot currently be used by Web content. It is chrome
- * and Web Extensions (with a permission) only.
- */
- [Throws, NeedsSubjectPrincipal, Func="CanvasUtils::HasDrawWindowPrivilege"]
- undefined drawWindow(Window window, double x, double y, double w, double h,
- UTF8String bgColor, optional unsigned long flags = 0);
- /**
- * This causes a context that is currently using a hardware-accelerated
- * backend to fallback to a software one. All state should be preserved.
- */
- [ChromeOnly]
- undefined demote();
- };
- CanvasRenderingContext2D includes CanvasState;
- CanvasRenderingContext2D includes CanvasTransform;
- CanvasRenderingContext2D includes CanvasCompositing;
- CanvasRenderingContext2D includes CanvasImageSmoothing;
- CanvasRenderingContext2D includes CanvasFillStrokeStyles;
- CanvasRenderingContext2D includes CanvasShadowStyles;
- CanvasRenderingContext2D includes CanvasFilters;
- CanvasRenderingContext2D includes CanvasRect;
- CanvasRenderingContext2D includes CanvasDrawPath;
- CanvasRenderingContext2D includes CanvasUserInterface;
- CanvasRenderingContext2D includes CanvasText;
- CanvasRenderingContext2D includes CanvasDrawImage;
- CanvasRenderingContext2D includes CanvasImageData;
- CanvasRenderingContext2D includes CanvasPathDrawingStyles;
- CanvasRenderingContext2D includes CanvasTextDrawingStyles;
- CanvasRenderingContext2D includes CanvasPathMethods;
- interface mixin CanvasState {
- // state
- undefined save(); // push state on state stack
- undefined restore(); // pop state stack and restore state
- undefined reset(); // reset the rendering context to its default state
- boolean isContextLost(); // return whether context is lost
- };
- interface mixin CanvasTransform {
- // transformations (default transform is the identity matrix)
- [Throws, LenientFloat]
- undefined scale(double x, double y);
- [Throws, LenientFloat]
- undefined rotate(double angle);
- [Throws, LenientFloat]
- undefined translate(double x, double y);
- [Throws, LenientFloat]
- undefined transform(double a, double b, double c, double d, double e, double f);
- [NewObject, Throws] DOMMatrix getTransform();
- [Throws, LenientFloat]
- undefined setTransform(double a, double b, double c, double d, double e, double f);
- [Throws]
- undefined setTransform(optional DOMMatrix2DInit transform = {});
- [Throws]
- undefined resetTransform();
- };
- interface mixin CanvasCompositing {
- attribute unrestricted double globalAlpha; // (default 1.0)
- [Throws]
- attribute DOMString globalCompositeOperation; // (default source-over)
- };
- interface mixin CanvasImageSmoothing {
- // drawing images
- attribute boolean imageSmoothingEnabled;
- };
- interface mixin CanvasFillStrokeStyles {
- // colors and styles (see also the CanvasPathDrawingStyles interface)
- attribute (UTF8String or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
- attribute (UTF8String or CanvasGradient or CanvasPattern) fillStyle; // (default black)
- [NewObject]
- CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
- [NewObject, Throws]
- CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
- [NewObject]
- CanvasGradient createConicGradient(double angle, double cx, double cy);
- [NewObject, Throws]
- CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
- };
- interface mixin CanvasShadowStyles {
- [LenientFloat]
- attribute double shadowOffsetX; // (default 0)
- [LenientFloat]
- attribute double shadowOffsetY; // (default 0)
- [LenientFloat]
- attribute double shadowBlur; // (default 0)
- attribute UTF8String shadowColor; // (default transparent black)
- };
- interface mixin CanvasFilters {
- [SetterThrows]
- attribute UTF8String filter; // (default empty string = no filter)
- };
- interface mixin CanvasRect {
- [LenientFloat]
- undefined clearRect(double x, double y, double w, double h);
- [LenientFloat]
- undefined fillRect(double x, double y, double w, double h);
- [LenientFloat]
- undefined strokeRect(double x, double y, double w, double h);
- };
- interface mixin CanvasDrawPath {
- // path API (see also CanvasPathMethods)
- undefined beginPath();
- undefined fill(optional CanvasWindingRule winding = "nonzero");
- undefined fill(Path2D path, optional CanvasWindingRule winding = "nonzero");
- undefined stroke();
- undefined stroke(Path2D path);
- undefined clip(optional CanvasWindingRule winding = "nonzero");
- undefined clip(Path2D path, optional CanvasWindingRule winding = "nonzero");
- // NOT IMPLEMENTED undefined resetClip();
- [NeedsSubjectPrincipal]
- boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
- [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes.
- boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
- [NeedsSubjectPrincipal]
- boolean isPointInStroke(double x, double y);
- [NeedsSubjectPrincipal] // Only required because overloads can't have different extended attributes.
- boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
- };
- interface mixin CanvasUserInterface {
- [Throws] undefined drawFocusIfNeeded(Element element);
- // NOT IMPLEMENTED undefined scrollPathIntoView();
- // NOT IMPLEMENTED undefined scrollPathIntoView(Path path);
- };
- interface mixin CanvasText {
- // text (see also the CanvasPathDrawingStyles interface)
- [Throws, LenientFloat]
- undefined fillText(DOMString text, double x, double y, optional double maxWidth);
- [Throws, LenientFloat]
- undefined strokeText(DOMString text, double x, double y, optional double maxWidth);
- [NewObject, Throws]
- TextMetrics measureText(DOMString text);
- };
- interface mixin CanvasDrawImage {
- [Throws, LenientFloat]
- undefined drawImage(CanvasImageSource image, double dx, double dy);
- [Throws, LenientFloat]
- undefined drawImage(CanvasImageSource image, double dx, double dy, double dw, double dh);
- [Throws, LenientFloat]
- undefined drawImage(CanvasImageSource image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
- };
- // See https://github.com/whatwg/html/issues/6262 for [EnforceRange] usage.
- interface mixin CanvasImageData {
- // pixel manipulation
- [NewObject, Throws]
- ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh);
- [NewObject, Throws]
- ImageData createImageData(ImageData imagedata);
- [NewObject, Throws, NeedsSubjectPrincipal]
- ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh);
- [Throws]
- undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy);
- [Throws]
- undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight);
- };
- interface mixin CanvasPathDrawingStyles {
- // line caps/joins
- [LenientFloat]
- attribute double lineWidth; // (default 1)
- attribute CanvasLineCap lineCap; // (default "butt")
- attribute CanvasLineJoin lineJoin; // (default "miter")
- [LenientFloat]
- attribute double miterLimit; // (default 10)
- // dashed lines
- [LenientFloat, Throws] undefined setLineDash(sequence<double> segments); // default empty
- sequence<double> getLineDash();
- [LenientFloat] attribute double lineDashOffset;
- };
- interface mixin CanvasTextDrawingStyles {
- // text
- [SetterThrows]
- attribute UTF8String font; // (default 10px sans-serif)
- attribute CanvasTextAlign textAlign; // (default: "start")
- attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
- attribute CanvasDirection direction; // (default: "inherit")
- attribute UTF8String letterSpacing; // default: "0px"
- attribute CanvasFontKerning fontKerning; // (default: "auto")
- attribute CanvasFontStretch fontStretch; // (default: "normal")
- attribute CanvasFontVariantCaps fontVariantCaps; // (default: "normal")
- attribute CanvasTextRendering textRendering; // (default: "auto")
- attribute UTF8String wordSpacing; // default: "0px"
- };
- interface mixin CanvasPathMethods {
- // shared path API methods
- undefined closePath();
- [LenientFloat]
- undefined moveTo(double x, double y);
- [LenientFloat]
- undefined lineTo(double x, double y);
- [LenientFloat]
- undefined quadraticCurveTo(double cpx, double cpy, double x, double y);
- [LenientFloat]
- undefined bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
- [Throws, LenientFloat]
- undefined arcTo(double x1, double y1, double x2, double y2, double radius);
- // NOT IMPLEMENTED [LenientFloat] undefined arcTo(double x1, double y1, double x2, double y2, double radiusX, double radiusY, double rotation);
- [LenientFloat]
- undefined rect(double x, double y, double w, double h);
- [Throws]
- 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);
- [Throws, LenientFloat]
- undefined arc(double x, double y, double radius, double startAngle, double endAngle, optional boolean anticlockwise = false);
- [Throws, LenientFloat]
- undefined ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, optional boolean anticlockwise = false);
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface CanvasGradient {
- // opaque object
- [Throws]
- // addColorStop should take a double
- undefined addColorStop(float offset, UTF8String color);
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface CanvasPattern {
- // opaque object
- // [Throws, LenientFloat] - could not do this overload because of bug 1020975
- // undefined setTransform(double a, double b, double c, double d, double e, double f);
- [Throws]
- undefined setTransform(optional DOMMatrix2DInit matrix = {});
- };
- [Exposed=(Window,Worker)]
- interface TextMetrics {
- // x-direction
- readonly attribute double width; // advance width
- // [experimental] actualBoundingBox* attributes
- [Pref="dom.textMetrics.actualBoundingBox.enabled"]
- readonly attribute double actualBoundingBoxLeft;
- [Pref="dom.textMetrics.actualBoundingBox.enabled"]
- readonly attribute double actualBoundingBoxRight;
- // y-direction
- // [experimental] fontBoundingBox* attributes
- [Pref="dom.textMetrics.fontBoundingBox.enabled"]
- readonly attribute double fontBoundingBoxAscent;
- [Pref="dom.textMetrics.fontBoundingBox.enabled"]
- readonly attribute double fontBoundingBoxDescent;
- // [experimental] actualBoundingBox* attributes
- [Pref="dom.textMetrics.actualBoundingBox.enabled"]
- readonly attribute double actualBoundingBoxAscent;
- [Pref="dom.textMetrics.actualBoundingBox.enabled"]
- readonly attribute double actualBoundingBoxDescent;
- // [experimental] emHeight* attributes
- [Pref="dom.textMetrics.emHeight.enabled"]
- readonly attribute double emHeightAscent;
- [Pref="dom.textMetrics.emHeight.enabled"]
- readonly attribute double emHeightDescent;
- // [experimental] *Baseline attributes
- [Pref="dom.textMetrics.baselines.enabled"]
- readonly attribute double hangingBaseline;
- [Pref="dom.textMetrics.baselines.enabled"]
- readonly attribute double alphabeticBaseline;
- [Pref="dom.textMetrics.baselines.enabled"]
- readonly attribute double ideographicBaseline;
- };
- [Exposed=(Window,Worker)]
- interface Path2D
- {
- constructor();
- constructor(Path2D other);
- constructor(DOMString pathString);
- [Throws] undefined addPath(Path2D path, optional DOMMatrix2DInit transform = {});
- };
- Path2D includes CanvasPathMethods;
-
- /* ---------------------- CaretPosition ----------------------------- */
- /* ./webidl/CaretPosition.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Exposed=Window]
- interface CaretPosition {
- /**
- * The offsetNode could potentially be null due to anonymous content.
- */
- readonly attribute Node? offsetNode;
- readonly attribute unsigned long offset;
- };
- /**
- * Gecko specific methods and properties for CaretPosition.
- */
- partial interface CaretPosition {
- DOMRect? getClientRect();
- };
-
- /* ---------------------- CaretStateChangedEvent ----------------------------- */
- /* ./webidl/CaretStateChangedEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- enum CaretChangedReason {
- "visibilitychange",
- "updateposition",
- "longpressonemptycontent",
- "taponcaret",
- "presscaret",
- "releasecaret",
- "scroll",
- "dragcaret"
- };
- dictionary CaretStateChangedEventInit : EventInit {
- boolean collapsed = true;
- DOMRectReadOnly? boundingClientRect = null;
- CaretChangedReason reason = "visibilitychange";
- boolean caretVisible = false;
- boolean caretVisuallyVisible = false;
- boolean selectionVisible = false;
- boolean selectionEditable = false;
- DOMString selectedTextContent = "";
- long clientX = 0;
- long clientY = 0;
- };
- [ChromeOnly,
- Exposed=Window]
- interface CaretStateChangedEvent : Event {
- constructor(DOMString type,
- optional CaretStateChangedEventInit eventInit = {});
- readonly attribute boolean collapsed;
- /* The bounding client rect is relative to the visual viewport. */
- readonly attribute DOMRectReadOnly? boundingClientRect;
- readonly attribute CaretChangedReason reason;
- readonly attribute boolean caretVisible;
- readonly attribute boolean caretVisuallyVisible;
- readonly attribute boolean selectionVisible;
- readonly attribute boolean selectionEditable;
- readonly attribute DOMString selectedTextContent;
- [Pref="layout.accessiblecaret.magnifier.enabled"]
- readonly attribute long clientX;
- [Pref="layout.accessiblecaret.magnifier.enabled"]
- readonly attribute long clientY;
- };
-
- /* ---------------------- CDATASection ----------------------------- */
- /* ./webidl/CDATASection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface CDATASection : Text {
- };
-
- /* ---------------------- ChannelMergerNode ----------------------------- */
- /* ./webidl/ChannelMergerNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary ChannelMergerOptions : AudioNodeOptions {
- unsigned long numberOfInputs = 6;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface ChannelMergerNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional ChannelMergerOptions options = {});
- };
-
- /* ---------------------- ChannelSplitterNode ----------------------------- */
- /* ./webidl/ChannelSplitterNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary ChannelSplitterOptions : AudioNodeOptions {
- unsigned long numberOfOutputs = 6;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface ChannelSplitterNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional ChannelSplitterOptions options = {});
- };
-
- /* ---------------------- CharacterData ----------------------------- */
- /* ./webidl/CharacterData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#characterdata
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface CharacterData : Node {
- [Pure, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString data;
- [Pure]
- readonly attribute unsigned long length;
- [Throws]
- DOMString substringData(unsigned long offset, unsigned long count);
- [Throws]
- undefined appendData(DOMString data);
- [Throws]
- undefined insertData(unsigned long offset, DOMString data);
- [Throws]
- undefined deleteData(unsigned long offset, unsigned long count);
- [Throws]
- undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
- };
- CharacterData includes ChildNode;
- CharacterData includes NonDocumentTypeChildNode;
-
- /* ---------------------- CheckerboardReportService ----------------------------- */
- /* ./webidl/CheckerboardReportService.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * This file declares data structures used to communicate checkerboard reports
- * from C++ code to about:checkerboard (see bug 1238042). These dictionaries
- * are NOT exposed to standard web content.
- */
- enum CheckerboardReason {
- "severe",
- "recent"
- };
- // Individual checkerboard report. Contains fields for the severity of the
- // checkerboard event, the timestamp at which it was reported, the detailed
- // log of the event, and the reason this report was saved (currently either
- // "severe" or "recent").
- dictionary CheckerboardReport {
- unsigned long severity;
- DOMTimeStamp timestamp; // milliseconds since epoch
- DOMString log;
- CheckerboardReason reason;
- };
- // The guard function only allows creation of this interface on the
- // about:checkerboard page, and only if it's in the parent process.
- [Func="mozilla::dom::CheckerboardReportService::IsEnabled",
- Exposed=Window]
- interface CheckerboardReportService {
- constructor();
- /**
- * Gets the available checkerboard reports.
- */
- sequence<CheckerboardReport> getReports();
- /**
- * Gets the state of the apz.record_checkerboarding pref.
- */
- boolean isRecordingEnabled();
- /**
- * Sets the state of the apz.record_checkerboarding pref.
- */
- undefined setRecordingEnabled(boolean aEnabled);
- /**
- * Flush any in-progress checkerboard reports. Since this happens
- * asynchronously, the caller may register an observer with the observer
- * service to be notified when this operation is complete. The observer should
- * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving
- * this notification, the caller may call getReports() to obtain the flushed
- * reports, along with any other reports that are available.
- */
- undefined flushActiveReports();
- };
-
- /* ---------------------- ChildNode ----------------------------- */
- /* ./webidl/ChildNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#interface-childnode
- */
- interface mixin ChildNode {
- [CEReactions, Throws, Unscopable]
- undefined before((Node or DOMString)... nodes);
- [CEReactions, Throws, Unscopable]
- undefined after((Node or DOMString)... nodes);
- [CEReactions, Throws, Unscopable]
- undefined replaceWith((Node or DOMString)... nodes);
- [CEReactions, Unscopable]
- undefined remove();
- };
- interface mixin NonDocumentTypeChildNode {
- [Pure]
- readonly attribute Element? previousElementSibling;
- [Pure]
- readonly attribute Element? nextElementSibling;
- };
-
- /* ---------------------- Client ----------------------------- */
- /* ./webidl/Client.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/ServiceWorker/#client-interface
- *
- */
- [Exposed=ServiceWorker]
- interface Client {
- readonly attribute USVString url;
- // Remove frameType in bug 1290936
- [BinaryName="GetFrameType"]
- readonly attribute FrameType frameType;
- readonly attribute ClientType type;
- readonly attribute DOMString id;
- // Implement reserved in bug 1264177
- // readonly attribute boolean reserved;
- [Throws]
- undefined postMessage(any message, sequence<object> transfer);
- [Throws]
- undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {});
- };
- [Exposed=ServiceWorker]
- interface WindowClient : Client {
- [BinaryName="GetVisibilityState"]
- readonly attribute VisibilityState visibilityState;
- readonly attribute boolean focused;
- // Implement ancestorOrigins in bug 1264180
- // [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins;
- [Throws, NewObject, NeedsCallerType]
- Promise<WindowClient> focus();
- [Throws, NewObject]
- Promise<WindowClient> navigate(USVString url);
- };
- // Remove FrameType in bug 1290936
- enum FrameType {
- "auxiliary",
- "top-level",
- "nested",
- "none"
- };
-
- /* ---------------------- Clients ----------------------------- */
- /* ./webidl/Clients.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
- *
- */
- [Exposed=ServiceWorker]
- interface Clients {
- // The objects returned will be new instances every time
- [NewObject]
- Promise<(Client or undefined)> get(DOMString id);
- [NewObject]
- Promise<sequence<Client>> matchAll(optional ClientQueryOptions options = {});
- [NewObject]
- Promise<WindowClient?> openWindow(USVString url);
- [NewObject]
- Promise<undefined> claim();
- };
- dictionary ClientQueryOptions {
- boolean includeUncontrolled = false;
- ClientType type = "window";
- };
- enum ClientType {
- "window",
- "worker",
- "sharedworker",
- // https://github.com/w3c/ServiceWorker/issues/1036
- "serviceworker",
- "all"
- };
-
- /* ---------------------- Clipboard ----------------------------- */
- /* ./webidl/Clipboard.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/clipboard-apis/
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- typedef sequence<ClipboardItem> ClipboardItems;
- [SecureContext,
- Exposed=Window,
- InstrumentedProps=(read,readText,write)]
- interface Clipboard : EventTarget {
- [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal]
- Promise<ClipboardItems> read();
- [Func="Clipboard::ReadTextEnabled", NewObject, NeedsSubjectPrincipal]
- Promise<DOMString> readText();
- [Pref="dom.events.asyncClipboard.clipboardItem", NewObject, NeedsSubjectPrincipal]
- Promise<undefined> write(ClipboardItems data);
- [NewObject, NeedsSubjectPrincipal]
- Promise<undefined> writeText(DOMString data);
- };
- typedef (DOMString or Blob) ClipboardItemDataType;
- typedef Promise<ClipboardItemDataType> ClipboardItemData;
- // callback ClipboardItemDelayedCallback = ClipboardItemData ();
- [SecureContext, Exposed=Window, Pref="dom.events.asyncClipboard.clipboardItem"]
- interface ClipboardItem {
- [Throws]
- constructor(record<DOMString, ClipboardItemData> items,
- optional ClipboardItemOptions options = {});
- // static ClipboardItem createDelayed(
- // record<DOMString, ClipboardItemDelayedCallback> items,
- // optional ClipboardItemOptions options = {});
- readonly attribute PresentationStyle presentationStyle;
- // readonly attribute long long lastModified;
- // readonly attribute boolean delayed;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- // readonly attribute FrozenArray<DOMString> types;
- [Frozen, Cached, Pure]
- readonly attribute sequence<DOMString> types;
- [NewObject]
- Promise<Blob> getType(DOMString type);
- };
- enum PresentationStyle { "unspecified", "inline", "attachment" };
- dictionary ClipboardItemOptions {
- PresentationStyle presentationStyle = "unspecified";
- };
-
- /* ---------------------- ClipboardEvent ----------------------------- */
- /* ./webidl/ClipboardEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/clipops/#x5-clipboard-event-interfaces
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface ClipboardEvent : Event
- {
- [Throws]
- constructor(DOMString type, optional ClipboardEventInit eventInitDict = {});
- readonly attribute DataTransfer? clipboardData;
- };
- dictionary ClipboardEventInit : EventInit
- {
- DOMString data = "";
- DOMString dataType = "";
- };
-
- /* ---------------------- CloseEvent ----------------------------- */
- /* ./webidl/CloseEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The nsIDOMCloseEvent interface is the interface to the event
- * close on a WebSocket object.
- *
- * For more information on this interface, please see
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
- */
- [LegacyEventInit,
- Exposed=(Window,Worker)]
- interface CloseEvent : Event
- {
- constructor(DOMString type, optional CloseEventInit eventInitDict = {});
- readonly attribute boolean wasClean;
- readonly attribute unsigned short code;
- readonly attribute DOMString reason;
- };
- dictionary CloseEventInit : EventInit
- {
- boolean wasClean = false;
- unsigned short code = 0;
- DOMString reason = "";
- };
-
- /* ---------------------- Comment ----------------------------- */
- /* ./webidl/Comment.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#comment
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface Comment : CharacterData {
- [Throws]
- constructor(optional DOMString data = "");
- };
-
- /* ---------------------- CompositionEvent ----------------------------- */
- /* ./webidl/CompositionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://w3c.github.io/uievents/#interface-compositionevent
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface CompositionEvent : UIEvent
- {
- constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
- readonly attribute DOMString? data;
- // locale is currently non-standard
- readonly attribute DOMString locale;
- /**
- * ranges is trying to expose TextRangeArray in Gecko so a
- * js-plugin couble be able to know the clauses information
- */
- [ChromeOnly,Cached,Pure]
- readonly attribute sequence<TextClause> ranges;
- };
- dictionary CompositionEventInit : UIEventInit {
- DOMString data = "";
- };
- partial interface CompositionEvent
- {
- undefined initCompositionEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional Window? viewArg = null,
- optional DOMString? dataArg = null,
- optional DOMString localeArg = "");
- };
-
- /* ---------------------- CompressionStream ----------------------------- */
- /* ./webidl/CompressionStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://wicg.github.io/compression/#compression-stream
- */
- enum CompressionFormat {
- "deflate",
- "deflate-raw",
- "gzip",
- };
- [Exposed=*, Pref="dom.compression_streams.enabled"]
- interface CompressionStream {
- [Throws]
- constructor(CompressionFormat format);
- };
- CompressionStream includes GenericTransformStream;
-
- /* ---------------------- Console ----------------------------- */
- /* ./webidl/Console.webidl */
-
- /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* vim: set ts=2 et sw=2 tw=80: */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://console.spec.whatwg.org/#console-namespace
- */
- [Exposed=(Window,Worker,WorkerDebugger,Worklet),
- ClassString="Console",
- ProtoObjectHack]
- namespace console {
- // NOTE: if you touch this namespace, remember to update the ConsoleInstance
- // interface as well! - dom/chrome-webidl/ConsoleInstance.webidl
- // Logging
- [UseCounter]
- undefined assert(optional boolean condition = false, any... data);
- [UseCounter]
- undefined clear();
- [UseCounter]
- undefined count(optional DOMString label = "default");
- [UseCounter]
- undefined countReset(optional DOMString label = "default");
- [UseCounter]
- undefined debug(any... data);
- [UseCounter]
- undefined error(any... data);
- [UseCounter]
- undefined info(any... data);
- [UseCounter]
- undefined log(any... data);
- [UseCounter]
- undefined table(any... data); // FIXME: The spec is still unclear about this.
- [UseCounter]
- undefined trace(any... data);
- [UseCounter]
- undefined warn(any... data);
- [UseCounter]
- undefined dir(any... data); // FIXME: This doesn't follow the spec yet.
- [UseCounter]
- undefined dirxml(any... data);
- // Grouping
- [UseCounter]
- undefined group(any... data);
- [UseCounter]
- undefined groupCollapsed(any... data);
- [UseCounter]
- undefined groupEnd();
- // Timing
- [UseCounter]
- undefined time(optional DOMString label = "default");
- [UseCounter]
- undefined timeLog(optional DOMString label = "default", any... data);
- [UseCounter]
- undefined timeEnd(optional DOMString label = "default");
- // Mozilla only or Webcompat methods
- [UseCounter]
- undefined _exception(any... data);
- [UseCounter]
- undefined timeStamp(optional any data);
- [UseCounter]
- undefined profile(any... data);
- [UseCounter]
- undefined profileEnd(any... data);
- [ChromeOnly]
- const boolean IS_NATIVE_CONSOLE = true;
- [ChromeOnly, NewObject]
- ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {});
- };
-
- /* ---------------------- ConstantSourceNode ----------------------------- */
- /* ./webidl/ConstantSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary ConstantSourceOptions {
- float offset = 1;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface ConstantSourceNode : AudioScheduledSourceNode {
- constructor(BaseAudioContext context,
- optional ConstantSourceOptions options = {});
- readonly attribute AudioParam offset;
- };
-
- /* ---------------------- ContentVisibilityAutoStateChangeEvent ----------------------------- */
- /* ./webidl/ContentVisibilityAutoStateChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://drafts.csswg.org/css-contain-2/#content-visibility-auto-state-changed
- */
- [Exposed=Window, Pref="layout.css.content-visibility.enabled"]
- interface ContentVisibilityAutoStateChangeEvent : Event {
- constructor(DOMString type,
- optional ContentVisibilityAutoStateChangeEventInit eventInitDict = {});
- readonly attribute boolean skipped;
- };
- dictionary ContentVisibilityAutoStateChangeEventInit : EventInit {
- boolean skipped = false;
- };
-
- /* ---------------------- ConvolverNode ----------------------------- */
- /* ./webidl/ConvolverNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary ConvolverOptions : AudioNodeOptions {
- AudioBuffer? buffer;
- boolean disableNormalization = false;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface ConvolverNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, optional
- ConvolverOptions options = {});
- [SetterThrows]
- attribute AudioBuffer? buffer;
- attribute boolean normalize;
- };
- // Mozilla extension
- ConvolverNode includes AudioNodePassThrough;
-
- /* ---------------------- CreateOfferRequest ----------------------------- */
- /* ./webidl/CreateOfferRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This is an internal IDL file
- */
- [ChromeOnly,
- JSImplementation="@mozilla.org/dom/createofferrequest;1",
- Exposed=Window]
- interface CreateOfferRequest {
- readonly attribute unsigned long long windowID;
- readonly attribute unsigned long long innerWindowID;
- readonly attribute DOMString callID;
- readonly attribute boolean isSecure;
- };
-
- /* ---------------------- CredentialManagement ----------------------------- */
- /* ./webidl/CredentialManagement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webappsec-credential-management/
- * and
- * https://w3c.github.io/webauthn/
- * and
- * https://fedidcg.github.io/FedCM/
- */
- [Exposed=Window, SecureContext]
- interface Credential {
- readonly attribute USVString id;
- readonly attribute DOMString type;
- };
- [Exposed=Window, SecureContext]
- interface CredentialsContainer {
- [NewObject]
- Promise<Credential?> get(optional CredentialRequestOptions options = {});
- [NewObject]
- Promise<Credential?> create(optional CredentialCreationOptions options = {});
- [NewObject]
- Promise<Credential> store(Credential credential);
- [NewObject]
- Promise<undefined> preventSilentAccess();
- };
- dictionary CredentialRequestOptions {
- CredentialMediationRequirement mediation = "optional";
- AbortSignal signal;
- // This is taken from the partial definition in
- // https://w3c.github.io/webauthn/#sctn-credentialrequestoptions-extension
- [Pref="security.webauth.webauthn"]
- PublicKeyCredentialRequestOptions publicKey;
- // This is taken from the partial definition in
- // https://fedidcg.github.io/FedCM/#browser-api-credential-request-options
- [Pref="dom.security.credentialmanagement.identity.enabled"]
- IdentityCredentialRequestOptions identity;
- };
- enum CredentialMediationRequirement {
- "silent",
- "optional",
- "conditional",
- "required"
- };
- dictionary CredentialCreationOptions {
- // This is taken from the partial definition in
- // https://w3c.github.io/webauthn/#sctn-credentialcreationoptions-extension
- [Pref="security.webauth.webauthn"]
- PublicKeyCredentialCreationOptions publicKey;
- AbortSignal signal;
- };
-
- /* ---------------------- Crypto ----------------------------- */
- /* ./webidl/Crypto.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface
- */
- [Exposed=(Window,Worker)]
- interface mixin GlobalCrypto {
- [Throws] readonly attribute Crypto crypto;
- };
- [Exposed=(Window,Worker)]
- interface Crypto {
- [SecureContext]
- readonly attribute SubtleCrypto subtle;
- [Throws]
- ArrayBufferView getRandomValues(ArrayBufferView array);
- [SecureContext]
- UTF8String randomUUID();
- };
-
- /* ---------------------- CSPDictionaries ----------------------------- */
- /* ./webidl/CSPDictionaries.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * Dictionary used to display CSP info.
- */
- dictionary CSP {
- boolean report-only = false;
- sequence<DOMString> default-src;
- sequence<DOMString> script-src;
- sequence<DOMString> object-src;
- sequence<DOMString> style-src;
- sequence<DOMString> img-src;
- sequence<DOMString> media-src;
- sequence<DOMString> frame-src;
- sequence<DOMString> font-src;
- sequence<DOMString> connect-src;
- sequence<DOMString> report-uri;
- sequence<DOMString> frame-ancestors;
- // sequence<DOMString> reflected-xss; // not supported in Firefox
- sequence<DOMString> base-uri;
- sequence<DOMString> form-action;
- sequence<DOMString> referrer;
- sequence<DOMString> manifest-src;
- sequence<DOMString> upgrade-insecure-requests;
- sequence<DOMString> child-src;
- sequence<DOMString> block-all-mixed-content;
- sequence<DOMString> sandbox;
- sequence<DOMString> worker-src;
- sequence<DOMString> script-src-elem;
- sequence<DOMString> script-src-attr;
- };
- [GenerateToJSON]
- dictionary CSPPolicies {
- sequence<CSP> csp-policies;
- };
-
- /* ---------------------- CSPReport ----------------------------- */
- /* ./webidl/CSPReport.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * This dictionary holds the parameters used to send
- * CSP reports in JSON format.
- *
- * Based on https://w3c.github.io/webappsec-csp/#deprecated-serialize-violation
- */
- dictionary CSPReportProperties {
- DOMString document-uri = "";
- DOMString referrer = "";
- DOMString blocked-uri = "";
- DOMString effective-directive = "";
- DOMString violated-directive = "";
- DOMString original-policy= "";
- SecurityPolicyViolationEventDisposition disposition = "report";
- long status-code = 0;
- DOMString source-file;
- DOMString script-sample;
- long line-number;
- long column-number;
- };
- [GenerateToJSON]
- dictionary CSPReport {
- // We always want to have a "csp-report" property, so just pre-initialize it
- // to an empty dictionary..
- CSPReportProperties csp-report = {};
- };
-
- /* ---------------------- CSS ----------------------------- */
- /* ./webidl/CSS.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css3-conditional/
- * http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
- * https://www.w3.org/TR/css-highlight-api-1/#registration
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- namespace CSS {
- boolean supports(UTF8String property, UTF8String value);
- boolean supports(UTF8String conditionText);
- };
- // http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
- partial namespace CSS {
- DOMString escape(DOMString ident);
- };
- // https://www.w3.org/TR/css-highlight-api-1/#registration
- partial namespace CSS {
- [Pref="dom.customHighlightAPI.enabled", GetterThrows]
- readonly attribute HighlightRegistry highlights;
- };
- // https://drafts.css-houdini.org/css-properties-values-api-1/#registering-custom-properties
- // See https://github.com/w3c/css-houdini-drafts/pull/1100 for DOMString vs. UTF8String
- dictionary PropertyDefinition {
- required UTF8String name;
- UTF8String syntax = "*";
- required boolean inherits;
- UTF8String initialValue;
- };
- partial namespace CSS {
- [Pref="layout.css.properties-and-values.enabled", Throws]
- undefined registerProperty(PropertyDefinition definition);
- };
-
- /* ---------------------- CSSAnimation ----------------------------- */
- /* ./webidl/CSSAnimation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-animations-2/#the-CSSAnimation-interface
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [HeaderFile="nsAnimationManager.h", Exposed=Window]
- interface CSSAnimation : Animation {
- [Constant] readonly attribute DOMString animationName;
- };
-
- /* ---------------------- CSSConditionRule ----------------------------- */
- /* ./webidl/CSSConditionRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
- */
- // https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
- [Exposed=Window]
- interface CSSConditionRule : CSSGroupingRule {
- readonly attribute UTF8String conditionText;
- };
-
- /* ---------------------- CSSContainerRule ----------------------------- */
- /* ./webidl/CSSContainerRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
- */
- // https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
- [Exposed=Window, Pref="layout.css.container-queries.enabled"]
- interface CSSContainerRule : CSSConditionRule {
- readonly attribute UTF8String containerName;
- readonly attribute UTF8String containerQuery;
- // Performs a container query look-up for an element.
- [ChromeOnly] Element? queryContainerFor(Element element);
- };
-
- /* ---------------------- CSSCounterStyleRule ----------------------------- */
- /* ./webidl/CSSCounterStyleRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
- */
- // https://drafts.csswg.org/css-counter-styles-3/#the-csscounterstylerule-interface
- [Exposed=Window]
- interface CSSCounterStyleRule : CSSRule {
- attribute DOMString name;
- attribute UTF8String system;
- attribute UTF8String symbols;
- attribute UTF8String additiveSymbols;
- attribute UTF8String negative;
- attribute UTF8String prefix;
- attribute UTF8String suffix;
- attribute UTF8String range;
- attribute UTF8String pad;
- attribute UTF8String speakAs;
- attribute UTF8String fallback;
- };
-
- /* ---------------------- CSSFontFaceRule ----------------------------- */
- /* ./webidl/CSSFontFaceRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-fonts/#om-fontface
- */
- // https://drafts.csswg.org/css-fonts/#om-fontface
- // But we implement a very old draft, apparently....
- // See bug 1058408 for implementing the current spec.
- [Exposed=Window]
- interface CSSFontFaceRule : CSSRule {
- [SameObject] readonly attribute CSSStyleDeclaration style;
- };
-
- /* ---------------------- CSSFontFeatureValuesRule ----------------------------- */
- /* ./webidl/CSSFontFeatureValuesRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
- */
- // https://drafts.csswg.org/css-fonts/#om-fontfeaturevalues
- // but we don't implement anything remotely resembling the spec.
- [Exposed=Window]
- interface CSSFontFeatureValuesRule : CSSRule {
- [SetterThrows]
- attribute UTF8String fontFamily;
- // Not yet implemented
- // readonly attribute CSSFontFeatureValuesMap annotation;
- // readonly attribute CSSFontFeatureValuesMap ornaments;
- // readonly attribute CSSFontFeatureValuesMap stylistic;
- // readonly attribute CSSFontFeatureValuesMap swash;
- // readonly attribute CSSFontFeatureValuesMap characterVariant;
- // readonly attribute CSSFontFeatureValuesMap styleset;
- };
- partial interface CSSFontFeatureValuesRule {
- // Gecko addition?
- [SetterThrows]
- attribute UTF8String valueText;
- };
-
- /* ---------------------- CSSFontPaletteValuesRule ----------------------------- */
- /* ./webidl/CSSFontPaletteValuesRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-fonts/#om-fontpalettevalues
- */
- [Exposed=Window, Pref="layout.css.font-palette.enabled"]
- interface CSSFontPaletteValuesRule : CSSRule {
- readonly attribute UTF8String name;
- readonly attribute UTF8String fontFamily;
- readonly attribute UTF8String basePalette;
- readonly attribute UTF8String overrideColors;
- };
-
- /* ---------------------- CSSGroupingRule ----------------------------- */
- /* ./webidl/CSSGroupingRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#cssgroupingrule
- */
- // https://drafts.csswg.org/cssom/#cssgroupingrule
- [Exposed=Window]
- interface CSSGroupingRule : CSSRule {
- [SameObject] readonly attribute CSSRuleList cssRules;
- [Throws]
- unsigned long insertRule(UTF8String rule, optional unsigned long index = 0);
- [Throws]
- undefined deleteRule(unsigned long index);
- };
-
- /* ---------------------- CSSImportRule ----------------------------- */
- /* ./webidl/CSSImportRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#cssimportrule
- */
- // https://drafts.csswg.org/cssom/#cssimportrule
- [Exposed=Window]
- interface CSSImportRule : CSSRule {
- readonly attribute DOMString href;
- // Per spec, the .media is never null, but in our implementation it can
- // be since stylesheet can be null, and in Stylo, media is derived from
- // the stylesheet. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
- [SameObject, PutForwards=mediaText] readonly attribute MediaList? media;
- [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet;
- readonly attribute UTF8String? layerName;
- readonly attribute UTF8String? supportsText;
- };
-
- /* ---------------------- CSSKeyframeRule ----------------------------- */
- /* ./webidl/CSSKeyframeRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-animations/#interface-csskeyframerule
- */
- // https://drafts.csswg.org/css-animations/#interface-csskeyframerule
- [Exposed=Window]
- interface CSSKeyframeRule : CSSRule {
- attribute UTF8String keyText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
- };
-
- /* ---------------------- CSSKeyframesRule ----------------------------- */
- /* ./webidl/CSSKeyframesRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
- */
- // https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
- [Exposed=Window]
- interface CSSKeyframesRule : CSSRule {
- attribute DOMString name;
- readonly attribute CSSRuleList cssRules;
- getter CSSKeyframeRule (unsigned long index);
- readonly attribute unsigned long length;
- undefined appendRule(DOMString rule);
- undefined deleteRule(DOMString select);
- CSSKeyframeRule? findRule(DOMString select);
- };
-
- /* ---------------------- CSSLayerBlockRule ----------------------------- */
- /* ./webidl/CSSLayerBlockRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-cascade-5/#the-csslayerblockrule-interface
- */
- [Exposed=Window]
- interface CSSLayerBlockRule : CSSGroupingRule {
- readonly attribute UTF8String name;
- };
-
- /* ---------------------- CSSLayerStatementRule ----------------------------- */
- /* ./webidl/CSSLayerStatementRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface
- */
- [Exposed=Window]
- interface CSSLayerStatementRule : CSSRule {
- // readonly attribute FrozenArray<CSSOMString> nameList;
- [Frozen, Cached, Pure]
- readonly attribute sequence<UTF8String> nameList;
- };
-
- /* ---------------------- CSSMediaRule ----------------------------- */
- /* ./webidl/CSSMediaRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#the-cssmediarule-interface
- * https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
- */
- // https://drafts.csswg.org/cssom/#the-cssmediarule-interface and
- // https://drafts.csswg.org/css-conditional/#the-cssmediarule-interface
- // except they disagree with each other. We're taking the inheritance from
- // css-conditional and the PutForwards behavior from cssom.
- [Exposed=Window]
- interface CSSMediaRule : CSSConditionRule {
- [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
- };
-
- /* ---------------------- CSSMozDocumentRule ----------------------------- */
- /* ./webidl/CSSMozDocumentRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // This is a non-standard interface for @-moz-document rules
- [Exposed=Window]
- interface CSSMozDocumentRule : CSSConditionRule {
- // XXX Add access to the URL list.
- };
-
- /* ---------------------- CSSNamespaceRule ----------------------------- */
- /* ./webidl/CSSNamespaceRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#cssnamespacerule
- */
- // https://drafts.csswg.org/cssom/#cssnamespacerule
- [Exposed=Window]
- interface CSSNamespaceRule : CSSRule {
- readonly attribute DOMString namespaceURI;
- readonly attribute DOMString prefix;
- };
-
- /* ---------------------- CSSPageRule ----------------------------- */
- /* ./webidl/CSSPageRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#the-csspagerule-interface
- */
- // https://drafts.csswg.org/cssom/#the-csspagerule-interface
- // Per spec, this should inherit from CSSGroupingRule, but we don't
- // implement this yet.
- [Exposed=Window]
- interface CSSPageRule : CSSRule {
- attribute UTF8String selectorText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
- };
-
- /* ---------------------- CSSPropertyRule ----------------------------- */
- /* ./webidl/CSSPropertyRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface
- */
- // https://drafts.css-houdini.org/css-properties-values-api-1/#the-css-property-rule-interface
- [Exposed=Window, Pref="layout.css.properties-and-values.enabled"]
- interface CSSPropertyRule : CSSRule {
- readonly attribute UTF8String name;
- readonly attribute UTF8String syntax;
- readonly attribute boolean inherits;
- readonly attribute UTF8String? initialValue;
- };
-
- /* ---------------------- CSSPseudoElement ----------------------------- */
- /* ./webidl/CSSPseudoElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-pseudo-4/#csspseudoelement
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.css_pseudo_element.enabled",
- Exposed=Window]
- interface CSSPseudoElement {
- readonly attribute DOMString type;
- readonly attribute Element element;
- };
-
- /* ---------------------- CSSRule ----------------------------- */
- /* ./webidl/CSSRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#the-cssrule-interface
- * https://drafts.csswg.org/css-animations/#interface-cssrule
- * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
- * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
- * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
- */
- // https://drafts.csswg.org/cssom/#the-cssrule-interface
- [Exposed=Window]
- interface CSSRule {
- const unsigned short STYLE_RULE = 1;
- const unsigned short CHARSET_RULE = 2; // historical
- const unsigned short IMPORT_RULE = 3;
- const unsigned short MEDIA_RULE = 4;
- const unsigned short FONT_FACE_RULE = 5;
- const unsigned short PAGE_RULE = 6;
- // FIXME: We don't support MARGIN_RULE yet.
- // XXXbz Should we expose the constant anyway?
- // const unsigned short MARGIN_RULE = 9;
- const unsigned short NAMESPACE_RULE = 10;
- [BinaryName="typeForBindings"] readonly attribute unsigned short type;
- attribute UTF8String cssText;
- readonly attribute CSSRule? parentRule;
- readonly attribute CSSStyleSheet? parentStyleSheet;
- };
- // https://drafts.csswg.org/css-animations/#interface-cssrule
- partial interface CSSRule {
- const unsigned short KEYFRAMES_RULE = 7;
- const unsigned short KEYFRAME_RULE = 8;
- };
- // https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
- partial interface CSSRule {
- const unsigned short COUNTER_STYLE_RULE = 11;
- };
- // https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
- partial interface CSSRule {
- const unsigned short SUPPORTS_RULE = 12;
- };
- // Non-standard extension for @-moz-document rules.
- partial interface CSSRule {
- [ChromeOnly]
- const unsigned short DOCUMENT_RULE = 13;
- };
- // https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
- partial interface CSSRule {
- const unsigned short FONT_FEATURE_VALUES_RULE = 14;
- };
-
- /* ---------------------- CSSRuleList ----------------------------- */
- /* ./webidl/CSSRuleList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface CSSRuleList {
- readonly attribute unsigned long length;
- getter CSSRule? item(unsigned long index);
- };
-
- /* ---------------------- CSSScopeRule ----------------------------- */
- /* ./webidl/CSSScopeRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-cascade-6/#the-cssscoperule-interface
- */
- [Exposed=Window, Pref="layout.css.at-scope.enabled"]
- interface CSSScopeRule : CSSGroupingRule {
- readonly attribute UTF8String? start;
- readonly attribute UTF8String? end;
- };
-
- /* ---------------------- CSSStyleDeclaration ----------------------------- */
- /* ./webidl/CSSStyleDeclaration.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom/
- */
- // Because of getComputedStyle, many CSSStyleDeclaration objects can be
- // short-living.
- [ProbablyShortLivingWrapper,
- Exposed=Window]
- interface CSSStyleDeclaration {
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute UTF8String cssText;
- readonly attribute unsigned long length;
- getter UTF8String item(unsigned long index);
- [Throws, ChromeOnly]
- sequence<UTF8String> getCSSImageURLs(UTF8String property);
- [ChromeOnly]
- readonly attribute float usedFontSize;
- UTF8String getPropertyValue(UTF8String property);
- UTF8String getPropertyPriority(UTF8String property);
- [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
- undefined setProperty(UTF8String property, [LegacyNullToEmptyString] UTF8String value, optional [LegacyNullToEmptyString] UTF8String priority = "");
- [CEReactions, Throws]
- UTF8String removeProperty(UTF8String property);
- readonly attribute CSSRule? parentRule;
- };
-
- /* ---------------------- CSSStyleRule ----------------------------- */
- /* ./webidl/CSSStyleRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom/#the-cssstylerule-interface
- */
- // https://drafts.csswg.org/cssom/#the-cssstylerule-interface
- [Exposed=Window]
- interface CSSStyleRule : CSSGroupingRule {
- attribute UTF8String selectorText;
- [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
- [ChromeOnly] readonly attribute unsigned long selectorCount;
- [ChromeOnly] UTF8String selectorTextAt(unsigned long index, optional boolean desugared = false);
- [ChromeOnly] unsigned long long selectorSpecificityAt(unsigned long index, optional boolean desugared = false);
- [ChromeOnly] boolean selectorMatchesElement(
- unsigned long selectorIndex,
- Element element,
- optional [LegacyNullToEmptyString] DOMString pseudo = "",
- optional boolean includeVisitedStyle = false);
- [ChromeOnly] sequence<SelectorWarning> getSelectorWarnings();
- };
- enum SelectorWarningKind {
- "UnconstrainedHas",
- };
- dictionary SelectorWarning {
- required unsigned long index;
- required SelectorWarningKind kind;
- };
-
- /* ---------------------- CSSStyleSheet ----------------------------- */
- /* ./webidl/CSSStyleSheet.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom/
- * https://wicg.github.io/construct-stylesheets/
- */
- enum CSSStyleSheetParsingMode {
- "author",
- "user",
- "agent"
- };
- dictionary CSSStyleSheetInit {
- (MediaList or UTF8String) media = "";
- boolean disabled = false;
- UTF8String baseURL;
- };
- [Exposed=Window]
- interface CSSStyleSheet : StyleSheet {
- [Throws]
- constructor(optional CSSStyleSheetInit options = {});
- [Pure, BinaryName="DOMOwnerRule"]
- readonly attribute CSSRule? ownerRule;
- [Throws, NeedsSubjectPrincipal]
- readonly attribute CSSRuleList cssRules;
- [ChromeOnly, BinaryName="parsingModeDOM"]
- readonly attribute CSSStyleSheetParsingMode parsingMode;
- [Throws, NeedsSubjectPrincipal]
- unsigned long insertRule(UTF8String rule, optional unsigned long index = 0);
- [Throws, NeedsSubjectPrincipal]
- undefined deleteRule(unsigned long index);
- [NewObject]
- Promise<CSSStyleSheet> replace(UTF8String text);
- [Throws]
- undefined replaceSync(UTF8String text);
- // Non-standard WebKit things.
- [Throws, NeedsSubjectPrincipal, BinaryName="cssRules"]
- readonly attribute CSSRuleList rules;
- [Throws, NeedsSubjectPrincipal, BinaryName="deleteRule"]
- undefined removeRule(optional unsigned long index = 0);
- [Throws, NeedsSubjectPrincipal]
- long addRule(optional UTF8String selector = "undefined", optional UTF8String style = "undefined", optional unsigned long index);
- };
-
- /* ---------------------- CSSSupportsRule ----------------------------- */
- /* ./webidl/CSSSupportsRule.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
- */
- // https://drafts.csswg.org/css-conditional/#the-csssupportsrule-interface
- [Exposed=Window]
- interface CSSSupportsRule : CSSConditionRule {
- };
-
- /* ---------------------- CSSTransition ----------------------------- */
- /* ./webidl/CSSTransition.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-transitions-2/#the-CSSTransition-interface
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [HeaderFile="nsTransitionManager.h", Exposed=Window]
- interface CSSTransition : Animation {
- [Constant] readonly attribute DOMString transitionProperty;
- };
-
- /* ---------------------- CustomElementRegistry ----------------------------- */
- /* ./webidl/CustomElementRegistry.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- // https://html.spec.whatwg.org/#dom-window-customelements
- [Exposed=Window]
- interface CustomElementRegistry {
- [CEReactions, Throws, UseCounter]
- undefined define(DOMString name, CustomElementConstructor constructor,
- optional ElementDefinitionOptions options = {});
- [ChromeOnly, Throws]
- undefined setElementCreationCallback(DOMString name, CustomElementCreationCallback callback);
- (CustomElementConstructor or undefined) get(DOMString name);
- DOMString? getName(CustomElementConstructor constructor);
- [Throws]
- Promise<CustomElementConstructor> whenDefined(DOMString name);
- [CEReactions] undefined upgrade(Node root);
- };
- dictionary ElementDefinitionOptions {
- DOMString extends;
- };
- enum RestoreReason {
- "restore",
- "autocomplete",
- };
- callback constructor CustomElementConstructor = any ();
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback CustomElementCreationCallback = undefined (DOMString name);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleConnectedCallback = undefined();
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleDisconnectedCallback = undefined();
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleAdoptedCallback = undefined(Document? oldDocument,
- Document? newDocment);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleAttributeChangedCallback = undefined(DOMString attrName,
- DOMString? oldValue,
- DOMString? newValue,
- DOMString? namespaceURI);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleFormAssociatedCallback = undefined(HTMLFormElement? form);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleFormResetCallback = undefined();
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleFormDisabledCallback = undefined(boolean disabled);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleFormStateRestoreCallback = undefined((File or USVString or FormData)? state, RestoreReason reason);
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback LifecycleGetCustomInterfaceCallback = object?(any iid);
- // Unsorted is necessary until https://github.com/whatwg/html/issues/3580 is resolved.
- [GenerateInit, Unsorted]
- dictionary LifecycleCallbacks {
- LifecycleConnectedCallback connectedCallback;
- LifecycleDisconnectedCallback disconnectedCallback;
- LifecycleAdoptedCallback adoptedCallback;
- LifecycleAttributeChangedCallback attributeChangedCallback;
- [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback;
- };
- [GenerateInit, Unsorted]
- dictionary FormAssociatedLifecycleCallbacks {
- LifecycleFormAssociatedCallback formAssociatedCallback;
- LifecycleFormResetCallback formResetCallback;
- LifecycleFormDisabledCallback formDisabledCallback;
- LifecycleFormStateRestoreCallback formStateRestoreCallback;
- };
-
- /* ---------------------- CustomEvent ----------------------------- */
- /* ./webidl/CustomEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window, Worker)]
- interface CustomEvent : Event
- {
- constructor(DOMString type, optional CustomEventInit eventInitDict = {});
- readonly attribute any detail;
- // initCustomEvent is a Gecko specific deprecated method.
- undefined initCustomEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional any detail = null);
- };
- dictionary CustomEventInit : EventInit
- {
- any detail = null;
- };
-
- /* ---------------------- DataTransfer ----------------------------- */
- /* ./webidl/DataTransfer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
- */
- interface ContentSecurityPolicy;
- [Exposed=Window]
- interface DataTransfer {
- constructor();
- attribute DOMString dropEffect;
- attribute DOMString effectAllowed;
- readonly attribute DataTransferItemList items;
- undefined setDragImage(Element image, long x, long y);
- [Frozen, Cached, Pure, NeedsCallerType]
- readonly attribute sequence<DOMString> types;
- [Throws, NeedsSubjectPrincipal]
- DOMString getData(DOMString format);
- [Throws, NeedsSubjectPrincipal]
- undefined setData(DOMString format, DOMString data);
- [Throws, NeedsSubjectPrincipal]
- undefined clearData(optional DOMString format);
- [NeedsSubjectPrincipal]
- readonly attribute FileList? files;
- };
- // Mozilla specific stuff
- partial interface DataTransfer {
- /*
- * Set the drag source. Usually you would not change this, but it will
- * affect which node the drag and dragend events are fired at. The
- * default target is the node that was dragged.
- *
- * @param element drag source to use
- * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
- */
- [Throws, UseCounter]
- undefined addElement(Element element);
- /**
- * The number of items being dragged.
- */
- [ChromeOnly]
- readonly attribute unsigned long mozItemCount;
- /**
- * Sets the drag cursor state. Primarily used to control the cursor during
- * tab drags, but could be expanded to other uses. XXX Currently implemented
- * on Win32 only.
- *
- * Possible values:
- * auto - use default system behavior.
- * default - set the cursor to an arrow during the drag operation.
- *
- * Values other than 'default' are indentical to setting mozCursor to
- * 'auto'.
- */
- [UseCounter]
- attribute DOMString mozCursor;
- /**
- * Holds a list of the format types of the data that is stored for an item
- * at the specified index. If the index is not in the range from 0 to
- * itemCount - 1, an empty string list is returned.
- */
- [Throws, ChromeOnly]
- DOMStringList mozTypesAt(unsigned long index);
- /**
- * Remove the data associated with the given format for an item at the
- * specified index. The index is in the range from zero to itemCount - 1.
- *
- * If the last format for the item is removed, the entire item is removed,
- * reducing the itemCount by one.
- *
- * If format is empty, then the data associated with all formats is removed.
- * If the format is not found, then this method has no effect.
- *
- * @param format the format to remove
- * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
- * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
- */
- [Throws, ChromeOnly]
- undefined mozClearDataAt(DOMString format, unsigned long index);
- /*
- * A data transfer may store multiple items, each at a given zero-based
- * index. setDataAt may only be called with an index argument less than
- * itemCount in which case an existing item is modified, or equal to
- * itemCount in which case a new item is added, and the itemCount is
- * incremented by one.
- *
- * Data should be added in order of preference, with the most specific
- * format added first and the least specific format added last. If data of
- * the given format already exists, it is replaced in the same position as
- * the old data.
- *
- * The data should be either a string, a primitive boolean or number type
- * (which will be converted into a string) or an nsISupports.
- *
- * @param format the format to add
- * @param data the data to add
- * @throws NS_ERROR_NULL_POINTER if the data is null
- * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater than itemCount
- * @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
- */
- [Throws, ChromeOnly]
- undefined mozSetDataAt(DOMString format, any data, unsigned long index);
- /**
- * Retrieve the data associated with the given format for an item at the
- * specified index, or null if it does not exist. The index should be in the
- * range from zero to itemCount - 1.
- *
- * @param format the format of the data to look up
- * @returns the data of the given format, or null if it doesn't exist.
- * @throws NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
- */
- [Throws, ChromeOnly]
- any mozGetDataAt(DOMString format, unsigned long index);
- /**
- * Update the drag image. Arguments are the same as setDragImage. This is only
- * valid within the parent chrome process.
- */
- [ChromeOnly]
- undefined updateDragImage(Element image, long x, long y);
- /**
- * Will be true when the user has cancelled the drag (typically by pressing
- * Escape) and when the drag has been cancelled unexpectedly. This will be
- * false otherwise, including when the drop has been rejected by its target.
- * This property is only relevant for the dragend event.
- */
- [UseCounter]
- readonly attribute boolean mozUserCancelled;
- /**
- * The node that the mouse was pressed over to begin the drag. For external
- * drags, or if the caller cannot access this node, this will be null.
- */
- [UseCounter]
- readonly attribute Node? mozSourceNode;
- /**
- * The top-level window context that mouse was pressed over to begin the drag.
- * For external drags, this will be null.
- */
- [ChromeOnly]
- readonly attribute WindowContext? sourceTopWindowContext;
- /**
- * The URI spec of the triggering principal. This may be different than
- * sourceNode's principal when sourceNode is xul:browser and the drag is
- * triggered in a browsing context inside it.
- */
- [ChromeOnly]
- readonly attribute DOMString mozTriggeringPrincipalURISpec;
- [ChromeOnly]
- readonly attribute ContentSecurityPolicy? mozCSP;
- /**
- * Copy the given DataTransfer for the given event. Used by testing code for
- * creating emulated Drag and Drop events in the UI.
- *
- * NOTE: Don't expose a DataTransfer produced with this method to the web or
- * use this for non-testing purposes. It can easily be used to get the
- * DataTransfer into an invalid state, and is an unstable implementation
- * detail of EventUtils.synthesizeDrag.
- */
- [Throws, ChromeOnly]
- DataTransfer mozCloneForEvent(DOMString event);
- /**
- * Whether to show the "fail" animation that returns a dragged item
- * to its source. Only works on macOS, and has to be set early in the drag
- * on that platform.
- * Defaults to true.
- */
- [ChromeOnly]
- attribute boolean mozShowFailAnimation;
- };
-
- /* ---------------------- DataTransferItem ----------------------------- */
- /* ./webidl/DataTransferItem.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitem-interface
- * https://wicg.github.io/entries-api/#idl-index
- */
- [InstrumentedProps=(webkitGetAsEntry),Exposed=Window]
- interface DataTransferItem {
- readonly attribute DOMString kind;
- readonly attribute DOMString type;
- [Throws, NeedsSubjectPrincipal]
- undefined getAsString(FunctionStringCallback? callback);
- [Throws, NeedsSubjectPrincipal]
- File? getAsFile();
- };
- callback FunctionStringCallback = undefined (DOMString data);
- // https://wicg.github.io/entries-api/#idl-index
- partial interface DataTransferItem {
- [Pref="dom.webkitBlink.filesystem.enabled", BinaryName="getAsEntry", Throws,
- NeedsSubjectPrincipal]
- FileSystemEntry? webkitGetAsEntry();
- };
-
- /* ---------------------- DataTransferItemList ----------------------------- */
- /* ./webidl/DataTransferItemList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransferitemlist-interface
- */
- [Exposed=Window]
- interface DataTransferItemList {
- readonly attribute unsigned long length;
- getter DataTransferItem (unsigned long index);
- [Throws, NeedsSubjectPrincipal]
- DataTransferItem? add(DOMString data, DOMString type);
- [Throws, NeedsSubjectPrincipal]
- DataTransferItem? add(File data);
- [Throws, NeedsSubjectPrincipal]
- undefined remove(unsigned long index);
- [Throws, NeedsSubjectPrincipal]
- undefined clear();
- };
-
- /* ---------------------- DecoderDoctorNotification ----------------------------- */
- /* ./webidl/DecoderDoctorNotification.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- enum DecoderDoctorNotificationType {
- "cannot-play",
- "platform-decoder-not-found",
- "can-play-but-some-missing-decoders",
- "cannot-initialize-pulseaudio",
- "unsupported-libavcodec",
- "decode-error",
- "decode-warning",
- };
- enum DecoderDoctorReportType {
- "mediawidevinenowmf",
- "mediawmfneeded",
- "mediaplatformdecodernotfound",
- "mediacannotplaynodecoders",
- "medianodecoders",
- "mediacannotinitializepulseaudio",
- "mediaunsupportedlibavcodec",
- "mediadecodeerror",
- "mediadecodewarning",
- };
- [GenerateToJSON]
- dictionary DecoderDoctorNotification {
- required DecoderDoctorNotificationType type;
- // True when the issue has been solved.
- required boolean isSolved;
- // Key from dom.properties, used for telemetry and prefs.
- required DOMString decoderDoctorReportId;
- // If provided, formats (or key systems) at issue.
- DOMString formats;
- // If provided, technical details about the decode-error/warning.
- DOMString decodeIssue;
- // If provided, URL of the document where the issue happened.
- DOMString docURL;
- // If provided, URL of the media resource that caused a decode-error/warning.
- DOMString resourceURL;
- };
-
- /* ---------------------- DecompressionStream ----------------------------- */
- /* ./webidl/DecompressionStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://wicg.github.io/compression/#decompression-stream
- */
- [Exposed=*, Pref="dom.compression_streams.enabled"]
- interface DecompressionStream {
- [Throws]
- constructor(CompressionFormat format);
- };
- DecompressionStream includes GenericTransformStream;
-
- /* ---------------------- DedicatedWorkerGlobalScope ----------------------------- */
- /* ./webidl/DedicatedWorkerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
- * Software ASA.
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Global=(Worker,DedicatedWorker),
- Exposed=DedicatedWorker]
- interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
- [Replaceable]
- readonly attribute DOMString name;
- [Throws]
- undefined postMessage(any message, sequence<object> transfer);
- [Throws]
- undefined postMessage(any message, optional StructuredSerializeOptions options = {});
- undefined close();
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
- // https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-methods
- partial interface DedicatedWorkerGlobalScope {
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled"] attribute EventHandler onrtctransform;
- };
- // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
- DedicatedWorkerGlobalScope includes AnimationFrameProvider;
-
- /* ---------------------- DelayNode ----------------------------- */
- /* ./webidl/DelayNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary DelayOptions : AudioNodeOptions {
- double maxDelayTime = 1;
- double delayTime = 0;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface DelayNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, optional DelayOptions options = {});
- readonly attribute AudioParam delayTime;
- };
- // Mozilla extension
- DelayNode includes AudioNodePassThrough;
-
- /* ---------------------- DeviceLightEvent ----------------------------- */
- /* ./webidl/DeviceLightEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="device.sensors.ambientLight.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
- Exposed=Window]
- interface DeviceLightEvent : Event
- {
- constructor(DOMString type, optional DeviceLightEventInit eventInitDict = {});
- readonly attribute unrestricted double value;
- };
- dictionary DeviceLightEventInit : EventInit
- {
- unrestricted double value = Infinity;
- };
-
- /* ---------------------- DeviceMotionEvent ----------------------------- */
- /* ./webidl/DeviceMotionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://w3c.github.io/deviceorientation/
- */
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface DeviceAcceleration {
- readonly attribute double? x;
- readonly attribute double? y;
- readonly attribute double? z;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface DeviceRotationRate {
- readonly attribute double? alpha;
- readonly attribute double? beta;
- readonly attribute double? gamma;
- };
- [Pref="device.sensors.motion.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
- Exposed=Window]
- interface DeviceMotionEvent : Event {
- constructor(DOMString type,
- optional DeviceMotionEventInit eventInitDict = {});
- readonly attribute DeviceAcceleration? acceleration;
- readonly attribute DeviceAcceleration? accelerationIncludingGravity;
- readonly attribute DeviceRotationRate? rotationRate;
- readonly attribute double? interval;
- };
- dictionary DeviceAccelerationInit {
- double? x = null;
- double? y = null;
- double? z = null;
- };
- dictionary DeviceRotationRateInit {
- double? alpha = null;
- double? beta = null;
- double? gamma = null;
- };
- dictionary DeviceMotionEventInit : EventInit {
- // FIXME: bug 1493860: should this "= {}" be here?
- DeviceAccelerationInit acceleration = {};
- // FIXME: bug 1493860: should this "= {}" be here?
- DeviceAccelerationInit accelerationIncludingGravity = {};
- // FIXME: bug 1493860: should this "= {}" be here?
- DeviceRotationRateInit rotationRate = {};
- double? interval = null;
- };
- // Mozilla extensions.
- partial interface DeviceMotionEvent {
- undefined initDeviceMotionEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional DeviceAccelerationInit acceleration = {},
- optional DeviceAccelerationInit accelerationIncludingGravity = {},
- optional DeviceRotationRateInit rotationRate = {},
- optional double? interval = null);
- };
-
- /* ---------------------- DeviceOrientationEvent ----------------------------- */
- /* ./webidl/DeviceOrientationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="device.sensors.orientation.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled", LegacyEventInit,
- Exposed=Window]
- interface DeviceOrientationEvent : Event
- {
- constructor(DOMString type,
- optional DeviceOrientationEventInit eventInitDict = {});
- readonly attribute double? alpha;
- readonly attribute double? beta;
- readonly attribute double? gamma;
- readonly attribute boolean absolute;
- // initDeviceOrientationEvent is a Gecko specific deprecated method.
- undefined initDeviceOrientationEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional double? alpha = null,
- optional double? beta = null,
- optional double? gamma = null,
- optional boolean absolute = false);
- };
- dictionary DeviceOrientationEventInit : EventInit
- {
- double? alpha = null;
- double? beta = null;
- double? gamma = null;
- boolean absolute = false;
- };
-
- /* ---------------------- Directory ----------------------------- */
- /* ./webidl/Directory.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * All functions on Directory that accept DOMString arguments for file or
- * directory names only allow relative path to current directory itself. The
- * path should be a descendent path like "path/to/file.txt" and not contain a
- * segment of ".." or ".". So the paths aren't allowed to walk up the directory
- * tree. For example, paths like "../foo", "..", "/foo/bar" or "foo/../bar" are
- * not allowed.
- *
- * http://w3c.github.io/filesystem-api/#idl-def-Directory
- * https://microsoftedge.github.io/directory-upload/proposal.html#directory-interface
- */
- [Exposed=(Window,Worker)]
- interface Directory {
- // This ChromeOnly constructor is used by the MockFilePicker for testing only.
- [Throws, ChromeOnly]
- constructor(DOMString path);
- /*
- * The leaf name of the directory.
- */
- [Throws]
- readonly attribute DOMString name;
- };
- [Exposed=(Window,Worker)]
- partial interface Directory {
- // Already defined in the main interface declaration:
- //readonly attribute DOMString name;
- /*
- * The path of the Directory (includes both its basename and leafname).
- * The path begins with the name of the ancestor Directory that was
- * originally exposed to content (say via a directory picker) and traversed
- * to obtain this Directory. Full filesystem paths are not exposed to
- * unprivilaged content.
- */
- [Throws]
- readonly attribute DOMString path;
- /*
- * Getter for the immediate children of this directory.
- */
- [NewObject]
- Promise<sequence<(File or Directory)>> getFilesAndDirectories();
- [NewObject]
- Promise<sequence<File>> getFiles(optional boolean recursiveFlag = false);
- };
-
- /* ---------------------- Document ----------------------------- */
- /* ./webidl/Document.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://dom.spec.whatwg.org/#interface-document
- * https://html.spec.whatwg.org/multipage/dom.html#the-document-object
- * https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
- * https://fullscreen.spec.whatwg.org/#api
- * https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
- * https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
- * https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
- * https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
- * https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
- * https://wicg.github.io/feature-policy/#policy
- * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
- */
- interface ContentSecurityPolicy;
- interface Principal;
- interface WindowProxy;
- interface nsISupports;
- interface URI;
- interface nsIDocShell;
- interface nsILoadGroup;
- interface nsIReferrerInfo;
- interface nsICookieJarSettings;
- interface nsIPermissionDelegateHandler;
- interface XULCommandDispatcher;
- enum VisibilityState { "hidden", "visible" };
- /* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
- dictionary ElementCreationOptions {
- DOMString is;
- [ChromeOnly]
- DOMString pseudo;
- };
- /* https://dom.spec.whatwg.org/#interface-document */
- [Exposed=Window,
- InstrumentedProps=(caretRangeFromPoint,
- exitPictureInPicture,
- featurePolicy,
- onbeforecopy,
- onbeforecut,
- onbeforepaste,
- oncancel,
- onfreeze,
- onmousewheel,
- onresume,
- onsearch,
- onwebkitfullscreenchange,
- onwebkitfullscreenerror,
- pictureInPictureElement,
- pictureInPictureEnabled,
- registerElement,
- wasDiscarded,
- webkitCancelFullScreen,
- webkitCurrentFullScreenElement,
- webkitExitFullscreen,
- webkitFullscreenElement,
- webkitFullscreenEnabled,
- webkitHidden,
- webkitIsFullScreen,
- webkitVisibilityState,
- xmlEncoding,
- xmlStandalone,
- xmlVersion)]
- interface Document : Node {
- [Throws]
- constructor();
- [Throws]
- readonly attribute DOMImplementation implementation;
- [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
- readonly attribute DOMString URL;
- [Pure, Throws, BinaryName="documentURIFromJS", NeedsCallerType]
- readonly attribute DOMString documentURI;
- [Pure]
- readonly attribute DOMString compatMode;
- [Pure]
- readonly attribute DOMString characterSet;
- [Pure,BinaryName="characterSet"]
- readonly attribute DOMString charset; // legacy alias of .characterSet
- [Pure,BinaryName="characterSet"]
- readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
- [Pure]
- readonly attribute DOMString contentType;
- [Pure]
- readonly attribute DocumentType? doctype;
- [Pure]
- readonly attribute Element? documentElement;
- [Pure]
- HTMLCollection getElementsByTagName(DOMString localName);
- [Pure, Throws]
- HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
- [Pure]
- HTMLCollection getElementsByClassName(DOMString classNames);
- // These DOM methods cannot be accessed by UA Widget scripts
- // because the DOM element reflectors will be in the content scope,
- // instead of the desired UA Widget scope.
- [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
- Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
- [CEReactions, NewObject, Throws, Func="IsNotUAWidget"]
- Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options = {});
- [NewObject]
- DocumentFragment createDocumentFragment();
- [NewObject, Func="IsNotUAWidget"]
- Text createTextNode(DOMString data);
- [NewObject, Func="IsNotUAWidget"]
- Comment createComment(DOMString data);
- [NewObject, Throws]
- ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node importNode(Node node, optional boolean deep = false);
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node adoptNode(Node node);
- [NewObject, Throws, NeedsCallerType]
- Event createEvent(DOMString interface);
- [NewObject, Throws]
- Range createRange();
- // NodeFilter.SHOW_ALL = 0xFFFFFFFF
- [NewObject, Throws]
- NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
- [NewObject, Throws]
- TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
- // NEW
- // No support for prepend/append yet
- // undefined prepend((Node or DOMString)... nodes);
- // undefined append((Node or DOMString)... nodes);
- // These are not in the spec, but leave them for now for backwards compat.
- // So sort of like Gecko extensions
- [NewObject, Throws]
- CDATASection createCDATASection(DOMString data);
- [NewObject, Throws]
- Attr createAttribute(DOMString name);
- [NewObject, Throws]
- Attr createAttributeNS(DOMString? namespace, DOMString name);
- };
- // https://html.spec.whatwg.org/multipage/dom.html#the-document-object
- partial interface Document {
- [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- static Document parseHTMLUnsafe(DOMString html);
- [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
- [SetterThrows] attribute DOMString domain;
- readonly attribute DOMString referrer;
- [Throws] attribute DOMString cookie;
- readonly attribute DOMString lastModified;
- readonly attribute DOMString readyState;
- // DOM tree accessors
- //(Not proxy yet)getter object (DOMString name);
- [CEReactions, SetterThrows, Pure]
- attribute DOMString title;
- [CEReactions, Pure]
- attribute DOMString dir;
- [CEReactions, Pure, SetterThrows]
- attribute HTMLElement? body;
- [Pure]
- readonly attribute HTMLHeadElement? head;
- [SameObject] readonly attribute HTMLCollection images;
- [SameObject] readonly attribute HTMLCollection embeds;
- [SameObject] readonly attribute HTMLCollection plugins;
- [SameObject] readonly attribute HTMLCollection links;
- [SameObject] readonly attribute HTMLCollection forms;
- [SameObject] readonly attribute HTMLCollection scripts;
- [Pure]
- NodeList getElementsByName(DOMString elementName);
- //(Not implemented)readonly attribute DOMElementMap cssElementMap;
- // dynamic markup insertion
- [CEReactions, Throws]
- Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
- [CEReactions, Throws]
- WindowProxy? open(USVString url, DOMString name, DOMString features);
- [CEReactions, Throws]
- undefined close();
- [CEReactions, Throws]
- undefined write(DOMString... text);
- [CEReactions, Throws]
- undefined writeln(DOMString... text);
- // user interaction
- [Pure]
- readonly attribute WindowProxy? defaultView;
- [Throws]
- boolean hasFocus();
- [CEReactions, SetterThrows, SetterNeedsSubjectPrincipal]
- attribute DOMString designMode;
- [CEReactions, Throws, NeedsSubjectPrincipal]
- boolean execCommand(DOMString commandId, optional boolean showUI = false,
- optional DOMString value = "");
- [Throws, NeedsSubjectPrincipal]
- boolean queryCommandEnabled(DOMString commandId);
- [Throws]
- boolean queryCommandIndeterm(DOMString commandId);
- [Throws]
- boolean queryCommandState(DOMString commandId);
- [Throws, NeedsCallerType]
- boolean queryCommandSupported(DOMString commandId);
- [Throws]
- DOMString queryCommandValue(DOMString commandId);
- //(Not implemented)readonly attribute HTMLCollection commands;
- // special event handler IDL attributes that only apply to Document objects
- [LegacyLenientThis] attribute EventHandler onreadystatechange;
- // Gecko extensions?
- attribute EventHandler onbeforescriptexecute;
- attribute EventHandler onafterscriptexecute;
- /**
- * True if this document is synthetic : stand alone image, video, audio file,
- * etc.
- */
- [Func="IsChromeOrUAWidget"] readonly attribute boolean mozSyntheticDocument;
- /**
- * Returns the script element whose script is currently being processed.
- *
- * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
- */
- [Pure]
- readonly attribute Element? currentScript;
- /**
- * Release the current mouse capture if it is on an element within this
- * document.
- *
- * @see <https://developer.mozilla.org/en/DOM/document.releaseCapture>
- */
- [Deprecated=DocumentReleaseCapture, Pref="dom.mouse_capture.enabled"]
- undefined releaseCapture();
- /**
- * Use the given DOM element as the source image of target |-moz-element()|.
- *
- * This function introduces a new special ID (called "image element ID"),
- * which is only used by |-moz-element()|, and associates it with the given
- * DOM element. Image elements ID's have the higher precedence than general
- * HTML id's, so if |document.mozSetImageElement(<id>, <element>)| is called,
- * |-moz-element(#<id>)| uses |<element>| as the source image even if there
- * is another element with id attribute = |<id>|. To unregister an image
- * element ID |<id>|, call |document.mozSetImageElement(<id>, null)|.
- *
- * Example:
- * <script>
- * canvas = document.createElement("canvas");
- * canvas.setAttribute("width", 100);
- * canvas.setAttribute("height", 100);
- * // draw to canvas
- * document.mozSetImageElement("canvasbg", canvas);
- * </script>
- * <div style="background-image: -moz-element(#canvasbg);"></div>
- *
- * @param aImageElementId an image element ID to associate with
- * |aImageElement|
- * @param aImageElement a DOM element to be used as the source image of
- * |-moz-element(#aImageElementId)|. If this is null, the function will
- * unregister the image element ID |aImageElementId|.
- *
- * @see <https://developer.mozilla.org/en/DOM/document.mozSetImageElement>
- */
- [UseCounter]
- undefined mozSetImageElement(DOMString aImageElementId,
- Element? aImageElement);
- [ChromeOnly]
- readonly attribute URI? documentURIObject;
- /**
- * Current referrer policy - one of the referrer policy value from
- * ReferrerPolicy.webidl.
- */
- [ChromeOnly]
- readonly attribute ReferrerPolicy referrerPolicy;
- /**
- * Current referrer info, which holds all referrer related information
- * including referrer policy and raw referrer of document.
- */
- [ChromeOnly]
- readonly attribute nsIReferrerInfo referrerInfo;
- };
- // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
- partial interface Document {
- [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor;
- [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor;
- [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor;
- [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor;
- [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
- [SameObject] readonly attribute HTMLCollection anchors;
- [SameObject] readonly attribute HTMLCollection applets;
- undefined clear();
- // @deprecated These are old Netscape 4 methods. Do not use,
- // the implementation is no-op.
- // XXXbz do we actually need these anymore?
- undefined captureEvents();
- undefined releaseEvents();
- [SameObject] readonly attribute HTMLAllCollection all;
- };
- // https://fullscreen.spec.whatwg.org/#api
- partial interface Document {
- // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
- // versions have it uppercase.
- [LegacyLenientSetter, Unscopable]
- readonly attribute boolean fullscreen;
- [BinaryName="fullscreen"]
- readonly attribute boolean mozFullScreen;
- [LegacyLenientSetter, NeedsCallerType]
- readonly attribute boolean fullscreenEnabled;
- [BinaryName="fullscreenEnabled", NeedsCallerType]
- readonly attribute boolean mozFullScreenEnabled;
- [NewObject]
- Promise<undefined> exitFullscreen();
- [NewObject, BinaryName="exitFullscreen"]
- Promise<undefined> mozCancelFullScreen();
- // Events handlers
- attribute EventHandler onfullscreenchange;
- attribute EventHandler onfullscreenerror;
- };
- // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
- // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
- partial interface Document {
- undefined exitPointerLock();
- // Event handlers
- attribute EventHandler onpointerlockchange;
- attribute EventHandler onpointerlockerror;
- };
- // Mozilla-internal document extensions specific to error pages.
- partial interface Document {
- [Func="Document::CallerIsTrustedAboutCertError", NewObject]
- Promise<any> addCertException(boolean isTemporary);
- [Func="Document::CallerIsTrustedAboutHttpsOnlyError"]
- undefined reloadWithHttpsOnlyException();
- [Func="Document::CallerIsTrustedAboutCertError", Throws]
- FailedCertSecurityInfo getFailedCertSecurityInfo();
- [Func="Document::CallerIsTrustedAboutNetError", Throws]
- NetErrorInfo getNetErrorInfo();
- };
- // https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
- partial interface Document {
- readonly attribute boolean hidden;
- readonly attribute VisibilityState visibilityState;
- attribute EventHandler onvisibilitychange;
- };
- // https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
- partial interface Document {
- attribute DOMString? selectedStyleSheetSet;
- readonly attribute DOMString? lastStyleSheetSet;
- readonly attribute DOMString? preferredStyleSheetSet;
- [Constant]
- readonly attribute DOMStringList styleSheetSets;
- undefined enableStyleSheetsForSet (DOMString? name);
- };
- // https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
- partial interface Document {
- CaretPosition? caretPositionFromPoint (float x, float y);
- readonly attribute Element? scrollingElement;
- };
- // https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
- partial interface Document {
- [Func="Document::AreWebAnimationsTimelinesEnabled"]
- readonly attribute DocumentTimeline timeline;
- };
- // https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions
- partial interface Document {
- [BinaryName="SVGRootElement"]
- readonly attribute SVGSVGElement? rootElement;
- };
- // Mozilla extensions of various sorts
- partial interface Document {
- // Creates a new XUL element regardless of the document's default type.
- [ChromeOnly, CEReactions, NewObject, Throws]
- Element createXULElement(DOMString localName, optional (ElementCreationOptions or DOMString) options = {});
- // Wether the document was loaded using a nsXULPrototypeDocument.
- [ChromeOnly]
- readonly attribute boolean loadedFromPrototype;
- // The principal to use for the storage area of this document
- [ChromeOnly]
- readonly attribute Principal effectiveStoragePrincipal;
- // You should probably not be using this principal getter since it performs
- // no checks to ensure that the partitioned principal should really be used
- // here. It is only designed to be used in very specific circumstances, such
- // as when inheriting the document/storage principal.
- [ChromeOnly]
- readonly attribute Principal partitionedPrincipal;
- // The cookieJarSettings of this document
- [ChromeOnly]
- readonly attribute nsICookieJarSettings cookieJarSettings;
- // Touch bits
- // XXXbz I can't find the sane spec for this stuff, so just cribbing
- // from our xpidl for now.
- [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- Touch createTouch(optional Window? view = null,
- optional EventTarget? target = null,
- optional long identifier = 0,
- optional long pageX = 0,
- optional long pageY = 0,
- optional long screenX = 0,
- optional long screenY = 0,
- optional long clientX = 0,
- optional long clientY = 0,
- optional long radiusX = 0,
- optional long radiusY = 0,
- optional float rotationAngle = 0,
- optional float force = 0);
- // XXXbz a hack to get around the fact that we don't support variadics as
- // distinguishing arguments yet. Once this hack is removed. we can also
- // remove the corresponding overload on Document, since Touch... and
- // sequence<Touch> look the same in the C++.
- [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- TouchList createTouchList(Touch touch, Touch... touches);
- // XXXbz and another hack for the fact that we can't usefully have optional
- // distinguishing arguments but need a working zero-arg form of
- // createTouchList().
- [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- TouchList createTouchList();
- [NewObject, Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- TouchList createTouchList(sequence<Touch> touches);
- [ChromeOnly]
- attribute boolean styleSheetChangeEventsEnabled;
- [ChromeOnly]
- attribute boolean devToolsAnonymousAndShadowEventsEnabled;
- [ChromeOnly, BinaryName="contentLanguageForBindings"] readonly attribute DOMString contentLanguage;
- [ChromeOnly] readonly attribute nsILoadGroup? documentLoadGroup;
- // Blocks the initial document parser until the given promise is settled.
- [ChromeOnly, NewObject]
- Promise<any> blockParsing(Promise<any> promise,
- optional BlockParsingOptions options = {});
- [Func="nsContentUtils::IsSystemOrPDFJS", BinaryName="blockUnblockOnloadForSystemOrPDFJS"]
- undefined blockUnblockOnload(boolean block);
- // like documentURI, except that for error pages, it returns the URI we were
- // trying to load when we hit an error, rather than the error page's own URI.
- [ChromeOnly] readonly attribute URI? mozDocumentURIIfNotForErrorPages;
- // A promise that is resolved when we have both fired DOMContentLoaded and
- // are ready to start layout.
- // This is used for the "document_idle" webextension script injection point.
- [ChromeOnly, Throws]
- readonly attribute Promise<undefined> documentReadyForIdle;
- // Lazily created command dispatcher, returns null if the document is not
- // chrome privileged.
- [ChromeOnly]
- readonly attribute XULCommandDispatcher? commandDispatcher;
- [ChromeOnly]
- attribute boolean devToolsWatchingDOMMutations;
- /**
- * Returns all the shadow roots connected to the document, in no particular
- * order, and without regard to open/closed-ness. Also returns UA widgets
- * (like <video> controls), which can be checked using
- * ShadowRoot.isUAWidget().
- */
- [ChromeOnly]
- sequence<ShadowRoot> getConnectedShadowRoots();
- };
- dictionary BlockParsingOptions {
- /**
- * If true, blocks script-created parsers (created via document.open()) in
- * addition to network-created parsers.
- */
- boolean blockScriptCreated = true;
- };
- // Extension to give chrome JS the ability to determine when a document was
- // created to satisfy an iframe with srcdoc attribute.
- partial interface Document {
- [ChromeOnly] readonly attribute boolean isSrcdocDocument;
- };
- // Extension to give chrome JS the ability to get the underlying
- // sandbox flag attribute
- partial interface Document {
- [ChromeOnly] readonly attribute DOMString? sandboxFlagsAsString;
- };
- /**
- * Chrome document anonymous content management.
- * This is a Chrome-only API that allows inserting fixed positioned anonymous
- * content on top of the current page displayed in the document.
- */
- partial interface Document {
- /**
- * If aForce is true, tries to update layout to be able to insert the element
- * synchronously.
- */
- [ChromeOnly, NewObject, Throws]
- AnonymousContent insertAnonymousContent(optional boolean aForce = false);
- /**
- * Removes the element inserted into the CanvasFrame given an AnonymousContent
- * instance.
- */
- [ChromeOnly]
- undefined removeAnonymousContent(AnonymousContent aContent);
- };
- // http://w3c.github.io/selection-api/#extensions-to-document-interface
- partial interface Document {
- [Throws]
- Selection? getSelection();
- };
- // https://github.com/whatwg/html/issues/3338
- partial interface Document {
- [Pref="dom.storage_access.enabled", NewObject]
- Promise<boolean> hasStorageAccess();
- [Pref="dom.storage_access.enabled", NewObject]
- Promise<undefined> requestStorageAccess();
- // https://github.com/privacycg/storage-access/pull/100
- [Pref="dom.storage_access.forward_declared.enabled", NewObject]
- Promise<undefined> requestStorageAccessUnderSite(DOMString serializedSite);
- [Pref="dom.storage_access.forward_declared.enabled", NewObject]
- Promise<undefined> completeStorageAccessRequestFromSite(DOMString serializedSite);
- };
- // A privileged API to give chrome privileged code and the content script of the
- // webcompat extension the ability to request the storage access for a given
- // third party.
- partial interface Document {
- [Func="Document::CallerCanAccessPrivilegeSSA", NewObject]
- Promise<undefined> requestStorageAccessForOrigin(DOMString thirdPartyOrigin, optional boolean requireUserInteraction = true);
- };
- // Extension to give chrome JS the ability to determine whether
- // the user has interacted with the document or not.
- partial interface Document {
- [ChromeOnly] readonly attribute boolean userHasInteracted;
- };
- // Extension to give chrome JS the ability to simulate activate the document
- // by user gesture.
- partial interface Document {
- [ChromeOnly]
- undefined notifyUserGestureActivation();
- // For testing only.
- [ChromeOnly]
- undefined clearUserGestureActivation();
- [ChromeOnly]
- readonly attribute boolean hasBeenUserGestureActivated;
- [ChromeOnly]
- readonly attribute boolean hasValidTransientUserGestureActivation;
- [ChromeOnly]
- readonly attribute DOMHighResTimeStamp lastUserGestureTimeStamp;
- [ChromeOnly]
- boolean consumeTransientUserGestureActivation();
- };
- // Extension to give chrome JS the ability to set an event handler which is
- // called with certain events that happened while events were suppressed in the
- // document or one of its subdocuments.
- partial interface Document {
- [ChromeOnly]
- undefined setSuppressedEventListener(EventListener? aListener);
- };
- // Allows frontend code to query a CSP which needs to be passed for a
- // new load into docshell. Further, allows to query the CSP in JSON
- // format for testing purposes.
- partial interface Document {
- [ChromeOnly] readonly attribute ContentSecurityPolicy? csp;
- [ChromeOnly] readonly attribute DOMString cspJSON;
- };
- partial interface Document {
- [Func="Document::DocumentSupportsL10n"] readonly attribute DocumentL10n? l10n;
- [Func="Document::DocumentSupportsL10n"] readonly attribute boolean hasPendingL10nMutations;
- };
- Document includes XPathEvaluatorMixin;
- Document includes GlobalEventHandlers;
- Document includes TouchEventHandlers;
- Document includes ParentNode;
- Document includes OnErrorEventHandlerForNodes;
- Document includes GeometryUtils;
- Document includes FontFaceSource;
- Document includes DocumentOrShadowRoot;
- // https://w3c.github.io/webappsec-feature-policy/#idl-index
- partial interface Document {
- [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
- readonly attribute FeaturePolicy featurePolicy;
- };
- // Extension to give chrome JS the ability to specify a non-default keypress
- // event model.
- partial interface Document {
- /**
- * setKeyPressEventModel() is called when we need to check whether the web
- * app requires specific keypress event model or not.
- *
- * @param aKeyPressEventModel Proper keypress event model for the web app.
- * KEYPRESS_EVENT_MODEL_DEFAULT:
- * Use default keypress event model. I.e., depending on
- * "dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value"
- * pref.
- * KEYPRESS_EVENT_MODEL_SPLIT:
- * Use split model. I.e, if keypress event inputs a character,
- * keyCode should be 0. Otherwise, charCode should be 0.
- * KEYPRESS_EVENT_MODEL_CONFLATED:
- * Use conflated model. I.e., keyCode and charCode values of each
- * keypress event should be set to same value.
- */
- [ChromeOnly]
- const unsigned short KEYPRESS_EVENT_MODEL_DEFAULT = 0;
- [ChromeOnly]
- const unsigned short KEYPRESS_EVENT_MODEL_SPLIT = 1;
- [ChromeOnly]
- const unsigned short KEYPRESS_EVENT_MODEL_CONFLATED = 2;
- [ChromeOnly]
- undefined setKeyPressEventModel(unsigned short aKeyPressEventModel);
- };
- // Extensions to return information about about the nodes blocked by the
- // Safebrowsing API inside a document.
- partial interface Document {
- /*
- * Number of nodes that have been blocked by the Safebrowsing API to prevent
- * tracking, cryptomining and so on. This method is for testing only.
- */
- [ChromeOnly, Pure]
- readonly attribute long blockedNodeByClassifierCount;
- /*
- * List of nodes that have been blocked by the Safebrowsing API to prevent
- * tracking, fingerprinting, cryptomining and so on. This method is for
- * testing only.
- */
- [ChromeOnly, Pure]
- readonly attribute NodeList blockedNodesByClassifier;
- };
- // Extension to programmatically simulate a user interaction on a document,
- // used for testing.
- partial interface Document {
- [ChromeOnly, BinaryName="setUserHasInteracted"]
- undefined userInteractionForTesting();
- };
- // Extension for permission delegation.
- partial interface Document {
- [ChromeOnly, Pure]
- readonly attribute nsIPermissionDelegateHandler permDelegateHandler;
- };
- // Extension used by the password manager to infer form submissions.
- partial interface Document {
- /*
- * Set whether the document notifies an event when a fetch or
- * XHR completes successfully.
- */
- [ChromeOnly]
- undefined setNotifyFetchSuccess(boolean aShouldNotify);
- /*
- * Set whether a form and a password field notify an event when it is
- * removed from the DOM tree.
- */
- [ChromeOnly]
- undefined setNotifyFormOrPasswordRemoved(boolean aShouldNotify);
- };
- // Extension to allow chrome code to detect initial about:blank documents.
- partial interface Document {
- [ChromeOnly]
- readonly attribute boolean isInitialDocument;
- };
- // Extension to allow chrome code to get some wireframe-like structure.
- enum WireframeRectType {
- "image",
- "background",
- "text",
- "unknown",
- };
- dictionary WireframeTaggedRect {
- unrestricted double x = 0;
- unrestricted double y = 0;
- unrestricted double width = 0;
- unrestricted double height = 0;
- unsigned long color = 0; // in nscolor format
- WireframeRectType type;
- Node? node;
- };
- [GenerateInit]
- dictionary Wireframe {
- unsigned long canvasBackground = 0; // in nscolor format
- sequence<WireframeTaggedRect> rects;
- unsigned long version = 1; // Increment when the wireframe structure changes in backwards-incompatible ways
- };
- partial interface Document {
- [ChromeOnly]
- Wireframe? getWireframe(optional boolean aIncludeNodes = false);
- };
- partial interface Document {
- // Returns true if the document is the current active document in a browsing
- // context which isn't in bfcache.
- [ChromeOnly]
- boolean isActive();
- };
- Document includes NonElementParentNode;
- /**
- * Extension to add the fragmentDirective property.
- * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
- */
- partial interface Document {
- [Pref="dom.text_fragments.enabled", Exposed=Window, SameObject]
- readonly attribute FragmentDirective fragmentDirective;
- };
-
- /* ---------------------- DocumentFragment ----------------------------- */
- /* ./webidl/DocumentFragment.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#documentfragment
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface DocumentFragment : Node {
- [Throws]
- constructor();
- };
- DocumentFragment includes ParentNode;
- DocumentFragment includes NonElementParentNode;
-
- /* ---------------------- DocumentOrShadowRoot ----------------------------- */
- /* ./webidl/DocumentOrShadowRoot.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#documentorshadowroot
- * http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
- * https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
- */
- interface mixin DocumentOrShadowRoot {
- // Not implemented yet: bug 1430308.
- // Selection? getSelection();
- Element? elementFromPoint(float x, float y);
- sequence<Element> elementsFromPoint(float x, float y);
- // TODO: Avoid making these ChromeOnly, see:
- // https://github.com/w3c/csswg-drafts/issues/556
- [ChromeOnly]
- Node? nodeFromPoint(float x, float y);
- [ChromeOnly]
- sequence<Node> nodesFromPoint(float x, float y);
- // Not implemented yet: bug 1430307.
- // CaretPosition? caretPositionFromPoint (float x, float y);
- readonly attribute Element? activeElement;
- readonly attribute StyleSheetList styleSheets;
- readonly attribute Element? pointerLockElement;
- [LegacyLenientSetter]
- readonly attribute Element? fullscreenElement;
- [BinaryName="fullscreenElement"]
- readonly attribute Element? mozFullScreenElement;
- };
- // https://drafts.csswg.org/web-animations-1/#extensions-to-the-documentorshadowroot-interface-mixin
- partial interface mixin DocumentOrShadowRoot {
- sequence<Animation> getAnimations();
- };
- // https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets
- partial interface mixin DocumentOrShadowRoot {
- // We are using [Pure, Cached, Frozen] sequence until `FrozenArray` is implemented.
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=1236777 for more details.
- attribute ObservableArray<CSSStyleSheet> adoptedStyleSheets;
- };
-
- /* ---------------------- DocumentTimeline ----------------------------- */
- /* ./webidl/DocumentTimeline.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#documenttimeline
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary DocumentTimelineOptions {
- DOMHighResTimeStamp originTime = 0;
- };
- [Func="Document::AreWebAnimationsTimelinesEnabled",
- Exposed=Window]
- interface DocumentTimeline : AnimationTimeline {
- [Throws]
- constructor(optional DocumentTimelineOptions options = {});
- };
-
- /* ---------------------- DocumentType ----------------------------- */
- /* ./webidl/DocumentType.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#documenttype
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface DocumentType : Node {
- readonly attribute DOMString name;
- readonly attribute DOMString publicId;
- readonly attribute DOMString systemId;
- };
- DocumentType includes ChildNode;
-
- /* ---------------------- DOMException ----------------------------- */
- /* ./webidl/DOMException.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webidl.spec.whatwg.org/#idl-DOMException
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // This is the WebIDL version of nsIException. This is mostly legacy stuff.
- interface StackFrame;
- interface mixin ExceptionMembers
- {
- // The nsresult associated with this exception.
- readonly attribute unsigned long result;
- // Filename location. This is the location that caused the
- // error, which may or may not be a source file location.
- // For example, standard language errors would generally have
- // the same location as their top stack entry. File
- // parsers may put the location of the file they were parsing,
- // etc.
- // null indicates "no data"
- readonly attribute DOMString filename;
- // Valid line numbers begin at '1'. '0' indicates unknown.
- readonly attribute unsigned long lineNumber;
- // Valid column numbers begin at 0.
- // We don't have an unambiguous indicator for unknown.
- readonly attribute unsigned long columnNumber;
- // A stack trace, if available. nsIStackFrame does not have classinfo so
- // this was only ever usefully available to chrome JS.
- [ChromeOnly, Exposed=Window]
- readonly attribute StackFrame? location;
- // Arbitary data for the implementation.
- [Exposed=Window]
- readonly attribute nsISupports? data;
- // Formatted exception stack
- [Replaceable]
- readonly attribute DOMString stack;
- };
- [LegacyNoInterfaceObject, Exposed=(Window,Worker)]
- interface Exception {
- // The name of the error code (ie, a string repr of |result|).
- readonly attribute DOMString name;
- // A custom message set by the thrower.
- [BinaryName="messageMoz"]
- readonly attribute DOMString message;
- // A generic formatter - make it suitable to print, etc.
- stringifier;
- };
- Exception includes ExceptionMembers;
- // XXXkhuey this is an 'exception', not an interface, but we don't have any
- // parser or codegen mechanisms for dealing with exceptions.
- [ExceptionClass,
- Exposed=(Window, Worker),
- Serializable]
- interface DOMException {
- constructor(optional DOMString message = "", optional DOMString name);
- // The name of the error code (ie, a string repr of |result|).
- readonly attribute DOMString name;
- // A custom message set by the thrower.
- [BinaryName="messageMoz"]
- readonly attribute DOMString message;
- readonly attribute unsigned short code;
- const unsigned short INDEX_SIZE_ERR = 1;
- const unsigned short DOMSTRING_SIZE_ERR = 2; // historical
- const unsigned short HIERARCHY_REQUEST_ERR = 3;
- const unsigned short WRONG_DOCUMENT_ERR = 4;
- const unsigned short INVALID_CHARACTER_ERR = 5;
- const unsigned short NO_DATA_ALLOWED_ERR = 6; // historical
- const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
- const unsigned short NOT_FOUND_ERR = 8;
- const unsigned short NOT_SUPPORTED_ERR = 9;
- const unsigned short INUSE_ATTRIBUTE_ERR = 10; // historical
- const unsigned short INVALID_STATE_ERR = 11;
- const unsigned short SYNTAX_ERR = 12;
- const unsigned short INVALID_MODIFICATION_ERR = 13;
- const unsigned short NAMESPACE_ERR = 14;
- const unsigned short INVALID_ACCESS_ERR = 15;
- const unsigned short VALIDATION_ERR = 16; // historical
- const unsigned short TYPE_MISMATCH_ERR = 17; // historical; use JavaScript's TypeError instead
- const unsigned short SECURITY_ERR = 18;
- const unsigned short NETWORK_ERR = 19;
- const unsigned short ABORT_ERR = 20;
- const unsigned short URL_MISMATCH_ERR = 21;
- const unsigned short QUOTA_EXCEEDED_ERR = 22;
- const unsigned short TIMEOUT_ERR = 23;
- const unsigned short INVALID_NODE_TYPE_ERR = 24;
- const unsigned short DATA_CLONE_ERR = 25;
- };
- // XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave
- // the prototype chain sane.
- DOMException includes ExceptionMembers;
-
- /* ---------------------- DOMImplementation ----------------------------- */
- /* ./webidl/DOMImplementation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#interface-domimplementation
- *
- * Copyright:
- * To the extent possible under law, the editors have waived all copyright and
- * related or neighboring rights to this work.
- */
- [Exposed=Window]
- interface DOMImplementation {
- boolean hasFeature();
- [Throws]
- DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
- DOMString systemId);
- [Throws]
- Document createDocument(DOMString? namespace,
- [LegacyNullToEmptyString] DOMString qualifiedName,
- optional DocumentType? doctype = null);
- [Throws]
- Document createHTMLDocument(optional DOMString title);
- };
-
- /* ---------------------- DOMLocalization ----------------------------- */
- /* ./webidl/DOMLocalization.webidl */
-
- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * DOMLocalization is an extension of the Fluent Localization API.
- *
- * DOMLocalization adds a state for storing `roots` - DOM elements
- * which translation status is controlled by the DOMLocalization
- * instance and monitored for mutations.
- * DOMLocalization also adds methods dedicated to DOM manipulation.
- *
- * Methods:
- * - connectRoot - add a root
- * - disconnectRoot - remove a root
- * - pauseObserving - pause observing of roots
- * - resumeObserving - resume observing of roots
- * - setAttributes - set l10n attributes of an element
- * - getAttributes - retrieve l10n attributes of an element
- * - translateFragment - translate a DOM fragment
- * - translateElements - translate a list of DOM elements
- * - translateRoots - translate all attached roots
- *
- */
- [Func="IsChromeOrUAWidget", Exposed=Window]
- interface DOMLocalization : Localization {
- /**
- * Constructor arguments:
- * - aResourceids - a list of localization resource URIs
- * which will provide messages for this
- * Localization instance.
- * - aSync - Specifies if the initial state of the DOMLocalization
- * and the underlying Localization API is synchronous.
- * This enables a number of synchronous methods on the
- * Localization API and uses it for `TranslateElements`
- * making the method return a synchronusly resolved promise.
- * - aRegistry - optional custom L10nRegistry to be used by this Localization instance.
- * - aLocales - custom set of locales to be used for this Localization.
- */
- [Throws]
- constructor(sequence<L10nResourceId> aResourceIds,
- optional boolean aSync = false,
- optional L10nRegistry aRegistry,
- optional sequence<UTF8String> aLocales);
- /**
- * Adds a node to nodes observed for localization
- * related changes.
- */
- undefined connectRoot(Node aElement);
- /**
- * Removes a node from nodes observed for localization
- * related changes.
- */
- undefined disconnectRoot(Node aElement);
- /**
- * Pauses the MutationObserver set to observe
- * localization related DOM mutations.
- */
- undefined pauseObserving();
- /**
- * Resumes the MutationObserver set to observe
- * localization related DOM mutations.
- */
- undefined resumeObserving();
- /**
- * A helper function which allows the user to set localization-specific attributes
- * on an element.
- * This method lives on `document.l10n` for compatibility reasons with the
- * JS FluentDOM implementation. We may consider moving it onto Element.
- *
- * Example:
- * document.l10n.setAttributes(h1, "key1", { emailCount: 5 });
- *
- * <h1 data-l10n-id="key1" data-l10n-args="{\"emailCount\": 5}"/>
- */
- [Throws] undefined setAttributes(Element aElement, DOMString aId, optional object? aArgs);
- /**
- * A helper function which allows the user to retrieve a set of localization-specific
- * attributes from an element.
- * This method lives on `document.l10n` for compatibility reasons with the
- * JS FluentDOM implementation. We may consider moving it onto Element.
- *
- * Example:
- * let l10nAttrs = document.l10n.getAttributes(h1);
- * assert.deepEqual(l10nAttrs, {id: "key1", args: { emailCount: 5});
- */
- [Throws] L10nIdArgs getAttributes(Element aElement);
- /**
- * A helper function which allows the user to set the l10n args for an element. This
- * is similar to the setAttributes method, but does not require the l10n ID.
- *
- * Example:
- *
- * <h1 data-l10n-id="key1" />
- *
- * document.l10n.setArgs(h1, { emailCount: 5 });
- *
- * <h1 data-l10n-id="key1" data-l10n-args="{\"emailCount\": 5}" />
- *
- * document.l10n.setArgs(h1);
- *
- * <h1 data-l10n-id="key1" />
- */
- [Throws] undefined setArgs(Element aElement, optional object? aArgs);
- /**
- * Triggers translation of a subtree rooted at aNode.
- *
- * The method finds all translatable descendants of the argument and
- * localizes them.
- *
- * This method is mainly useful to trigger translation not covered by the
- * DOMLocalization's MutationObserver - for example before it gets attached
- * to the tree.
- * In such cases, when the already-translated fragment gets
- * injected into the observed root, one should `pauseObserving`,
- * then append the fragment, and finally `resumeObserving`.
- *
- * Example:
- * await document.l10n.translatFragment(frag);
- * root.pauseObserving();
- * parent.appendChild(frag);
- * root.resumeObserving();
- */
- [NewObject] Promise<any> translateFragment(Node aNode);
- /**
- * Triggers translation of a list of Elements using the localization context.
- *
- * The method only translates the elements directly passed to the method,
- * not any descendant nodes.
- *
- * This method is mainly useful to trigger translation not covered by the
- * DOMLocalization's MutationObserver - for example before it gets attached
- * to the tree.
- * In such cases, when the already-translated fragment gets
- * injected into the observed root, one should `pauseObserving`,
- * then append the fragment, and finally `resumeObserving`.
- *
- * Example:
- * await document.l10n.translateElements([elem1, elem2]);
- * root.pauseObserving();
- * parent.appendChild(elem1);
- * root.resumeObserving();
- * alert(elem2.textContent);
- */
- [NewObject] Promise<undefined> translateElements(sequence<Element> aElements);
- /**
- * Triggers translation of all attached roots and sets their
- * locale info and directionality attributes.
- *
- * Example:
- * await document.l10n.translateRoots();
- */
- [NewObject] Promise<undefined> translateRoots();
- };
-
- /* ---------------------- DOMMatrix ----------------------------- */
- /* ./webidl/DOMMatrix.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.fxtf.org/geometry/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker),
- Serializable]
- interface DOMMatrixReadOnly {
- [Throws]
- constructor(optional (UTF8String or sequence<unrestricted double> or DOMMatrixReadOnly) init);
- [NewObject, Throws] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other = {});
- [NewObject, Throws] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
- [NewObject, Throws] static DOMMatrixReadOnly fromFloat64Array(Float64Array array64);
- // These attributes are simple aliases for certain elements of the 4x4 matrix
- readonly attribute unrestricted double a;
- readonly attribute unrestricted double b;
- readonly attribute unrestricted double c;
- readonly attribute unrestricted double d;
- readonly attribute unrestricted double e;
- readonly attribute unrestricted double f;
- readonly attribute unrestricted double m11;
- readonly attribute unrestricted double m12;
- readonly attribute unrestricted double m13;
- readonly attribute unrestricted double m14;
- readonly attribute unrestricted double m21;
- readonly attribute unrestricted double m22;
- readonly attribute unrestricted double m23;
- readonly attribute unrestricted double m24;
- readonly attribute unrestricted double m31;
- readonly attribute unrestricted double m32;
- readonly attribute unrestricted double m33;
- readonly attribute unrestricted double m34;
- readonly attribute unrestricted double m41;
- readonly attribute unrestricted double m42;
- readonly attribute unrestricted double m43;
- readonly attribute unrestricted double m44;
- // Immutable transform methods
- DOMMatrix translate(optional unrestricted double tx = 0,
- optional unrestricted double ty = 0,
- optional unrestricted double tz = 0);
- [NewObject] DOMMatrix scale(optional unrestricted double scaleX = 1,
- optional unrestricted double scaleY,
- optional unrestricted double scaleZ = 1,
- optional unrestricted double originX = 0,
- optional unrestricted double originY = 0,
- optional unrestricted double originZ = 0);
- [NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
- optional unrestricted double scaleY = 1);
- DOMMatrix scale3d(optional unrestricted double scale = 1,
- optional unrestricted double originX = 0,
- optional unrestricted double originY = 0,
- optional unrestricted double originZ = 0);
- [NewObject] DOMMatrix rotate(optional unrestricted double rotX = 0,
- optional unrestricted double rotY,
- optional unrestricted double rotZ);
- [NewObject] DOMMatrix rotateFromVector(optional unrestricted double x = 0,
- optional unrestricted double y = 0);
- [NewObject] DOMMatrix rotateAxisAngle(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double z = 0,
- optional unrestricted double angle = 0);
- DOMMatrix skewX(optional unrestricted double sx = 0);
- DOMMatrix skewY(optional unrestricted double sy = 0);
- [NewObject, Throws] DOMMatrix multiply(optional DOMMatrixInit other = {});
- DOMMatrix flipX();
- DOMMatrix flipY();
- DOMMatrix inverse();
- // Helper methods
- readonly attribute boolean is2D;
- readonly attribute boolean isIdentity;
- DOMPoint transformPoint(optional DOMPointInit point = {});
- [Throws] Float32Array toFloat32Array();
- [Throws] Float64Array toFloat64Array();
- [Exposed=Window, Throws] stringifier;
- [Default] object toJSON();
- };
- [Exposed=(Window,Worker),
- Serializable,
- LegacyWindowAlias=WebKitCSSMatrix]
- interface DOMMatrix : DOMMatrixReadOnly {
- [Throws]
- constructor(optional (UTF8String or sequence<unrestricted double> or DOMMatrixReadOnly) init);
- [NewObject, Throws] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
- [NewObject, Throws] static DOMMatrix fromFloat32Array(Float32Array array32);
- [NewObject, Throws] static DOMMatrix fromFloat64Array(Float64Array array64);
- // These attributes are simple aliases for certain elements of the 4x4 matrix
- inherit attribute unrestricted double a;
- inherit attribute unrestricted double b;
- inherit attribute unrestricted double c;
- inherit attribute unrestricted double d;
- inherit attribute unrestricted double e;
- inherit attribute unrestricted double f;
- inherit attribute unrestricted double m11;
- inherit attribute unrestricted double m12;
- inherit attribute unrestricted double m13;
- inherit attribute unrestricted double m14;
- inherit attribute unrestricted double m21;
- inherit attribute unrestricted double m22;
- inherit attribute unrestricted double m23;
- inherit attribute unrestricted double m24;
- inherit attribute unrestricted double m31;
- inherit attribute unrestricted double m32;
- inherit attribute unrestricted double m33;
- inherit attribute unrestricted double m34;
- inherit attribute unrestricted double m41;
- inherit attribute unrestricted double m42;
- inherit attribute unrestricted double m43;
- inherit attribute unrestricted double m44;
- // Mutable transform methods
- [Throws] DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
- [Throws] DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
- DOMMatrix translateSelf(optional unrestricted double tx = 0,
- optional unrestricted double ty = 0,
- optional unrestricted double tz = 0);
- DOMMatrix scaleSelf(optional unrestricted double scaleX = 1,
- optional unrestricted double scaleY,
- optional unrestricted double scaleZ = 1,
- optional unrestricted double originX = 0,
- optional unrestricted double originY = 0,
- optional unrestricted double originZ = 0);
- DOMMatrix scale3dSelf(optional unrestricted double scale = 1,
- optional unrestricted double originX = 0,
- optional unrestricted double originY = 0,
- optional unrestricted double originZ = 0);
- DOMMatrix rotateSelf(optional unrestricted double rotX = 0,
- optional unrestricted double rotY,
- optional unrestricted double rotZ);
- DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0,
- optional unrestricted double y = 0);
- DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double z = 0,
- optional unrestricted double angle = 0);
- DOMMatrix skewXSelf(optional unrestricted double sx = 0);
- DOMMatrix skewYSelf(optional unrestricted double sy = 0);
- DOMMatrix invertSelf();
- [Exposed=Window, Throws] DOMMatrix setMatrixValue(UTF8String transformList);
- };
- dictionary DOMMatrix2DInit {
- unrestricted double a;
- unrestricted double b;
- unrestricted double c;
- unrestricted double d;
- unrestricted double e;
- unrestricted double f;
- unrestricted double m11;
- unrestricted double m12;
- unrestricted double m21;
- unrestricted double m22;
- unrestricted double m41;
- unrestricted double m42;
- };
- dictionary DOMMatrixInit : DOMMatrix2DInit {
- unrestricted double m13 = 0;
- unrestricted double m14 = 0;
- unrestricted double m23 = 0;
- unrestricted double m24 = 0;
- unrestricted double m31 = 0;
- unrestricted double m32 = 0;
- unrestricted double m33 = 1;
- unrestricted double m34 = 0;
- unrestricted double m43 = 0;
- unrestricted double m44 = 1;
- boolean is2D;
- };
-
- /* ---------------------- DOMParser ----------------------------- */
- /* ./webidl/DOMParser.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://domparsing.spec.whatwg.org/#the-domparser-interface
- */
- interface Principal;
- interface URI;
- interface InputStream;
- enum SupportedType {
- "text/html",
- "text/xml",
- "application/xml",
- "application/xhtml+xml",
- "image/svg+xml"
- };
- [Exposed=Window]
- interface DOMParser {
- [Throws]
- constructor();
- [NewObject, Throws, UseCounter]
- Document parseFromString(DOMString str, SupportedType type);
- [NewObject, ChromeOnly, Throws]
- Document parseFromSafeString(DOMString str, SupportedType type);
- // Mozilla-specific stuff
- [NewObject, Throws, ChromeOnly]
- Document parseFromBuffer(sequence<octet> buf, SupportedType type);
- [NewObject, Throws, ChromeOnly]
- Document parseFromBuffer(Uint8Array buf, SupportedType type);
- [NewObject, Throws, ChromeOnly]
- Document parseFromStream(InputStream stream, DOMString? charset,
- long contentLength, SupportedType type);
- // Can be used to allow a DOMParser to parse XUL/XBL no matter what
- // principal it's using for the document.
- [ChromeOnly]
- undefined forceEnableXULXBL();
- // Can be used to allow a DOMParser to load DTDs from URLs that
- // normally would not be allowed based on the document principal.
- [Func="IsChromeOrUAWidget"]
- undefined forceEnableDTD();
- };
-
- /* ---------------------- DOMPoint ----------------------------- */
- /* ./webidl/DOMPoint.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.fxtf.org/geometry/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker),
- Serializable]
- interface DOMPointReadOnly {
- constructor(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double z = 0,
- optional unrestricted double w = 1);
- [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other = {});
- readonly attribute unrestricted double x;
- readonly attribute unrestricted double y;
- readonly attribute unrestricted double z;
- readonly attribute unrestricted double w;
- [NewObject, Throws] DOMPoint matrixTransform(optional DOMMatrixInit matrix = {});
- [Default] object toJSON();
- };
- [Exposed=(Window,Worker),
- Serializable]
- interface DOMPoint : DOMPointReadOnly {
- constructor(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double z = 0,
- optional unrestricted double w = 1);
- [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});
- inherit attribute unrestricted double x;
- inherit attribute unrestricted double y;
- inherit attribute unrestricted double z;
- inherit attribute unrestricted double w;
- };
- dictionary DOMPointInit {
- unrestricted double x = 0;
- unrestricted double y = 0;
- unrestricted double z = 0;
- unrestricted double w = 1;
- };
-
- /* ---------------------- DOMQuad ----------------------------- */
- /* ./webidl/DOMQuad.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.fxtf.org/geometry/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker),
- Serializable]
- interface DOMQuad {
- constructor(optional DOMPointInit p1 = {}, optional DOMPointInit p2 = {},
- optional DOMPointInit p3 = {}, optional DOMPointInit p4 = {});
- constructor(DOMRectReadOnly rect);
- [NewObject] static DOMQuad fromRect(optional DOMRectInit other = {});
- [NewObject] static DOMQuad fromQuad(optional DOMQuadInit other = {});
- [SameObject] readonly attribute DOMPoint p1;
- [SameObject] readonly attribute DOMPoint p2;
- [SameObject] readonly attribute DOMPoint p3;
- [SameObject] readonly attribute DOMPoint p4;
- [NewObject] DOMRectReadOnly getBounds();
- [Default] object toJSON();
- };
- dictionary DOMQuadInit {
- DOMPointInit p1 = {};
- DOMPointInit p2 = {};
- DOMPointInit p3 = {};
- DOMPointInit p4 = {};
- };
-
- /* ---------------------- DOMRect ----------------------------- */
- /* ./webidl/DOMRect.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.fxtf.org/geometry/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker),
- Serializable]
- interface DOMRect : DOMRectReadOnly {
- constructor(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double width = 0,
- optional unrestricted double height = 0);
- [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});
- inherit attribute unrestricted double x;
- inherit attribute unrestricted double y;
- inherit attribute unrestricted double width;
- inherit attribute unrestricted double height;
- };
- [ProbablyShortLivingWrapper,
- Exposed=(Window,Worker),
- Serializable]
- interface DOMRectReadOnly {
- constructor(optional unrestricted double x = 0,
- optional unrestricted double y = 0,
- optional unrestricted double width = 0,
- optional unrestricted double height = 0);
- [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
- readonly attribute unrestricted double x;
- readonly attribute unrestricted double y;
- readonly attribute unrestricted double width;
- readonly attribute unrestricted double height;
- readonly attribute unrestricted double top;
- readonly attribute unrestricted double right;
- readonly attribute unrestricted double bottom;
- readonly attribute unrestricted double left;
- [Default] object toJSON();
- };
- dictionary DOMRectInit {
- unrestricted double x = 0;
- unrestricted double y = 0;
- unrestricted double width = 0;
- unrestricted double height = 0;
- };
-
- /* ---------------------- DOMRectList ----------------------------- */
- /* ./webidl/DOMRectList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface DOMRectList {
- readonly attribute unsigned long length;
- getter DOMRect? item(unsigned long index);
- };
-
- /* ---------------------- DOMStringList ----------------------------- */
- /* ./webidl/DOMStringList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface DOMStringList {
- readonly attribute unsigned long length;
- getter DOMString? item(unsigned long index);
- boolean contains(DOMString string);
- };
-
- /* ---------------------- DOMStringMap ----------------------------- */
- /* ./webidl/DOMStringMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#domstringmap-0
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyOverrideBuiltIns,
- Exposed=Window]
- interface DOMStringMap {
- getter DOMString (DOMString name);
- [CEReactions, Throws]
- setter undefined (DOMString name, DOMString value);
- [CEReactions]
- deleter undefined (DOMString name);
- };
-
- /* ---------------------- DOMTokenList ----------------------------- */
- /* ./webidl/DOMTokenList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#interface-domtokenlist
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface DOMTokenList {
- [Pure]
- readonly attribute unsigned long length;
- [Pure]
- getter DOMString? item(unsigned long index);
- [Pure]
- boolean contains(DOMString token);
- [CEReactions, Throws]
- undefined add(DOMString... tokens);
- [CEReactions, Throws]
- undefined remove(DOMString... tokens);
- [CEReactions, Throws]
- boolean replace(DOMString token, DOMString newToken);
- [CEReactions, Throws]
- boolean toggle(DOMString token, optional boolean force);
- [Throws]
- boolean supports(DOMString token);
- [CEReactions, SetterThrows, Pure]
- stringifier attribute DOMString value;
- iterable<DOMString?>;
- };
-
- /* ---------------------- DragEvent ----------------------------- */
- /* ./webidl/DragEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/#dragevent
- */
- [Exposed=Window]
- interface DragEvent : MouseEvent
- {
- constructor(DOMString type, optional DragEventInit eventInitDict = {});
- readonly attribute DataTransfer? dataTransfer;
- undefined initDragEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Window? aView = null,
- optional long aDetail = 0,
- optional long aScreenX = 0,
- optional long aScreenY = 0,
- optional long aClientX = 0,
- optional long aClientY = 0,
- optional boolean aCtrlKey = false,
- optional boolean aAltKey = false,
- optional boolean aShiftKey = false,
- optional boolean aMetaKey = false,
- optional unsigned short aButton = 0,
- optional EventTarget? aRelatedTarget = null,
- optional DataTransfer? aDataTransfer = null);
- };
- dictionary DragEventInit : MouseEventInit
- {
- DataTransfer? dataTransfer = null;
- };
-
- /* ---------------------- DynamicsCompressorNode ----------------------------- */
- /* ./webidl/DynamicsCompressorNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary DynamicsCompressorOptions : AudioNodeOptions {
- float attack = 0.003;
- float knee = 30;
- float ratio = 12;
- float release = 0.25;
- float threshold = -24;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface DynamicsCompressorNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional DynamicsCompressorOptions options = {});
- readonly attribute AudioParam threshold; // in Decibels
- readonly attribute AudioParam knee; // in Decibels
- readonly attribute AudioParam ratio; // unit-less
- readonly attribute float reduction; // in Decibels
- readonly attribute AudioParam attack; // in Seconds
- [BinaryName="getRelease"]
- readonly attribute AudioParam release; // in Seconds
- };
- // Mozilla extension
- DynamicsCompressorNode includes AudioNodePassThrough;
-
- /* ---------------------- Element ----------------------------- */
- /* ./webidl/Element.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#interface-element
- * https://domparsing.spec.whatwg.org/
- * https://drafts.csswg.org/cssom-view/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface nsIScreen;
- [Exposed=Window,
- InstrumentedProps=(computedStyleMap,onmousewheel,scrollIntoViewIfNeeded)]
- interface Element : Node {
- [Constant]
- readonly attribute DOMString? namespaceURI;
- [Constant]
- readonly attribute DOMString? prefix;
- [Constant]
- readonly attribute DOMString localName;
- // Not [Constant] because it depends on which document we're in
- [Pure]
- readonly attribute DOMString tagName;
- [CEReactions, Pure]
- attribute DOMString id;
- [CEReactions, Pure]
- attribute DOMString className;
- [Constant, PutForwards=value]
- readonly attribute DOMTokenList classList;
- // https://drafts.csswg.org/css-shadow-parts/#idl
- [SameObject, PutForwards=value]
- readonly attribute DOMTokenList part;
- [SameObject]
- readonly attribute NamedNodeMap attributes;
- [Pure]
- sequence<DOMString> getAttributeNames();
- [Pure]
- DOMString? getAttribute(DOMString name);
- [Pure]
- DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
- [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
- boolean toggleAttribute(DOMString name, optional boolean force);
- [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
- undefined setAttribute(DOMString name, DOMString value);
- [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws]
- undefined setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
- [CEReactions, Throws]
- undefined removeAttribute(DOMString name);
- [CEReactions, Throws]
- undefined removeAttributeNS(DOMString? namespace, DOMString localName);
- [Pure]
- boolean hasAttribute(DOMString name);
- [Pure]
- boolean hasAttributeNS(DOMString? namespace, DOMString localName);
- [Pure]
- boolean hasAttributes();
- [Throws, Pure]
- Element? closest(UTF8String selector);
- [Throws, Pure]
- boolean matches(UTF8String selector);
- [Throws, Pure, BinaryName="matches"]
- boolean webkitMatchesSelector(UTF8String selector);
- [Pure]
- HTMLCollection getElementsByTagName(DOMString localName);
- [Throws, Pure]
- HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
- [Pure]
- HTMLCollection getElementsByClassName(DOMString classNames);
- [CEReactions, Throws]
- Element? insertAdjacentElement(DOMString where, Element element); // historical
- [Throws]
- undefined insertAdjacentText(DOMString where, DOMString data); // historical
- /**
- * The ratio of font-size-inflated text font size to computed font
- * size for this element. This will query the element for its primary frame,
- * and then use this to get font size inflation information about the frame.
- * This will be 1.0 if font size inflation is not enabled, and -1.0 if an
- * error occurred during the retrieval of the font size inflation.
- *
- * @note The font size inflation ratio that is returned is actually the
- * font size inflation data for the element's _primary frame_, not the
- * element itself, but for most purposes, this should be sufficient.
- */
- [ChromeOnly]
- readonly attribute float fontSizeInflation;
- /**
- * Returns the pseudo-element string if this element represents a
- * pseudo-element, or null otherwise.
- */
- [ChromeOnly]
- readonly attribute DOMString? implementedPseudoElement;
- // Selectors API
- /**
- * Returns whether this element would be selected by the given selector
- * string.
- *
- * https://dom.spec.whatwg.org/#dom-element-matches
- */
- [Throws, Pure, BinaryName="matches"]
- boolean mozMatchesSelector(UTF8String selector);
- // Pointer events methods.
- [UseCounter, Throws]
- undefined setPointerCapture(long pointerId);
- [UseCounter, Throws]
- undefined releasePointerCapture(long pointerId);
- boolean hasPointerCapture(long pointerId);
- // Proprietary extensions
- /**
- * Set this during a mousedown event to grab and retarget all mouse events
- * to this element until the mouse button is released or releaseCapture is
- * called. If retargetToElement is true, then all events are targetted at
- * this element. If false, events can also fire at descendants of this
- * element.
- *
- */
- [Deprecated=ElementSetCapture, Pref="dom.mouse_capture.enabled"]
- undefined setCapture(optional boolean retargetToElement = false);
- /**
- * If this element has captured the mouse, release the capture. If another
- * element has captured the mouse, this method has no effect.
- */
- [Deprecated=ElementReleaseCapture, Pref="dom.mouse_capture.enabled"]
- undefined releaseCapture();
- /*
- * Chrome-only version of setCapture that works outside of a mousedown event.
- */
- [ChromeOnly]
- undefined setCaptureAlways(optional boolean retargetToElement = false);
- // Mozilla extensions
- // Obsolete methods.
- Attr? getAttributeNode(DOMString name);
- [CEReactions, Throws]
- Attr? setAttributeNode(Attr newAttr);
- [CEReactions, Throws]
- Attr? removeAttributeNode(Attr oldAttr);
- Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
- [CEReactions, Throws]
- Attr? setAttributeNodeNS(Attr newAttr);
- [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
- DOMMatrixReadOnly getTransformToAncestor(Element ancestor);
- [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
- DOMMatrixReadOnly getTransformToParent();
- [Func="nsContentUtils::IsCallerChromeOrElementTransformGettersEnabled"]
- DOMMatrixReadOnly getTransformToViewport();
- };
- // https://html.spec.whatwg.org/#focus-management-apis
- dictionary FocusOptions {
- boolean preventScroll = false;
- boolean focusVisible;
- };
- interface mixin HTMLOrForeignElement {
- [SameObject] readonly attribute DOMStringMap dataset;
- // See bug 1389421
- // attribute DOMString nonce; // intentionally no [CEReactions]
- [CEReactions, SetterThrows, Pure] attribute boolean autofocus;
- [CEReactions, SetterThrows, Pure] attribute long tabIndex;
- [Throws, NeedsCallerType] undefined focus(optional FocusOptions options = {});
- [Throws] undefined blur();
- };
- // https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-mixin
- interface mixin ElementCSSInlineStyle {
- [SameObject, PutForwards=cssText]
- readonly attribute CSSStyleDeclaration style;
- };
- // https://drafts.csswg.org/cssom-view/
- enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
- dictionary ScrollIntoViewOptions : ScrollOptions {
- ScrollLogicalPosition block = "start";
- ScrollLogicalPosition inline = "nearest";
- };
- dictionary CheckVisibilityOptions {
- boolean checkOpacity = false;
- boolean checkVisibilityCSS = false;
- boolean contentVisibilityAuto = false;
- boolean opacityProperty = false;
- boolean visibilityProperty = false;
- [ChromeOnly] boolean flush = true;
- };
- // https://drafts.csswg.org/cssom-view/#extensions-to-the-element-interface
- partial interface Element {
- DOMRectList getClientRects();
- DOMRect getBoundingClientRect();
- boolean checkVisibility(optional CheckVisibilityOptions options = {});
- // scrolling
- undefined scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg = {});
- // None of the CSSOM attributes are [Pure], because they flush
- attribute long scrollTop; // scroll on setting
- attribute long scrollLeft; // scroll on setting
- readonly attribute long scrollWidth;
- readonly attribute long scrollHeight;
- [BinaryName="scrollTo"]
- undefined scroll(unrestricted double x, unrestricted double y);
- [BinaryName="scrollTo"]
- undefined scroll(optional ScrollToOptions options = {});
- undefined scrollTo(unrestricted double x, unrestricted double y);
- undefined scrollTo(optional ScrollToOptions options = {});
- undefined scrollBy(unrestricted double x, unrestricted double y);
- undefined scrollBy(optional ScrollToOptions options = {});
- // mozScrollSnap is used by chrome to perform scroll snapping after the
- // user performs actions that may affect scroll position
- // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
- // as an extension to the ScrollOptions dictionary. See bug 1137937.
- [ChromeOnly] undefined mozScrollSnap();
- readonly attribute long clientTop;
- readonly attribute long clientLeft;
- readonly attribute long clientWidth;
- readonly attribute long clientHeight;
- // Return the screen coordinates of the element, in CSS pixels relative to
- // the window's screen.
- [ChromeOnly] readonly attribute long screenX;
- [ChromeOnly] readonly attribute long screenY;
- [ChromeOnly] readonly attribute nsIScreen? screen;
- // Mozilla specific stuff
- /* The minimum/maximum offset that the element can be scrolled to
- (i.e., the value that scrollLeft/scrollTop would be clamped to if they were
- set to arbitrarily large values. */
- [ChromeOnly] readonly attribute long scrollTopMin;
- readonly attribute long scrollTopMax;
- [ChromeOnly] readonly attribute long scrollLeftMin;
- readonly attribute long scrollLeftMax;
- [Pref="layout.css.zoom.enabled"] readonly attribute double currentCSSZoom;
- };
- // http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
- partial interface Element {
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, Pure, SetterThrows, GetterCanOOM]
- attribute [LegacyNullToEmptyString] DOMString innerHTML;
- [CEReactions, Pure, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString outerHTML;
- [CEReactions, Throws]
- undefined insertAdjacentHTML(DOMString position, DOMString text);
- };
- // https://dom.spec.whatwg.org/#dictdef-shadowrootinit
- dictionary ShadowRootInit {
- required ShadowRootMode mode;
- boolean delegatesFocus = false;
- SlotAssignmentMode slotAssignment = "named";
- [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- boolean clonable = false;
- };
- // https://dom.spec.whatwg.org/#element
- partial interface Element {
- // Shadow DOM v1
- [Throws, UseCounter]
- ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
- [BinaryName="shadowRootByMode"]
- readonly attribute ShadowRoot? shadowRoot;
- [Func="Document::IsCallerChromeOrAddon", BinaryName="shadowRoot"]
- readonly attribute ShadowRoot? openOrClosedShadowRoot;
- [BinaryName="assignedSlotByMode"]
- readonly attribute HTMLSlotElement? assignedSlot;
- [ChromeOnly, BinaryName="assignedSlot"]
- readonly attribute HTMLSlotElement? openOrClosedAssignedSlot;
- [CEReactions, Unscopable, SetterThrows]
- attribute DOMString slot;
- };
- Element includes ChildNode;
- Element includes NonDocumentTypeChildNode;
- Element includes ParentNode;
- Element includes Animatable;
- Element includes GeometryUtils;
- Element includes ARIAMixin;
- // https://fullscreen.spec.whatwg.org/#api
- partial interface Element {
- [NewObject, NeedsCallerType]
- Promise<undefined> requestFullscreen();
- [NewObject, BinaryName="requestFullscreen", NeedsCallerType, Deprecated="MozRequestFullScreenDeprecatedPrefix"]
- Promise<undefined> mozRequestFullScreen();
- // Events handlers
- attribute EventHandler onfullscreenchange;
- attribute EventHandler onfullscreenerror;
- };
- // https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
- partial interface Element {
- [NeedsCallerType, Pref="dom.pointer-lock.enabled"]
- undefined requestPointerLock();
- };
- // Mozilla-specific additions to support devtools
- partial interface Element {
- // Support reporting of Flexbox properties
- /**
- * If this element has a display:flex or display:inline-flex style,
- * this property returns an object with computed values for flex
- * properties, as well as a property that exposes the flex lines
- * in this container.
- */
- [ChromeOnly, Pure]
- Flex? getAsFlexContainer();
- // Support reporting of Grid properties
- /**
- * If this element has a display:grid or display:inline-grid style,
- * this property returns an object with computed values for grid
- * tracks and lines.
- */
- [ChromeOnly, Pure]
- sequence<Grid> getGridFragments();
- /**
- * Returns whether there are any grid fragments on this element.
- */
- [ChromeOnly, Pure]
- boolean hasGridFragments();
- /**
- * Returns a sequence of all the descendent elements of this element
- * that have display:grid or display:inline-grid style and generate
- * a frame.
- */
- [ChromeOnly, Pure]
- sequence<Element> getElementsWithGrid();
- /**
- * Set attribute on the Element with a customized Content-Security-Policy
- * appropriate to devtools, which includes:
- * style-src 'unsafe-inline'
- */
- [ChromeOnly, CEReactions, Throws]
- undefined setAttributeDevtools(DOMString name, DOMString value);
- [ChromeOnly, CEReactions, Throws]
- undefined setAttributeDevtoolsNS(DOMString? namespace, DOMString name, DOMString value);
- /**
- * Provide a direct way to determine if this Element has visible
- * scrollbars. Flushes layout.
- */
- [ChromeOnly]
- readonly attribute boolean hasVisibleScrollbars;
- };
- // These variables are used in vtt.js, they are used for positioning vtt cues.
- partial interface Element {
- // These two attributes are a double version of the clientHeight and the
- // clientWidth.
- [ChromeOnly]
- readonly attribute double clientHeightDouble;
- [ChromeOnly]
- readonly attribute double clientWidthDouble;
- // This attribute returns the block size of the first line box under the different
- // writing directions. If the direction is horizontal, it represents box's
- // height. If the direction is vertical, it represents box's width.
- [ChromeOnly]
- readonly attribute double firstLineBoxBSize;
- };
- // Sanitizer API, https://wicg.github.io/sanitizer-api/
- dictionary SetHTMLOptions {
- SanitizerConfig sanitizer;
- };
- partial interface Element {
- [SecureContext, UseCounter, Throws, Pref="dom.security.setHTML.enabled"]
- undefined setHTML(DOMString aInnerHTML, optional SetHTMLOptions options = {});
- };
- partial interface Element {
- // https://html.spec.whatwg.org/#dom-element-sethtmlunsafe
- [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- undefined setHTMLUnsafe(DOMString html);
- };
-
- /* ---------------------- ElementInternals ----------------------------- */
- /* ./webidl/ElementInternals.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/#elementinternals
- */
- [Exposed=Window]
- interface ElementInternals {
- // Shadow root access
- readonly attribute ShadowRoot? shadowRoot;
- // Form-associated custom elements
- [Throws]
- undefined setFormValue((File or USVString or FormData)? value,
- optional (File or USVString or FormData)? state);
- [Throws]
- readonly attribute HTMLFormElement? form;
- [Throws]
- undefined setValidity(optional ValidityStateFlags flags = {},
- optional DOMString message,
- optional HTMLElement anchor);
- [Throws]
- readonly attribute boolean willValidate;
- [Throws]
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- [Throws]
- boolean checkValidity();
- [Throws]
- boolean reportValidity();
- [Throws]
- readonly attribute NodeList labels;
- [Pref="dom.element.customstateset.enabled", SameObject] readonly attribute CustomStateSet states;
- };
- [Pref="dom.element.customstateset.enabled", Exposed=Window]
- interface CustomStateSet {
- setlike<DOMString>;
- };
- partial interface CustomStateSet {
- // Setlike methods need to be overriden.
- [Throws]
- undefined add(DOMString state);
- [Throws]
- boolean delete(DOMString state);
- [Throws]
- undefined clear();
- };
- partial interface ElementInternals {
- [ChromeOnly, Throws]
- readonly attribute HTMLElement? validationAnchor;
- };
- ElementInternals includes ARIAMixin;
- dictionary ValidityStateFlags {
- boolean valueMissing = false;
- boolean typeMismatch = false;
- boolean patternMismatch = false;
- boolean tooLong = false;
- boolean tooShort = false;
- boolean rangeUnderflow = false;
- boolean rangeOverflow = false;
- boolean stepMismatch = false;
- boolean badInput = false;
- boolean customError = false;
- };
-
- /* ---------------------- EncodedAudioChunk ----------------------------- */
- /* ./webidl/EncodedAudioChunk.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#encodedaudiochunk
- */
- // [Serializable] is implemented without adding attribute here.
- [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
- interface EncodedAudioChunk {
- [Throws]
- constructor(EncodedAudioChunkInit init);
- readonly attribute EncodedAudioChunkType type;
- readonly attribute long long timestamp; // microseconds
- readonly attribute unsigned long long? duration; // microseconds
- readonly attribute unsigned long byteLength;
- [Throws]
- undefined copyTo(
- // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)`
- ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination);
- };
- dictionary EncodedAudioChunkInit {
- required EncodedAudioChunkType type;
- required [EnforceRange] long long timestamp; // microseconds
- [EnforceRange] unsigned long long duration; // microseconds
- // bug 1696216: Should be AllowSharedBufferSource
- required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
- sequence<ArrayBuffer> transfer = [];
- };
- enum EncodedAudioChunkType {
- "key",
- "delta"
- };
-
- /* ---------------------- EncodedVideoChunk ----------------------------- */
- /* ./webidl/EncodedVideoChunk.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#encodedvideochunk
- */
- // [Serializable] is implemented without adding attribute here.
- [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
- interface EncodedVideoChunk {
- [Throws]
- constructor(EncodedVideoChunkInit init);
- readonly attribute EncodedVideoChunkType type;
- readonly attribute long long timestamp; // microseconds
- readonly attribute unsigned long long? duration; // microseconds
- readonly attribute unsigned long byteLength;
- // bug 1696216: Should be `copyTo([AllowShared] BufferSource destination)`
- [Throws]
- undefined copyTo(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination);
- };
- dictionary EncodedVideoChunkInit {
- required EncodedVideoChunkType type;
- required [EnforceRange] long long timestamp; // microseconds
- [EnforceRange] unsigned long long duration; // microseconds
- // bug 1696216: Should be `required BufferSource data`
- required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data;
- };
- enum EncodedVideoChunkType {
- "key",
- "delta",
- };
-
- /* ---------------------- ErrorEvent ----------------------------- */
- /* ./webidl/ErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/#the-errorevent-interface
- */
- [Exposed=(Window,Worker)]
- interface ErrorEvent : Event
- {
- constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
- readonly attribute DOMString message;
- readonly attribute DOMString filename;
- readonly attribute unsigned long lineno;
- readonly attribute unsigned long colno;
- readonly attribute any error;
- };
- dictionary ErrorEventInit : EventInit
- {
- DOMString message = "";
- DOMString filename = "";
- unsigned long lineno = 0;
- unsigned long colno = 0;
- any error;
- };
-
- /* ---------------------- Event ----------------------------- */
- /* ./webidl/Event.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker,AudioWorklet), ProbablyShortLivingWrapper]
- interface Event {
- constructor(DOMString type, optional EventInit eventInitDict = {});
- [Pure]
- readonly attribute DOMString type;
- [Pure, BindingAlias="srcElement"]
- readonly attribute EventTarget? target;
- [Pure]
- readonly attribute EventTarget? currentTarget;
- sequence<EventTarget> composedPath();
- const unsigned short NONE = 0;
- const unsigned short CAPTURING_PHASE = 1;
- const unsigned short AT_TARGET = 2;
- const unsigned short BUBBLING_PHASE = 3;
- [Pure]
- readonly attribute unsigned short eventPhase;
- undefined stopPropagation();
- undefined stopImmediatePropagation();
- [Pure]
- readonly attribute boolean bubbles;
- [Pure]
- readonly attribute boolean cancelable;
- [NeedsCallerType]
- attribute boolean returnValue;
- [NeedsCallerType]
- undefined preventDefault();
- [Pure, NeedsCallerType]
- readonly attribute boolean defaultPrevented;
- [ChromeOnly, Pure]
- readonly attribute boolean defaultPreventedByChrome;
- [ChromeOnly, Pure]
- readonly attribute boolean defaultPreventedByContent;
- [Pure]
- readonly attribute boolean composed;
- [LegacyUnforgeable, Pure]
- readonly attribute boolean isTrusted;
- [Pure]
- readonly attribute DOMHighResTimeStamp timeStamp;
- undefined initEvent(DOMString type,
- optional boolean bubbles = false,
- optional boolean cancelable = false);
- attribute boolean cancelBubble;
- };
- // Mozilla specific legacy stuff.
- partial interface Event {
- const long ALT_MASK = 0x00000001;
- const long CONTROL_MASK = 0x00000002;
- const long SHIFT_MASK = 0x00000004;
- const long META_MASK = 0x00000008;
- /** The original target of the event, before any retargetings. */
- readonly attribute EventTarget? originalTarget;
- /**
- * The explicit original target of the event. If the event was retargeted
- * for some reason other than an anonymous boundary crossing, this will be set
- * to the target before the retargeting occurs. For example, mouse events
- * are retargeted to their parent node when they happen over text nodes (bug
- * 185889), and in that case .target will show the parent and
- * .explicitOriginalTarget will show the text node.
- * .explicitOriginalTarget differs from .originalTarget in that it will never
- * contain anonymous content.
- */
- readonly attribute EventTarget? explicitOriginalTarget;
- [ChromeOnly] readonly attribute EventTarget? composedTarget;
- [ChromeOnly] undefined preventMultipleActions();
- [ChromeOnly] readonly attribute boolean multipleActionsPrevented;
- [ChromeOnly] readonly attribute boolean isSynthesized;
- /**
- * When the event target is a remote browser, calling this will fire an
- * reply event in the chrome process.
- */
- [ChromeOnly] undefined requestReplyFromRemoteContent();
- /**
- * Returns true when the event shouldn't be handled by chrome.
- */
- [ChromeOnly] readonly attribute boolean isWaitingReplyFromRemoteContent;
- /**
- * Returns true when the event is a reply event from a remote process.
- */
- [ChromeOnly] readonly attribute boolean isReplyEventFromRemoteContent;
- };
- dictionary EventInit {
- boolean bubbles = false;
- boolean cancelable = false;
- boolean composed = false;
- };
-
- /* ---------------------- EventHandler ----------------------------- */
- /* ./webidl/EventHandler.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#eventhandler
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyTreatNonObjectAsNull]
- callback EventHandlerNonNull = any (Event event);
- typedef EventHandlerNonNull? EventHandler;
- [LegacyTreatNonObjectAsNull]
- callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
- typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
- [LegacyTreatNonObjectAsNull]
- callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
- typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
- interface mixin GlobalEventHandlers {
- attribute EventHandler onabort;
- attribute EventHandler onblur;
- // We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
- // below.
- // attribute OnErrorEventHandler onerror;
- attribute EventHandler onfocus;
- attribute EventHandler oncancel;
- attribute EventHandler onauxclick;
- attribute EventHandler onbeforeinput;
- [Pref="dom.element.popover.enabled"]
- attribute EventHandler onbeforetoggle;
- attribute EventHandler oncanplay;
- attribute EventHandler oncanplaythrough;
- attribute EventHandler onchange;
- attribute EventHandler onclick;
- attribute EventHandler onclose;
- attribute EventHandler oncontextlost;
- attribute EventHandler oncontextmenu;
- attribute EventHandler oncontextrestored;
- attribute EventHandler oncopy;
- attribute EventHandler oncuechange;
- attribute EventHandler oncut;
- attribute EventHandler ondblclick;
- attribute EventHandler ondrag;
- attribute EventHandler ondragend;
- attribute EventHandler ondragenter;
- [Func="Event::IsDragExitEnabled"]
- attribute EventHandler ondragexit;
- attribute EventHandler ondragleave;
- attribute EventHandler ondragover;
- attribute EventHandler ondragstart;
- attribute EventHandler ondrop;
- attribute EventHandler ondurationchange;
- attribute EventHandler onemptied;
- attribute EventHandler onended;
- attribute EventHandler onformdata;
- attribute EventHandler oninput;
- attribute EventHandler oninvalid;
- attribute EventHandler onkeydown;
- attribute EventHandler onkeypress;
- attribute EventHandler onkeyup;
- attribute EventHandler onload;
- attribute EventHandler onloadeddata;
- attribute EventHandler onloadedmetadata;
- attribute EventHandler onloadstart;
- attribute EventHandler onmousedown;
- [LegacyLenientThis] attribute EventHandler onmouseenter;
- [LegacyLenientThis] attribute EventHandler onmouseleave;
- attribute EventHandler onmousemove;
- attribute EventHandler onmouseout;
- attribute EventHandler onmouseover;
- attribute EventHandler onmouseup;
- attribute EventHandler onwheel;
- attribute EventHandler onpaste;
- attribute EventHandler onpause;
- attribute EventHandler onplay;
- attribute EventHandler onplaying;
- attribute EventHandler onprogress;
- attribute EventHandler onratechange;
- attribute EventHandler onreset;
- attribute EventHandler onresize;
- attribute EventHandler onscroll;
- attribute EventHandler onscrollend;
- attribute EventHandler onsecuritypolicyviolation;
- attribute EventHandler onseeked;
- attribute EventHandler onseeking;
- attribute EventHandler onselect;
- attribute EventHandler onslotchange;
- //(Not implemented)attribute EventHandler onsort;
- attribute EventHandler onstalled;
- attribute EventHandler onsubmit;
- attribute EventHandler onsuspend;
- attribute EventHandler ontimeupdate;
- attribute EventHandler onvolumechange;
- attribute EventHandler onwaiting;
- attribute EventHandler onselectstart;
- attribute EventHandler onselectionchange;
- attribute EventHandler ontoggle;
- // Pointer events handlers
- attribute EventHandler onpointercancel;
- attribute EventHandler onpointerdown;
- attribute EventHandler onpointerup;
- attribute EventHandler onpointermove;
- attribute EventHandler onpointerout;
- attribute EventHandler onpointerover;
- attribute EventHandler onpointerenter;
- attribute EventHandler onpointerleave;
- attribute EventHandler ongotpointercapture;
- attribute EventHandler onlostpointercapture;
- // Mozilla-specific handlers. Unprefixed handlers live in
- // Document rather than here.
- [Deprecated="MozfullscreenchangeDeprecatedPrefix"]
- attribute EventHandler onmozfullscreenchange;
- [Deprecated="MozfullscreenerrorDeprecatedPrefix"]
- attribute EventHandler onmozfullscreenerror;
- // CSS-Animation and CSS-Transition handlers.
- attribute EventHandler onanimationcancel;
- attribute EventHandler onanimationend;
- attribute EventHandler onanimationiteration;
- attribute EventHandler onanimationstart;
- attribute EventHandler ontransitioncancel;
- attribute EventHandler ontransitionend;
- attribute EventHandler ontransitionrun;
- attribute EventHandler ontransitionstart;
- // CSS-Animation and CSS-Transition legacy handlers.
- // This handler isn't standard.
- [BinaryName="onwebkitAnimationEnd"]
- attribute EventHandler onwebkitanimationend;
- [BinaryName="onwebkitAnimationIteration"]
- attribute EventHandler onwebkitanimationiteration;
- [BinaryName="onwebkitAnimationStart"]
- attribute EventHandler onwebkitanimationstart;
- [BinaryName="onwebkitTransitionEnd"]
- attribute EventHandler onwebkittransitionend;
- };
- interface mixin WindowEventHandlers {
- attribute EventHandler onafterprint;
- attribute EventHandler onbeforeprint;
- attribute OnBeforeUnloadEventHandler onbeforeunload;
- attribute EventHandler onhashchange;
- attribute EventHandler onlanguagechange;
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- attribute EventHandler onoffline;
- attribute EventHandler ononline;
- attribute EventHandler onpagehide;
- attribute EventHandler onpageshow;
- attribute EventHandler onpopstate;
- attribute EventHandler onrejectionhandled;
- attribute EventHandler onstorage;
- attribute EventHandler onunhandledrejection;
- attribute EventHandler onunload;
- };
- // https://w3c.github.io/gamepad/#extensions-to-the-windoweventhandlers-interface-mixin
- partial interface mixin WindowEventHandlers {
- attribute EventHandler ongamepadconnected;
- attribute EventHandler ongamepaddisconnected;
- };
- // The spec has |attribute OnErrorEventHandler onerror;| on
- // GlobalEventHandlers, and calls the handler differently depending on
- // whether an ErrorEvent was fired. We don't do that, and until we do we'll
- // need to distinguish between onerror on Window or on nodes.
- interface mixin OnErrorEventHandlerForNodes {
- attribute EventHandler onerror;
- };
- interface mixin OnErrorEventHandlerForWindow {
- attribute OnErrorEventHandler onerror;
- };
-
- /* ---------------------- EventListener ----------------------------- */
- /* ./webidl/EventListener.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- callback interface EventListener {
- undefined handleEvent(Event event);
- };
-
- /* ---------------------- EventSource ----------------------------- */
- /* ./webidl/EventSource.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/comms.html#the-eventsource-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface EventSource : EventTarget {
- [Throws]
- constructor(USVString url, optional EventSourceInit eventSourceInitDict = {});
- [Constant]
- readonly attribute DOMString url;
- [Constant]
- readonly attribute boolean withCredentials;
- // ready state
- const unsigned short CONNECTING = 0;
- const unsigned short OPEN = 1;
- const unsigned short CLOSED = 2;
- readonly attribute unsigned short readyState;
- // networking
- attribute EventHandler onopen;
- attribute EventHandler onmessage;
- attribute EventHandler onerror;
- undefined close();
- };
- dictionary EventSourceInit {
- boolean withCredentials = false;
- };
-
- /* ---------------------- EventTarget ----------------------------- */
- /* ./webidl/EventTarget.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary EventListenerOptions {
- boolean capture = false;
- /* Setting to true make the listener be added to the system group. */
- [Func="ThreadSafeIsChromeOrUAWidget"]
- boolean mozSystemGroup = false;
- };
- dictionary AddEventListenerOptions : EventListenerOptions {
- boolean passive;
- boolean once = false;
- AbortSignal signal;
- [ChromeOnly]
- boolean wantUntrusted;
- };
- [Exposed=*]
- interface EventTarget {
- [Throws]
- constructor();
- /* Passing null for wantsUntrusted means "default behavior", which
- differs in content and chrome. In content that default boolean
- value is true, while in chrome the default boolean value is
- false. */
- [Throws]
- undefined addEventListener(DOMString type,
- EventListener? listener,
- optional (AddEventListenerOptions or boolean) options = {},
- optional boolean? wantsUntrusted = null);
- [Throws]
- undefined removeEventListener(DOMString type,
- EventListener? listener,
- optional (EventListenerOptions or boolean) options = {});
- [Throws, NeedsCallerType]
- boolean dispatchEvent(Event event);
- };
- // Mozilla extensions for use by JS-implemented event targets to
- // implement on* properties.
- partial interface EventTarget {
- // The use of [TreatNonCallableAsNull] here is a bit of a hack: it just makes
- // the codegen check whether the type involved is either
- // [TreatNonCallableAsNull] or [TreatNonObjectAsNull] and if it is handle it
- // accordingly. In particular, it will NOT actually treat a non-null
- // non-callable object as null here.
- [ChromeOnly, Throws]
- undefined setEventHandler(DOMString type,
- [TreatNonCallableAsNull] EventHandler handler);
- [ChromeOnly]
- EventHandler getEventHandler(DOMString type);
- };
- // Mozilla extension to make firing events on event targets from
- // chrome easier. This returns the window which can be used to create
- // events to fire at this EventTarget, or null if there isn't one.
- partial interface EventTarget {
- [ChromeOnly, Exposed=Window, BinaryName="ownerGlobalForBindings"]
- readonly attribute WindowProxy? ownerGlobal;
- };
-
- /* ---------------------- ExtendableEvent ----------------------------- */
- /* ./webidl/ExtendableEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
- */
- [Exposed=ServiceWorker]
- interface ExtendableEvent : Event {
- constructor(DOMString type, optional ExtendableEventInit eventInitDict = {});
- // https://github.com/slightlyoff/ServiceWorker/issues/261
- [Throws]
- undefined waitUntil(Promise<any> p);
- };
- dictionary ExtendableEventInit : EventInit {
- // Defined for the forward compatibility across the derived events
- };
-
- /* ---------------------- ExtendableMessageEvent ----------------------------- */
- /* ./webidl/ExtendableMessageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://w3c.github.io/ServiceWorker/#extendablemessage-event-section
- */
- [Exposed=(ServiceWorker)]
- interface ExtendableMessageEvent : ExtendableEvent {
- constructor(DOMString type,
- optional ExtendableMessageEventInit eventInitDict = {});
- /**
- * Custom data associated with this event.
- */
- [GetterThrows]
- readonly attribute any data;
- /**
- * The origin of the site from which this event originated.
- */
- readonly attribute DOMString origin;
- /**
- * The last event ID string of the event source.
- */
- readonly attribute DOMString lastEventId;
- /**
- * The client, service worker or port which originated this event.
- */
- readonly attribute (Client or ServiceWorker or MessagePort)? source;
- [Constant, Cached, Frozen]
- readonly attribute sequence<MessagePort> ports;
- };
- dictionary ExtendableMessageEventInit : ExtendableEventInit {
- any data = null;
- DOMString origin = "";
- DOMString lastEventId = "";
- (Client or ServiceWorker or MessagePort)? source = null;
- sequence<MessagePort> ports = [];
- };
-
- /* ---------------------- ExtensionAlarms ----------------------------- */
- /* ./webidl/ExtensionAlarms.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- alarms
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "alarms" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionAlarms {
- // API methods.
- [Throws, WebExtensionStub="NoReturn"]
- undefined create(DOMString name, any alarmInfo);
- [Throws, WebExtensionStub="NoReturn"]
- undefined create(any alarmInfo);
- [Throws, WebExtensionStub="Async"]
- any get(DOMString name, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any get(optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any getAll(optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any clear(DOMString name, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any clear(optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any clearAll(optional Function callback);
- // API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onAlarm;
- };
-
- /* ---------------------- ExtensionBrowser ----------------------------- */
- /* ./webidl/ExtensionBrowser.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- *
- * This IDL file is related to interface mixin for the additional globals that should be
- * available in windows and service workers allowed to access the WebExtensions API and
- * the WebExtensions browser API namespace.
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- // WebExtensions API interface mixin (used to include ExtensionBrowser interface
- // in the ServiceWorkerGlobalScope and Window).
- [Exposed=(ServiceWorker)]
- interface mixin ExtensionGlobalsMixin {
- [Replaceable, SameObject, BinaryName="AcquireExtensionBrowser",
- BindingAlias="chrome", Func="extensions::ExtensionAPIAllowed"]
- readonly attribute ExtensionBrowser browser;
- };
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionBrowser {
- // A mock API only exposed in tests to unit test the internals
- // meant to be reused by the real WebExtensions API bindings
- // in xpcshell tests.
- [Replaceable, SameObject, BinaryName="GetExtensionMockAPI",
- Func="mozilla::extensions::ExtensionMockAPI::IsAllowed",
- Pref="extensions.webidl-api.expose_mock_interface"]
- readonly attribute ExtensionMockAPI mockExtensionAPI;
- // `browser.alarms` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionAlarms",
- Func="mozilla::extensions::ExtensionAlarms::IsAllowed"]
- readonly attribute ExtensionAlarms alarms;
- // `browser.browserSettings` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionBrowserSettings",
- Func="mozilla::extensions::ExtensionBrowserSettings::IsAllowed"]
- readonly attribute ExtensionBrowserSettings browserSettings;
- // `browser.dns` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionDns",
- Func="mozilla::extensions::ExtensionDns::IsAllowed"]
- readonly attribute ExtensionDns dns;
- // `browser.proxy` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionProxy",
- Func="mozilla::extensions::ExtensionProxy::IsAllowed"]
- readonly attribute ExtensionProxy proxy;
- // `browser.runtime` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionRuntime",
- Func="mozilla::extensions::ExtensionRuntime::IsAllowed"]
- readonly attribute ExtensionRuntime runtime;
- // `browser.scripting` API namespace
- [Replaceable, SameObject, BinaryName="GetExtensionScripting",
- Func="mozilla::extensions::ExtensionScripting::IsAllowed"]
- readonly attribute ExtensionScripting scripting;
- // `browser.test` API namespace, available in tests.
- [Replaceable, SameObject, BinaryName="GetExtensionTest",
- Func="mozilla::extensions::ExtensionTest::IsAllowed"]
- readonly attribute ExtensionTest test;
- };
-
- /* ---------------------- ExtensionBrowserSettings ----------------------------- */
- /* ./webidl/ExtensionBrowserSettings.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- browserSettings
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "browserSettings" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionBrowserSettings {
- // API properties.
- [Replaceable]
- readonly attribute ExtensionSetting allowPopupsForUserEvents;
- [Replaceable]
- readonly attribute ExtensionSetting cacheEnabled;
- [Replaceable]
- readonly attribute ExtensionSetting closeTabsByDoubleClick;
- [Replaceable]
- readonly attribute ExtensionSetting contextMenuShowEvent;
- [Replaceable]
- readonly attribute ExtensionSetting ftpProtocolEnabled;
- [Replaceable]
- readonly attribute ExtensionSetting homepageOverride;
- [Replaceable]
- readonly attribute ExtensionSetting imageAnimationBehavior;
- [Replaceable]
- readonly attribute ExtensionSetting newTabPageOverride;
- [Replaceable]
- readonly attribute ExtensionSetting newTabPosition;
- [Replaceable]
- readonly attribute ExtensionSetting openBookmarksInNewTabs;
- [Replaceable]
- readonly attribute ExtensionSetting openSearchResultsInNewTabs;
- [Replaceable]
- readonly attribute ExtensionSetting openUrlbarResultsInNewTabs;
- [Replaceable]
- readonly attribute ExtensionSetting webNotificationsDisabled;
- [Replaceable]
- readonly attribute ExtensionSetting overrideDocumentColors;
- [Replaceable]
- readonly attribute ExtensionSetting overrideContentColorScheme;
- [Replaceable]
- readonly attribute ExtensionSetting useDocumentFonts;
- [Replaceable]
- readonly attribute ExtensionSetting zoomFullPage;
- [Replaceable]
- readonly attribute ExtensionSetting zoomSiteSpecific;
- // API child namespaces.
- [Replaceable, SameObject,
- BinaryName="GetExtensionBrowserSettingsColorManagement",
- Func="mozilla::extensions::ExtensionBrowserSettingsColorManagement::IsAllowed"]
- readonly attribute ExtensionBrowserSettingsColorManagement colorManagement;
- };
-
- /* ---------------------- ExtensionBrowserSettingsColorManagement ----------------------------- */
- /* ./webidl/ExtensionBrowserSettingsColorManagement.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- browserSettings.colorManagement
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "browserSettings.colorManagement" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionBrowserSettingsColorManagement {
- // API properties.
- [Replaceable]
- readonly attribute ExtensionSetting mode;
- [Replaceable]
- readonly attribute ExtensionSetting useNativeSRGB;
- [Replaceable]
- readonly attribute ExtensionSetting useWebRenderCompositor;
- };
-
- /* ---------------------- ExtensionDns ----------------------------- */
- /* ./webidl/ExtensionDns.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- dns
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "dns" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionDns {
- // API methods.
- [Throws, WebExtensionStub="AsyncAmbiguous"]
- any resolve(any... args);
- };
-
- /* ---------------------- ExtensionEventManager ----------------------------- */
- /* ./webidl/ExtensionEventManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- *
- * This IDL file is related to the WebExtensions API object.
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionEventManager {
- [Throws]
- undefined addListener(Function callback, optional object listenerOptions);
- [Throws]
- undefined removeListener(Function callback);
- [Throws]
- boolean hasListener(Function callback);
- [Throws]
- boolean hasListeners();
- };
-
- /* ---------------------- ExtensionMockAPI ----------------------------- */
- /* ./webidl/ExtensionMockAPI.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- *
- * This IDL file is related to the WebExtensions API object only used in
- * unit tests.
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- // WebIDL definition for the "mockExtensionAPI" WebExtensions API,
- // only available in tests and locked behind an about:config preference
- // ("extensions.webidl-api.expose_mock_interface").
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionMockAPI {
- // Test API methods scenarios.
- [Throws, WebExtensionStub]
- any methodSyncWithReturn(any... args);
- [Throws, WebExtensionStub="NoReturn"]
- undefined methodNoReturn(any... args);
- [Throws, WebExtensionStub="Async"]
- any methodAsync(any arg0, optional Function cb);
- [Throws, WebExtensionStub="AsyncAmbiguous"]
- any methodAmbiguousArgsAsync(any... args);
- [Throws, WebExtensionStub="ReturnsPort"]
- ExtensionPort methodReturnsPort(DOMString testName);
- // Test API properties.
- [Replaceable]
- readonly attribute any propertyAsErrorObject;
- [Replaceable]
- readonly attribute DOMString propertyAsString;
- // Test API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onTestEvent;
- };
-
- /* ---------------------- ExtensionPort ----------------------------- */
- /* ./webidl/ExtensionPort.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- *
- * This IDL file is related to the WebExtensions browser.runtime's Port.
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionPort {
- [Replaceable]
- readonly attribute DOMString name;
- [Replaceable]
- readonly attribute any sender;
- [Replaceable]
- readonly attribute any error;
- [Throws, WebExtensionStub="NoReturn"]
- undefined disconnect();
- [Throws, WebExtensionStub="NoReturn"]
- undefined postMessage(any message);
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onDisconnect;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onMessage;
- };
- // Dictionary used by ExtensionAPIRequestForwarder and ExtensionCallabck to receive from the
- // mozIExtensionAPIRequestHandler an internal description of a runtime.Port (and then used in
- // the webidl implementation to create an ExtensionPort instance).
- [GenerateInit]
- dictionary ExtensionPortDescriptor {
- required DOMString portId;
- DOMString name = "";
- };
-
- /* ---------------------- ExtensionProxy ----------------------------- */
- /* ./webidl/ExtensionProxy.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- proxy
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "proxy" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionProxy {
- // API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onRequest;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onError;
- // API properties.
- [Replaceable]
- readonly attribute ExtensionSetting settings;
- };
-
- /* ---------------------- ExtensionRuntime ----------------------------- */
- /* ./webidl/ExtensionRuntime.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- runtime
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "runtime" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionRuntime {
- // API methods.
- [Throws, WebExtensionStub="Async"]
- any openOptionsPage(optional Function callback);
- [Throws, WebExtensionStub]
- any getManifest();
- [Throws, WebExtensionStub="ReturnsString"]
- DOMString getURL(DOMString path);
- [Throws, WebExtensionStub="Async"]
- any setUninstallURL(DOMString url, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any setUninstallURL(optional Function callback);
- [Throws, WebExtensionStub="NoReturn"]
- undefined reload();
- [Throws, WebExtensionStub="ReturnsPort"]
- ExtensionPort connect(DOMString extensionId, any connectInfo);
- [Throws, WebExtensionStub="ReturnsPort"]
- ExtensionPort connect(any connectInfo);
- [Throws, WebExtensionStub="ReturnsPort"]
- ExtensionPort connect();
- [Throws, WebExtensionStub="ReturnsPort"]
- ExtensionPort connectNative(DOMString application);
- [Throws, WebExtensionStub="AsyncAmbiguous"]
- any sendMessage(any... args);
- [Throws, WebExtensionStub="Async"]
- any sendNativeMessage(DOMString application, any message, optional Function responseCallback);
- [Throws, WebExtensionStub="Async"]
- any getBrowserInfo(optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any getPlatformInfo(optional Function callback);
- // API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onStartup;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onInstalled;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onUpdateAvailable;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onConnect;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onConnectExternal;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onMessage;
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onMessageExternal;
- // API properties.
- [Replaceable]
- readonly attribute any lastError;
- [Replaceable]
- readonly attribute DOMString id;
- };
-
- /* ---------------------- ExtensionScripting ----------------------------- */
- /* ./webidl/ExtensionScripting.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- scripting
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "scripting" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionScripting {
- // API methods.
- [Throws, WebExtensionStub="NotImplementedAsync"]
- any executeScript(any injection, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any insertCSS(any injection, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any removeCSS(any injection, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any registerContentScripts(any scripts, optional Function callback);
- [Throws, WebExtensionStub="AsyncAmbiguous"]
- any getRegisteredContentScripts(any... args);
- [Throws, WebExtensionStub="AsyncAmbiguous"]
- any unregisterContentScripts(any... args);
- [Throws, WebExtensionStub="Async"]
- any updateContentScripts(any scripts, optional Function callback);
- };
-
- /* ---------------------- ExtensionSetting ----------------------------- */
- /* ./webidl/ExtensionSetting.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- *
- * This IDL file is related to the WebExtensions API object.
- *
- * The ExtensionSetting interface is used by the API namespace that expose
- * settings API sub-namespaces (in particular browserSettings, proxy,
- * captivePortal and privacy WebExtensions APIs).
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionSetting {
- // API methods.
- [Throws, WebExtensionStub="Async"]
- any get(object details, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any set(object details, optional Function callback);
- [Throws, WebExtensionStub="Async"]
- any clear(object details, optional Function callback);
- // API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onChange;
- };
-
- /* ---------------------- ExtensionTest ----------------------------- */
- /* ./webidl/ExtensionTest.webidl */
-
- /*
- * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
- *
- * The content of this file has been generated based on the WebExtensions API
- * JSONSchema using the following command:
- *
- * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
- * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- test
- *
- * More info about generating webidl API bindings for WebExtensions API at:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
- *
- * A short summary of the special setup used by these WebIDL files (meant to aid
- * webidl peers reviews and sign-offs) is available in the following section:
- *
- * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- // WebIDL definition for the "test" WebExtensions API
- [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
- interface ExtensionTest {
- // API methods.
- [Throws, WebExtensionStub="NotImplementedNoReturn"]
- undefined withHandlingUserInput(Function callback);
- [Throws, WebExtensionStub="NoReturn"]
- undefined notifyFail(DOMString message);
- [Throws, WebExtensionStub="NoReturn"]
- undefined notifyPass(DOMString message);
- [Throws, WebExtensionStub="NoReturn"]
- undefined notifyPass();
- [Throws, WebExtensionStub="NoReturn"]
- undefined log(DOMString message);
- [Throws, WebExtensionStub="NoReturn"]
- undefined sendMessage(any... args);
- [Throws, WebExtensionStub="NoReturn"]
- undefined fail(any message);
- [Throws, WebExtensionStub="NoReturn"]
- undefined fail();
- [Throws, WebExtensionStub="NoReturn"]
- undefined succeed(any message);
- [Throws, WebExtensionStub="NoReturn"]
- undefined succeed();
- [Throws, WebExtensionStub="NoReturn"]
- undefined assertTrue(any... args);
- [Throws, WebExtensionStub="NoReturn"]
- undefined assertFalse(any... args);
- [Throws, WebExtensionStub="NoReturn"]
- undefined assertDeepEq(any... args);
- [Throws, WebExtensionStub="AssertEq"]
- undefined assertEq(any... args);
- [Throws]
- any assertRejects(Promise<any> promise, any expectedError, DOMString message, optional Function callback);
- [Throws]
- any assertRejects(Promise<any> promise, any expectedError, optional Function callback);
- [Throws]
- undefined assertThrows(Function func, any expectedError, DOMString message);
- [Throws]
- undefined assertThrows(Function func, any expectedError);
- // API events.
- [Replaceable, SameObject]
- readonly attribute ExtensionEventManager onMessage;
- };
-
- /* ---------------------- External ----------------------------- */
- /* ./webidl/External.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [LegacyNoInterfaceObject, Exposed=Window]
- interface External {
- [Deprecated="External_AddSearchProvider"]
- undefined AddSearchProvider();
- undefined IsSearchProviderInstalled();
- };
-
- /* ---------------------- FailedCertSecurityInfo ----------------------------- */
- /* ./webidl/FailedCertSecurityInfo.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * This dictionary is used for exposing failed channel certificate information
- * to about:certerror to display information.
- */
- enum OverridableErrorCategory {
- "unset",
- "trust-error",
- "domain-mismatch",
- "expired-or-not-yet-valid",
- };
- dictionary FailedCertSecurityInfo {
- DOMString errorCodeString = "";
- OverridableErrorCategory overridableErrorCategory = "unset";
- DOMTimeStamp validNotBefore = 0;
- DOMTimeStamp validNotAfter = 0;
- DOMString issuerCommonName = "";
- DOMTimeStamp certValidityRangeNotAfter = 0;
- DOMTimeStamp certValidityRangeNotBefore = 0;
- DOMString errorMessage = "";
- boolean hasHSTS = true;
- boolean hasHPKP = true;
- sequence<DOMString> certChainStrings;
- };
-
- /* ---------------------- FakePluginTagInit ----------------------------- */
- /* ./webidl/FakePluginTagInit.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * A fake plugin is fundamentally identified by its handlerURI.
- *
- * In addition to that, a fake plugin registration needs to provide at least one
- * FakePluginMimeEntry so we'll know what types(s) the plugin is registered for.
- * Other information is optional, though having usable niceName is highly
- * recommended.
- */
- [GenerateInit]
- dictionary FakePluginTagInit {
- required DOMString handlerURI;
- required sequence<FakePluginMimeEntry> mimeEntries;
- // The niceName should really be provided, and be unique, if possible; it can
- // be used as a key to persist state for this plug-in.
- DOMString niceName = "";
- // Other things can be provided but don't really matter that much.
- DOMString fullPath = "";
- DOMString name = "";
- DOMString description = "";
- DOMString fileName = "";
- DOMString version = "";
- /**
- * Optional script to run in a sandbox when instantiating a plugin. The script
- * runs in a sandbox with system principal in the process that contains the
- * element that instantiates the plugin (ie the EMBED or OBJECT element). The
- * sandbox global has a 'pluginElement' property that the script can use to
- * access the element that instantiates the plugin.
- */
- DOMString sandboxScript = "";
- };
- /**
- * A single MIME entry for the fake plugin.
- */
- dictionary FakePluginMimeEntry {
- required DOMString type;
- DOMString description = "";
- DOMString extension = "";
- };
-
- /* ---------------------- FeaturePolicy ----------------------------- */
- /* ./webidl/FeaturePolicy.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://w3c.github.io/webappsec-feature-policy/#idl-index
- */
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface FeaturePolicy {
- boolean allowsFeature(DOMString feature, optional DOMString origin);
- sequence<DOMString> features();
- sequence<DOMString> allowedFeatures();
- sequence<DOMString> getAllowlistForFeature(DOMString feature);
- };
- [Pref="dom.reporting.featurePolicy.enabled",
- Exposed=Window]
- interface FeaturePolicyViolationReportBody : ReportBody {
- readonly attribute DOMString featureId;
- readonly attribute DOMString? sourceFile;
- readonly attribute long? lineNumber;
- readonly attribute long? columnNumber;
- readonly attribute DOMString disposition;
- };
-
- /* ---------------------- Fetch ----------------------------- */
- /* ./webidl/Fetch.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://fetch.spec.whatwg.org/
- */
- typedef object JSON;
- typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) XMLHttpRequestBodyInit;
- /* no support for request body streams yet */
- typedef XMLHttpRequestBodyInit BodyInit;
- interface mixin Body {
- readonly attribute boolean bodyUsed;
- [NewObject]
- Promise<ArrayBuffer> arrayBuffer();
- [NewObject]
- Promise<Blob> blob();
- [NewObject]
- Promise<FormData> formData();
- [NewObject]
- Promise<JSON> json();
- [NewObject]
- Promise<USVString> text();
- };
- // These are helper dictionaries for the parsing of a
- // getReader().read().then(data) parsing.
- // See more about how these 2 helpers are used in
- // dom/fetch/FetchStreamReader.cpp
- [GenerateInit]
- dictionary FetchReadableStreamReadDataDone {
- boolean done = false;
- };
- [GenerateInit]
- dictionary FetchReadableStreamReadDataArray {
- Uint8Array value;
- };
-
- /* ---------------------- FetchEvent ----------------------------- */
- /* ./webidl/FetchEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
- */
- [Func="ServiceWorkerVisible",
- Exposed=(ServiceWorker)]
- interface FetchEvent : ExtendableEvent {
- constructor(DOMString type, FetchEventInit eventInitDict);
- [SameObject, BinaryName="request_"] readonly attribute Request request;
- [Pref="dom.serviceWorkers.navigationPreload.enabled"]
- readonly attribute Promise<any> preloadResponse;
- readonly attribute DOMString clientId;
- readonly attribute DOMString resultingClientId;
- readonly attribute Promise<undefined> handled;
- [Throws]
- undefined respondWith(Promise<Response> r);
- };
- dictionary FetchEventInit : EventInit {
- required Request request;
- DOMString clientId = "";
- DOMString resultingClientId = "";
- };
-
- /* ---------------------- FetchObserver ----------------------------- */
- /* ./webidl/FetchObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- callback interface ObserverCallback {
- undefined handleEvent(FetchObserver observer);
- };
- enum FetchState {
- // Pending states
- "requesting", "responding",
- // Final states
- "aborted", "errored", "complete"
- };
- [Exposed=(Window,Worker),
- Pref="dom.fetchObserver.enabled"]
- interface FetchObserver : EventTarget {
- readonly attribute FetchState state;
- // Events
- attribute EventHandler onstatechange;
- attribute EventHandler onrequestprogress;
- attribute EventHandler onresponseprogress;
- };
-
- /* ---------------------- File ----------------------------- */
- /* ./webidl/File.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/FileAPI/#file
- * https://wicg.github.io/entries-api
- */
- interface nsIFile;
- [Exposed=(Window,Worker)]
- interface File : Blob {
- [Throws]
- constructor(sequence<BlobPart> fileBits,
- USVString fileName, optional FilePropertyBag options = {});
- readonly attribute DOMString name;
- [GetterThrows]
- readonly attribute long long lastModified;
- };
- dictionary FilePropertyBag : BlobPropertyBag {
- long long lastModified;
- };
- dictionary ChromeFilePropertyBag : FilePropertyBag {
- DOMString name = "";
- boolean existenceCheck = true;
- };
- // https://wicg.github.io/entries-api
- partial interface File {
- [BinaryName="relativePath", Pref="dom.webkitBlink.dirPicker.enabled"]
- readonly attribute USVString webkitRelativePath;
- };
- // Mozilla extensions
- partial interface File {
- [GetterThrows, ChromeOnly, NeedsCallerType]
- readonly attribute DOMString mozFullPath;
- };
- // Mozilla extensions
- // These 2 methods can be used only in these conditions:
- // - the main-thread
- // - parent process OR file process OR, only for testing, with pref
- // `dom.file.createInChild' set to true.
- [Exposed=(Window)]
- partial interface File {
- [ChromeOnly, NewObject, NeedsCallerType]
- static Promise<File> createFromNsIFile(nsIFile file,
- optional ChromeFilePropertyBag options = {});
- [ChromeOnly, NewObject, NeedsCallerType]
- static Promise<File> createFromFileName(USVString fileName,
- optional ChromeFilePropertyBag options = {});
- };
-
- /* ---------------------- FileList ----------------------------- */
- /* ./webidl/FileList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2006/webapi/FileAPI/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface FileList {
- getter File? item(unsigned long index);
- readonly attribute unsigned long length;
- };
-
- /* ---------------------- FileMode ----------------------------- */
- /* ./webidl/FileMode.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- enum FileMode { "readonly", "readwrite" };
-
- /* ---------------------- FileReader ----------------------------- */
- /* ./webidl/FileReader.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/FileAPI/#APIASynch
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface FileReader : EventTarget {
- constructor();
- // async read methods
- [Throws]
- undefined readAsArrayBuffer(Blob blob);
- [Throws]
- undefined readAsBinaryString(Blob filedata);
- [Throws]
- undefined readAsText(Blob blob, optional DOMString label);
- [Throws]
- undefined readAsDataURL(Blob blob);
- undefined abort();
- // states
- const unsigned short EMPTY = 0;
- const unsigned short LOADING = 1;
- const unsigned short DONE = 2;
- readonly attribute unsigned short readyState;
- readonly attribute (DOMString or ArrayBuffer)? result;
- readonly attribute DOMException? error;
- // event handler attributes
- attribute EventHandler onloadstart;
- attribute EventHandler onprogress;
- attribute EventHandler onload;
- attribute EventHandler onabort;
- attribute EventHandler onerror;
- attribute EventHandler onloadend;
- };
-
- /* ---------------------- FileReaderSync ----------------------------- */
- /* ./webidl/FileReaderSync.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2006/webapi/FileAPI/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(DedicatedWorker,SharedWorker)]
- interface FileReaderSync {
- constructor();
- // Synchronously return strings
- [Throws]
- ArrayBuffer readAsArrayBuffer(Blob blob);
- [Throws]
- DOMString readAsBinaryString(Blob blob);
- [Throws]
- DOMString readAsText(Blob blob, optional DOMString encoding);
- [Throws]
- DOMString readAsDataURL(Blob blob);
- };
-
- /* ---------------------- FileSystem ----------------------------- */
- /* ./webidl/FileSystem.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://wicg.github.io/entries-api/#idl-index
- */
- dictionary FileSystemFlags {
- boolean create = false;
- boolean exclusive = false;
- };
- callback FileSystemEntryCallback = undefined (FileSystemEntry entry);
- callback ErrorCallback = undefined (DOMException err);
- [Exposed=Window]
- interface FileSystem {
- readonly attribute USVString name;
- readonly attribute FileSystemDirectoryEntry root;
- };
-
- /* ---------------------- FileSystemDirectoryEntry ----------------------------- */
- /* ./webidl/FileSystemDirectoryEntry.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://wicg.github.io/entries-api/#idl-index
- */
- [Exposed=Window]
- interface FileSystemDirectoryEntry : FileSystemEntry {
- FileSystemDirectoryReader createReader();
- undefined getFile(optional USVString? path,
- optional FileSystemFlags options = {},
- optional FileSystemEntryCallback successCallback,
- optional ErrorCallback errorCallback);
- undefined getDirectory(optional USVString? path,
- optional FileSystemFlags options = {},
- optional FileSystemEntryCallback successCallback,
- optional ErrorCallback errorCallback);
- };
-
- /* ---------------------- FileSystemDirectoryHandle ----------------------------- */
- /* ./webidl/FileSystemDirectoryHandle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- dictionary FileSystemGetFileOptions {
- boolean create = false;
- };
- dictionary FileSystemGetDirectoryOptions {
- boolean create = false;
- };
- dictionary FileSystemRemoveOptions {
- boolean recursive = false;
- };
- [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
- interface FileSystemDirectoryHandle : FileSystemHandle {
- async iterable<USVString, FileSystemHandle>;
- [NewObject]
- Promise<FileSystemFileHandle> getFileHandle(USVString name, optional FileSystemGetFileOptions options = {});
- [NewObject]
- Promise<FileSystemDirectoryHandle> getDirectoryHandle(USVString name, optional FileSystemGetDirectoryOptions options = {});
- [NewObject]
- Promise<undefined> removeEntry(USVString name, optional FileSystemRemoveOptions options = {});
- [NewObject]
- Promise<sequence<USVString>?> resolve(FileSystemHandle possibleDescendant);
- };
-
- /* ---------------------- FileSystemDirectoryIterator ----------------------------- */
- /* ./webidl/FileSystemDirectoryIterator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- // To implement FileSystemDirectoryHandle's async iteration until we can use
- // a natively supported `async iterable`.
- [Exposed=(Window,Worker), SecureContext, LegacyNoInterfaceObject]
- interface FileSystemDirectoryIterator {
- [NewObject]
- Promise<any> next();
- };
-
- /* ---------------------- FileSystemDirectoryReader ----------------------------- */
- /* ./webidl/FileSystemDirectoryReader.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://wicg.github.io/entries-api/#idl-index
- */
- callback FileSystemEntriesCallback = undefined (sequence<FileSystemEntry> entries);
- [Exposed=Window]
- interface FileSystemDirectoryReader {
- // readEntries can be called just once. The second time it returns no data.
- [Throws]
- undefined readEntries(FileSystemEntriesCallback successCallback,
- optional ErrorCallback errorCallback);
- };
-
- /* ---------------------- FileSystemEntry ----------------------------- */
- /* ./webidl/FileSystemEntry.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://wicg.github.io/entries-api/#idl-index
- */
- [Exposed=Window]
- interface FileSystemEntry {
- readonly attribute boolean isFile;
- readonly attribute boolean isDirectory;
- [GetterThrows]
- readonly attribute USVString name;
- [GetterThrows]
- readonly attribute USVString fullPath;
- readonly attribute FileSystem filesystem;
- undefined getParent(optional FileSystemEntryCallback successCallback,
- optional ErrorCallback errorCallback);
- };
-
- /* ---------------------- FileSystemFileEntry ----------------------------- */
- /* ./webidl/FileSystemFileEntry.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://wicg.github.io/entries-api/#idl-index
- */
- callback FileCallback = undefined (File file);
- [Exposed=Window]
- interface FileSystemFileEntry : FileSystemEntry {
- [BinaryName="GetFile"]
- undefined file (FileCallback successCallback,
- optional ErrorCallback errorCallback);
- };
-
- /* ---------------------- FileSystemFileHandle ----------------------------- */
- /* ./webidl/FileSystemFileHandle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- dictionary FileSystemCreateWritableOptions {
- boolean keepExistingData = false;
- };
- [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
- interface FileSystemFileHandle : FileSystemHandle {
- [NewObject]
- Promise<File> getFile();
- [NewObject]
- Promise<FileSystemWritableFileStream> createWritable(optional FileSystemCreateWritableOptions options = {});
- [Exposed=DedicatedWorker, NewObject]
- Promise<FileSystemSyncAccessHandle> createSyncAccessHandle();
- };
-
- /* ---------------------- FileSystemHandle ----------------------------- */
- /* ./webidl/FileSystemHandle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- enum FileSystemHandleKind {
- "file",
- "directory",
- };
- [Exposed=(Window,Worker), SecureContext, Serializable, Pref="dom.fs.enabled"]
- interface FileSystemHandle {
- readonly attribute FileSystemHandleKind kind;
- readonly attribute USVString name;
- /* https://whatpr.org/fs/10.html#api-filesystemhandle */
- [NewObject]
- Promise<undefined> move(USVString name);
- [NewObject]
- Promise<undefined> move(FileSystemDirectoryHandle parent);
- [NewObject]
- Promise<undefined> move(FileSystemDirectoryHandle parent, USVString name);
- [NewObject]
- Promise<boolean> isSameEntry(FileSystemHandle other);
- };
-
- /* ---------------------- FileSystemSyncAccessHandle ----------------------------- */
- /* ./webidl/FileSystemSyncAccessHandle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- dictionary FileSystemReadWriteOptions {
- [EnforceRange] unsigned long long at;
- };
- [Exposed=(DedicatedWorker), SecureContext, Pref="dom.fs.enabled"]
- interface FileSystemSyncAccessHandle {
- // TODO: Use `[AllowShared] BufferSource data` once it works (bug 1696216)
- [Throws] unsigned long long read(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
- [Throws] unsigned long long write(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) buffer, optional FileSystemReadWriteOptions options = {});
- [Throws] undefined truncate([EnforceRange] unsigned long long size);
- [Throws] unsigned long long getSize();
- [Throws] undefined flush();
- undefined close();
- };
-
- /* ---------------------- FileSystemWritableFileStream ----------------------------- */
- /* ./webidl/FileSystemWritableFileStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- enum WriteCommandType {
- "write",
- "seek",
- "truncate"
- };
- [GenerateConversionToJS]
- dictionary WriteParams {
- required WriteCommandType type;
- unsigned long long? size;
- unsigned long long? position;
- (BufferSource or Blob or UTF8String)? data;
- };
- typedef (BufferSource or Blob or UTF8String or WriteParams) FileSystemWriteChunkType;
- [Exposed=(Window,Worker), SecureContext, Pref="dom.fs.enabled"]
- interface FileSystemWritableFileStream : WritableStream {
- [NewObject, Throws]
- Promise<undefined> write(FileSystemWriteChunkType data);
- [NewObject]
- Promise<undefined> seek(unsigned long long position);
- [NewObject]
- Promise<undefined> truncate(unsigned long long size);
- };
-
- /* ---------------------- FinalizationRegistry ----------------------------- */
- /* ./webidl/FinalizationRegistry.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This IDL file contains a callback used to integrate JS FinalizationRegistry
- * objects with the browser.
- */
- callback FinalizationRegistryCleanupCallback = undefined();
-
- /* ---------------------- FocusEvent ----------------------------- */
- /* ./webidl/FocusEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface FocusEvent : UIEvent {
- constructor(DOMString typeArg,
- optional FocusEventInit focusEventInitDict = {});
- // Introduced in DOM Level 3:
- readonly attribute EventTarget? relatedTarget;
- };
- dictionary FocusEventInit : UIEventInit {
- EventTarget? relatedTarget = null;
- };
-
- /* ---------------------- FontFace ----------------------------- */
- /* ./webidl/FontFace.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-font-loading/#fontface-interface
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- typedef (ArrayBuffer or ArrayBufferView) BinaryData;
- dictionary FontFaceDescriptors {
- UTF8String style = "normal";
- UTF8String weight = "normal";
- UTF8String stretch = "normal";
- UTF8String unicodeRange = "U+0-10FFFF";
- UTF8String variant = "normal";
- UTF8String featureSettings = "normal";
- [Pref="layout.css.font-variations.enabled"] UTF8String variationSettings = "normal";
- UTF8String display = "auto";
- UTF8String ascentOverride = "normal";
- UTF8String descentOverride = "normal";
- UTF8String lineGapOverride = "normal";
- [Pref="layout.css.size-adjust.enabled"] UTF8String sizeAdjust = "100%";
- };
- enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
- [Exposed=(Window,Worker)]
- interface FontFace {
- [Throws]
- constructor(UTF8String family,
- (UTF8String or BinaryData) source,
- optional FontFaceDescriptors descriptors = {});
- [SetterThrows] attribute UTF8String family;
- [SetterThrows] attribute UTF8String style;
- [SetterThrows] attribute UTF8String weight;
- [SetterThrows] attribute UTF8String stretch;
- [SetterThrows] attribute UTF8String unicodeRange;
- [SetterThrows] attribute UTF8String variant;
- [SetterThrows] attribute UTF8String featureSettings;
- [SetterThrows, Pref="layout.css.font-variations.enabled"] attribute UTF8String variationSettings;
- [SetterThrows] attribute UTF8String display;
- [SetterThrows] attribute UTF8String ascentOverride;
- [SetterThrows] attribute UTF8String descentOverride;
- [SetterThrows] attribute UTF8String lineGapOverride;
- [SetterThrows, Pref="layout.css.size-adjust.enabled"] attribute UTF8String sizeAdjust;
- readonly attribute FontFaceLoadStatus status;
- [Throws]
- Promise<FontFace> load();
- [Throws]
- readonly attribute Promise<FontFace> loaded;
- };
-
- /* ---------------------- FontFaceSet ----------------------------- */
- /* ./webidl/FontFaceSet.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // To implement FontFaceSet's iterator until we can use setlike.
- dictionary FontFaceSetIteratorResult
- {
- required any value;
- required boolean done;
- };
- // To implement FontFaceSet's iterator until we can use setlike.
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface FontFaceSetIterator {
- [Throws] FontFaceSetIteratorResult next();
- };
- callback FontFaceSetForEachCallback = undefined (FontFace value, FontFace key, FontFaceSet set);
- enum FontFaceSetLoadStatus { "loading", "loaded" };
- [Exposed=(Window,Worker)]
- interface FontFaceSet : EventTarget {
- // Bug 1072762 is for the FontFaceSet constructor.
- // constructor(sequence<FontFace> initialFaces);
- // Emulate setlike behavior until we can use that directly.
- readonly attribute unsigned long size;
- [Throws] undefined add(FontFace font);
- boolean has(FontFace font);
- boolean delete(FontFace font);
- undefined clear();
- [NewObject] FontFaceSetIterator entries();
- // Iterator keys();
- [NewObject, Alias=keys, Alias="@@iterator"] FontFaceSetIterator values();
- [Throws] undefined forEach(FontFaceSetForEachCallback cb, optional any thisArg);
- // -- events for when loading state changes
- attribute EventHandler onloading;
- attribute EventHandler onloadingdone;
- attribute EventHandler onloadingerror;
- // check and start loads if appropriate
- // and fulfill promise when all loads complete
- [NewObject] Promise<sequence<FontFace>> load(UTF8String font, optional DOMString text = " ");
- // return whether all fonts in the fontlist are loaded
- // (does not initiate load if not available)
- [Throws] boolean check(UTF8String font, optional DOMString text = " ");
- // async notification that font loading and layout operations are done
- [Throws] readonly attribute Promise<undefined> ready;
- // loading state, "loading" while one or more fonts loading, "loaded" otherwise
- readonly attribute FontFaceSetLoadStatus status;
- };
-
- /* ---------------------- FontFaceSetLoadEvent ----------------------------- */
- /* ./webidl/FontFaceSetLoadEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary FontFaceSetLoadEventInit : EventInit {
- sequence<FontFace> fontfaces = [];
- };
- [Exposed=(Window,Worker)]
- interface FontFaceSetLoadEvent : Event {
- constructor(DOMString type,
- optional FontFaceSetLoadEventInit eventInitDict = {});
- [Cached, Constant, Frozen] readonly attribute sequence<FontFace> fontfaces;
- };
-
- /* ---------------------- FontFaceSource ----------------------------- */
- /* ./webidl/FontFaceSource.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/css-font-loading/#font-face-source
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin FontFaceSource {
- [Throws]
- readonly attribute FontFaceSet fonts;
- };
-
- /* ---------------------- FormData ----------------------------- */
- /* ./webidl/FormData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://xhr.spec.whatwg.org
- */
- typedef (Blob or Directory or USVString) FormDataEntryValue;
- [Exposed=(Window,Worker)]
- interface FormData {
- [Throws]
- constructor(optional HTMLFormElement form, optional HTMLElement? submitter = null);
- [Throws]
- undefined append(USVString name, Blob value, optional USVString filename);
- [Throws]
- undefined append(USVString name, USVString value);
- undefined delete(USVString name);
- FormDataEntryValue? get(USVString name);
- sequence<FormDataEntryValue> getAll(USVString name);
- boolean has(USVString name);
- [Throws]
- undefined set(USVString name, Blob value, optional USVString filename);
- [Throws]
- undefined set(USVString name, USVString value);
- iterable<USVString, FormDataEntryValue>;
- };
-
- /* ---------------------- FormDataEvent ----------------------------- */
- /* ./webidl/FormDataEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-formdataevent-interface
- */
- [Exposed=Window]
- interface FormDataEvent : Event {
- constructor(DOMString type, optional FormDataEventInit eventInitDict = {});
- // C++ can't deal with a method called FormData() in the generated code
- [BinaryName="GetFormData"]
- readonly attribute FormData formData;
- };
- dictionary FormDataEventInit : EventInit {
- required FormData formData;
- };
-
- /* ---------------------- FragmentDirective ----------------------------- */
- /* ./webidl/FragmentDirective.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://wicg.github.io/scroll-to-text-fragment/
- */
- [Exposed=Window, Pref="dom.text_fragments.enabled"]
- interface FragmentDirective {
- };
-
- /* ---------------------- FrameCrashedEvent ----------------------------- */
- /* ./webidl/FrameCrashedEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [ChromeOnly,
- Exposed=Window]
- interface FrameCrashedEvent : Event
- {
- constructor(DOMString type,
- optional FrameCrashedEventInit eventInitDict = {});
- /**
- * The browsingContextId of the frame that crashed.
- */
- readonly attribute unsigned long long browsingContextId;
- /**
- * True if the top-most frame crashed.
- */
- readonly attribute boolean isTopFrame;
- /**
- * Internal process identifier of the frame that crashed. This will be
- * 0 if this identifier is not known, for example a process that failed
- * to start.
- */
- readonly attribute unsigned long long childID;
- };
- dictionary FrameCrashedEventInit : EventInit
- {
- unsigned long long browsingContextId = 0;
- boolean isTopFrame = true;
- unsigned long long childID = 0;
- };
-
- /* ---------------------- Function ----------------------------- */
- /* ./webidl/Function.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#functiocn
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- callback Function = any(any... arguments);
- callback VoidFunction = undefined ();
-
- /* ---------------------- FuzzingFunctions ----------------------------- */
- /* ./webidl/FuzzingFunctions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * Various functions useful for automated fuzzing that are enabled
- * only in --enable-fuzzing builds, because they may be dangerous to
- * enable on untrusted pages.
- */
- [Pref="fuzzing.enabled",
- Exposed=Window]
- namespace FuzzingFunctions {
- /**
- * Synchronously perform a garbage collection.
- */
- undefined garbageCollect();
- /**
- * Synchronously perform a compacting garbage collection.
- */
- undefined garbageCollectCompacting();
- /**
- * Trigger a forced crash.
- */
- undefined crash(optional DOMString reason = "");
- /**
- * Synchronously perform a cycle collection.
- */
- undefined cycleCollect();
- /**
- * Send a memory pressure event, causes shrinking GC, cycle collection and
- * other actions.
- */
- undefined memoryPressure();
- /**
- * Enable accessibility.
- */
- [Throws]
- undefined enableAccessibility();
- /**
- * Send IPC fuzzing ready event to parent.
- */
- undefined signalIPCReady();
- /**
- * synthesizeKeyboardEvents() synthesizes a set of "keydown",
- * "keypress" (only when it's necessary) and "keyup" events in top DOM window
- * in current process (and the synthesized events will be retargeted to
- * focused window/document/element). I.e, this is currently not dispatched
- * via the main process if you call this in a content process. Therefore, in
- * the case, some default action handlers which are only in the main process
- * will never run. Note that this does not allow to synthesize keyboard
- * events if this is called from a keyboard event or composition event
- * listener.
- *
- * @param aKeyValue If you want to synthesize non-printable key
- * events, you need to set one of key values
- * defined by "UI Events KeyboardEvent key Values".
- * You can check our current support values in
- * dom/events/KeyNameList.h
- * If you want to synthesize printable key events,
- * you can set any string value including empty
- * string.
- * Note that |key| value in aDictionary is always
- * ignored.
- * @param aDictionary If you want to synthesize simple key press
- * without any modifiers, you can omit this.
- * Otherwise, specify this with proper values.
- * If |code| is omitted or empty string, this
- * guesses proper code value in US-English
- * keyboard. Otherwise, the value must be empty
- * string or known code value defined by "UI Events
- * KeyboardEvent code Values". You can check our
- * current support values in
- * dom/events/PhysicalKeyCodeNameList.h.
- * If |keyCode| is omitted or 0, this guesses
- * proper keyCode value in US-English keyboard.
- * If |location| is omitted or 0, this assumes
- * that left modifier key is pressed if aKeyValue
- * is one of such modifier keys.
- * |key|, |isComposing|, |charCode| and |which|
- * are always ignored.
- * Modifier states like |shiftKey|, |altKey|,
- * |modifierAltGraph|, |modifierCapsLock| and
- * |modifierNumLock| are not adjusted for
- * aKeyValue. Please specify them manually if
- * necessary.
- * Note that this API does not allow to dispatch
- * known key events with empty |code| value and
- * 0 |keyCode| value since it's unsual situation
- * especially 0 |keyCode| value with known key.
- * Note that when you specify only one of |code|
- * and |keyCode| value, the other will be guessed
- * from US-English keyboard layout. So, if you
- * want to emulate key press with another keyboard
- * layout, you should specify both values.
- *
- * For example:
- * // Synthesize "Tab" key events.
- * synthesizeKeyboardEvents("Tab");
- * // Synthesize Shift + Tab key events.
- * synthesizeKeyboardEvents("Tab", { shiftKey: true });
- * // Synthesize Control + A key events.
- * synthesizeKeyboardEvents("a", { controlKey: true });
- * // Synthesize Control + Shift + A key events.
- * synthesizeKeyboardEvents("A", { controlKey: true,
- * shitKey: true });
- * // Synthesize "Enter" key on numpad.
- * synthesizeKeyboardEvents("Enter", { code: "NumpadEnter" });
- * // Synthesize right "Shift" key.
- * synthesizeKeyboardEvents("Shift", { code: "ShiftRight" });
- * // Synthesize "1" on numpad.
- * synthesizeKeyboardEvents("1", { code: "Numpad1",
- * modifierNumLock: true });
- * // Synthesize "End" on numpad.
- * synthesizeKeyboardEvents("End", { code: "Numpad1" });
- * // Synthesize "%" key of US-English keyboard layout.
- * synthesizeKeyboardEvents("%", { shiftKey: true });
- * // Synthesize "*" key of Japanese keyboard layout.
- * synthesizeKeyboardEvents("*", { code: "Quote",
- * shiftKey: true,
- * keyCode: KeyboardEvent.DOM_VK_COLON });
- */
- [Throws]
- undefined synthesizeKeyboardEvents(DOMString aKeyValue,
- optional KeyboardEventInit aDictionary = {});
- };
-
- /* ---------------------- GainNode ----------------------------- */
- /* ./webidl/GainNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary GainOptions : AudioNodeOptions {
- float gain = 1.0;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface GainNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, optional GainOptions options = {});
- readonly attribute AudioParam gain;
- };
- // Mozilla extension
- GainNode includes AudioNodePassThrough;
-
- /* ---------------------- Gamepad ----------------------------- */
- /* ./webidl/Gamepad.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/gamepad/
- * https://w3c.github.io/gamepad/extensions.html
- * https://w3c.github.io/webvr/spec/1.1/#interface-gamepad
- */
- [Pref="dom.gamepad.enabled",
- Exposed=Window]
- interface GamepadButton {
- readonly attribute boolean pressed;
- readonly attribute boolean touched;
- readonly attribute double value;
- };
- enum GamepadHand {
- "",
- "left",
- "right"
- };
- /**
- * https://www.w3.org/TR/gamepad/#gamepadmappingtype-enum
- * https://immersive-web.github.io/webxr-gamepads-module/#enumdef-gamepadmappingtype
- */
- enum GamepadMappingType {
- "",
- "standard",
- "xr-standard"
- };
- [Pref="dom.gamepad.enabled",
- Exposed=Window]
- interface Gamepad {
- /**
- * An identifier, unique per type of device.
- */
- readonly attribute DOMString id;
- /**
- * The game port index for the device. Unique per device
- * attached to this system.
- */
- readonly attribute long index;
- /**
- * The mapping in use for this device. The empty string
- * indicates that no mapping is in use.
- */
- readonly attribute GamepadMappingType mapping;
- /**
- * The hand in use for this device. The empty string
- * indicates that unknown, both hands, or not applicable
- */
- [Pref="dom.gamepad.extensions.enabled"]
- readonly attribute GamepadHand hand;
- /**
- * The displayId in use for as an association point in the VRDisplay API
- * to identify which VRDisplay that the gamepad is associated with.
- */
- [Pref="dom.vr.enabled"]
- readonly attribute unsigned long displayId;
- /**
- * true if this gamepad is currently connected to the system.
- */
- readonly attribute boolean connected;
- /**
- * The current state of all buttons on the device, an
- * array of GamepadButton.
- */
- [Pure, Cached, Frozen]
- readonly attribute sequence<GamepadButton> buttons;
- /**
- * The current position of all axes on the device, an
- * array of doubles.
- */
- [Pure, Cached, Frozen]
- readonly attribute sequence<double> axes;
- /**
- * Timestamp from when the data of this device was last updated.
- */
- readonly attribute DOMHighResTimeStamp timestamp;
- /**
- * The current pose of the device, a GamepadPose.
- */
- [Pref="dom.gamepad.extensions.enabled"]
- readonly attribute GamepadPose? pose;
- /**
- * The current haptic actuator of the device, an array of
- * GamepadHapticActuator.
- */
- [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled"]
- readonly attribute sequence<GamepadHapticActuator> hapticActuators;
- [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled", Pref="dom.gamepad.extensions.lightindicator"]
- readonly attribute sequence<GamepadLightIndicator> lightIndicators;
- [Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled", Pref="dom.gamepad.extensions.multitouch"]
- readonly attribute sequence<GamepadTouch> touchEvents;
- };
-
- /* ---------------------- GamepadAxisMoveEvent ----------------------------- */
- /* ./webidl/GamepadAxisMoveEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="dom.gamepad.non_standard_events.enabled",
- Exposed=Window]
- interface GamepadAxisMoveEvent : GamepadEvent
- {
- constructor(DOMString type,
- optional GamepadAxisMoveEventInit eventInitDict = {});
- readonly attribute unsigned long axis;
- readonly attribute double value;
- };
- dictionary GamepadAxisMoveEventInit : GamepadEventInit
- {
- unsigned long axis = 0;
- double value = 0;
- };
-
- /* ---------------------- GamepadButtonEvent ----------------------------- */
- /* ./webidl/GamepadButtonEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="dom.gamepad.non_standard_events.enabled",
- Exposed=Window]
- interface GamepadButtonEvent : GamepadEvent
- {
- constructor(DOMString type,
- optional GamepadButtonEventInit eventInitDict = {});
- readonly attribute unsigned long button;
- };
- dictionary GamepadButtonEventInit : GamepadEventInit
- {
- unsigned long button = 0;
- };
-
- /* ---------------------- GamepadEvent ----------------------------- */
- /* ./webidl/GamepadEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/gamepad/#gamepadevent-interface
- */
- [Pref="dom.gamepad.enabled",
- Exposed=Window]
- interface GamepadEvent : Event
- {
- constructor(DOMString type, optional GamepadEventInit eventInitDict = {});
- readonly attribute Gamepad? gamepad;
- };
- dictionary GamepadEventInit : EventInit
- {
- Gamepad? gamepad = null;
- };
-
- /* ---------------------- GamepadHapticActuator ----------------------------- */
- /* ./webidl/GamepadHapticActuator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface
- */
- enum GamepadHapticActuatorType {
- "vibration"
- };
- [Pref="dom.gamepad.extensions.enabled",
- HeaderFile="mozilla/dom/GamepadHapticActuator.h",
- Exposed=Window]
- interface GamepadHapticActuator
- {
- readonly attribute GamepadHapticActuatorType type;
- [Throws, NewObject]
- Promise<boolean> pulse(double value, double duration);
- };
-
- /* ---------------------- GamepadLightIndicator ----------------------------- */
- /* ./webidl/GamepadLightIndicator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://github.com/knyg/gamepad/blob/lightindicator/extensions.html
- */
- enum GamepadLightIndicatorType {
- "on-off",
- "rgb"
- };
- dictionary GamepadLightColor {
- required octet red;
- required octet green;
- required octet blue;
- };
- [Pref="dom.gamepad.extensions.lightindicator",
- Exposed=Window]
- interface GamepadLightIndicator
- {
- readonly attribute GamepadLightIndicatorType type;
- [Throws, NewObject]
- Promise<boolean> setColor(GamepadLightColor color);
- };
-
- /* ---------------------- GamepadPose ----------------------------- */
- /* ./webidl/GamepadPose.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface
- */
- [Pref="dom.gamepad.extensions.enabled",
- Exposed=Window]
- interface GamepadPose
- {
- readonly attribute boolean hasOrientation;
- readonly attribute boolean hasPosition;
- /**
- * position, linearVelocity, and linearAcceleration are 3-component vectors.
- * position is relative to a sitting space. Transforming this point with
- * VRStageParameters.sittingToStandingTransform converts this to standing space.
- */
- [Constant, Throws] readonly attribute Float32Array? position;
- [Constant, Throws] readonly attribute Float32Array? linearVelocity;
- [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
- /* orientation is a 4-entry array representing the components of a quaternion. */
- [Constant, Throws] readonly attribute Float32Array? orientation;
- /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
- [Constant, Throws] readonly attribute Float32Array? angularVelocity;
- [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
- };
-
- /* ---------------------- GamepadServiceTest ----------------------------- */
- /* ./webidl/GamepadServiceTest.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Pref="dom.gamepad.test.enabled",
- Exposed=Window]
- interface GamepadServiceTest
- {
- readonly attribute GamepadMappingType noMapping;
- readonly attribute GamepadMappingType standardMapping;
- readonly attribute GamepadHand noHand;
- readonly attribute GamepadHand leftHand;
- readonly attribute GamepadHand rightHand;
- [NewObject]
- Promise<unsigned long> addGamepad(DOMString id,
- GamepadMappingType mapping,
- GamepadHand hand,
- unsigned long numButtons,
- unsigned long numAxes,
- unsigned long numHaptics,
- unsigned long numLightIndicator,
- unsigned long numTouchEvents);
- [NewObject]
- Promise<unsigned long> removeGamepad(unsigned long index);
- [NewObject]
- Promise<unsigned long> newButtonEvent(unsigned long index,
- unsigned long button,
- boolean pressed,
- boolean touched);
- [NewObject]
- Promise<unsigned long> newButtonValueEvent(unsigned long index,
- unsigned long button,
- boolean pressed,
- boolean touched,
- double value);
- [NewObject]
- Promise<unsigned long> newAxisMoveEvent(unsigned long index,
- unsigned long axis,
- double value);
- [NewObject]
- Promise<unsigned long> newPoseMove(unsigned long index,
- Float32Array? orient,
- Float32Array? pos,
- Float32Array? angVelocity,
- Float32Array? angAcceleration,
- Float32Array? linVelocity,
- Float32Array? linAcceleration);
- [NewObject]
- Promise<unsigned long> newTouch(unsigned long index, unsigned long aTouchArrayIndex,
- unsigned long touchId, octet surfaceId,
- Float32Array position, Float32Array? surfaceDimension);
- };
-
- /* ---------------------- GamepadTouch ----------------------------- */
- /* ./webidl/GamepadTouch.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://github.com/knyg/gamepad/blob/multitouch/extensions.html
- */
- [Pref="dom.gamepad.extensions.multitouch",
- Exposed=Window]
- interface GamepadTouch {
- readonly attribute unsigned long touchId;
- readonly attribute octet surfaceId;
- [Constant, Throws] readonly attribute Float32Array position;
- [Constant, Throws] readonly attribute Uint32Array? surfaceDimensions;
- };
-
- /* ---------------------- GenericTransformStream ----------------------------- */
- /* ./webidl/GenericTransformStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#other-specs-ts-wrapping
- */
- interface mixin GenericTransformStream {
- readonly attribute ReadableStream readable;
- readonly attribute WritableStream writable;
- };
-
- /* ---------------------- Geolocation ----------------------------- */
- /* ./webidl/Geolocation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/geolocation-API
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary PositionOptions {
- boolean enableHighAccuracy = false;
- [Clamp] unsigned long timeout = 0x7fffffff;
- [Clamp] unsigned long maximumAge = 0;
- };
- [Exposed=Window]
- interface Geolocation {
- [Throws, NeedsCallerType]
- undefined getCurrentPosition(PositionCallback successCallback,
- optional PositionErrorCallback? errorCallback = null,
- optional PositionOptions options = {});
- [Throws, NeedsCallerType]
- long watchPosition(PositionCallback successCallback,
- optional PositionErrorCallback? errorCallback = null,
- optional PositionOptions options = {});
- undefined clearWatch(long watchId);
- };
- callback PositionCallback = undefined (GeolocationPosition position);
- callback PositionErrorCallback = undefined (GeolocationPositionError positionError);
-
- /* ---------------------- GeolocationCoordinates ----------------------------- */
- /* ./webidl/GeolocationCoordinates.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/geolocation-API
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window, SecureContext]
- interface GeolocationCoordinates {
- readonly attribute double latitude;
- readonly attribute double longitude;
- readonly attribute double? altitude;
- readonly attribute double accuracy;
- readonly attribute double? altitudeAccuracy;
- readonly attribute double? heading;
- readonly attribute double? speed;
- };
-
- /* ---------------------- GeolocationPosition ----------------------------- */
- /* ./webidl/GeolocationPosition.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/geolocation-API
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window, SecureContext]
- interface GeolocationPosition {
- readonly attribute GeolocationCoordinates coords;
- readonly attribute EpochTimeStamp timestamp;
- };
-
- /* ---------------------- GeolocationPositionError ----------------------------- */
- /* ./webidl/GeolocationPositionError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/geolocation-API
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface GeolocationPositionError {
- const unsigned short PERMISSION_DENIED = 1;
- const unsigned short POSITION_UNAVAILABLE = 2;
- const unsigned short TIMEOUT = 3;
- readonly attribute unsigned short code;
- readonly attribute DOMString message;
- };
-
- /* ---------------------- GeometryUtils ----------------------------- */
- /* ./webidl/GeometryUtils.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom-view/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum CSSBoxType { "margin", "border", "padding", "content" };
- dictionary BoxQuadOptions {
- CSSBoxType box = "border";
- GeometryNode relativeTo;
- [ChromeOnly]
- boolean createFramesForSuppressedWhitespace = true;
- };
- dictionary ConvertCoordinateOptions {
- CSSBoxType fromBox = "border";
- CSSBoxType toBox = "border";
- };
- interface mixin GeometryUtils {
- [Throws, Func="nsINode::HasBoxQuadsSupport", NeedsCallerType]
- sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options = {});
- /* getBoxQuadsFromWindowOrigin is similar to getBoxQuads, but the
- * returned quads are further translated relative to the window
- * origin -- which is not the layout origin. Further translation
- * must be done to bring the quads into layout space. Typically,
- * this will be done by performing another call from the top level
- * browser process, requesting the quad of the top level content
- * document itself. The position of this quad can then be used as
- * the offset into layout space, and subtracted from the original
- * returned quads. If options.relativeTo is supplied, this method
- * will throw.
- */
- [ChromeOnly, Throws, Func="nsINode::HasBoxQuadsSupport"]
- sequence<DOMQuad> getBoxQuadsFromWindowOrigin(optional BoxQuadOptions options = {});
- [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
- DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options = {});
- [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
- DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options = {});
- [Throws, Pref="layout.css.convertFromNode.enabled", NeedsCallerType]
- DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options = {});
- };
- // PseudoElement includes GeometryUtils;
- typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;
-
- /* ---------------------- GetUserMediaRequest ----------------------------- */
- /* ./webidl/GetUserMediaRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This is an internal IDL file
- */
- interface nsIMediaDevice;
- // For gUM request start (getUserMedia:request) notification,
- // rawID, mediaSource and audioOutputOptions won't be set.
- // For selectAudioOutput request start (getUserMedia:request) notification,
- // rawID, mediaSource and constraints won't be set.
- // For gUM request stop (recording-device-stopped) notification due to page
- // reload, only windowID will be set.
- // For gUM request stop (recording-device-stopped) notification due to track
- // stop, only type, windowID, rawID and mediaSource will be set
- enum GetUserMediaRequestType {
- "getusermedia",
- "selectaudiooutput",
- "recording-device-stopped"
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface GetUserMediaRequest {
- readonly attribute GetUserMediaRequestType type;
- readonly attribute unsigned long long windowID;
- readonly attribute unsigned long long innerWindowID;
- readonly attribute DOMString callID;
- readonly attribute DOMString rawID;
- readonly attribute DOMString mediaSource;
- // The set of devices to consider
- [Constant, Cached, Frozen]
- readonly attribute sequence<nsIMediaDevice> devices;
- MediaStreamConstraints getConstraints();
- AudioOutputOptions getAudioOutputOptions();
- readonly attribute boolean isSecure;
- readonly attribute boolean isHandlingUserInput;
- };
-
- /* ---------------------- Glean ----------------------------- */
- /* ./webidl/Glean.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanCategory {
- /**
- * Get a metric by name.
- *
- * Returns an object of the corresponding metric type,
- * with only the allowed functions available.
- */
- getter GleanMetric (DOMString identifier);
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanImpl {
- /**
- * Get a metric category by name.
- *
- * Returns an object for further metric lookup.
- */
- getter GleanCategory (DOMString identifier);
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanLabeled {
- /**
- * Get a specific metric for a given label.
- *
- * If a set of acceptable labels were specified in the `metrics.yaml` file,
- * and the given label is not in the set, it will be recorded under the
- * special `OTHER_LABEL` label.
- *
- * If a set of acceptable labels was not specified in the `metrics.yaml` file,
- * only the first 16 unique labels will be used.
- * After that, any additional labels will be recorded under the special
- * `OTHER_LABEL` label.
- */
- getter GleanMetric (DOMString identifier);
- };
-
- /* ---------------------- GleanMetrics ----------------------------- */
- /* ./webidl/GleanMetrics.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // The definitions in this file are not sorted.
- // Please add new ones to the bottom.
- /**
- * Base interface for all metric types to make typing more expressive.
- */
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanMetric {};
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanBoolean : GleanMetric {
- /**
- * Set to the specified boolean value.
- *
- * @param value the value to set.
- */
- undefined set(boolean value);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a boolean.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- boolean? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanDatetime : GleanMetric {
- /**
- * Set the datetime to the provided value, or the local now.
- * The internal value will store the local timezone.
- *
- * Note: The metric's time_unit affects the resolution of the value, not the
- * unit of this function's parameter (which is always PRTime/nanos).
- *
- * @param aValue The (optional) time value as PRTime (nanoseconds since epoch).
- * Defaults to local now.
- */
- undefined set(optional long long aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a Date.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric as a JS Date with timezone,
- * or null if there is no value.
- */
- [Throws, ChromeOnly]
- any testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanCounter : GleanMetric {
- /*
- * Increases the counter by `amount`.
- *
- * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
- */
- undefined add(optional long aAmount = 1);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as an integer.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- long? testGetValue(optional UTF8String aPingName = "");
- };
- dictionary GleanDistributionData {
- required unsigned long long sum;
- required unsigned long long count;
- required record<UTF8String, unsigned long long> values;
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanTimingDistribution : GleanMetric {
- /**
- * Starts tracking time for the provided metric.
- *
- * @returns A unique timer id for the new timer
- */
- unsigned long long start();
- /**
- * Stops tracking time for the provided metric and timer id.
- *
- * Adds a count to the corresponding bucket in the timing distribution.
- * This will record an error if no `start` was called for this TimerId or
- * if this TimerId was used to call `cancel`.
- *
- * @param aId The TimerId associated with this timing. This allows for
- * concurrent timing of events associated with different ids.
- */
- undefined stopAndAccumulate(unsigned long long aId);
- /**
- * Aborts a previous `start` call. No error is recorded if no `start` was
- * called. (But then where did you get that id from?)
- *
- * @param aId The TimerID whose `start` you wish to abort.
- */
- undefined cancel(unsigned long long aId);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
- /**
- * **Test-only API**
- *
- * Accumulates a raw numeric sample of milliseconds.
- *
- * @param aSample The sample, in milliseconds, to add.
- */
- [ChromeOnly]
- undefined testAccumulateRawMillis(unsigned long long aSample);
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanMemoryDistribution : GleanMetric {
- /**
- * Accumulates the provided signed sample in the metric.
- *
- * @param aSample The sample to be recorded by the metric. The sample is
- * assumed to be in the confgured memory unit of the metric.
- *
- * Notes: Values bigger than 1 Terabyte (2^40 bytes) are truncated and an
- * InvalidValue error is recorded.
- */
- undefined accumulate(unsigned long long aSample);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a DistributionData.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanCustomDistribution : GleanMetric {
- /**
- * Accumulates the provided signed samples in the metric.
- *
- * @param aSamples - The vector holding the samples to be recorded by the metric.
- *
- * Notes: Discards any negative value in `samples`
- * and report an `ErrorType::InvalidValue` for each of them.
- */
- undefined accumulateSamples(sequence<long long> aSamples);
- /**
- * Accumulates the provided single signed sample in the metric.
- *
- * @param aSample - The sample to be recorded by the metric.
- *
- * Notes: Discards any negative value of `sample` and reports an
- * `ErrorType::InvalidValue`.
- */
- undefined accumulateSingleSample(long long aSample);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a DistributionData.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- GleanDistributionData? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanString : GleanMetric {
- /**
- * Set the string to the provided value.
- *
- * @param aValue The string to set the metric to.
- */
- undefined set(UTF8String? aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a string.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- UTF8String? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanStringList : GleanMetric {
- /**
- * Adds a new string to the list.
- *
- * Truncates the value and logs an error if it is longer than 100 bytes.
- *
- * @param value The string to add.
- */
- undefined add(UTF8String value);
- /**
- * Sets the string_list to the provided list of strings.
- *
- * Truncates the list and logs an error if longer than 100 items.
- * Truncates any item longer than 100 bytes and logs an error.
- *
- * @param aValue The list of strings to set the metric to.
- */
- undefined set(sequence<UTF8String> aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- sequence<UTF8String>? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanTimespan : GleanMetric {
- /**
- * Start tracking time for the provided metric.
- *
- * This records an error if it’s already tracking time (i.e. start was already
- * called with no corresponding [stop]): in that case the original
- * start time will be preserved.
- */
- undefined start();
- /**
- * Stop tracking time for the provided metric.
- *
- * Sets the metric to the elapsed time, but does not overwrite an already
- * existing value.
- * This will record an error if no [start] was called or there is an already
- * existing value.
- */
- undefined stop();
- /**
- * Aborts a previous start.
- *
- * Does not record an error if there was no previous call to start.
- */
- undefined cancel();
- /**
- * Explicitly sets the timespan value.
- *
- * This API should only be used if you cannot make use of
- * `start`/`stop`/`cancel`.
- *
- * @param aDuration The duration of this timespan, in units matching the
- * `time_unit` of this metric's definition.
- */
- undefined setRaw(unsigned long aDuration);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- unsigned long long? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanUuid : GleanMetric {
- /**
- * Set to the specified value.
- *
- * @param aValue The UUID to set the metric to.
- */
- undefined set(UTF8String aValue);
- /**
- * Generate a new random UUID and set the metric to it.
- */
- undefined generateAndSet();
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- UTF8String? testGetValue(optional UTF8String aPingName = "");
- };
- dictionary GleanEventRecord {
- required unsigned long long timestamp;
- required UTF8String category;
- required UTF8String name;
- record<UTF8String, UTF8String> extra;
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanEvent : GleanMetric {
- /*
- * Record an event.
- *
- * @param aExtra An (optional) map of extra values.
- */
- undefined _record(optional record<UTF8String, UTF8String?> aExtra);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- *
- * The difference between event timestamps is in milliseconds
- * See https://mozilla.github.io/glean/book/user/metrics/event.html for further details.
- * Due to limitations of numbers in JavaScript, the timestamp will only be accurate up until 2^53.
- * (This is probably not an issue with the current clock implementation. Probably.)
- */
- [Throws, ChromeOnly]
- sequence<GleanEventRecord>? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanQuantity : GleanMetric {
- /**
- * Set to the specified value.
- *
- * @param aValue The value to set the metric to.
- */
- undefined set(long long aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- long long? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanDenominator : GleanMetric {
- /*
- * Increases the counter by `aAmount`.
- *
- * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
- */
- undefined add(optional long aAmount = 1);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as an integer.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- long? testGetValue(optional UTF8String aPingName = "");
- };
- dictionary GleanRateData {
- required long numerator;
- required long denominator;
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanNumerator : GleanMetric {
- /*
- * Increases the numerator by `aAmount`.
- *
- * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
- */
- undefined addToNumerator(optional long aAmount = 1);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value in the form {numerator: n, denominator: d}
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- GleanRateData? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanRate : GleanMetric {
- /*
- * Increases the numerator by `amount`.
- *
- * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
- */
- undefined addToNumerator(optional long aAmount = 1);
- /*
- * Increases the denominator by `amount`.
- *
- * @param aAmount The (optional) amount to increase by. Should be positive. Defaults to 1.
- */
- undefined addToDenominator(optional long aAmount = 1);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value in the form {numerator: n, denominator: d}
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- GleanRateData? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanUrl : GleanMetric {
- /**
- * Set to the specified value.
- *
- * @param aValue The stringified URL to set the metric to.
- */
- undefined set(UTF8String aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- UTF8String? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanText : GleanMetric {
- /**
- * Set to the provided value.
- *
- * @param aValue The text to set the metric to.
- */
- undefined set(UTF8String aValue);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as a string.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or null if there is no value.
- */
- [Throws, ChromeOnly]
- UTF8String? testGetValue(optional UTF8String aPingName = "");
- };
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanObject : GleanMetric {
- /**
- * Set to the specified object.
- *
- * The structure of the metric is validated against the predefined structure.
- *
- * @param object The object to set the metric to.
- */
- undefined set(object value);
- /**
- * **Test-only API**
- *
- * Gets the currently stored value as an object.
- *
- * This function will attempt to await the last parent-process task (if any)
- * writing to the the metric's storage engine before returning a value.
- * This function will not wait for data from child processes.
- *
- * This doesn't clear the stored value.
- * Parent process only. Panics in child processes.
- *
- * @param aPingName The (optional) name of the ping to retrieve the metric
- * for. Defaults to the first value in `send_in_pings`.
- *
- * @return value of the stored metric, or undefined if there is no value.
- */
- [Throws, ChromeOnly]
- object? testGetValue(optional UTF8String aPingName = "");
- };
-
- /* ---------------------- GleanPings ----------------------------- */
- /* ./webidl/GleanPings.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- interface nsIGleanPing;
- [Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window]
- interface GleanPingsImpl {
- /**
- * Get a ping by name.
- */
- getter nsIGleanPing (DOMString identifier);
- };
-
- /* ---------------------- GPUUncapturedErrorEvent ----------------------------- */
- /* ./webidl/GPUUncapturedErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://gpuweb.github.io/gpuweb/
- */
- dictionary GPUUncapturedErrorEventInit : EventInit {
- required GPUError error;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUUncapturedErrorEvent: Event {
- constructor(DOMString type, GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict);
- readonly attribute GPUError error;
- };
-
- /* ---------------------- HashChangeEvent ----------------------------- */
- /* ./webidl/HashChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/#the-hashchangeevent-interface
- */
- [LegacyEventInit,
- Exposed=Window]
- interface HashChangeEvent : Event
- {
- constructor(DOMString type, optional HashChangeEventInit eventInitDict = {});
- readonly attribute DOMString oldURL;
- readonly attribute DOMString newURL;
- undefined initHashChangeEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional DOMString oldURLArg = "",
- optional DOMString newURLArg = "");
- };
- dictionary HashChangeEventInit : EventInit
- {
- DOMString oldURL = "";
- DOMString newURL = "";
- };
-
- /* ---------------------- Headers ----------------------------- */
- /* ./webidl/Headers.webidl */
-
- /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* vim: set ts=8 sts=2 et sw=2 tw=80: */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://fetch.spec.whatwg.org/#headers-class
- */
- typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
- enum HeadersGuardEnum {
- "none",
- "request",
- "request-no-cors",
- "response",
- "immutable"
- };
- [Exposed=(Window,Worker)]
- interface Headers {
- [Throws]
- constructor(optional HeadersInit init);
- [Throws] undefined append(ByteString name, ByteString value);
- [Throws] undefined delete(ByteString name);
- [Throws] ByteString? get(ByteString name);
- sequence<ByteString> getSetCookie();
- [Throws] boolean has(ByteString name);
- [Throws] undefined set(ByteString name, ByteString value);
- iterable<ByteString, ByteString>;
- // Used to test different guard states from mochitest.
- // Note: Must be set prior to populating headers or will throw.
- [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;
- };
-
- /* ---------------------- Highlight ----------------------------- */
- /* ./webidl/Highlight.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/css-highlight-api-1/
- *
- * Copyright © 2021 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- /**
- * Enum defining the available highlight types.
- * See https://drafts.csswg.org/css-highlight-api-1/#enumdef-highlighttype
- */
- enum HighlightType {
- "highlight",
- "spelling-error",
- "grammar-error"
- };
- /**
- * Definition of a highlight object, consisting of a set of ranges,
- * a priority and a highlight type.
- *
- * See https://drafts.csswg.org/css-highlight-api-1/#highlight
- */
- [Pref="dom.customHighlightAPI.enabled", Exposed=Window]
- interface Highlight {
- [Throws]
- constructor(AbstractRange... initialRanges);
- setlike<AbstractRange>;
- attribute long priority;
- attribute HighlightType type;
- };
- partial interface Highlight {
- // Setlike methods need to be overridden.
- // Iterating a setlike is not possible from C++ yet.
- // Therefore a separate data structure must be held and kept in sync.
- [Throws]
- undefined add(AbstractRange range);
- [Throws]
- undefined clear();
- [Throws]
- boolean delete(AbstractRange range);
- };
- /**
- * Registry object that contains all Highlights associated with a Document.
- *
- * See https://drafts.csswg.org/css-highlight-api-1/#highlightregistry
- */
- [Pref="dom.customHighlightAPI.enabled", Exposed=Window]
- interface HighlightRegistry {
- maplike<DOMString, Highlight>;
- };
- partial interface HighlightRegistry {
- // Maplike interface methods need to be overridden.
- // Iterating a maplike is not possible from C++ yet.
- // Therefore, a separate data structure must be held and kept in sync.
- [Throws]
- undefined set(DOMString key, Highlight value);
- [Throws]
- undefined clear();
- [Throws]
- boolean delete(DOMString key);
- };
-
- /* ---------------------- History ----------------------------- */
- /* ./webidl/History.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-history-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- enum ScrollRestoration { "auto", "manual" };
- [Exposed=Window]
- interface History {
- [Throws]
- readonly attribute unsigned long length;
- [Throws]
- attribute ScrollRestoration scrollRestoration;
- [Throws]
- readonly attribute any state;
- [Throws, NeedsSubjectPrincipal]
- undefined go(optional long delta = 0);
- [Throws, NeedsCallerType]
- undefined back();
- [Throws, NeedsCallerType]
- undefined forward();
- [Throws, NeedsCallerType]
- undefined pushState(any data, DOMString title, optional DOMString? url = null);
- [Throws, NeedsCallerType]
- undefined replaceState(any data, DOMString title, optional DOMString? url = null);
- };
-
- /* ---------------------- HTMLAllCollection ----------------------------- */
- /* ./webidl/HTMLAllCollection.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* Emulates undefined through Codegen.py. */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface HTMLAllCollection {
- readonly attribute unsigned long length;
- getter Element (unsigned long index);
- getter (HTMLCollection or Element)? namedItem(DOMString name);
- (HTMLCollection or Element)? item(optional DOMString nameOrIndex);
- legacycaller (HTMLCollection or Element)? (optional DOMString nameOrIndex);
- };
-
- /* ---------------------- HTMLAnchorElement ----------------------------- */
- /* ./webidl/HTMLAnchorElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-a-element
- [Exposed=Window]
- interface HTMLAnchorElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString target;
- [CEReactions, SetterThrows]
- attribute DOMString download;
- [CEReactions, SetterThrows]
- attribute DOMString ping;
- [CEReactions, SetterThrows]
- attribute DOMString rel;
- [CEReactions, SetterThrows]
- attribute DOMString referrerPolicy;
- [PutForwards=value]
- readonly attribute DOMTokenList relList;
- [CEReactions, SetterThrows]
- attribute DOMString hreflang;
- [CEReactions, SetterThrows]
- attribute DOMString type;
- [CEReactions, Throws]
- attribute DOMString text;
- };
- HTMLAnchorElement includes HTMLHyperlinkElementUtils;
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLAnchorElement {
- [CEReactions, SetterThrows]
- attribute DOMString coords;
- [CEReactions, SetterThrows]
- attribute DOMString charset;
- [CEReactions, SetterThrows]
- attribute DOMString name;
- [CEReactions, SetterThrows]
- attribute DOMString rev;
- [CEReactions, SetterThrows]
- attribute DOMString shape;
- };
-
- /* ---------------------- HTMLAreaElement ----------------------------- */
- /* ./webidl/HTMLAreaElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- &
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-area-element
- [Exposed=Window]
- interface HTMLAreaElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString alt;
- [CEReactions, SetterThrows]
- attribute DOMString coords;
- [CEReactions, SetterThrows]
- attribute DOMString shape;
- [CEReactions, SetterThrows]
- attribute DOMString target;
- [CEReactions, SetterThrows]
- attribute DOMString download;
- [CEReactions, SetterThrows]
- attribute DOMString ping;
- [CEReactions, SetterThrows]
- attribute DOMString rel;
- [CEReactions, SetterThrows]
- attribute DOMString referrerPolicy;
- [PutForwards=value]
- readonly attribute DOMTokenList relList;
- };
- HTMLAreaElement includes HTMLHyperlinkElementUtils;
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLAreaElement {
- [CEReactions, SetterThrows]
- attribute boolean noHref;
- };
-
- /* ---------------------- HTMLAudioElement ----------------------------- */
- /* ./webidl/HTMLAudioElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-audio-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyFactoryFunction=Audio(optional DOMString src),
- Exposed=Window]
- interface HTMLAudioElement : HTMLMediaElement {
- [HTMLConstructor] constructor();
- };
-
- /* ---------------------- HTMLBaseElement ----------------------------- */
- /* ./webidl/HTMLBaseElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-base-element
- [Exposed=Window]
- interface HTMLBaseElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString href;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString target;
- };
-
- /* ---------------------- HTMLBodyElement ----------------------------- */
- /* ./webidl/HTMLBodyElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLBodyElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- partial interface HTMLBodyElement {
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString text;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString link;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString vLink;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString aLink;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString bgColor;
- [CEReactions, SetterThrows]
- attribute DOMString background;
- };
- HTMLBodyElement includes WindowEventHandlers;
-
- /* ---------------------- HTMLBRElement ----------------------------- */
- /* ./webidl/HTMLBRElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-br-element
- [Exposed=Window]
- interface HTMLBRElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLBRElement {
- [CEReactions, SetterThrows]
- attribute DOMString clear;
- };
- // Mozilla extensions
- partial interface HTMLBRElement {
- // Set to true if the <br> element is created by editor for placing caret
- // at proper position in empty editor.
- [ChromeOnly]
- readonly attribute boolean isPaddingForEmptyEditor;
- // Set to true if the <br> element is created by editor for placing caret
- // at proper position making last empty line in a block element in HTML
- // editor or <textarea> element visible.
- [ChromeOnly]
- readonly attribute boolean isPaddingForEmptyLastLine;
- };
-
- /* ---------------------- HTMLButtonElement ----------------------------- */
- /* ./webidl/HTMLButtonElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
- [Exposed=Window,
- InstrumentedProps=(popoverTargetAction,popoverTargetElement)]
- interface HTMLButtonElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute boolean disabled;
- [Pure]
- readonly attribute HTMLFormElement? form;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString formAction;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString formEnctype;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString formMethod;
- [CEReactions, SetterThrows, Pure]
- attribute boolean formNoValidate;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString formTarget;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString type;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString value;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- readonly attribute NodeList labels;
- };
- HTMLButtonElement includes PopoverInvokerElement;
- HTMLButtonElement includes InvokerElement;
-
- /* ---------------------- HTMLCanvasElement ----------------------------- */
- /* ./webidl/HTMLCanvasElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- interface nsISupports;
- typedef (HTMLCanvasElement or OffscreenCanvas) CanvasSource;
- [Exposed=Window]
- interface HTMLCanvasElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long width;
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long height;
- [Throws]
- nsISupports? getContext(DOMString contextId, optional any contextOptions = null);
- [Throws, NeedsSubjectPrincipal]
- DOMString toDataURL(optional DOMString type = "",
- optional any encoderOptions);
- [Throws, NeedsSubjectPrincipal]
- undefined toBlob(BlobCallback callback,
- optional DOMString type = "",
- optional any encoderOptions);
- };
- // Mozilla specific bits
- partial interface HTMLCanvasElement {
- [Pure, SetterThrows]
- attribute boolean mozOpaque;
- attribute PrintCallback? mozPrintCallback;
- [Throws, NeedsSubjectPrincipal]
- CanvasCaptureMediaStream captureStream(optional double frameRate);
- };
- // For OffscreenCanvas
- // Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
- partial interface HTMLCanvasElement {
- [Pref="gfx.offscreencanvas.enabled", Throws]
- OffscreenCanvas transferControlToOffscreen();
- };
- [ChromeOnly,
- Exposed=Window]
- interface MozCanvasPrintState
- {
- // A canvas rendering context.
- readonly attribute nsISupports context;
- // To be called when rendering to the context is done.
- undefined done();
- };
- callback PrintCallback = undefined(MozCanvasPrintState ctx);
- callback BlobCallback = undefined(Blob? blob);
-
- /* ---------------------- HTMLCollection ----------------------------- */
- /* ./webidl/HTMLCollection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface HTMLCollection {
- readonly attribute unsigned long length;
- getter Element? item(unsigned long index);
- getter Element? namedItem(DOMString name);
- };
-
- /* ---------------------- HTMLDataElement ----------------------------- */
- /* ./webidl/HTMLDataElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element
- */
- [Exposed=Window]
- interface HTMLDataElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString value;
- };
-
- /* ---------------------- HTMLDataListElement ----------------------------- */
- /* ./webidl/HTMLDataListElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLDataListElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute HTMLCollection options;
- };
-
- /* ---------------------- HTMLDetailsElement ----------------------------- */
- /* ./webidl/HTMLDetailsElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/forms.html#the-details-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLDetailsElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean open;
- };
-
- /* ---------------------- HTMLDialogElement ----------------------------- */
- /* ./webidl/HTMLDialogElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLDialogElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean open;
- attribute DOMString returnValue;
- [CEReactions, Throws, UseCounter]
- undefined show();
- [CEReactions, Throws]
- undefined showModal();
- [CEReactions]
- undefined close(optional DOMString returnValue);
- };
-
- /* ---------------------- HTMLDirectoryElement ----------------------------- */
- /* ./webidl/HTMLDirectoryElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- [Exposed=Window]
- interface HTMLDirectoryElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute boolean compact;
- };
-
- /* ---------------------- HTMLDivElement ----------------------------- */
- /* ./webidl/HTMLDivElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window, ProbablyShortLivingWrapper]
- interface HTMLDivElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- partial interface HTMLDivElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- };
-
- /* ---------------------- HTMLDListElement ----------------------------- */
- /* ./webidl/HTMLDListElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element
- [Exposed=Window]
- interface HTMLDListElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLDListElement {
- [CEReactions, SetterThrows]
- attribute boolean compact;
- };
-
- /* ---------------------- HTMLDocument ----------------------------- */
- /* ./webidl/HTMLDocument.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [LegacyOverrideBuiltIns,
- Exposed=Window]
- interface HTMLDocument : Document {
- // DOM tree accessors
- [Throws]
- getter object (DOMString name);
- };
-
- /* ---------------------- HTMLElement ----------------------------- */
- /* ./webidl/HTMLElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/ and
- * http://dev.w3.org/csswg/cssom-view/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window,
- InstrumentedProps=(attributeStyleMap,hidePopover,popover,showPopover,togglePopover)]
- interface HTMLElement : Element {
- [HTMLConstructor] constructor();
- // metadata attributes
- [CEReactions]
- attribute DOMString title;
- [CEReactions]
- attribute DOMString lang;
- [CEReactions, SetterThrows, Pure]
- attribute boolean translate;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString dir;
- [CEReactions, GetterThrows, Pure]
- attribute [LegacyNullToEmptyString] DOMString innerText;
- [CEReactions, GetterThrows, SetterThrows, Pure]
- attribute [LegacyNullToEmptyString] DOMString outerText;
- // user interaction
- [CEReactions, SetterThrows, Pure]
- attribute boolean hidden;
- [CEReactions, SetterThrows, Pure]
- attribute boolean inert;
- [NeedsCallerType]
- undefined click();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString accessKey;
- [Pure]
- readonly attribute DOMString accessKeyLabel;
- [CEReactions, SetterThrows, Pure]
- attribute boolean draggable;
- //[PutForwards=value] readonly attribute DOMTokenList dropzone;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString contentEditable;
- [Pure]
- readonly attribute boolean isContentEditable;
- [CEReactions, SetterThrows, Pure, Pref="dom.element.popover.enabled"]
- attribute DOMString? popover;
- [CEReactions, SetterThrows, Pure]
- attribute boolean spellcheck;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString inputMode;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString enterKeyHint;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString autocapitalize;
- attribute DOMString nonce;
- // command API
- //readonly attribute DOMString? commandType;
- //readonly attribute DOMString? commandLabel;
- //readonly attribute DOMString? commandIcon;
- //readonly attribute boolean? commandHidden;
- //readonly attribute boolean? commandDisabled;
- //readonly attribute boolean? commandChecked;
- // https://html.spec.whatwg.org/multipage/custom-elements.html#dom-attachinternals
- [Throws]
- ElementInternals attachInternals();
- [Throws, Pref="dom.element.popover.enabled"]
- undefined showPopover();
- [Throws, Pref="dom.element.popover.enabled"]
- undefined hidePopover();
- [Throws, Pref="dom.element.popover.enabled"]
- boolean togglePopover(optional boolean force);
- };
- // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
- partial interface HTMLElement {
- // CSSOM things are not [Pure] because they can flush
- readonly attribute Element? offsetParent;
- readonly attribute long offsetTop;
- readonly attribute long offsetLeft;
- readonly attribute long offsetWidth;
- readonly attribute long offsetHeight;
- };
- partial interface HTMLElement {
- [ChromeOnly]
- readonly attribute ElementInternals? internals;
- [ChromeOnly]
- readonly attribute boolean isFormAssociatedCustomElements;
- };
- interface mixin TouchEventHandlers {
- [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- attribute EventHandler ontouchstart;
- [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- attribute EventHandler ontouchend;
- [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- attribute EventHandler ontouchmove;
- [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
- attribute EventHandler ontouchcancel;
- };
- HTMLElement includes GlobalEventHandlers;
- HTMLElement includes HTMLOrForeignElement;
- HTMLElement includes ElementCSSInlineStyle;
- HTMLElement includes TouchEventHandlers;
- HTMLElement includes OnErrorEventHandlerForNodes;
- [Exposed=Window]
- interface HTMLUnknownElement : HTMLElement {};
-
- /* ---------------------- HTMLEmbedElement ----------------------------- */
- /* ./webidl/HTMLEmbedElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
- * http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
- [Exposed=Window]
- interface HTMLEmbedElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Pure, SetterThrows]
- attribute DOMString src;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString type;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString width;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString height;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#HTMLEmbedElement-partial
- partial interface HTMLEmbedElement {
- [CEReactions, Pure, SetterThrows]
- attribute DOMString align;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString name;
- };
- partial interface HTMLEmbedElement {
- // GetSVGDocument
- [NeedsSubjectPrincipal]
- Document? getSVGDocument();
- };
- HTMLEmbedElement includes MozFrameLoaderOwner;
- HTMLEmbedElement includes MozObjectLoadingContent;
-
- /* ---------------------- HTMLFieldSetElement ----------------------------- */
- /* ./webidl/HTMLFieldSetElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-fieldset-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLFieldSetElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean disabled;
- readonly attribute HTMLFormElement? form;
- [CEReactions, SetterThrows]
- attribute DOMString name;
- readonly attribute DOMString type;
- readonly attribute HTMLCollection elements;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- };
-
- /* ---------------------- HTMLFontElement ----------------------------- */
- /* ./webidl/HTMLFontElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLFontElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString color;
- [CEReactions, SetterThrows] attribute DOMString face;
- [CEReactions, SetterThrows] attribute DOMString size;
- };
-
- /* ---------------------- HTMLFormControlsCollection ----------------------------- */
- /* ./webidl/HTMLFormControlsCollection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection
- *
- * © Copyright 2004-2013 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLFormControlsCollection : HTMLCollection {
- // inherits length and item()
- /* legacycaller */ getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
- };
-
- /* ---------------------- HTMLFormElement ----------------------------- */
- /* ./webidl/HTMLFormElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyOverrideBuiltIns, LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface HTMLFormElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Pure, SetterThrows]
- attribute DOMString acceptCharset;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString action;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString autocomplete;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString enctype;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString encoding;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString method;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString name;
- [CEReactions, Pure, SetterThrows]
- attribute boolean noValidate;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString target;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString rel;
- [PutForwards=value]
- readonly attribute DOMTokenList relList;
- [SameObject]
- readonly attribute HTMLFormControlsCollection elements;
- [Pure]
- readonly attribute long length;
- getter Element (unsigned long index);
- // TODO this should be: getter (RadioNodeList or HTMLInputElement or HTMLImageElement) (DOMString name);
- getter nsISupports (DOMString name);
- [Throws]
- undefined submit();
- [Throws]
- undefined requestSubmit(optional HTMLElement? submitter = null);
- [CEReactions]
- undefined reset();
- boolean checkValidity();
- boolean reportValidity();
- };
-
- /* ---------------------- HTMLFrameElement ----------------------------- */
- /* ./webidl/HTMLFrameElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement
- [Exposed=Window]
- interface HTMLFrameElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString name;
- [CEReactions, SetterThrows]
- attribute DOMString scrolling;
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- [CEReactions, SetterThrows]
- attribute DOMString frameBorder;
- [CEReactions, SetterThrows]
- attribute DOMString longDesc;
- [CEReactions, SetterThrows]
- attribute boolean noResize;
- [NeedsSubjectPrincipal]
- readonly attribute Document? contentDocument;
- readonly attribute WindowProxy? contentWindow;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString marginHeight;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString marginWidth;
- };
- HTMLFrameElement includes MozFrameLoaderOwner;
-
- /* ---------------------- HTMLFrameSetElement ----------------------------- */
- /* ./webidl/HTMLFrameSetElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLFrameSetElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString cols;
- [CEReactions, SetterThrows]
- attribute DOMString rows;
- };
- HTMLFrameSetElement includes WindowEventHandlers;
-
- /* ---------------------- HTMLHeadElement ----------------------------- */
- /* ./webidl/HTMLHeadElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-head-element
- [Exposed=Window]
- interface HTMLHeadElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
-
- /* ---------------------- HTMLHeadingElement ----------------------------- */
- /* ./webidl/HTMLHeadingElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
- [Exposed=Window]
- interface HTMLHeadingElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLHeadingElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- };
-
- /* ---------------------- HTMLHRElement ----------------------------- */
- /* ./webidl/HTMLHRElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element
- [Exposed=Window]
- interface HTMLHRElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLHRElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString color;
- [CEReactions, SetterThrows]
- attribute boolean noShade;
- [CEReactions, SetterThrows]
- attribute DOMString size;
- [CEReactions, SetterThrows]
- attribute DOMString width;
- };
-
- /* ---------------------- HTMLHtmlElement ----------------------------- */
- /* ./webidl/HTMLHtmlElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-html-element
- [Exposed=Window]
- interface HTMLHtmlElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLHtmlElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString version;
- };
-
- /* ---------------------- HTMLHyperlinkElementUtils ----------------------------- */
- /* ./webidl/HTMLHyperlinkElementUtils.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- interface mixin HTMLHyperlinkElementUtils {
- [CEReactions, SetterThrows]
- stringifier attribute USVString href;
- readonly attribute USVString origin;
- [CEReactions]
- attribute USVString protocol;
- [CEReactions]
- attribute USVString username;
- [CEReactions]
- attribute USVString password;
- [CEReactions]
- attribute USVString host;
- [CEReactions]
- attribute USVString hostname;
- [CEReactions]
- attribute USVString port;
- [CEReactions]
- attribute USVString pathname;
- [CEReactions]
- attribute USVString search;
- [CEReactions]
- attribute USVString hash;
- };
-
- /* ---------------------- HTMLIFrameElement ----------------------------- */
- /* ./webidl/HTMLIFrameElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-iframe-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * https://wicg.github.io/feature-policy/#policy
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLIFrameElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
- attribute DOMString src;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString srcdoc;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [PutForwards=value] readonly attribute DOMTokenList sandbox;
- // attribute boolean seamless;
- [CEReactions, SetterThrows, Pure]
- attribute boolean allowFullscreen;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString width;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString height;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString referrerPolicy;
- [CEReactions, SetterThrows, Pure, Pref="dom.iframe-lazy-loading.enabled"]
- attribute DOMString loading;
- [NeedsSubjectPrincipal]
- readonly attribute Document? contentDocument;
- readonly attribute WindowProxy? contentWindow;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLIFrameElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString align;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString scrolling;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString frameBorder;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString longDesc;
- [CEReactions, SetterThrows, Pure]
- attribute [LegacyNullToEmptyString] DOMString marginHeight;
- [CEReactions, SetterThrows, Pure]
- attribute [LegacyNullToEmptyString] DOMString marginWidth;
- };
- partial interface HTMLIFrameElement {
- // GetSVGDocument
- [NeedsSubjectPrincipal]
- Document? getSVGDocument();
- };
- HTMLIFrameElement includes MozFrameLoaderOwner;
- // https://w3c.github.io/webappsec-feature-policy/#idl-index
- partial interface HTMLIFrameElement {
- [SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
- readonly attribute FeaturePolicy featurePolicy;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString allow;
- };
-
- /* ---------------------- HTMLImageElement ----------------------------- */
- /* ./webidl/HTMLImageElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- interface imgINotificationObserver;
- interface imgIRequest;
- interface URI;
- interface nsIStreamListener;
- [LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height),
- Exposed=Window]
- interface HTMLImageElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString alt;
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString srcset;
- [CEReactions, SetterThrows]
- attribute DOMString? crossOrigin;
- [CEReactions, SetterThrows]
- attribute DOMString useMap;
- [CEReactions, SetterThrows]
- attribute DOMString referrerPolicy;
- [CEReactions, SetterThrows]
- attribute boolean isMap;
- [CEReactions, SetterThrows]
- attribute unsigned long width;
- [CEReactions, SetterThrows]
- attribute unsigned long height;
- [CEReactions, SetterThrows]
- attribute DOMString decoding;
- [CEReactions, SetterThrows]
- attribute DOMString loading;
- [Pref="network.fetchpriority.enabled", CEReactions]
- attribute DOMString fetchPriority;
- readonly attribute unsigned long naturalWidth;
- readonly attribute unsigned long naturalHeight;
- readonly attribute boolean complete;
- [NewObject]
- Promise<undefined> decode();
- [NewObject, ChromeOnly]
- Promise<sequence<ImageText>> recognizeCurrentImageText();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLImageElement {
- [CEReactions, SetterThrows]
- attribute DOMString name;
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute unsigned long hspace;
- [CEReactions, SetterThrows]
- attribute unsigned long vspace;
- [CEReactions, SetterThrows]
- attribute DOMString longDesc;
- [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString border;
- };
- // [Update me: not in whatwg spec yet]
- // http://picture.responsiveimages.org/#the-img-element
- partial interface HTMLImageElement {
- [CEReactions, SetterThrows]
- attribute DOMString sizes;
- readonly attribute DOMString currentSrc;
- };
- // Mozilla extensions.
- partial interface HTMLImageElement {
- [CEReactions, SetterThrows]
- attribute DOMString lowsrc;
- // These attributes are offsets from the closest view (to mimic
- // NS4's "offset-from-layer" behavior).
- readonly attribute long x;
- readonly attribute long y;
- };
- interface mixin MozImageLoadingContent {
- // Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
- // to update this list if nsIImageLoadingContent changes.
- [ChromeOnly]
- const long UNKNOWN_REQUEST = -1;
- [ChromeOnly]
- const long CURRENT_REQUEST = 0;
- [ChromeOnly]
- const long PENDING_REQUEST = 1;
- [ChromeOnly]
- attribute boolean loadingEnabled;
- /**
- * Same as addNativeObserver but intended for scripted observers or observers
- * from another or without a document.
- */
- [ChromeOnly]
- undefined addObserver(imgINotificationObserver aObserver);
- /**
- * Same as removeNativeObserver but intended for scripted observers or
- * observers from another or without a document.
- */
- [ChromeOnly]
- undefined removeObserver(imgINotificationObserver aObserver);
- [ChromeOnly,Throws]
- imgIRequest? getRequest(long aRequestType);
- [ChromeOnly,Throws]
- long getRequestType(imgIRequest aRequest);
- [ChromeOnly]
- readonly attribute URI? currentURI;
- // Gets the final URI of the current request, if available.
- // Otherwise, returns null.
- [ChromeOnly]
- readonly attribute URI? currentRequestFinalURI;
- /**
- * forceReload forces reloading of the image pointed to by currentURI
- *
- * @param aNotify request should notify
- * @throws NS_ERROR_NOT_AVAILABLE if there is no current URI to reload
- */
- [ChromeOnly,Throws]
- undefined forceReload(optional boolean aNotify = true);
- };
- HTMLImageElement includes MozImageLoadingContent;
-
- /* ---------------------- HTMLInputElement ----------------------------- */
- /* ./webidl/HTMLInputElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-input-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * https://wicg.github.io/entries-api/#idl-index
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- enum SelectionMode {
- "select",
- "start",
- "end",
- "preserve",
- };
- interface XULControllers;
- [Exposed=Window,
- InstrumentedProps=(capture,
- incremental,
- onsearch,
- popoverTargetAction,
- popoverTargetElement,
- webkitEntries,
- webkitdirectory)]
- interface HTMLInputElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Pure, SetterThrows]
- attribute DOMString accept;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString alt;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString autocomplete;
- [CEReactions, Pure, SetterThrows, Pref="dom.capture.enabled"]
- attribute DOMString capture;
- [CEReactions, Pure, SetterThrows]
- attribute boolean defaultChecked;
- [Pure]
- attribute boolean checked;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString dirName;
- [CEReactions, Pure, SetterThrows]
- attribute boolean disabled;
- readonly attribute HTMLFormElement? form;
- [Pure]
- attribute FileList? files;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString formAction;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString formEnctype;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString formMethod;
- [CEReactions, Pure, SetterThrows]
- attribute boolean formNoValidate;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString formTarget;
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long height;
- [Pure]
- attribute boolean indeterminate;
- [Pure]
- readonly attribute HTMLDataListElement? list;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString max;
- [CEReactions, Pure, SetterThrows]
- attribute long maxLength;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString min;
- [CEReactions, Pure, SetterThrows]
- attribute long minLength;
- [CEReactions, Pure, SetterThrows]
- attribute boolean multiple;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString name;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString pattern;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString placeholder;
- [CEReactions, Pure, SetterThrows]
- attribute boolean readOnly;
- [CEReactions, Pure, SetterThrows]
- attribute boolean required;
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long size;
- [CEReactions, Pure, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString step;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString type;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString defaultValue;
- [CEReactions, Pure, SetterThrows, NeedsCallerType]
- attribute [LegacyNullToEmptyString] DOMString value;
- [Throws]
- attribute object? valueAsDate;
- [Pure, SetterThrows]
- attribute unrestricted double valueAsNumber;
- [CEReactions, SetterThrows]
- attribute unsigned long width;
- [Throws]
- undefined stepUp(optional long n = 1);
- [Throws]
- undefined stepDown(optional long n = 1);
- [Pure]
- readonly attribute boolean willValidate;
- [Pure]
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- readonly attribute NodeList? labels;
- undefined select();
- [Throws]
- attribute unsigned long? selectionStart;
- [Throws]
- attribute unsigned long? selectionEnd;
- [Throws]
- attribute DOMString? selectionDirection;
- [Throws]
- undefined setRangeText(DOMString replacement);
- [Throws]
- undefined setRangeText(DOMString replacement, unsigned long start,
- unsigned long end, optional SelectionMode selectionMode = "preserve");
- [Throws]
- undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
- [Throws]
- undefined showPicker();
- // also has obsolete members
- };
- partial interface HTMLInputElement {
- [CEReactions, Pure, SetterThrows]
- attribute DOMString align;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString useMap;
- };
- // Mozilla extensions
- partial interface HTMLInputElement {
- [GetterThrows, ChromeOnly]
- readonly attribute XULControllers? controllers;
- // Binaryname because we have a FragmentOrElement function named "TextLength()".
- [NeedsCallerType, BinaryName="inputTextLength"]
- readonly attribute long textLength;
- [Throws, ChromeOnly]
- sequence<DOMString> mozGetFileNameArray();
- [ChromeOnly, Throws]
- undefined mozSetFileNameArray(sequence<DOMString> fileNames);
- [ChromeOnly]
- undefined mozSetFileArray(sequence<File> files);
- // This method is meant to use for testing only.
- [ChromeOnly, Throws]
- undefined mozSetDirectory(DOMString directoryPath);
- // This method is meant to use for testing only.
- [ChromeOnly]
- undefined mozSetDndFilesAndDirectories(sequence<(File or Directory)> list);
- // This method is meant to use for testing only.
- [ChromeOnly, NewObject]
- Promise<sequence<(File or Directory)>> getFilesAndDirectories();
- boolean mozIsTextField(boolean aExcludePassword);
- [ChromeOnly]
- readonly attribute boolean hasBeenTypePassword;
- [ChromeOnly]
- attribute DOMString previewValue;
- // Last value entered by the user, not by a script.
- // NOTE(emilio): As of right now some execCommand triggered changes might be
- // considered interactive.
- [ChromeOnly]
- readonly attribute DOMString lastInteractiveValue;
- [ChromeOnly]
- // This function will return null if @autocomplete is not defined for the
- // current @type
- AutocompleteInfo? getAutocompleteInfo();
- [ChromeOnly]
- // The reveal password state for a type=password control.
- attribute boolean revealPassword;
- };
- interface mixin MozEditableElement {
- // Returns an nsIEditor instance which is associated with the element.
- // If the element can be associated with an editor but not yet created,
- // this creates new one automatically.
- [Pure, ChromeOnly, BinaryName="editorForBindings"]
- readonly attribute nsIEditor? editor;
- // Returns true if an nsIEditor instance has already been associated with
- // the element.
- [Pure, ChromeOnly]
- readonly attribute boolean hasEditor;
- // This is set to true if "input" event should be fired with InputEvent on
- // the element. Otherwise, i.e., if "input" event should be fired with
- // Event, set to false.
- [ChromeOnly]
- readonly attribute boolean isInputEventTarget;
- // This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
- // of the value change is closer to the normal user input, so 'change' event
- // for example will be dispatched when focusing out the element.
- [Func="IsChromeOrUAWidget", NeedsSubjectPrincipal]
- undefined setUserInput(DOMString input);
- };
- HTMLInputElement includes MozEditableElement;
- HTMLInputElement includes MozImageLoadingContent;
- HTMLInputElement includes PopoverInvokerElement;
- HTMLInputElement includes InvokerElement;
- // https://wicg.github.io/entries-api/#idl-index
- partial interface HTMLInputElement {
- [Pref="dom.webkitBlink.filesystem.enabled", Frozen, Cached, Pure]
- readonly attribute sequence<FileSystemEntry> webkitEntries;
- [Pref="dom.webkitBlink.dirPicker.enabled", BinaryName="WebkitDirectoryAttr", SetterThrows]
- attribute boolean webkitdirectory;
- };
- dictionary DateTimeValue {
- long hour;
- long minute;
- long year;
- long month;
- long day;
- };
- partial interface HTMLInputElement {
- [ChromeOnly]
- DateTimeValue getDateTimeInputBoxValue();
- [ChromeOnly]
- readonly attribute Element? dateTimeBoxElement;
- [ChromeOnly, BinaryName="getMinimumAsDouble"]
- double getMinimum();
- [ChromeOnly, BinaryName="getMaximumAsDouble"]
- double getMaximum();
- [Func="IsChromeOrUAWidget"]
- undefined openDateTimePicker(optional DateTimeValue initialValue = {});
- [Func="IsChromeOrUAWidget"]
- undefined updateDateTimePicker(optional DateTimeValue value = {});
- [Func="IsChromeOrUAWidget"]
- undefined closeDateTimePicker();
- [Func="IsChromeOrUAWidget"]
- undefined setFocusState(boolean aIsFocused);
- [Func="IsChromeOrUAWidget"]
- undefined updateValidityState();
- [Func="IsChromeOrUAWidget", BinaryName="getStepAsDouble"]
- double getStep();
- [Func="IsChromeOrUAWidget", BinaryName="getStepBaseAsDouble"]
- double getStepBase();
- };
-
- /* ---------------------- HTMLLabelElement ----------------------------- */
- /* ./webidl/HTMLLabelElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLLabelElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute HTMLFormElement? form;
- [CEReactions]
- attribute DOMString htmlFor;
- readonly attribute HTMLElement? control;
- };
-
- /* ---------------------- HTMLLegendElement ----------------------------- */
- /* ./webidl/HTMLLegendElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element
- [Exposed=Window]
- interface HTMLLegendElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute HTMLFormElement? form;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLLegendElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- };
-
- /* ---------------------- HTMLLIElement ----------------------------- */
- /* ./webidl/HTMLLIElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
- [Exposed=Window]
- interface HTMLLIElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute long value;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLLIElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString type;
- };
-
- /* ---------------------- HTMLLinkElement ----------------------------- */
- /* ./webidl/HTMLLinkElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-link-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
- [Exposed=Window]
- interface HTMLLinkElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute boolean disabled;
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure]
- attribute DOMString href;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString? crossOrigin;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString rel;
- [PutForwards=value]
- readonly attribute DOMTokenList relList;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString media;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString hreflang;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString type;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString referrerPolicy;
- [PutForwards=value] readonly attribute DOMTokenList sizes;
- [CEReactions, SetterThrows, Pure]
- attribute USVString imageSrcset;
- [CEReactions, SetterThrows, Pure]
- attribute USVString imageSizes;
- [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
- readonly attribute DOMTokenList blocking;
- [Pref="network.fetchpriority.enabled", CEReactions]
- attribute DOMString fetchPriority;
- };
- HTMLLinkElement includes LinkStyle;
- // https://html.spec.whatwg.org/multipage/obsolete.html#other-elements%2C-attributes-and-apis
- partial interface HTMLLinkElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString charset;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString rev;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString target;
- };
- // https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
- partial interface HTMLLinkElement {
- [CEReactions, SetterThrows]
- attribute DOMString integrity;
- };
- // https://html.spec.whatwg.org/multipage/links.html#link-type-preload
- partial interface HTMLLinkElement {
- [SetterThrows, Pure]
- attribute DOMString as;
- };
-
- /* ---------------------- HTMLMapElement ----------------------------- */
- /* ./webidl/HTMLMapElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
- [Exposed=Window]
- interface HTMLMapElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [Constant]
- readonly attribute HTMLCollection areas;
- // Not supported yet.
- //readonly attribute HTMLCollection images;
- };
-
- /* ---------------------- HTMLMarqueeElement ----------------------------- */
- /* ./webidl/HTMLMarqueeElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element
- [Exposed=Window]
- interface HTMLMarqueeElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows] attribute DOMString behavior;
- [CEReactions, SetterThrows] attribute DOMString bgColor;
- [CEReactions, SetterThrows] attribute DOMString direction;
- [CEReactions, SetterThrows] attribute DOMString height;
- [CEReactions, SetterThrows] attribute unsigned long hspace;
- [CEReactions, SetterThrows] attribute long loop;
- [CEReactions, SetterThrows] attribute unsigned long scrollAmount;
- [CEReactions, SetterThrows] attribute unsigned long scrollDelay;
- [CEReactions, SetterThrows] attribute boolean trueSpeed;
- [CEReactions, SetterThrows] attribute unsigned long vspace;
- [CEReactions, SetterThrows] attribute DOMString width;
- attribute EventHandler onbounce;
- attribute EventHandler onfinish;
- attribute EventHandler onstart;
- undefined start();
- undefined stop();
- };
-
- /* ---------------------- HTMLMediaElement ----------------------------- */
- /* ./webidl/HTMLMediaElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#media-elements
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window,
- InstrumentedProps=(disableRemotePlayback,remote)]
- interface HTMLMediaElement : HTMLElement {
- // error state
- readonly attribute MediaError? error;
- // network state
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- readonly attribute DOMString currentSrc;
- [CEReactions, SetterThrows]
- attribute DOMString? crossOrigin;
- const unsigned short NETWORK_EMPTY = 0;
- const unsigned short NETWORK_IDLE = 1;
- const unsigned short NETWORK_LOADING = 2;
- const unsigned short NETWORK_NO_SOURCE = 3;
- readonly attribute unsigned short networkState;
- [CEReactions, SetterThrows]
- attribute DOMString preload;
- [NewObject]
- readonly attribute TimeRanges buffered;
- undefined load();
- DOMString canPlayType(DOMString type);
- // ready state
- const unsigned short HAVE_NOTHING = 0;
- const unsigned short HAVE_METADATA = 1;
- const unsigned short HAVE_CURRENT_DATA = 2;
- const unsigned short HAVE_FUTURE_DATA = 3;
- const unsigned short HAVE_ENOUGH_DATA = 4;
- readonly attribute unsigned short readyState;
- readonly attribute boolean seeking;
- // playback state
- [SetterThrows]
- attribute double currentTime;
- [Throws]
- undefined fastSeek(double time);
- readonly attribute unrestricted double duration;
- [ChromeOnly]
- readonly attribute boolean isEncrypted;
- // TODO: Bug 847376 - readonly attribute any startDate;
- readonly attribute boolean paused;
- [SetterThrows]
- attribute double defaultPlaybackRate;
- [SetterThrows]
- attribute double playbackRate;
- [NewObject]
- readonly attribute TimeRanges played;
- [NewObject]
- readonly attribute TimeRanges seekable;
- readonly attribute boolean ended;
- [CEReactions, SetterThrows]
- attribute boolean autoplay;
- [CEReactions, SetterThrows]
- attribute boolean loop;
- [NewObject]
- Promise<undefined> play();
- [Throws]
- undefined pause();
- // TODO: Bug 847377 - mediaGroup and MediaController
- // media controller
- // attribute DOMString mediaGroup;
- // attribute MediaController? controller;
- // controls
- [CEReactions, SetterThrows]
- attribute boolean controls;
- [SetterThrows]
- attribute double volume;
- attribute boolean muted;
- [CEReactions, SetterThrows]
- attribute boolean defaultMuted;
- // TODO: Bug 847379
- // tracks
- [Pref="media.track.enabled"]
- readonly attribute AudioTrackList audioTracks;
- [Pref="media.track.enabled"]
- readonly attribute VideoTrackList videoTracks;
- readonly attribute TextTrackList? textTracks;
- TextTrack addTextTrack(TextTrackKind kind,
- optional DOMString label = "",
- optional DOMString language = "");
- };
- // Mozilla extensions:
- partial interface HTMLMediaElement {
- [Func="HasDebuggerOrTabsPrivilege"]
- readonly attribute MediaSource? mozMediaSourceObject;
- [Func="HasDebuggerOrTabsPrivilege", NewObject]
- Promise<HTMLMediaElementDebugInfo> mozRequestDebugInfo();
- [Func="HasDebuggerOrTabsPrivilege", NewObject]
- static undefined mozEnableDebugLog();
- [Func="HasDebuggerOrTabsPrivilege", NewObject]
- Promise<DOMString> mozRequestDebugLog();
- attribute MediaStream? srcObject;
- attribute boolean preservesPitch;
- // NB: for internal use with the video controls:
- [Func="IsChromeOrUAWidget"] attribute boolean mozAllowCasting;
- [Func="IsChromeOrUAWidget"] attribute boolean mozIsCasting;
- // Mozilla extension: stream capture
- [Throws]
- MediaStream mozCaptureStream();
- [Throws]
- MediaStream mozCaptureStreamUntilEnded();
- readonly attribute boolean mozAudioCaptured;
- // Mozilla extension: return embedded metadata from the stream as a
- // JSObject with key:value pairs for each tag. This can be used by
- // player interfaces to display the song title, artist, etc.
- [Throws]
- object? mozGetMetadata();
- // Mozilla extension: provides access to the fragment end time if
- // the media element has a fragment URI for the currentSrc, otherwise
- // it is equal to the media duration.
- readonly attribute double mozFragmentEnd;
- };
- // Encrypted Media Extensions
- partial interface HTMLMediaElement {
- readonly attribute MediaKeys? mediaKeys;
- // undefined, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
- [NewObject]
- Promise<undefined> setMediaKeys(MediaKeys? mediaKeys);
- attribute EventHandler onencrypted;
- attribute EventHandler onwaitingforkey;
- };
- /**
- * These attributes are general testing attributes and they should only be used
- * in tests.
- */
- partial interface HTMLMediaElement {
- [Pref="media.useAudioChannelService.testing"]
- readonly attribute double computedVolume;
- [Pref="media.useAudioChannelService.testing"]
- readonly attribute boolean computedMuted;
- // Return true if the media is suspended because its document is inactive or
- // the docshell is inactive and explicitly being set to prohibit all media
- // from playing.
- [ChromeOnly]
- readonly attribute boolean isSuspendedByInactiveDocOrDocShell;
- };
- /*
- * HTMLMediaElement::seekToNextFrame() is a Mozilla experimental feature.
- *
- * The SeekToNextFrame() method provides a way to access a video element's video
- * frames one by one without going through the realtime playback. So, it lets
- * authors use "frame" as unit to access the video element's underlying data,
- * instead of "time".
- *
- * The SeekToNextFrame() is a kind of seek operation, so normally, once it is
- * invoked, a "seeking" event is dispatched. However, if the media source has no
- * video data or is not seekable, the operation is ignored without filing the
- * "seeking" event.
- *
- * Once the SeekToNextFrame() is done, a "seeked" event should always be filed
- * and a "ended" event might also be filed depends on where the media element's
- * position before seeking was. There are two cases:
- * Assume the media source has n+1 video frames where n is a non-negative
- * integers and the frame sequence is indexed from zero.
- * (1) If the currentTime is at anywhere smaller than the n-th frame's beginning
- * time, say the currentTime is now pointing to a position which is smaller
- * than the x-th frame's beginning time and larger or equal to the (x-1)-th
- * frame's beginning time, where x belongs to [1, n], then the
- * SeekToNextFrame() operation seeks the media to the x-th frame, sets the
- * media's currentTime to the x-th frame's beginning time and dispatches a
- * "seeked" event.
- * (2) Otherwise, if the currentTime is larger or equal to the n-th frame's
- * beginning time, then the SeekToNextFrame() operation sets the media's
- * currentTime to the duration of the media source and dispatches a "seeked"
- * event and an "ended" event.
- */
- partial interface HTMLMediaElement {
- [NewObject, Pref="media.seekToNextFrame.enabled"]
- Promise<undefined> seekToNextFrame();
- };
- /* Internal testing only API */
- partial interface HTMLMediaElement {
- // These APIs are used to simulate visibility changes to help debug and write
- // tests about suspend-video-decoding.
- // - SetVisible() is for simulating visibility changes.
- // - HasSuspendTaint() is for querying that the element's decoder cannot suspend
- // video decoding because it has been tainted by an operation, such as
- // drawImage().
- // - isInViewPort is a boolean value which indicate whether media element is
- // in view port.
- // - isVideoDecodingSuspended() is used to know whether video decoding has
- // suspended.
- [Pref="media.test.video-suspend"]
- undefined setVisible(boolean aVisible);
- [Pref="media.test.video-suspend"]
- boolean hasSuspendTaint();
- [ChromeOnly]
- readonly attribute boolean isInViewPort;
- [ChromeOnly]
- readonly attribute boolean isVideoDecodingSuspended;
- [ChromeOnly]
- readonly attribute double totalVideoPlayTime;
- [ChromeOnly]
- readonly attribute double totalVideoHDRPlayTime;
- [ChromeOnly]
- readonly attribute double visiblePlayTime;
- [ChromeOnly]
- readonly attribute double invisiblePlayTime;
- [ChromeOnly]
- readonly attribute double videoDecodeSuspendedTime;
- [ChromeOnly]
- readonly attribute double totalAudioPlayTime;
- [ChromeOnly]
- readonly attribute double audiblePlayTime;
- [ChromeOnly]
- readonly attribute double inaudiblePlayTime;
- [ChromeOnly]
- readonly attribute double mutedPlayTime;
- // These APIs are used for decoder doctor tests.
- [ChromeOnly]
- undefined setFormatDiagnosticsReportForMimeType(DOMString mimeType, DecoderDoctorReportType error);
- [Throws, ChromeOnly]
- undefined setDecodeError(DOMString error);
- [ChromeOnly]
- undefined setAudioSinkFailedStartup();
- };
- /* Audio Output Devices API
- * https://w3c.github.io/mediacapture-output/
- */
- partial interface HTMLMediaElement {
- [SecureContext, Pref="media.setsinkid.enabled"]
- readonly attribute DOMString sinkId;
- [NewObject, SecureContext, Pref="media.setsinkid.enabled"]
- Promise<undefined> setSinkId(DOMString sinkId);
- };
- /*
- * API that exposes whether a call to HTMLMediaElement.play() would be
- * blocked by autoplay policies; whether the promise returned by play()
- * would be rejected with NotAllowedError.
- */
- partial interface HTMLMediaElement {
- [Pref="media.allowed-to-play.enabled"]
- readonly attribute boolean allowedToPlay;
- };
-
- /* ---------------------- HTMLMenuElement ----------------------------- */
- /* ./webidl/HTMLMenuElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element
- * https://html.spec.whatwg.org/multipage/obsolete.html#HTMLMenuElement-partial
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element
- [Exposed=Window]
- interface HTMLMenuElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // https://html.spec.whatwg.org/multipage/obsolete.html#HTMLMenuElement-partial
- partial interface HTMLMenuElement {
- [CEReactions, SetterThrows]
- attribute boolean compact;
- };
-
- /* ---------------------- HTMLMetaElement ----------------------------- */
- /* ./webidl/HTMLMetaElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // https://html.spec.whatwg.org/#the-meta-element
- [Exposed=Window]
- interface HTMLMetaElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString httpEquiv;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString content;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString media;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLMetaElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString scheme;
- };
-
- /* ---------------------- HTMLMeterElement ----------------------------- */
- /* ./webidl/HTMLMeterElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element
- [Exposed=Window]
- interface HTMLMeterElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute double value;
- [CEReactions, SetterThrows]
- attribute double min;
- [CEReactions, SetterThrows]
- attribute double max;
- [CEReactions, SetterThrows]
- attribute double low;
- [CEReactions, SetterThrows]
- attribute double high;
- [CEReactions, SetterThrows]
- attribute double optimum;
- readonly attribute NodeList labels;
- };
-
- /* ---------------------- HTMLModElement ----------------------------- */
- /* ./webidl/HTMLModElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements
- [Exposed=Window]
- interface HTMLModElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString cite;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString dateTime;
- };
-
- /* ---------------------- HTMLObjectElement ----------------------------- */
- /* ./webidl/HTMLObjectElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
- * http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
- [Exposed=Window]
- interface HTMLObjectElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Pure, SetterThrows]
- attribute DOMString data;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString type;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString name;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString useMap;
- [Pure]
- readonly attribute HTMLFormElement? form;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString width;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString height;
- // Not pure: can trigger about:blank instantiation
- [NeedsSubjectPrincipal]
- readonly attribute Document? contentDocument;
- // Not pure: can trigger about:blank instantiation
- [NeedsSubjectPrincipal]
- readonly attribute WindowProxy? contentWindow;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#HTMLObjectElement-partial
- partial interface HTMLObjectElement {
- [CEReactions, Pure, SetterThrows]
- attribute DOMString align;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString archive;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString code;
- [CEReactions, Pure, SetterThrows]
- attribute boolean declare;
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long hspace;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString standby;
- [CEReactions, Pure, SetterThrows]
- attribute unsigned long vspace;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString codeBase;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString codeType;
- [CEReactions, Pure, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString border;
- };
- partial interface HTMLObjectElement {
- // GetSVGDocument
- [NeedsSubjectPrincipal]
- Document? getSVGDocument();
- };
- interface mixin MozObjectLoadingContent {
- // Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please
- // make sure to update this list if nsIObjectLoadingContent changes. Also,
- // make sure everything on here is [ChromeOnly].
- [ChromeOnly]
- const unsigned long TYPE_LOADING = 0;
- [ChromeOnly]
- const unsigned long TYPE_DOCUMENT = 1;
- [ChromeOnly]
- const unsigned long TYPE_FALLBACK = 2;
- /**
- * The actual mime type (the one we got back from the network
- * request) for the element.
- */
- [ChromeOnly]
- readonly attribute DOMString actualType;
- /**
- * Gets the type of the content that's currently loaded. See
- * the constants above for the list of possible values.
- */
- [ChromeOnly]
- readonly attribute unsigned long displayedType;
- /**
- * The URL of the data/src loaded in the object. This may be null (i.e.
- * an <embed> with no src).
- */
- [ChromeOnly]
- readonly attribute URI? srcURI;
- };
- HTMLObjectElement includes MozFrameLoaderOwner;
- HTMLObjectElement includes MozObjectLoadingContent;
-
- /* ---------------------- HTMLOListElement ----------------------------- */
- /* ./webidl/HTMLOListElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element
- [Exposed=Window]
- interface HTMLOListElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean reversed;
- [CEReactions, SetterThrows]
- attribute long start;
- [CEReactions, SetterThrows]
- attribute DOMString type;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLOListElement {
- [CEReactions, SetterThrows]
- attribute boolean compact;
- };
-
- /* ---------------------- HTMLOptGroupElement ----------------------------- */
- /* ./webidl/HTMLOptGroupElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-optgroup-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLOptGroupElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean disabled;
- [CEReactions, SetterThrows]
- attribute DOMString label;
- };
-
- /* ---------------------- HTMLOptionElement ----------------------------- */
- /* ./webidl/HTMLOptionElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-option-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false),
- Exposed=Window]
- interface HTMLOptionElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute boolean disabled;
- readonly attribute HTMLFormElement? form;
- [CEReactions, SetterThrows]
- attribute DOMString label;
- [CEReactions, SetterThrows]
- attribute boolean defaultSelected;
- attribute boolean selected;
- [CEReactions, SetterThrows]
- attribute DOMString value;
- [CEReactions, SetterThrows]
- attribute DOMString text;
- readonly attribute long index;
- };
-
- /* ---------------------- HTMLOptionsCollection ----------------------------- */
- /* ./webidl/HTMLOptionsCollection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-html5-20120329/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface HTMLOptionsCollection : HTMLCollection {
- [CEReactions, SetterThrows]
- attribute unsigned long length;
- [CEReactions, Throws]
- setter undefined (unsigned long index, HTMLOptionElement? option);
- [CEReactions, Throws]
- undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
- [CEReactions]
- undefined remove(long index);
- attribute long selectedIndex;
- };
-
- /* ---------------------- HTMLOutputElement ----------------------------- */
- /* ./webidl/HTMLOutputElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
- [Exposed=Window]
- interface HTMLOutputElement : HTMLElement {
- [HTMLConstructor] constructor();
- [PutForwards=value, Constant]
- readonly attribute DOMTokenList htmlFor;
- readonly attribute HTMLFormElement? form;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [Constant]
- readonly attribute DOMString type;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString defaultValue;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString value;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- readonly attribute NodeList labels;
- };
-
- /* ---------------------- HTMLParagraphElement ----------------------------- */
- /* ./webidl/HTMLParagraphElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-p-element
- [Exposed=Window]
- interface HTMLParagraphElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLParagraphElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- };
-
- /* ---------------------- HTMLParamElement ----------------------------- */
- /* ./webidl/HTMLParamElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
- [Exposed=Window]
- interface HTMLParamElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString value;
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLParamElement {
- [CEReactions, SetterThrows, Pure]
- attribute DOMString type;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString valueType;
- };
-
- /* ---------------------- HTMLPictureElement ----------------------------- */
- /* ./webidl/HTMLPictureElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface HTMLPictureElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
-
- /* ---------------------- HTMLPreElement ----------------------------- */
- /* ./webidl/HTMLPreElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element
- [Exposed=Window]
- interface HTMLPreElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLPreElement {
- [CEReactions, SetterThrows]
- attribute long width;
- };
-
- /* ---------------------- HTMLProgressElement ----------------------------- */
- /* ./webidl/HTMLProgressElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLProgressElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute double value;
- [CEReactions, SetterThrows]
- attribute double max;
- readonly attribute double position;
- readonly attribute NodeList labels;
- };
-
- /* ---------------------- HTMLQuoteElement ----------------------------- */
- /* ./webidl/HTMLQuoteElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element
- [Exposed=Window]
- interface HTMLQuoteElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString cite;
- };
-
- /* ---------------------- HTMLScriptElement ----------------------------- */
- /* ./webidl/HTMLScriptElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-script-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- */
- [Exposed=Window]
- interface HTMLScriptElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- [CEReactions, SetterThrows]
- attribute DOMString type;
- [CEReactions, SetterThrows]
- attribute boolean noModule;
- [CEReactions, SetterThrows]
- attribute DOMString charset;
- [CEReactions, SetterThrows]
- attribute boolean async;
- [CEReactions, SetterThrows]
- attribute boolean defer;
- [CEReactions, SetterThrows]
- attribute DOMString? crossOrigin;
- [CEReactions, SetterThrows]
- attribute DOMString referrerPolicy;
- [CEReactions, Throws]
- attribute DOMString text;
- [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
- readonly attribute DOMTokenList blocking;
- [Pref="network.fetchpriority.enabled", CEReactions]
- attribute DOMString fetchPriority;
- static boolean supports(DOMString type);
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLScriptElement {
- [CEReactions, SetterThrows]
- attribute DOMString event;
- [CEReactions, SetterThrows]
- attribute DOMString htmlFor;
- };
- // https://w3c.github.io/webappsec/specs/subresourceintegrity/#htmlscriptelement-1
- partial interface HTMLScriptElement {
- [CEReactions, SetterThrows]
- attribute DOMString integrity;
- };
-
- /* ---------------------- HTMLSelectElement ----------------------------- */
- /* ./webidl/HTMLSelectElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/html/#the-select-element
- */
- [Exposed=Window]
- interface HTMLSelectElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString autocomplete;
- [CEReactions, SetterThrows, Pure]
- attribute boolean disabled;
- [Pure]
- readonly attribute HTMLFormElement? form;
- [CEReactions, SetterThrows, Pure]
- attribute boolean multiple;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [CEReactions, SetterThrows, Pure]
- attribute boolean required;
- [CEReactions, SetterThrows, Pure]
- attribute unsigned long size;
- [Pure]
- readonly attribute DOMString type;
- [Constant]
- readonly attribute HTMLOptionsCollection options;
- [CEReactions, SetterThrows, Pure]
- attribute unsigned long length;
- getter Element? item(unsigned long index);
- HTMLOptionElement? namedItem(DOMString name);
- [CEReactions, Throws]
- undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
- [CEReactions]
- undefined remove(long index);
- [CEReactions, Throws]
- setter undefined (unsigned long index, HTMLOptionElement? option);
- readonly attribute HTMLCollection selectedOptions;
- [Pure]
- attribute long selectedIndex;
- [Pure]
- attribute DOMString value;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- [Throws, Pref="dom.select.showPicker.enabled"]
- undefined showPicker();
- readonly attribute NodeList labels;
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
- [CEReactions]
- undefined remove();
- };
- // Chrome only interface
- partial interface HTMLSelectElement {
- [ChromeOnly]
- undefined userFinishedInteracting(boolean changed);
- [ChromeOnly, Pure]
- readonly attribute boolean isCombobox;
- [ChromeOnly]
- attribute boolean openInParentProcess;
- [ChromeOnly]
- AutocompleteInfo getAutocompleteInfo();
- [ChromeOnly]
- attribute DOMString previewValue;
- };
-
- /* ---------------------- HTMLSlotElement ----------------------------- */
- /* ./webidl/HTMLSlotElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLSlotElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows] attribute DOMString name;
- sequence<Node> assignedNodes(optional AssignedNodesOptions options = {});
- sequence<Element> assignedElements(optional AssignedNodesOptions options = {});
- undefined assign((Element or Text)... nodes);
- };
- dictionary AssignedNodesOptions {
- boolean flatten = false;
- };
-
- /* ---------------------- HTMLSourceElement ----------------------------- */
- /* ./webidl/HTMLSourceElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-source-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLSourceElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString src;
- [CEReactions, SetterThrows]
- attribute DOMString type;
- };
- partial interface HTMLSourceElement {
- [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
- attribute DOMString srcset;
- [CEReactions, SetterThrows]
- attribute DOMString sizes;
- [CEReactions, SetterThrows]
- attribute DOMString media;
- [CEReactions, SetterThrows]
- attribute unsigned long width;
- [CEReactions, SetterThrows]
- attribute unsigned long height;
- };
-
- /* ---------------------- HTMLSpanElement ----------------------------- */
- /* ./webidl/HTMLSpanElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-span-element
- [Exposed=Window, ProbablyShortLivingWrapper]
- interface HTMLSpanElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
-
- /* ---------------------- HTMLStyleElement ----------------------------- */
- /* ./webidl/HTMLStyleElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-style-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- */
- [Exposed=Window]
- interface HTMLStyleElement : HTMLElement {
- [HTMLConstructor] constructor();
- [Pure]
- attribute boolean disabled;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString media;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString type;
- [Pref="dom.element.blocking.enabled", SameObject, PutForwards=value]
- readonly attribute DOMTokenList blocking;
- };
- HTMLStyleElement includes LinkStyle;
- // Mozilla-specific additions to support devtools
- partial interface HTMLStyleElement {
- /**
- * Mark this style element with a devtools-specific principal that
- * skips Content Security Policy unsafe-inline checks. This triggering
- * principal will be overwritten by any callers that set textContent
- * or innerHTML on this element.
- */
- [ChromeOnly]
- undefined setDevtoolsAsTriggeringPrincipal();
- };
-
- /* ---------------------- HTMLTableCaptionElement ----------------------------- */
- /* ./webidl/HTMLTableCaptionElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableCaptionElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- partial interface HTMLTableCaptionElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- };
-
- /* ---------------------- HTMLTableCellElement ----------------------------- */
- /* ./webidl/HTMLTableCellElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableCellElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute unsigned long colSpan;
- [CEReactions, SetterThrows]
- attribute unsigned long rowSpan;
- //[PutForwards=value] readonly attribute DOMTokenList headers;
- [CEReactions, SetterThrows]
- attribute DOMString headers;
- readonly attribute long cellIndex;
- // Mozilla-specific extensions
- [CEReactions, SetterThrows]
- attribute DOMString abbr;
- [CEReactions, SetterThrows]
- attribute DOMString scope;
- };
- partial interface HTMLTableCellElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString axis;
- [CEReactions, SetterThrows]
- attribute DOMString height;
- [CEReactions, SetterThrows]
- attribute DOMString width;
- [CEReactions, SetterThrows]
- attribute DOMString ch;
- [CEReactions, SetterThrows]
- attribute DOMString chOff;
- [CEReactions, SetterThrows]
- attribute boolean noWrap;
- [CEReactions, SetterThrows]
- attribute DOMString vAlign;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString bgColor;
- };
-
- /* ---------------------- HTMLTableColElement ----------------------------- */
- /* ./webidl/HTMLTableColElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableColElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute unsigned long span;
- };
- partial interface HTMLTableColElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString ch;
- [CEReactions, SetterThrows]
- attribute DOMString chOff;
- [CEReactions, SetterThrows]
- attribute DOMString vAlign;
- [CEReactions, SetterThrows]
- attribute DOMString width;
- };
-
- /* ---------------------- HTMLTableElement ----------------------------- */
- /* ./webidl/HTMLTableElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute HTMLTableCaptionElement? caption;
- HTMLElement createCaption();
- [CEReactions]
- undefined deleteCaption();
- [CEReactions, SetterThrows]
- attribute HTMLTableSectionElement? tHead;
- HTMLElement createTHead();
- [CEReactions]
- undefined deleteTHead();
- [CEReactions, SetterThrows]
- attribute HTMLTableSectionElement? tFoot;
- HTMLElement createTFoot();
- [CEReactions]
- undefined deleteTFoot();
- readonly attribute HTMLCollection tBodies;
- HTMLElement createTBody();
- readonly attribute HTMLCollection rows;
- [Throws]
- HTMLElement insertRow(optional long index = -1);
- [CEReactions, Throws]
- undefined deleteRow(long index);
- // attribute boolean sortable;
- //undefined stopSorting();
- };
- partial interface HTMLTableElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString border;
- [CEReactions, SetterThrows]
- attribute DOMString frame;
- [CEReactions, SetterThrows]
- attribute DOMString rules;
- [CEReactions, SetterThrows]
- attribute DOMString summary;
- [CEReactions, SetterThrows]
- attribute DOMString width;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString bgColor;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString cellPadding;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString cellSpacing;
- };
-
- /* ---------------------- HTMLTableRowElement ----------------------------- */
- /* ./webidl/HTMLTableRowElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableRowElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute long rowIndex;
- readonly attribute long sectionRowIndex;
- readonly attribute HTMLCollection cells;
- [Throws]
- HTMLElement insertCell(optional long index = -1);
- [CEReactions, Throws]
- undefined deleteCell(long index);
- };
- partial interface HTMLTableRowElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString ch;
- [CEReactions, SetterThrows]
- attribute DOMString chOff;
- [CEReactions, SetterThrows]
- attribute DOMString vAlign;
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString bgColor;
- };
-
- /* ---------------------- HTMLTableSectionElement ----------------------------- */
- /* ./webidl/HTMLTableSectionElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface HTMLTableSectionElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute HTMLCollection rows;
- [Throws]
- HTMLElement insertRow(optional long index = -1);
- [CEReactions, Throws]
- undefined deleteRow(long index);
- };
- partial interface HTMLTableSectionElement {
- [CEReactions, SetterThrows]
- attribute DOMString align;
- [CEReactions, SetterThrows]
- attribute DOMString ch;
- [CEReactions, SetterThrows]
- attribute DOMString chOff;
- [CEReactions, SetterThrows]
- attribute DOMString vAlign;
- };
-
- /* ---------------------- HTMLTemplateElement ----------------------------- */
- /* ./webidl/HTMLTemplateElement.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface HTMLTemplateElement : HTMLElement {
- [HTMLConstructor] constructor();
- readonly attribute DocumentFragment content;
- [CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- attribute DOMString shadowRootMode;
- [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- attribute boolean shadowRootDelegatesFocus;
- [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- attribute boolean shadowRootClonable;
- };
-
- /* ---------------------- HTMLTextAreaElement ----------------------------- */
- /* ./webidl/HTMLTextAreaElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- interface nsIEditor;
- interface XULControllers;
- [Exposed=Window]
- interface HTMLTextAreaElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString autocomplete;
- [CEReactions, SetterThrows, Pure]
- attribute unsigned long cols;
- [CEReactions, Pure, SetterThrows]
- attribute DOMString dirName;
- [CEReactions, SetterThrows, Pure]
- attribute boolean disabled;
- [Pure]
- readonly attribute HTMLFormElement? form;
- // attribute DOMString inputMode;
- [CEReactions, SetterThrows, Pure]
- attribute long maxLength;
- [CEReactions, SetterThrows, Pure]
- attribute long minLength;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString name;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString placeholder;
- [CEReactions, SetterThrows, Pure]
- attribute boolean readOnly;
- [CEReactions, SetterThrows, Pure]
- attribute boolean required;
- [CEReactions, SetterThrows, Pure]
- attribute unsigned long rows;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString wrap;
- [Constant]
- readonly attribute DOMString type;
- [CEReactions, Throws, Pure]
- attribute DOMString defaultValue;
- [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString value;
- [BinaryName="getTextLength"]
- readonly attribute unsigned long textLength;
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- [Throws]
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- undefined setCustomValidity(DOMString error);
- readonly attribute NodeList labels;
- undefined select();
- [Throws]
- attribute unsigned long? selectionStart;
- [Throws]
- attribute unsigned long? selectionEnd;
- [Throws]
- attribute DOMString? selectionDirection;
- [Throws]
- undefined setRangeText(DOMString replacement);
- [Throws]
- undefined setRangeText(DOMString replacement, unsigned long start,
- unsigned long end, optional SelectionMode selectionMode = "preserve");
- [Throws]
- undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
- };
- partial interface HTMLTextAreaElement {
- // Chrome-only Mozilla extensions
- [Throws, ChromeOnly]
- readonly attribute XULControllers controllers;
- };
- HTMLTextAreaElement includes MozEditableElement;
- partial interface HTMLTextAreaElement {
- [ChromeOnly]
- attribute DOMString previewValue;
- };
-
- /* ---------------------- HTMLTimeElement ----------------------------- */
- /* ./webidl/HTMLTimeElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element
- */
- [Exposed=Window]
- interface HTMLTimeElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute DOMString dateTime;
- };
-
- /* ---------------------- HTMLTitleElement ----------------------------- */
- /* ./webidl/HTMLTitleElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-title-element
- */
- [Exposed=Window]
- interface HTMLTitleElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, Throws]
- attribute DOMString text;
- };
-
- /* ---------------------- HTMLTrackElement ----------------------------- */
- /* ./webidl/HTMLTrackElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element
- */
- [Exposed=Window]
- interface HTMLTrackElement : HTMLElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows, Pure]
- attribute DOMString kind;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString src;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString srclang;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString label;
- [CEReactions, SetterThrows, Pure]
- attribute boolean default;
- const unsigned short NONE = 0;
- const unsigned short LOADING = 1;
- const unsigned short LOADED = 2;
- const unsigned short ERROR = 3;
- [BinaryName="readyStateForBindings"]
- readonly attribute unsigned short readyState;
- readonly attribute TextTrack? track;
- };
-
- /* ---------------------- HTMLUListElement ----------------------------- */
- /* ./webidl/HTMLUListElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
- * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element
- [Exposed=Window]
- interface HTMLUListElement : HTMLElement {
- [HTMLConstructor] constructor();
- };
- // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
- partial interface HTMLUListElement {
- [CEReactions, SetterThrows]
- attribute boolean compact;
- [CEReactions, SetterThrows]
- attribute DOMString type;
- };
-
- /* ---------------------- HTMLVideoElement ----------------------------- */
- /* ./webidl/HTMLVideoElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#the-video-element
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window,
- InstrumentedProps=(cancelVideoFrameCallback,
- onenterpictureinpicture,
- onleavepictureinpicture,
- playsInline,
- requestPictureInPicture,
- requestVideoFrameCallback)]
- interface HTMLVideoElement : HTMLMediaElement {
- [HTMLConstructor] constructor();
- [CEReactions, SetterThrows]
- attribute unsigned long width;
- [CEReactions, SetterThrows]
- attribute unsigned long height;
- readonly attribute unsigned long videoWidth;
- readonly attribute unsigned long videoHeight;
- [CEReactions, SetterThrows]
- attribute DOMString poster;
- };
- partial interface HTMLVideoElement {
- // A count of the number of video frames that have demuxed from the media
- // resource. If we were playing perfectly, we'd be able to paint this many
- // frames.
- readonly attribute unsigned long mozParsedFrames;
- // A count of the number of frames that have been decoded. We may drop
- // frames if the decode is taking too much time.
- readonly attribute unsigned long mozDecodedFrames;
- // A count of the number of frames that have been presented to the rendering
- // pipeline. We may drop frames if they arrive late at the renderer.
- readonly attribute unsigned long mozPresentedFrames;
- // Number of presented frames which were painted on screen.
- readonly attribute unsigned long mozPaintedFrames;
- // Time which the last painted video frame was late by, in seconds.
- readonly attribute double mozFrameDelay;
- // True if the video has an audio track available.
- readonly attribute boolean mozHasAudio;
- // Clones the frames playing in this <video> to the target. Cloning ends
- // when either node is removed from their DOM trees. Throws if one or
- // both <video> elements are not attached to a DOM tree.
- // Returns a promise that resolves when the target's ImageContainer has been
- // installed in this <video>'s MediaDecoder, or selected video
- // MediaStreamTrack, whichever is available first. Note that it might never
- // resolve.
- [NewObject, Func="IsChromeOrUAWidget"]
- Promise<undefined> cloneElementVisually(HTMLVideoElement target);
- // Stops a <video> from cloning visually. Does nothing if the <video>
- // wasn't cloning in the first place.
- [Func="IsChromeOrUAWidget"]
- undefined stopCloningElementVisually();
- // Returns true if the <video> is being cloned visually to another
- // <video> element (see cloneElementVisually).
- [Func="IsChromeOrUAWidget"]
- readonly attribute boolean isCloningElementVisually;
- };
- // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
- partial interface HTMLVideoElement {
- [Pref="media.mediasource.enabled", NewObject]
- VideoPlaybackQuality getVideoPlaybackQuality();
- };
- // https://w3c.github.io/picture-in-picture/#htmlvideoelement-extensions
- partial interface HTMLVideoElement {
- [CEReactions, SetterThrows] attribute boolean disablePictureInPicture;
- };
-
- /* ---------------------- IDBCursor ----------------------------- */
- /* ./webidl/IDBCursor.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#cursor-interface
- */
- enum IDBCursorDirection {
- "next",
- "nextunique",
- "prev",
- "prevunique"
- };
- [Exposed=(Window,Worker)]
- interface IDBCursor {
- readonly attribute (IDBObjectStore or IDBIndex) source;
- [BinaryName="getDirection"]
- readonly attribute IDBCursorDirection direction;
- [Pure, Throws] readonly attribute any key;
- [Pure, Throws] readonly attribute any primaryKey;
- [SameObject] readonly attribute IDBRequest request;
- [Throws]
- undefined advance ([EnforceRange] unsigned long count);
- [Throws]
- undefined continue (optional any key);
- [Throws]
- undefined continuePrimaryKey(any key, any primaryKey);
- [NewObject, Throws] IDBRequest update(any value);
- [NewObject, Throws] IDBRequest delete();
- };
- [Exposed=(Window,Worker)]
- interface IDBCursorWithValue : IDBCursor {
- [Pure, Throws] readonly attribute any value;
- };
-
- /* ---------------------- IDBDatabase ----------------------------- */
- /* ./webidl/IDBDatabase.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#database-interface
- * https://w3c.github.io/IndexedDB/#enumdef-idbtransactiondurability
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum IDBTransactionDurability { "default", "strict", "relaxed" };
- dictionary IDBTransactionOptions {
- IDBTransactionDurability durability = "default";
- };
- [Exposed=(Window,Worker)]
- interface IDBDatabase : EventTarget {
- [Constant] readonly attribute DOMString name;
- readonly attribute unsigned long long version;
- readonly attribute DOMStringList objectStoreNames;
- [NewObject, Throws]
- IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames,
- optional IDBTransactionMode mode = "readonly",
- optional IDBTransactionOptions options = {});
- [NewObject, Throws]
- IDBObjectStore createObjectStore(
- DOMString name,
- optional IDBObjectStoreParameters options = {});
- [Throws]
- undefined deleteObjectStore (DOMString name);
- undefined close ();
- attribute EventHandler onabort;
- attribute EventHandler onclose;
- attribute EventHandler onerror;
- attribute EventHandler onversionchange;
- };
-
- /* ---------------------- IDBFactory ----------------------------- */
- /* ./webidl/IDBFactory.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#factory-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface Principal;
- dictionary IDBOpenDBOptions
- {
- [EnforceRange] unsigned long long version;
- };
- /**
- * Interface that defines the indexedDB property on a window. See
- * https://w3c.github.io/IndexedDB/#idbfactory
- * for more information.
- */
- [Exposed=(Window,Worker)]
- interface IDBFactory {
- [NewObject, Throws, NeedsCallerType]
- IDBOpenDBRequest
- open(DOMString name,
- [EnforceRange] unsigned long long version);
- [NewObject, Throws, NeedsCallerType]
- IDBOpenDBRequest
- open(DOMString name,
- optional IDBOpenDBOptions options = {});
- [NewObject, Throws, NeedsCallerType]
- IDBOpenDBRequest
- deleteDatabase(DOMString name,
- optional IDBOpenDBOptions options = {});
- Promise<sequence<IDBDatabaseInfo>> databases();
- [Throws]
- short
- cmp(any first,
- any second);
- [NewObject, Throws, ChromeOnly, NeedsCallerType]
- IDBOpenDBRequest
- openForPrincipal(Principal principal,
- DOMString name,
- [EnforceRange] unsigned long long version);
- [NewObject, Throws, ChromeOnly, NeedsCallerType]
- IDBOpenDBRequest
- openForPrincipal(Principal principal,
- DOMString name,
- optional IDBOpenDBOptions options = {});
- [NewObject, Throws, ChromeOnly, NeedsCallerType]
- IDBOpenDBRequest
- deleteForPrincipal(Principal principal,
- DOMString name,
- optional IDBOpenDBOptions options = {});
- };
- dictionary IDBDatabaseInfo {
- DOMString name;
- unsigned long long version;
- };
-
- /* ---------------------- IDBIndex ----------------------------- */
- /* ./webidl/IDBIndex.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#index-interface
- */
- dictionary IDBIndexParameters {
- boolean unique = false;
- boolean multiEntry = false;
- // <null>: Not locale-aware, uses normal JS sorting.
- // <string>: Always sorted based on the rules of the specified
- // locale (e.g. "en-US", etc.).
- // "auto": Sorted by the platform default, may change based on
- // user agent options.
- DOMString? locale = null;
- };
- [Exposed=(Window,Worker)]
- interface IDBIndex {
- [SetterThrows] attribute DOMString name;
- [SameObject] readonly attribute IDBObjectStore objectStore;
- [Throws]
- readonly attribute any keyPath;
- readonly attribute boolean multiEntry;
- readonly attribute boolean unique;
- // <null>: Not locale-aware, uses normal JS sorting.
- // <string>: Sorted based on the rules of the specified locale.
- // Note: never returns "auto", only the current locale.
- [Pref="dom.indexedDB.experimental"]
- readonly attribute DOMString? locale;
- [Pref="dom.indexedDB.experimental"]
- readonly attribute boolean isAutoLocale;
- [NewObject, Throws] IDBRequest get(any query);
- [NewObject, Throws] IDBRequest getKey(any query);
- // If we decide to add use counters for the mozGetAll/mozGetAllKeys
- // functions, we'll need to pull them out into sepatate operations
- // with a BinaryName mapping to the same underlying implementation.
- // See also bug 1577227.
- [NewObject, Throws, Alias="mozGetAll"]
- IDBRequest getAll(optional any query,
- optional [EnforceRange] unsigned long count);
- [NewObject, Throws, Alias="mozGetAllKeys"]
- IDBRequest getAllKeys(optional any query,
- optional [EnforceRange] unsigned long count);
- [NewObject, Throws] IDBRequest count(optional any query);
- [NewObject, Throws]
- IDBRequest openCursor(optional any query,
- optional IDBCursorDirection direction = "next");
- [NewObject, Throws]
- IDBRequest openKeyCursor(optional any query,
- optional IDBCursorDirection direction = "next");
- };
-
- /* ---------------------- IDBKeyRange ----------------------------- */
- /* ./webidl/IDBKeyRange.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /*
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#keyrange
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface IDBKeyRange {
- [Throws]
- readonly attribute any lower;
- [Throws]
- readonly attribute any upper;
- [Constant]
- readonly attribute boolean lowerOpen;
- [Constant]
- readonly attribute boolean upperOpen;
- [Throws]
- boolean _includes(any key);
- [NewObject, Throws]
- static IDBKeyRange only (any value);
- [NewObject, Throws]
- static IDBKeyRange lowerBound (any lower, optional boolean open = false);
- [NewObject, Throws]
- static IDBKeyRange upperBound (any upper, optional boolean open = false);
- [NewObject, Throws]
- static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
- };
-
- /* ---------------------- IDBObjectStore ----------------------------- */
- /* ./webidl/IDBObjectStore.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#object-store-interface
- */
- dictionary IDBObjectStoreParameters {
- (DOMString or sequence<DOMString>)? keyPath = null;
- boolean autoIncrement = false;
- };
- [Exposed=(Window,Worker)]
- interface IDBObjectStore {
- [SetterThrows]
- attribute DOMString name;
- [Throws]
- readonly attribute any keyPath;
- readonly attribute DOMStringList indexNames;
- [SameObject] readonly attribute IDBTransaction transaction;
- readonly attribute boolean autoIncrement;
- [NewObject, Throws]
- IDBRequest put (any value, optional any key);
- [NewObject, Throws]
- IDBRequest add (any value, optional any key);
- [NewObject, Throws]
- IDBRequest delete (any key);
- [NewObject, Throws]
- IDBRequest clear ();
- [NewObject, Throws]
- IDBRequest get (any key);
- [NewObject, Throws]
- IDBRequest getKey (any key);
- // Success fires IDBTransactionEvent, result == array of values for given keys
- // If we decide to add use a counter for the mozGetAll function, we'll need
- // to pull it out into a sepatate operation with a BinaryName mapping to the
- // same underlying implementation.
- [NewObject, Throws, Alias="mozGetAll"]
- IDBRequest getAll(optional any query,
- optional [EnforceRange] unsigned long count);
- [NewObject, Throws]
- IDBRequest getAllKeys(optional any query,
- optional [EnforceRange] unsigned long count);
- [NewObject, Throws]
- IDBRequest count(optional any key);
- [NewObject, Throws]
- IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
- [NewObject, Throws]
- IDBRequest openKeyCursor(optional any query,
- optional IDBCursorDirection direction = "next");
- [NewObject, Throws]
- IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters = {});
- [Throws]
- IDBIndex index (DOMString name);
- [Throws]
- undefined deleteIndex (DOMString indexName);
- };
-
- /* ---------------------- IDBOpenDBRequest ----------------------------- */
- /* ./webidl/IDBOpenDBRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#idbopendbrequest
- */
- [Exposed=(Window,Worker)]
- interface IDBOpenDBRequest : IDBRequest {
- attribute EventHandler onblocked;
- attribute EventHandler onupgradeneeded;
- };
-
- /* ---------------------- IDBRequest ----------------------------- */
- /* ./webidl/IDBRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#idbrequest
- * https://w3c.github.io/IndexedDB/#enumdef-idbrequestreadystate
- */
- enum IDBRequestReadyState {
- "pending",
- "done"
- };
- [Exposed=(Window,Worker)]
- interface IDBRequest : EventTarget {
- [Throws]
- readonly attribute any result;
- [Throws]
- readonly attribute DOMException? error;
- readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
- readonly attribute IDBTransaction? transaction;
- readonly attribute IDBRequestReadyState readyState;
- attribute EventHandler onsuccess;
- attribute EventHandler onerror;
- };
-
- /* ---------------------- IDBTransaction ----------------------------- */
- /* ./webidl/IDBTransaction.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#idbtransaction
- * https://w3c.github.io/IndexedDB/#enumdef-idbtransactionmode
- */
- enum IDBTransactionMode {
- "readonly",
- "readwrite",
- // The "readwriteflush" mode is only available when the
- // |dom.indexedDB.experimental| pref returns
- // true. This mode is not yet part of the standard.
- "readwriteflush",
- "cleanup",
- "versionchange"
- };
- [Exposed=(Window,Worker)]
- interface IDBTransaction : EventTarget {
- [Throws]
- readonly attribute IDBTransactionMode mode;
- [Throws]
- readonly attribute IDBTransactionDurability durability;
- [SameObject] readonly attribute IDBDatabase db;
- readonly attribute DOMException? error;
- [Throws]
- IDBObjectStore objectStore (DOMString name);
- [Throws]
- undefined commit();
- [Throws]
- undefined abort();
- attribute EventHandler onabort;
- attribute EventHandler oncomplete;
- attribute EventHandler onerror;
- };
- // This seems to be custom
- partial interface IDBTransaction {
- readonly attribute DOMStringList objectStoreNames;
- };
-
- /* ---------------------- IDBVersionChangeEvent ----------------------------- */
- /* ./webidl/IDBVersionChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IndexedDB/#idbversionchangeevent
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary IDBVersionChangeEventInit : EventInit {
- unsigned long long oldVersion = 0;
- unsigned long long? newVersion = null;
- };
- [Exposed=(Window,Worker)]
- interface IDBVersionChangeEvent : Event {
- constructor(DOMString type,
- optional IDBVersionChangeEventInit eventInitDict = {});
- [Constant] readonly attribute unsigned long long oldVersion;
- [Constant] readonly attribute unsigned long long? newVersion;
- };
-
- /* ---------------------- IdentityCredential ----------------------------- */
- /* ./webidl/IdentityCredential.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://fedidcg.github.io/FedCM
- */
- [Exposed=Window, SecureContext,
- Pref="dom.security.credentialmanagement.identity.enabled"]
- interface IdentityCredential : Credential {
- readonly attribute USVString? token;
- [Throws]
- static Promise<undefined> logoutRPs(sequence<IdentityCredentialLogoutRPsRequest> logoutRequests);
- };
- dictionary IdentityCredentialRequestOptions {
- sequence<IdentityProviderConfig> providers;
- };
- [GenerateConversionToJS]
- dictionary IdentityProviderConfig {
- required UTF8String configURL;
- required USVString clientId;
- USVString nonce;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityproviderwellknown
- [GenerateInit]
- dictionary IdentityProviderWellKnown {
- required sequence<UTF8String> provider_urls;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityprovidericon
- dictionary IdentityProviderIcon {
- required USVString url;
- unsigned long size;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityproviderbranding
- dictionary IdentityProviderBranding {
- USVString background_color;
- USVString color;
- sequence<IdentityProviderIcon> icons;
- USVString name;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityproviderapiconfig
- [GenerateInit, GenerateConversionToJS]
- dictionary IdentityProviderAPIConfig {
- required UTF8String accounts_endpoint;
- required UTF8String client_metadata_endpoint;
- required UTF8String id_assertion_endpoint;
- IdentityProviderBranding branding;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccount
- dictionary IdentityProviderAccount {
- required USVString id;
- required USVString name;
- required USVString email;
- USVString given_name;
- USVString picture;
- sequence<USVString> approved_clients;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccountlist
- [GenerateInit, GenerateConversionToJS]
- dictionary IdentityProviderAccountList {
- sequence<IdentityProviderAccount> accounts;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityproviderclientmetadata
- [GenerateInit, GenerateConversionToJS]
- dictionary IdentityProviderClientMetadata {
- USVString privacy_policy_url;
- USVString terms_of_service_url;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identityprovidertoken
- [GenerateInit]
- dictionary IdentityProviderToken {
- required USVString token;
- };
- // https://fedidcg.github.io/FedCM/#dictdef-identitycredentiallogoutrpsrequest
- dictionary IdentityCredentialLogoutRPsRequest {
- required UTF8String url;
- required UTF8String accountId;
- };
-
- /* ---------------------- IdleDeadline ----------------------------- */
- /* ./webidl/IdleDeadline.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://w3c.github.io/requestidlecallback/
- */
- [Exposed=Window]
- interface IdleDeadline {
- DOMHighResTimeStamp timeRemaining();
- readonly attribute boolean didTimeout;
- };
-
- /* ---------------------- IIRFilterNode ----------------------------- */
- /* ./webidl/IIRFilterNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is https://www.w3.org/TR/webaudio
- *
- * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary IIRFilterOptions : AudioNodeOptions {
- required sequence<double> feedforward;
- required sequence<double> feedback;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface IIRFilterNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, IIRFilterOptions options);
- undefined getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
- };
- // Mozilla extension
- IIRFilterNode includes AudioNodePassThrough;
-
- /* ---------------------- ImageBitmap ----------------------------- */
- /* ./webidl/ImageBitmap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/webappapis.html#images
- *
- * The origin of the extended IDL file is
- * http://w3c.github.io/mediacapture-worker/#imagebitmap-extensions
- */
- typedef (CanvasImageSource or
- Blob or
- CanvasRenderingContext2D or // This is out of spec.
- ImageData) ImageBitmapSource;
- [Exposed=(Window,Worker)]
- interface ImageBitmap {
- [Constant]
- readonly attribute unsigned long width;
- [Constant]
- readonly attribute unsigned long height;
- };
- // It's crucial that there be a way to explicitly dispose of ImageBitmaps
- // since they refer to potentially large graphics resources. Some uses
- // of this API proposal will result in repeated allocations of ImageBitmaps,
- // and garbage collection will not reliably reclaim them quickly enough.
- // Here we reuse close(), which also exists on another Transferable type,
- // MessagePort. Potentially, all Transferable types should inherit from a
- // new interface type "Closeable".
- partial interface ImageBitmap {
- // Dispose of all graphical resources associated with this ImageBitmap.
- undefined close();
- };
- // ImageBitmap-extensions
- // Bug 1141979 - [FoxEye] Extend ImageBitmap with interfaces to access its
- // underlying image data
- /*
- * An image or a video frame is conceptually a two-dimensional array of data and
- * each element in the array is called a pixel. The pixels are usually stored in
- * a one-dimensional array and could be arranged in a variety of image formats.
- * Developers need to know how the pixels are formatted so that they are able to
- * process them.
- *
- * The image format describes how pixels in an image are arranged. A single
- * pixel has at least one, but usually multiple pixel values. The range of a
- * pixel value varies, which means different image formats use different data
- * types to store a single pixel value.
- *
- * The most frequently used data type is 8-bit unsigned integer whose range is
- * from 0 to 255, others could be 16-bit integer or 32-bit floating points and
- * so forth. The number of pixel values of a single pixel is called the number
- * of channels of the image format. Multiple pixel values of a pixel are used
- * together to describe the captured property which could be color or depth
- * information. For example, if the data is a color image in RGB color space,
- * then it is a three-channel image format and a pixel is described by R, G and
- * B three pixel values with range from 0 to 255. As another example, if the
- * data is a gray image, then it is a single-channel image format with 8-bit
- * unsigned integer data type and the pixel value describes the gray scale. For
- * depth data, it is a single channel image format too, but the data type is
- * 16-bit unsigned integer and the pixel value is the depth level.
- *
- * For those image formats whose pixels contain multiple pixel values, the pixel
- * values might be arranged in one of the following ways:
- * 1) Planar pixel layout:
- * each channel has its pixel values stored consecutively in separated
- * buffers (a.k.a. planes) and then all channel buffers are stored
- * consecutively in memory.
- * (Ex: RRRRRR......GGGGGG......BBBBBB......)
- * 2) Interleaving pixel layout:
- * each pixel has its pixel values from all channels stored together and
- * interleaves all channels.
- * (Ex: RGBRGBRGBRGBRGB......)
- */
- /*
- * The ImageBitmap extensions use this enumeration to negotiate the image format
- * while 1) accessing the underlying data of an ImageBitmap and
- * 2) creating a new ImageBitmap.
- *
- * For each format in this enumeration, we use a 2x2 small image (4 pixels) as
- * example to illustrate the pixel layout.
- *
- * 2x2 image: +--------+--------+
- * | pixel1 | pixel2 |
- * +--------+--------+
- * | pixel3 | pixel4 |
- * +--------+--------+
- *
- */
- enum ImageBitmapFormat {
- /*
- * Channel order: R, G, B, A
- * Channel size: full rgba-chennels
- * Pixel layout: interleaving rgba-channels
- * Pixel layout illustration:
- * [Plane1]: R1 G1 B1 A1 R2 G2 B2 A2 R3 G3 B3 A3 R4 G4 B4 A4
- * Data type: 8-bit unsigned integer
- */
- "RGBA32",
- /*
- * Channel order: B, G, R, A
- * Channel size: full bgra-channels
- * Pixel layout: interleaving bgra-channels
- * Pixel layout illustration:
- * [Plane1]: B1 G1 R1 A1 B2 G2 R2 A2 B3 G3 R3 A3 B4 G4 R4 A4
- * Data type: 8-bit unsigned integer
- */
- "BGRA32",
- /*
- * Channel order: R, G, B
- * Channel size: full rgb-channels
- * Pixel layout: interleaving rgb-channels
- * Pixel layout illustration:
- * [Plane1]: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4
- * Data type: 8-bit unsigned integer
- */
- "RGB24",
- /*
- * Channel order: B, G, R
- * Channel size: full bgr-channels
- * Pixel layout: interleaving bgr-channels
- * Pixel layout illustration:
- * [Plane1]: B1 G1 R1 B2 G2 R2 B3 G3 R3 B4 G4 R4
- * Data type: 8-bit unsigned integer
- */
- "BGR24",
- /*
- * Channel order: GRAY
- * Channel size: full gray-channel
- * Pixel layout: planar gray-channel
- * Pixel layout illustration:
- * [Plane1]: GRAY1 GRAY2 GRAY3 GRAY4
- * Data type: 8-bit unsigned integer
- */
- "GRAY8",
- /*
- * Channel order: Y, U, V
- * Channel size: full yuv-channels
- * Pixel layout: planar yuv-channels
- * Pixel layout illustration:
- * [Plane1]: Y1 Y2 Y3 Y4
- * [Plane2]: U1 U2 U3 U4
- * [Plane3]: V1 V2 V3 V4
- * Data type: 8-bit unsigned integer
- */
- "YUV444P",
- /*
- * Channel order: Y, U, V
- * Channel size: full y-channel, half uv-channels
- * Pixel layout: planar yuv-channels
- * Pixel layout illustration:
- * [Plane1]: Y1 Y2 Y3 Y4
- * [Plane2]: U1 U3
- * [Plane3]: V1 V3
- * Data type: 8-bit unsigned integer
- */
- "YUV422P",
- /*
- * Channel order: Y, U, V
- * Channel size: full y-channel, quarter uv-channels
- * Pixel layout: planar yuv-channels
- * Pixel layout illustration:
- * [Plane1]: Y1 Y2 Y3 Y4
- * [Plane2]: U1
- * [Plane3]: V1
- * Data type: 8-bit unsigned integer
- */
- "YUV420P",
- /*
- * Channel order: Y, U, V
- * Channel size: full y-channel, quarter uv-channels
- * Pixel layout: planar y-channel, interleaving uv-channels
- * Pixel layout illustration:
- * [Plane1]: Y1 Y2 Y3 Y4
- * [Plane2]: U1 V1
- * Data type: 8-bit unsigned integer
- */
- "YUV420SP_NV12",
- /*
- * Channel order: Y, V, U
- * Channel size: full y-channel, quarter vu-channels
- * Pixel layout: planar y-channel, interleaving vu-channels
- * Pixel layout illustration:
- * [Plane1]: Y1 Y2 Y3 Y4
- * [Plane2]: V1 U1
- * Data type: 8-bit unsigned integer
- */
- "YUV420SP_NV21",
- /*
- * Channel order: H, S, V
- * Channel size: full hsv-channels
- * Pixel layout: interleaving hsv-channels
- * Pixel layout illustration:
- * [Plane1]: H1 S1 V1 H2 S2 V2 H3 S3 V3
- * Data type: 32-bit floating point value
- */
- "HSV",
- /*
- * Channel order: l, a, b
- * Channel size: full lab-channels
- * Pixel layout: interleaving lab-channels
- * Pixel layout illustration:
- * [Plane1]: l1 a1 b1 l2 a2 b2 l3 a3 b3
- * Data type: 32-bit floating point value
- */
- "Lab",
- /*
- * Channel order: DEPTH
- * Channel size: full depth-channel
- * Pixel layout: planar depth-channel
- * Pixel layout illustration:
- * [Plane1]: DEPTH1 DEPTH2 DEPTH3 DEPTH4
- * Data type: 16-bit unsigned integer
- */
- "DEPTH",
- };
- enum ChannelPixelLayoutDataType {
- "uint8",
- "int8",
- "uint16",
- "int16",
- "uint32",
- "int32",
- "float32",
- "float64"
- };
- /*
- * Two concepts, ImagePixelLayout and ChannelPixelLayout, together generalize
- * the variety of pixel layouts among image formats.
- *
- * The ChannelPixelLayout represents the pixel layout of a single channel in a
- * certain image format and the ImagePixelLayout is just the collection of
- * ChannelPixelLayouts. So, the ChannelPixelLayout is defined as a dictionary
- * type with properties to describe the layout and the ImagePixelLayout is just
- * an alias name to a sequence of ChannelPixelLayout objects.
- *
- * Since an image format is composed of at least one channel, an
- * ImagePixelLayout object contains at least one ChannelPixelLayout object.
- *
- * Although an image or a video frame is a two-dimensional structure, its data
- * is usually stored in a one-dimensional array in the row-major way and the
- * ChannelPixelLayout objects use the following properties to describe the
- * layout of pixel values in the buffer.
- *
- * 1) offset:
- * denotes the beginning position of the channel's data relative to the
- * beginning position of the one-dimensional array.
- * 2) width & height:
- * denote the width and height of the channel respectively. Each channel in
- * an image format may have different height and width.
- * 3) data type:
- * denotes the format used to store one single pixel value.
- * 4) stride:
- * the number of bytes between the beginning two consecutive rows in memory.
- * (The total bytes of each row plus the padding bytes of each raw.)
- * 5) skip value:
- * the value is zero for the planar pixel layout, and a positive integer for
- * the interleaving pixel layout. (Describes how many bytes there are between
- * two adjacent pixel values in this channel.)
- */
- /*
- * Example1: RGBA image, width = 620, height = 480, stride = 2560
- *
- * chanel_r: offset = 0, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
- * chanel_g: offset = 1, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
- * chanel_b: offset = 2, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
- * chanel_a: offset = 3, width = 620, height = 480, data type = uint8, stride = 2560, skip = 3
- *
- * <---------------------------- stride ---------------------------->
- * <---------------------- width x 4 ---------------------->
- * [index] 01234 8 12 16 20 24 28 2479 2559
- * |||||---|---|---|---|---|---|----------------------------|-------|
- * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
- * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
- * [data] RGBARGBARGBARGBARGBAR___R___R... A%%%%%%%%
- * ^^^
- * r-skip
- */
- /*
- * Example2: YUV420P image, width = 620, height = 480, stride = 640
- *
- * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
- * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
- * chanel_v: offset = 384000, width = 310, height = 240, data type = uint8, stride = 320, skip = 0
- *
- * <--------------------------- y-stride --------------------------->
- * <----------------------- y-width ----------------------->
- * [index] 012345 619 639
- * ||||||--------------------------------------------------|--------|
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] ......
- * <-------- u-stride ---------->
- * <----- u-width ----->
- * [index] 307200 307509 307519
- * |-------------------|--------|
- * [data] UUUUUUUUUU... U%%%%%%%%%
- * [data] UUUUUUUUUU... U%%%%%%%%%
- * [data] UUUUUUUUUU... U%%%%%%%%%
- * [data] ......
- * <-------- v-stride ---------->
- * <- --- v-width ----->
- * [index] 384000 384309 384319
- * |-------------------|--------|
- * [data] VVVVVVVVVV... V%%%%%%%%%
- * [data] VVVVVVVVVV... V%%%%%%%%%
- * [data] VVVVVVVVVV... V%%%%%%%%%
- * [data] ......
- */
- /*
- * Example3: YUV420SP_NV12 image, width = 620, height = 480, stride = 640
- *
- * chanel_y: offset = 0, width = 620, height = 480, stride = 640, skip = 0
- * chanel_u: offset = 307200, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
- * chanel_v: offset = 307201, width = 310, height = 240, data type = uint8, stride = 640, skip = 1
- *
- * <--------------------------- y-stride -------------------------->
- * <----------------------- y-width ---------------------->
- * [index] 012345 619 639
- * ||||||-------------------------------------------------|--------|
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] YYYYYYYYYYYYYYYYYYYYYYYYYYYYY... Y%%%%%%%%%
- * [data] ......
- * <--------------------- u-stride / v-stride -------------------->
- * <------------------ u-width + v-width ----------------->
- * [index] 307200(u-offset) 307819 307839
- * |------------------------------------------------------|-------|
- * [index] |307201(v-offset) |307820 |
- * ||-----------------------------------------------------||------|
- * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
- * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
- * [data] UVUVUVUVUVUVUVUVUVUVUVUVUVUVUV... UV%%%%%%%
- * ^ ^
- * u-skip v-skip
- */
- /*
- * Example4: DEPTH image, width = 640, height = 480, stride = 1280
- *
- * chanel_d: offset = 0, width = 640, height = 480, data type = uint16, stride = 1280, skip = 0
- *
- * note: each DEPTH value uses two bytes
- *
- * <----------------------- d-stride ---------------------->
- * <----------------------- d-width ----------------------->
- * [index] 02468 1278
- * |||||---------------------------------------------------|
- * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
- * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
- * [data] DDDDDDDDDDDDDDDDDDDDDDDDDDDDD... D
- * [data] ......
- */
- dictionary ChannelPixelLayout {
- required unsigned long offset;
- required unsigned long width;
- required unsigned long height;
- required ChannelPixelLayoutDataType dataType;
- required unsigned long stride;
- required unsigned long skip;
- };
- typedef sequence<ChannelPixelLayout> ImagePixelLayout;
- enum ImageOrientation { "none", "flipY", "from-image" };
- enum PremultiplyAlpha { "none", "premultiply", "default" };
- enum ColorSpaceConversion { "none", "default" };
- //enum ResizeQuality { "pixelated", "low", "medium", "high" };
- dictionary ImageBitmapOptions {
- ImageOrientation imageOrientation = "none";
- PremultiplyAlpha premultiplyAlpha = "default";
- // options to be added bugs: 1363861
- ColorSpaceConversion colorSpaceConversion = "default";
- [EnforceRange] unsigned long resizeWidth;
- [EnforceRange] unsigned long resizeHeight;
- //ResizeQuality resizeQuality = "low";
- };
-
- /* ---------------------- ImageBitmapRenderingContext ----------------------------- */
- /* ./webidl/ImageBitmapRenderingContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://wiki.whatwg.org/wiki/OffscreenCanvas
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- // The new ImageBitmapRenderingContext is a canvas rendering context
- // which only provides the functionality to replace the canvas's
- // contents with the given ImageBitmap. Its context id (the first argument
- // to getContext) is "bitmaprenderer".
- [Exposed=(Window,Worker)]
- interface ImageBitmapRenderingContext {
- readonly attribute CanvasSource? canvas;
- // Displays the given ImageBitmap in the canvas associated with this
- // rendering context. Ownership of the ImageBitmap is transferred to
- // the canvas. The caller may not use its reference to the ImageBitmap
- // after making this call. (This semantic is crucial to enable prompt
- // reclamation of expensive graphics resources, rather than relying on
- // garbage collection to do so.)
- //
- // The ImageBitmap conceptually replaces the canvas's bitmap, but
- // it does not change the canvas's intrinsic width or height.
- //
- // The ImageBitmap, when displayed, is clipped to the rectangle
- // defined by the canvas's instrinsic width and height. Pixels that
- // would be covered by the canvas's bitmap which are not covered by
- // the supplied ImageBitmap are rendered transparent black. Any CSS
- // styles affecting the display of the canvas are applied as usual.
- [Throws]
- undefined transferFromImageBitmap(ImageBitmap? bitmap);
- // Deprecated version of transferFromImageBitmap
- [Deprecated="ImageBitmapRenderingContext_TransferImageBitmap", Throws]
- undefined transferImageBitmap(ImageBitmap bitmap);
- };
-
- /* ---------------------- ImageCapture ----------------------------- */
- /* ./webidl/ImageCapture.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
- *
- * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Pref="dom.imagecapture.enabled",
- Exposed=Window]
- interface ImageCapture : EventTarget {
- [Throws]
- constructor(MediaStreamTrack track);
- // readonly attribute PhotoSettingsOptions photoSettingsOptions;
- [BinaryName="GetVideoStreamTrack"]
- readonly attribute MediaStreamTrack videoStreamTrack;
- attribute EventHandler onphoto;
- attribute EventHandler onerror;
- // attribute EventHandler onphotosettingschange;
- // attribute EventHandler onframegrab;
- // [Throws]
- // undefined setOptions (PhotoSettings? photoSettings);
- [Throws]
- undefined takePhoto();
- // [Throws]
- // undefined getFrame();
- };
-
- /* ---------------------- ImageCaptureErrorEvent ----------------------------- */
- /* ./webidl/ImageCaptureErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html
- *
- * Copyright © 2012-2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Pref="dom.imagecapture.enabled",
- Exposed=Window]
- interface ImageCaptureErrorEvent : Event {
- constructor(DOMString type,
- optional ImageCaptureErrorEventInit imageCaptureErrorInitDict = {});
- readonly attribute ImageCaptureError? imageCaptureError;
- };
- dictionary ImageCaptureErrorEventInit : EventInit {
- ImageCaptureError? imageCaptureError = null;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface ImageCaptureError {
- const unsigned short FRAME_GRAB_ERROR = 1;
- const unsigned short SETTINGS_ERROR = 2;
- const unsigned short PHOTO_ERROR = 3;
- const unsigned short ERROR_UNKNOWN = 4;
- readonly attribute unsigned short code;
- readonly attribute DOMString message;
- };
-
- /* ---------------------- ImageData ----------------------------- */
- /* ./webidl/ImageData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#imagedata
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
- * You are granted a license to use, reproduce and create derivative works of this document.
- */
- [Exposed=(Window,Worker),
- Serializable,
- InstrumentedProps=(colorSpace)]
- interface ImageData {
- [Throws]
- constructor(unsigned long sw, unsigned long sh);
- [Throws]
- constructor(Uint8ClampedArray data, unsigned long sw,
- optional unsigned long sh);
- [Constant]
- readonly attribute unsigned long width;
- [Constant]
- readonly attribute unsigned long height;
- [Constant, StoreInSlot]
- readonly attribute Uint8ClampedArray data;
- };
-
- /* ---------------------- ImageDocument ----------------------------- */
- /* ./webidl/ImageDocument.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [ChromeOnly, LegacyOverrideBuiltIns,
- Exposed=Window]
- interface ImageDocument : HTMLDocument {
- /* Whether the image is overflowing visible area. */
- readonly attribute boolean imageIsOverflowing;
- /* Whether the image has been resized to fit visible area. */
- readonly attribute boolean imageIsResized;
- /* Resize the image to fit visible area. */
- undefined shrinkToFit();
- /* Restore image original size. */
- undefined restoreImage();
- };
-
- /* ---------------------- InputEvent ----------------------------- */
- /* ./webidl/InputEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/input-events/#interface-InputEvent
- */
- [Exposed=Window]
- interface InputEvent : UIEvent
- {
- constructor(DOMString type, optional InputEventInit eventInitDict = {});
- readonly attribute boolean isComposing;
- readonly attribute DOMString inputType;
- [NeedsCallerType]
- readonly attribute DOMString? data;
- };
- dictionary InputEventInit : UIEventInit
- {
- boolean isComposing = false;
- DOMString inputType = "";
- // NOTE: Currently, default value of `data` attribute is declared as empty
- // string by UI Events. However, both Chrome and Safari uses `null`,
- // and there is a spec issue about this:
- // https://github.com/w3c/uievents/issues/139
- // So, we take `null` for compatibility with them.
- DOMString? data = null;
- };
- // https://w3c.github.io/input-events/#interface-InputEvent
- // https://rawgit.com/w3c/input-events/v1/index.html#interface-InputEvent
- partial interface InputEvent
- {
- [NeedsCallerType]
- readonly attribute DataTransfer? dataTransfer;
- // Enable `getTargetRanges()` only when `beforeinput` event is enabled
- // because this may be used for feature detection of `beforeinput` event
- // support (due to Chrome not supporting `onbeforeinput` attribute).
- sequence<StaticRange> getTargetRanges();
- };
- partial dictionary InputEventInit
- {
- DataTransfer? dataTransfer = null;
- sequence<StaticRange> targetRanges = [];
- };
-
- /* ---------------------- InstallTrigger ----------------------------- */
- /* ./webidl/InstallTrigger.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * A callback function that webpages can implement to be notified when triggered
- * installs complete.
- */
- callback InstallTriggerCallback = undefined(DOMString url, short status);
- dictionary InstallTriggerData {
- DOMString URL;
- DOMString? IconURL;
- DOMString? Hash;
- };
- /**
- * The interface for the InstallTrigger object available to all websites.
- */
- [ChromeOnly,
- JSImplementation="@mozilla.org/addons/installtrigger;1",
- Exposed=Window]
- interface InstallTriggerImpl {
- /**
- * Retained for backwards compatibility.
- */
- const unsigned short SKIN = 1;
- const unsigned short LOCALE = 2;
- const unsigned short CONTENT = 4;
- const unsigned short PACKAGE = 7;
- /**
- * Tests if installation is enabled.
- */
- boolean enabled();
- /**
- * Tests if installation is enabled.
- *
- * @deprecated Use "enabled" in the future.
- */
- boolean updateEnabled();
- /**
- * Starts a new installation of a set of add-ons.
- *
- * @param aArgs
- * The add-ons to install. This should be a JS object, each property
- * is the name of an add-on to be installed. The value of the
- * property should either be a string URL, or an object with the
- * following properties:
- * * URL for the add-on's URL
- * * IconURL for an icon for the add-on
- * * Hash for a hash of the add-on
- * @param aCallback
- * A callback to call as each installation succeeds or fails
- * @return true if the installations were successfully started
- */
- [Deprecated="InstallTriggerInstallDeprecated"]
- boolean install(record<DOMString, (DOMString or InstallTriggerData)> installs,
- optional InstallTriggerCallback callback);
- /**
- * Starts installing a new add-on.
- *
- * @deprecated use "install" in the future.
- *
- * @param aType
- * Unused, retained for backwards compatibility
- * @param aUrl
- * The URL of the add-on
- * @param aSkin
- * Unused, retained for backwards compatibility
- * @return true if the installation was successfully started
- */
- [Deprecated="InstallTriggerInstallDeprecated"]
- boolean installChrome(unsigned short type, DOMString url, DOMString skin);
- /**
- * Starts installing a new add-on.
- *
- * @deprecated use "install" in the future.
- *
- * @param aUrl
- * The URL of the add-on
- * @param aFlags
- * Unused, retained for backwards compatibility
- * @return true if the installation was successfully started
- */
- [Deprecated="InstallTriggerInstallDeprecated"]
- boolean startSoftwareUpdate(DOMString url, optional unsigned short flags);
- };
-
- /* ---------------------- IntersectionObserver ----------------------------- */
- /* ./webidl/IntersectionObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/IntersectionObserver/
- */
- [ProbablyShortLivingWrapper, Exposed=Window]
- interface IntersectionObserverEntry {
- [Constant]
- readonly attribute DOMHighResTimeStamp time;
- [Constant]
- readonly attribute DOMRectReadOnly? rootBounds;
- [Constant]
- readonly attribute DOMRectReadOnly boundingClientRect;
- [Constant]
- readonly attribute DOMRectReadOnly intersectionRect;
- [Constant]
- readonly attribute boolean isIntersecting;
- [Constant]
- readonly attribute double intersectionRatio;
- [Constant]
- readonly attribute Element target;
- };
- [Exposed=Window]
- interface IntersectionObserver {
- [Throws]
- constructor(IntersectionCallback intersectionCallback,
- optional IntersectionObserverInit options = {});
- [Constant]
- readonly attribute Node? root;
- [Constant]
- readonly attribute UTF8String rootMargin;
- [Constant,Cached]
- readonly attribute sequence<double> thresholds;
- undefined observe(Element target);
- undefined unobserve(Element target);
- undefined disconnect();
- sequence<IntersectionObserverEntry> takeRecords();
- };
- callback IntersectionCallback =
- undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
- dictionary IntersectionObserverEntryInit {
- required DOMHighResTimeStamp time;
- required DOMRectInit rootBounds;
- required DOMRectInit boundingClientRect;
- required DOMRectInit intersectionRect;
- required Element target;
- };
- dictionary IntersectionObserverInit {
- (Element or Document)? root = null;
- UTF8String rootMargin = "0px";
- (double or sequence<double>) threshold = 0;
- };
-
- /* ---------------------- IntlUtils ----------------------------- */
- /* ./webidl/IntlUtils.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- [GenerateConversionToJS]
- dictionary DisplayNameOptions {
- DOMString type;
- DOMString style;
- DOMString calendar;
- sequence<DOMString> keys;
- };
- [GenerateInit]
- dictionary DisplayNameResult {
- DOMString locale;
- DOMString type;
- DOMString style;
- DOMString calendar;
- sequence<DOMString> values;
- };
- [GenerateInit]
- dictionary LocaleInfo {
- DOMString locale;
- DOMString direction;
- };
- /**
- * The IntlUtils interface provides helper functions for localization.
- */
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface IntlUtils {
- /**
- * Helper function to retrieve the localized values for a list of requested
- * keys.
- *
- * The function takes two arguments - locales which is a list of locale
- * strings and options which is an object with four optional properties:
- *
- * keys:
- * an Array of string values to localize
- *
- * type:
- * a String with a value "language", "region", "script", "currency",
- * "weekday", "month", "quarter", "dayPeriod", or "dateTimeField"
- *
- * style:
- * a String with a value "long", "abbreviated", "short", or "narrow"
- *
- * calendar:
- * a String to select a specific calendar type, e.g. "gregory"
- *
- * It returns an object with properties:
- *
- * locale:
- * a negotiated locale string
- *
- * type:
- * negotiated type
- *
- * style:
- * negotiated style
- *
- * calendar:
- * negotiated calendar
- *
- * values:
- * a list of translated values for the requested keys
- *
- */
- [Throws]
- DisplayNameResult getDisplayNames(sequence<DOMString> locales,
- optional DisplayNameOptions options = {});
- /**
- * Helper function to determine if the current application locale is RTL.
- *
- * The result of this function can be overriden by this pref:
- * - `intl.l10n.pseudo`
- */
- boolean isAppLocaleRTL();
- };
-
- /* ---------------------- InvokeEvent ----------------------------- */
- /* ./webidl/InvokeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://github.com/whatwg/html/pull/9841
- */
- [Pref="dom.element.invokers.enabled",
- Exposed=Window]
- interface InvokeEvent : Event {
- constructor(DOMString type, optional InvokeEventInit eventInitDict = {});
- readonly attribute Element? invoker;
- readonly attribute DOMString action;
- };
- dictionary InvokeEventInit : EventInit {
- Element? invoker = null;
- DOMString action = "auto";
- };
-
- /* ---------------------- InvokerElement ----------------------------- */
- /* ./webidl/InvokerElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://github.com/whatwg/html/pull/9841
- */
- interface mixin InvokerElement {
- [Pref="dom.element.invokers.enabled", CEReactions] attribute Element? invokeTargetElement;
- [Pref="dom.element.invokers.enabled", CEReactions] attribute DOMString invokeAction;
- };
-
- /* ---------------------- IterableIterator ----------------------------- */
- /* ./webidl/IterableIterator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [GenerateConversionToJS]
- dictionary IterableKeyOrValueResult {
- any value;
- boolean done = false;
- };
- [GenerateConversionToJS]
- dictionary IterableKeyAndValueResult {
- sequence<any> value = [];
- boolean done = false;
- };
-
- /* ---------------------- KeyAlgorithm ----------------------------- */
- /* ./webidl/KeyAlgorithm.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/WebCryptoAPI/
- */
- dictionary KeyAlgorithm {
- required DOMString name;
- };
- [GenerateConversionToJS]
- dictionary AesKeyAlgorithm : KeyAlgorithm {
- required unsigned short length;
- };
- [GenerateConversionToJS]
- dictionary EcKeyAlgorithm : KeyAlgorithm {
- required DOMString namedCurve;
- };
- [GenerateConversionToJS]
- dictionary HmacKeyAlgorithm : KeyAlgorithm {
- required KeyAlgorithm hash;
- required unsigned long length;
- };
- [GenerateConversionToJS]
- dictionary RsaHashedKeyAlgorithm : KeyAlgorithm {
- required unsigned short modulusLength;
- required Uint8Array publicExponent;
- required KeyAlgorithm hash;
- };
- [GenerateConversionToJS]
- dictionary DhKeyAlgorithm : KeyAlgorithm {
- required Uint8Array prime;
- required Uint8Array generator;
- };
-
- /* ---------------------- KeyboardEvent ----------------------------- */
- /* ./webidl/KeyboardEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface KeyboardEvent : UIEvent
- {
- [BinaryName="constructorJS"]
- constructor(DOMString typeArg,
- optional KeyboardEventInit keyboardEventInitDict= {});
- [NeedsCallerType]
- readonly attribute unsigned long charCode;
- [NeedsCallerType]
- readonly attribute unsigned long keyCode;
- [NeedsCallerType]
- readonly attribute boolean altKey;
- [NeedsCallerType]
- readonly attribute boolean ctrlKey;
- [NeedsCallerType]
- readonly attribute boolean shiftKey;
- readonly attribute boolean metaKey;
- [NeedsCallerType]
- boolean getModifierState(DOMString key);
- const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
- const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
- const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
- const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
- readonly attribute unsigned long location;
- readonly attribute boolean repeat;
- readonly attribute boolean isComposing;
- readonly attribute DOMString key;
- [NeedsCallerType]
- readonly attribute DOMString code;
- [BinaryName="initKeyboardEventJS"]
- undefined initKeyboardEvent(DOMString typeArg,
- optional boolean bubblesArg = false,
- optional boolean cancelableArg = false,
- optional Window? viewArg = null,
- optional DOMString keyArg = "",
- optional unsigned long locationArg = 0,
- optional boolean ctrlKey = false,
- optional boolean altKey = false,
- optional boolean shiftKey = false,
- optional boolean metaKey = false);
- // This returns the initialized dictionary for generating a
- // same-type keyboard event
- [Cached, ChromeOnly, Constant]
- readonly attribute KeyboardEventInit initDict;
- };
- dictionary KeyboardEventInit : EventModifierInit
- {
- [BinaryType="nsAutoString"]
- DOMString key = "";
- [BinaryType="nsAutoString"]
- DOMString code = "";
- unsigned long location = 0;
- boolean repeat = false;
- boolean isComposing = false;
- // legacy attributes
- unsigned long charCode = 0;
- unsigned long keyCode = 0;
- unsigned long which = 0;
- };
- // Mozilla extensions
- KeyboardEvent includes KeyEventMixin;
-
- /* ---------------------- KeyEvent ----------------------------- */
- /* ./webidl/KeyEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-KeyEvent
- [Exposed=Window]
- interface KeyEvent
- {
- // It's all mixed in.
- };
- KeyEvent includes KeyEventMixin;
- interface mixin KeyEventMixin {
- const unsigned long DOM_VK_CANCEL = 0x03;
- const unsigned long DOM_VK_HELP = 0x06;
- const unsigned long DOM_VK_BACK_SPACE = 0x08;
- const unsigned long DOM_VK_TAB = 0x09;
- const unsigned long DOM_VK_CLEAR = 0x0C;
- const unsigned long DOM_VK_RETURN = 0x0D;
- // DOM_VK_ENTER has been never used for representing native key events.
- // Therefore, it's removed for preventing developers being confused.
- // const unsigned long DOM_VK_ENTER = 0x0E;
- const unsigned long DOM_VK_SHIFT = 0x10;
- const unsigned long DOM_VK_CONTROL = 0x11;
- const unsigned long DOM_VK_ALT = 0x12;
- const unsigned long DOM_VK_PAUSE = 0x13;
- const unsigned long DOM_VK_CAPS_LOCK = 0x14;
- const unsigned long DOM_VK_KANA = 0x15;
- const unsigned long DOM_VK_HANGUL = 0x15;
- const unsigned long DOM_VK_EISU = 0x16; // Japanese Mac keyboard only
- const unsigned long DOM_VK_JUNJA = 0x17;
- const unsigned long DOM_VK_FINAL = 0x18;
- const unsigned long DOM_VK_HANJA = 0x19;
- const unsigned long DOM_VK_KANJI = 0x19;
- const unsigned long DOM_VK_ESCAPE = 0x1B;
- const unsigned long DOM_VK_CONVERT = 0x1C;
- const unsigned long DOM_VK_NONCONVERT = 0x1D;
- const unsigned long DOM_VK_ACCEPT = 0x1E;
- const unsigned long DOM_VK_MODECHANGE = 0x1F;
- const unsigned long DOM_VK_SPACE = 0x20;
- const unsigned long DOM_VK_PAGE_UP = 0x21;
- const unsigned long DOM_VK_PAGE_DOWN = 0x22;
- const unsigned long DOM_VK_END = 0x23;
- const unsigned long DOM_VK_HOME = 0x24;
- const unsigned long DOM_VK_LEFT = 0x25;
- const unsigned long DOM_VK_UP = 0x26;
- const unsigned long DOM_VK_RIGHT = 0x27;
- const unsigned long DOM_VK_DOWN = 0x28;
- const unsigned long DOM_VK_SELECT = 0x29;
- const unsigned long DOM_VK_PRINT = 0x2A;
- const unsigned long DOM_VK_EXECUTE = 0x2B;
- const unsigned long DOM_VK_PRINTSCREEN = 0x2C;
- const unsigned long DOM_VK_INSERT = 0x2D;
- const unsigned long DOM_VK_DELETE = 0x2E;
- // DOM_VK_0 - DOM_VK_9 match their ascii values
- const unsigned long DOM_VK_0 = 0x30;
- const unsigned long DOM_VK_1 = 0x31;
- const unsigned long DOM_VK_2 = 0x32;
- const unsigned long DOM_VK_3 = 0x33;
- const unsigned long DOM_VK_4 = 0x34;
- const unsigned long DOM_VK_5 = 0x35;
- const unsigned long DOM_VK_6 = 0x36;
- const unsigned long DOM_VK_7 = 0x37;
- const unsigned long DOM_VK_8 = 0x38;
- const unsigned long DOM_VK_9 = 0x39;
- const unsigned long DOM_VK_COLON = 0x3A;
- const unsigned long DOM_VK_SEMICOLON = 0x3B;
- const unsigned long DOM_VK_LESS_THAN = 0x3C;
- const unsigned long DOM_VK_EQUALS = 0x3D;
- const unsigned long DOM_VK_GREATER_THAN = 0x3E;
- const unsigned long DOM_VK_QUESTION_MARK = 0x3F;
- const unsigned long DOM_VK_AT = 0x40;
- // DOM_VK_A - DOM_VK_Z match their ascii values
- const unsigned long DOM_VK_A = 0x41;
- const unsigned long DOM_VK_B = 0x42;
- const unsigned long DOM_VK_C = 0x43;
- const unsigned long DOM_VK_D = 0x44;
- const unsigned long DOM_VK_E = 0x45;
- const unsigned long DOM_VK_F = 0x46;
- const unsigned long DOM_VK_G = 0x47;
- const unsigned long DOM_VK_H = 0x48;
- const unsigned long DOM_VK_I = 0x49;
- const unsigned long DOM_VK_J = 0x4A;
- const unsigned long DOM_VK_K = 0x4B;
- const unsigned long DOM_VK_L = 0x4C;
- const unsigned long DOM_VK_M = 0x4D;
- const unsigned long DOM_VK_N = 0x4E;
- const unsigned long DOM_VK_O = 0x4F;
- const unsigned long DOM_VK_P = 0x50;
- const unsigned long DOM_VK_Q = 0x51;
- const unsigned long DOM_VK_R = 0x52;
- const unsigned long DOM_VK_S = 0x53;
- const unsigned long DOM_VK_T = 0x54;
- const unsigned long DOM_VK_U = 0x55;
- const unsigned long DOM_VK_V = 0x56;
- const unsigned long DOM_VK_W = 0x57;
- const unsigned long DOM_VK_X = 0x58;
- const unsigned long DOM_VK_Y = 0x59;
- const unsigned long DOM_VK_Z = 0x5A;
- const unsigned long DOM_VK_WIN = 0x5B;
- const unsigned long DOM_VK_CONTEXT_MENU = 0x5D;
- const unsigned long DOM_VK_SLEEP = 0x5F;
- // Numpad keys
- const unsigned long DOM_VK_NUMPAD0 = 0x60;
- const unsigned long DOM_VK_NUMPAD1 = 0x61;
- const unsigned long DOM_VK_NUMPAD2 = 0x62;
- const unsigned long DOM_VK_NUMPAD3 = 0x63;
- const unsigned long DOM_VK_NUMPAD4 = 0x64;
- const unsigned long DOM_VK_NUMPAD5 = 0x65;
- const unsigned long DOM_VK_NUMPAD6 = 0x66;
- const unsigned long DOM_VK_NUMPAD7 = 0x67;
- const unsigned long DOM_VK_NUMPAD8 = 0x68;
- const unsigned long DOM_VK_NUMPAD9 = 0x69;
- const unsigned long DOM_VK_MULTIPLY = 0x6A;
- const unsigned long DOM_VK_ADD = 0x6B;
- const unsigned long DOM_VK_SEPARATOR = 0x6C;
- const unsigned long DOM_VK_SUBTRACT = 0x6D;
- const unsigned long DOM_VK_DECIMAL = 0x6E;
- const unsigned long DOM_VK_DIVIDE = 0x6F;
- const unsigned long DOM_VK_F1 = 0x70;
- const unsigned long DOM_VK_F2 = 0x71;
- const unsigned long DOM_VK_F3 = 0x72;
- const unsigned long DOM_VK_F4 = 0x73;
- const unsigned long DOM_VK_F5 = 0x74;
- const unsigned long DOM_VK_F6 = 0x75;
- const unsigned long DOM_VK_F7 = 0x76;
- const unsigned long DOM_VK_F8 = 0x77;
- const unsigned long DOM_VK_F9 = 0x78;
- const unsigned long DOM_VK_F10 = 0x79;
- const unsigned long DOM_VK_F11 = 0x7A;
- const unsigned long DOM_VK_F12 = 0x7B;
- const unsigned long DOM_VK_F13 = 0x7C;
- const unsigned long DOM_VK_F14 = 0x7D;
- const unsigned long DOM_VK_F15 = 0x7E;
- const unsigned long DOM_VK_F16 = 0x7F;
- const unsigned long DOM_VK_F17 = 0x80;
- const unsigned long DOM_VK_F18 = 0x81;
- const unsigned long DOM_VK_F19 = 0x82;
- const unsigned long DOM_VK_F20 = 0x83;
- const unsigned long DOM_VK_F21 = 0x84;
- const unsigned long DOM_VK_F22 = 0x85;
- const unsigned long DOM_VK_F23 = 0x86;
- const unsigned long DOM_VK_F24 = 0x87;
- const unsigned long DOM_VK_NUM_LOCK = 0x90;
- const unsigned long DOM_VK_SCROLL_LOCK = 0x91;
- // OEM specific virtual keyCode of Windows should pass through DOM keyCode
- // for compatibility with the other web browsers on Windows.
- const unsigned long DOM_VK_WIN_OEM_FJ_JISHO = 0x92;
- const unsigned long DOM_VK_WIN_OEM_FJ_MASSHOU = 0x93;
- const unsigned long DOM_VK_WIN_OEM_FJ_TOUROKU = 0x94;
- const unsigned long DOM_VK_WIN_OEM_FJ_LOYA = 0x95;
- const unsigned long DOM_VK_WIN_OEM_FJ_ROYA = 0x96;
- const unsigned long DOM_VK_CIRCUMFLEX = 0xA0;
- const unsigned long DOM_VK_EXCLAMATION = 0xA1;
- const unsigned long DOM_VK_DOUBLE_QUOTE = 0xA2;
- const unsigned long DOM_VK_HASH = 0xA3;
- const unsigned long DOM_VK_DOLLAR = 0xA4;
- const unsigned long DOM_VK_PERCENT = 0xA5;
- const unsigned long DOM_VK_AMPERSAND = 0xA6;
- const unsigned long DOM_VK_UNDERSCORE = 0xA7;
- const unsigned long DOM_VK_OPEN_PAREN = 0xA8;
- const unsigned long DOM_VK_CLOSE_PAREN = 0xA9;
- const unsigned long DOM_VK_ASTERISK = 0xAA;
- const unsigned long DOM_VK_PLUS = 0xAB;
- const unsigned long DOM_VK_PIPE = 0xAC;
- const unsigned long DOM_VK_HYPHEN_MINUS = 0xAD;
- const unsigned long DOM_VK_OPEN_CURLY_BRACKET = 0xAE;
- const unsigned long DOM_VK_CLOSE_CURLY_BRACKET = 0xAF;
- const unsigned long DOM_VK_TILDE = 0xB0;
- const unsigned long DOM_VK_VOLUME_MUTE = 0xB5;
- const unsigned long DOM_VK_VOLUME_DOWN = 0xB6;
- const unsigned long DOM_VK_VOLUME_UP = 0xB7;
- const unsigned long DOM_VK_COMMA = 0xBC;
- const unsigned long DOM_VK_PERIOD = 0xBE;
- const unsigned long DOM_VK_SLASH = 0xBF;
- const unsigned long DOM_VK_BACK_QUOTE = 0xC0;
- const unsigned long DOM_VK_OPEN_BRACKET = 0xDB; // square bracket
- const unsigned long DOM_VK_BACK_SLASH = 0xDC;
- const unsigned long DOM_VK_CLOSE_BRACKET = 0xDD; // square bracket
- const unsigned long DOM_VK_QUOTE = 0xDE; // Apostrophe
- const unsigned long DOM_VK_META = 0xE0;
- const unsigned long DOM_VK_ALTGR = 0xE1;
- // OEM specific virtual keyCode of Windows should pass through DOM keyCode
- // for compatibility with the other web browsers on Windows.
- const unsigned long DOM_VK_WIN_ICO_HELP = 0xE3;
- const unsigned long DOM_VK_WIN_ICO_00 = 0xE4;
- // IME processed key.
- const unsigned long DOM_VK_PROCESSKEY = 0xE5;
- // OEM specific virtual keyCode of Windows should pass through DOM keyCode
- // for compatibility with the other web browsers on Windows.
- const unsigned long DOM_VK_WIN_ICO_CLEAR = 0xE6;
- const unsigned long DOM_VK_WIN_OEM_RESET = 0xE9;
- const unsigned long DOM_VK_WIN_OEM_JUMP = 0xEA;
- const unsigned long DOM_VK_WIN_OEM_PA1 = 0xEB;
- const unsigned long DOM_VK_WIN_OEM_PA2 = 0xEC;
- const unsigned long DOM_VK_WIN_OEM_PA3 = 0xED;
- const unsigned long DOM_VK_WIN_OEM_WSCTRL = 0xEE;
- const unsigned long DOM_VK_WIN_OEM_CUSEL = 0xEF;
- const unsigned long DOM_VK_WIN_OEM_ATTN = 0xF0;
- const unsigned long DOM_VK_WIN_OEM_FINISH = 0xF1;
- const unsigned long DOM_VK_WIN_OEM_COPY = 0xF2;
- const unsigned long DOM_VK_WIN_OEM_AUTO = 0xF3;
- const unsigned long DOM_VK_WIN_OEM_ENLW = 0xF4;
- const unsigned long DOM_VK_WIN_OEM_BACKTAB = 0xF5;
- // Following keys are not used on most keyboards. However, for compatibility
- // with other browsers on Windows, we should define them.
- const unsigned long DOM_VK_ATTN = 0xF6;
- const unsigned long DOM_VK_CRSEL = 0xF7;
- const unsigned long DOM_VK_EXSEL = 0xF8;
- const unsigned long DOM_VK_EREOF = 0xF9;
- const unsigned long DOM_VK_PLAY = 0xFA;
- const unsigned long DOM_VK_ZOOM = 0xFB;
- const unsigned long DOM_VK_PA1 = 0xFD;
- // OEM specific virtual keyCode of Windows should pass through DOM keyCode
- // for compatibility with the other web browsers on Windows.
- const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
- [BinaryName="initKeyEventJS", Func="KeyboardEvent::IsInitKeyEventAvailable"]
- undefined initKeyEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Window? view = null,
- optional boolean ctrlKey = false,
- optional boolean altKey = false,
- optional boolean shiftKey = false,
- optional boolean metaKey = false,
- optional unsigned long keyCode = 0,
- optional unsigned long charCode = 0);
- };
-
- /* ---------------------- KeyframeAnimationOptions ----------------------------- */
- /* ./webidl/KeyframeAnimationOptions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/fxtf/web-animations/#the-animatable-interface
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // This typedef is off in its own file, because of bug 995352.
- typedef (unrestricted double or KeyframeAnimationOptions) UnrestrictedDoubleOrKeyframeAnimationOptions;
-
- /* ---------------------- KeyframeEffect ----------------------------- */
- /* ./webidl/KeyframeEffect.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#the-keyframeeffect-interfaces
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum IterationCompositeOperation {
- "replace",
- "accumulate"
- };
- dictionary KeyframeEffectOptions : EffectTiming {
- [Pref="dom.animations-api.compositing.enabled"]
- IterationCompositeOperation iterationComposite = "replace";
- [Pref="dom.animations-api.compositing.enabled"]
- CompositeOperation composite = "replace";
- DOMString? pseudoElement = null;
- };
- // KeyframeEffect should run in the caller's compartment to do custom
- // processing on the `keyframes` object.
- [RunConstructorInCallerCompartment, Exposed=Window]
- interface KeyframeEffect : AnimationEffect {
- [Throws]
- constructor(Element? target,
- object? keyframes,
- optional (unrestricted double or KeyframeEffectOptions) options = {});
- [Throws]
- constructor(KeyframeEffect source);
- attribute Element? target;
- [SetterThrows] attribute DOMString? pseudoElement;
- [Pref="dom.animations-api.compositing.enabled"]
- attribute IterationCompositeOperation iterationComposite;
- [Pref="dom.animations-api.compositing.enabled"]
- attribute CompositeOperation composite;
- [Throws] sequence<object> getKeyframes();
- [Throws] undefined setKeyframes(object? keyframes);
- };
- // Non-standard extensions
- dictionary AnimationPropertyValueDetails {
- required double offset;
- UTF8String value;
- UTF8String easing;
- required CompositeOperation composite;
- };
- dictionary AnimationPropertyDetails {
- required DOMString property;
- required boolean runningOnCompositor;
- DOMString warning;
- required sequence<AnimationPropertyValueDetails> values;
- };
- partial interface KeyframeEffect {
- [ChromeOnly, Throws] sequence<AnimationPropertyDetails> getProperties();
- };
-
- /* ---------------------- KeyIdsInitData ----------------------------- */
- /* ./webidl/KeyIdsInitData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // "KeyIds" EME init data format definition/parser, as defined by
- // https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html
- [GenerateInitFromJSON]
- dictionary KeyIdsInitData {
- required sequence<DOMString> kids;
- };
-
- /* ---------------------- LinkStyle ----------------------------- */
- /* ./webidl/LinkStyle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom/#the-linkstyle-interface
- */
- interface mixin LinkStyle {
- [BinaryName="sheetForBindings"] readonly attribute StyleSheet? sheet;
- };
-
- /* ---------------------- Localization ----------------------------- */
- /* ./webidl/Localization.webidl */
-
- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * L10nIdArgs is an object used to carry localization tuple for message
- * translation.
- *
- * Fields:
- * id - identifier of a message.
- * args - an optional record of arguments used to format the message.
- * The argument will be converted to/from JSON, and the API
- * will only handle strings and numbers.
- */
- dictionary L10nIdArgs {
- UTF8String? id = null;
- L10nArgs? args = null;
- };
- /**
- * When no arguments are required to format a message a simple string can be
- * used instead.
- */
- typedef (UTF8String or L10nIdArgs) L10nKey;
- /**
- * L10nMessage is a compound translation unit from Fluent which
- * encodes the value and (optionally) a list of attributes used
- * to translate a given widget.
- *
- * Most simple imperative translations will only use the `value`,
- * but when building a Message for a UI widget, a combination
- * of a value and attributes will be used.
- */
- dictionary AttributeNameValue {
- required UTF8String name;
- required UTF8String value;
- };
- dictionary L10nMessage {
- UTF8String? value = null;
- sequence<AttributeNameValue>? attributes = null;
- };
- /**
- * Localization is an implementation of the Fluent Localization API.
- *
- * An instance of a Localization class stores a state of a mix
- * of localization resources and provides the API to resolve
- * translation value for localization identifiers from the
- * resources.
- *
- * Methods:
- * - addResourceIds - add resources
- * - removeResourceIds - remove resources
- * - formatValue - format a single value
- * - formatValues - format multiple values
- * - formatMessages - format multiple compound messages
- *
- */
- [Func="IsChromeOrUAWidget", Exposed=Window]
- interface Localization {
- /**
- * Constructor arguments:
- * - aResourceids - a list of localization resource URIs
- * which will provide messages for this
- * Localization instance.
- * - aSync - Specifies if the initial state of the Localization API is synchronous.
- * This enables a number of synchronous methods on the
- * Localization API.
- * - aRegistry - optional custom L10nRegistry to be used by this Localization instance.
- * - aLocales - custom set of locales to be used for this Localization.
- */
- [Throws]
- constructor(sequence<L10nResourceId> aResourceIds,
- optional boolean aSync = false,
- optional L10nRegistry aRegistry,
- optional sequence<UTF8String> aLocales);
- /**
- * A method for adding resources to the localization context.
- */
- undefined addResourceIds(sequence<L10nResourceId> aResourceIds);
- /**
- * A method for removing resources from the localization context.
- *
- * Returns a new count of resources used by the context.
- */
- unsigned long removeResourceIds(sequence<L10nResourceId> aResourceIds);
- /**
- * Formats a value of a localization message with a given id.
- * An optional dictionary of arguments can be passed to inform
- * the message formatting logic.
- *
- * Example:
- * let value = await document.l10n.formatValue("unread-emails", {count: 5});
- * assert.equal(value, "You have 5 unread emails");
- */
- [NewObject] Promise<UTF8String?> formatValue(UTF8String aId, optional L10nArgs aArgs);
- /**
- * Formats values of a list of messages with given ids.
- *
- * Example:
- * let values = await document.l10n.formatValues([
- * {id: "hello-world"},
- * {id: "unread-emails", args: {count: 5}
- * ]);
- * assert.deepEqual(values, [
- * "Hello World",
- * "You have 5 unread emails"
- * ]);
- */
- [NewObject] Promise<sequence<UTF8String?>> formatValues(sequence<L10nKey> aKeys);
- /**
- * Formats values and attributes of a list of messages with given ids.
- *
- * Example:
- * let values = await document.l10n.formatMessages([
- * {id: "hello-world"},
- * {id: "unread-emails", args: {count: 5}
- * ]);
- * assert.deepEqual(values, [
- * {
- * value: "Hello World",
- * attributes: null
- * },
- * {
- * value: "You have 5 unread emails",
- * attributes: {
- * tooltip: "Click to select them all"
- * }
- * }
- * ]);
- */
- [NewObject] Promise<sequence<L10nMessage?>> formatMessages(sequence<L10nKey> aKeys);
- undefined setAsync();
- [NewObject, Throws]
- UTF8String? formatValueSync(UTF8String aId, optional L10nArgs aArgs);
- [NewObject, Throws]
- sequence<UTF8String?> formatValuesSync(sequence<L10nKey> aKeys);
- [NewObject, Throws]
- sequence<L10nMessage?> formatMessagesSync(sequence<L10nKey> aKeys);
- };
- /**
- * A helper dict for converting between JS Value and L10nArgs.
- */
- [GenerateInitFromJSON, GenerateConversionToJS]
- dictionary L10nArgsHelperDict {
- required L10nArgs args;
- };
-
- /* ---------------------- Location ----------------------------- */
- /* ./webidl/Location.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/history.html#the-location-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [LegacyUnforgeable,
- Exposed=Window,
- InstrumentedProps=(ancestorOrigins)]
- interface Location {
- [Throws, CrossOriginWritable, NeedsSubjectPrincipal]
- stringifier attribute USVString href;
- [Throws, NeedsSubjectPrincipal]
- readonly attribute USVString origin;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString protocol;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString host;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString hostname;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString port;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString pathname;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString search;
- [Throws, NeedsSubjectPrincipal]
- attribute USVString hash;
- [Throws, NeedsSubjectPrincipal]
- undefined assign(USVString url);
- [Throws, CrossOriginCallable, NeedsSubjectPrincipal]
- undefined replace(USVString url);
- // XXXbz there is no forceget argument in the spec! See bug 1037721.
- [Throws, NeedsSubjectPrincipal]
- undefined reload(optional boolean forceget = false);
- // Bug 1085214 [SameObject] readonly attribute USVString[] ancestorOrigins;
- };
-
- /* ---------------------- Lock ----------------------------- */
- /* ./webidl/Lock.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/web-locks/
- */
- [SecureContext, Exposed=(Window,Worker)]
- interface Lock {
- readonly attribute DOMString name;
- readonly attribute LockMode mode;
- };
-
- /* ---------------------- LockManager ----------------------------- */
- /* ./webidl/LockManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/web-locks/
- */
- [SecureContext, Exposed=(Window,Worker)]
- interface LockManager {
- [NewObject]
- Promise<any> request(DOMString name,
- LockGrantedCallback callback);
- [NewObject]
- Promise<any> request(DOMString name,
- LockOptions options,
- LockGrantedCallback callback);
- [NewObject]
- Promise<LockManagerSnapshot> query();
- };
- callback LockGrantedCallback = Promise<any> (Lock? lock);
- enum LockMode { "shared", "exclusive" };
- dictionary LockOptions {
- LockMode mode = "exclusive";
- boolean ifAvailable = false;
- boolean steal = false;
- AbortSignal signal;
- };
- dictionary LockManagerSnapshot {
- sequence<LockInfo> held;
- sequence<LockInfo> pending;
- };
- dictionary LockInfo {
- DOMString name;
- LockMode mode;
- DOMString clientId;
- };
-
- /* ---------------------- MathMLElement ----------------------------- */
- /* ./webidl/MathMLElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://mathml-refresh.github.io/mathml-core/
- *
- * Copyright © 2019 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark
- * and permissive document license rules apply.
- */
- [Exposed=Window]
- interface MathMLElement : Element { };
- MathMLElement includes GlobalEventHandlers;
- MathMLElement includes HTMLOrForeignElement;
- MathMLElement includes ElementCSSInlineStyle;
- MathMLElement includes TouchEventHandlers;
- MathMLElement includes OnErrorEventHandlerForNodes;
-
- /* ---------------------- MediaCapabilities ----------------------------- */
- /* ./webidl/MediaCapabilities.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/media-capabilities/
- *
- * Copyright © 2018 the Contributors to the Media Capabilities Specification
- */
- dictionary MediaConfiguration {
- VideoConfiguration video;
- AudioConfiguration audio;
- };
- dictionary MediaDecodingConfiguration : MediaConfiguration {
- required MediaDecodingType type;
- };
- dictionary MediaEncodingConfiguration : MediaConfiguration {
- required MediaEncodingType type;
- };
- enum MediaDecodingType {
- "file",
- "media-source",
- };
- enum MediaEncodingType {
- "record",
- "transmission"
- };
- dictionary VideoConfiguration {
- required DOMString contentType;
- required unsigned long width;
- required unsigned long height;
- required unsigned long long bitrate;
- required double framerate;
- boolean hasAlphaChannel;
- HdrMetadataType hdrMetadataType;
- ColorGamut colorGamut;
- TransferFunction transferFunction;
- DOMString scalabilityMode;
- };
- enum HdrMetadataType {
- "smpteSt2086",
- "smpteSt2094-10",
- "smpteSt2094-40"
- };
- enum ColorGamut {
- "srgb",
- "p3",
- "rec2020"
- };
- enum TransferFunction {
- "srgb",
- "pq",
- "hlg"
- };
- dictionary AudioConfiguration {
- required DOMString contentType;
- DOMString channels;
- unsigned long long bitrate;
- unsigned long samplerate;
- };
- [Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled",
- HeaderFile="mozilla/dom/MediaCapabilities.h"]
- interface MediaCapabilitiesInfo {
- readonly attribute boolean supported;
- readonly attribute boolean smooth;
- readonly attribute boolean powerEfficient;
- };
- [Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled"]
- interface MediaCapabilities {
- [NewObject]
- Promise<MediaCapabilitiesInfo> decodingInfo(MediaDecodingConfiguration configuration);
- [NewObject]
- Promise<MediaCapabilitiesInfo> encodingInfo(MediaEncodingConfiguration configuration);
- };
-
- /* ---------------------- MediaDebugInfo ----------------------------- */
- /* ./webidl/MediaDebugInfo.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- * This module defines dictonaries that are filled with debug information
- * through GetDebugInfo() calls in the media component. To get the information
- * filled and returned, we have two methods that return promises, one in
- * HTMLMediaElement and one in MediaSource.
- *
- * If you need to add some extra info, there's one dictionary per class,
- * following the pattern <ClassName>DebugInfo, where you can add some fields
- * and fill them in the corresponding GetDebugInfo() call.
- *
- * Below is the structures returned.
- *
- * Used by HTMLMediaElement.GetMozRequestDebugInfo(), see HTMLMediaElement.webidl:
- *
- * HTMLMediaElementDebugInfo
- * EMEDebugInfo
- * MediaDecoderDebugInfo
- * MediaFormatReaderDebugInfo
- * MediaStateDebugInfo
- * MediaStateDebugInfo
- * MediaFrameStats
- * MediaDecoderStateMachineDebugInfo
- * MediaDecoderStateMachineDecodingStateDebugInfo
- * MediaSinkDebugInfo
- * VideoSinkDebugInfo
- * AudioSinkDebugInfo
- * DecodedStreamDebugInfo
- * DecodedStreamDataDebugInfo
- * MediaResourceDebugInfo
- * MediaCacheStreamDebugInfo
- *
- * Used by MediaSource.GetMozDebugReaderData(), see MediaSource.webidl:
- *
- * MediaSourceDecoderDebugInfo
- * MediaFormatReaderDebugInfo
- * MediaStateDebugInfo
- * MediaStateDebugInfo
- * MediaFrameStats
- * MediaSourceDemuxerDebugInfo
- * TrackBuffersManagerDebugInfo
- * TrackBuffersManagerDebugInfo
- */
- dictionary MediaCacheStreamDebugInfo {
- long long streamLength = 0;
- long long channelOffset = 0;
- boolean cacheSuspended = false;
- boolean channelEnded = false;
- long loadID = 0;
- };
- dictionary MediaResourceDebugInfo {
- MediaCacheStreamDebugInfo cacheStream = {};
- };
- dictionary MediaDecoderDebugInfo {
- DOMString instance = "";
- unsigned long channels = 0;
- unsigned long rate = 0;
- boolean hasAudio = false;
- boolean hasVideo = false;
- DOMString PlayState = "";
- DOMString containerType = "";
- MediaFormatReaderDebugInfo reader = {};
- MediaDecoderStateMachineDebugInfo stateMachine = {};
- MediaResourceDebugInfo resource = {};
- };
- dictionary AudioSinkDebugInfo {
- long long startTime = 0;
- long long lastGoodPosition = 0;
- boolean isPlaying = false;
- boolean isStarted = false;
- boolean audioEnded = false;
- unsigned long outputRate = 0;
- long long written = 0;
- boolean hasErrored = false;
- boolean playbackComplete = false;
- };
- dictionary AudioSinkWrapperDebugInfo {
- boolean isPlaying = false;
- boolean isStarted = false;
- boolean audioEnded = false;
- AudioSinkDebugInfo audioSink = {};
- };
- dictionary VideoSinkDebugInfo {
- boolean isStarted = false;
- boolean isPlaying = false;
- boolean finished = false;
- long size = 0;
- long long videoFrameEndTime = 0;
- boolean hasVideo = false;
- boolean videoSinkEndRequestExists = false;
- boolean endPromiseHolderIsEmpty = false;
- };
- dictionary DecodedStreamDataDebugInfo {
- DOMString instance = "";
- long long audioFramesWritten = 0;
- long long streamAudioWritten = 0;
- long long streamVideoWritten = 0;
- long long nextAudioTime = 0;
- long long lastVideoStartTime = 0;
- long long lastVideoEndTime = 0;
- boolean haveSentFinishAudio = false;
- boolean haveSentFinishVideo = false;
- };
- dictionary DecodedStreamDebugInfo {
- DOMString instance = "";
- long long startTime = 0;
- long long lastOutputTime = 0;
- long playing = 0;
- long long lastAudio = 0;
- boolean audioQueueFinished = false;
- long audioQueueSize = 0;
- DecodedStreamDataDebugInfo data = {};
- };
- dictionary MediaSinkDebugInfo {
- AudioSinkWrapperDebugInfo audioSinkWrapper = {};
- VideoSinkDebugInfo videoSink = {};
- DecodedStreamDebugInfo decodedStream = {};
- };
- dictionary MediaDecoderStateMachineDecodingStateDebugInfo {
- boolean isPrerolling = false;
- };
- dictionary MediaDecoderStateMachineDebugInfo {
- long long duration = 0;
- long long mediaTime = 0;
- long long clock = 0;
- DOMString state = "";
- long playState = 0;
- boolean sentFirstFrameLoadedEvent = false;
- boolean isPlaying = false;
- DOMString audioRequestStatus = "";
- DOMString videoRequestStatus = "";
- long long decodedAudioEndTime = 0;
- long long decodedVideoEndTime = 0;
- boolean audioCompleted = false;
- boolean videoCompleted = false;
- MediaDecoderStateMachineDecodingStateDebugInfo stateObj = {};
- MediaSinkDebugInfo mediaSink = {};
- double totalBufferingTimeMs = 0;
- };
- dictionary MediaStateDebugInfo {
- boolean needInput = false;
- boolean hasPromise = false;
- boolean waitingPromise = false;
- boolean hasDemuxRequest = false;
- long demuxQueueSize = 0;
- boolean hasDecoder = false;
- double timeTreshold = 0.0;
- boolean timeTresholdHasSeeked = false;
- long long numSamplesInput = 0;
- long long numSamplesOutput = 0;
- long queueSize = 0;
- long pending = 0;
- boolean waitingForData = false;
- long demuxEOS = 0;
- long drainState = 0;
- boolean waitingForKey = false;
- long long lastStreamSourceID = 0;
- };
- dictionary MediaFrameStats {
- long long droppedDecodedFrames = 0;
- long long droppedSinkFrames = 0;
- long long droppedCompositorFrames = 0;
- };
- dictionary MediaFormatReaderDebugInfo {
- DOMString videoType = "";
- DOMString videoDecoderName = "";
- long videoWidth = 0;
- long videoHeight = 0;
- double videoRate = 0.0;
- DOMString audioType = "";
- DOMString audioDecoderName = "";
- boolean videoHardwareAccelerated = false;
- long long videoNumSamplesOutputTotal = 0;
- long long videoNumSamplesSkippedTotal = 0;
- long audioChannels = 0;
- double audioRate = 0.0;
- long long audioFramesDecoded = 0;
- MediaStateDebugInfo audioState = {};
- MediaStateDebugInfo videoState = {};
- MediaFrameStats frameStats = {};
- double totalReadMetadataTimeMs = 0.0;
- double totalWaitingForVideoDataTimeMs = 0.0;
- };
- dictionary BufferRange {
- double start = 0;
- double end = 0;
- };
- dictionary TrackBuffersManagerDebugInfo {
- DOMString type = "";
- double nextSampleTime = 0.0;
- long numSamples = 0;
- long bufferSize = 0;
- long evictable = 0;
- long nextGetSampleIndex = 0;
- long nextInsertionIndex = 0;
- sequence<BufferRange> ranges = [];
- };
- dictionary MediaSourceDemuxerDebugInfo {
- TrackBuffersManagerDebugInfo audioTrack = {};
- TrackBuffersManagerDebugInfo videoTrack = {};
- };
- dictionary MediaSourceDecoderDebugInfo {
- MediaFormatReaderDebugInfo reader = {};
- MediaSourceDemuxerDebugInfo demuxer = {};
- };
- dictionary EMEDebugInfo {
- DOMString keySystem = "";
- DOMString sessionsInfo = "";
- };
- dictionary HTMLMediaElementDebugInfo {
- unsigned long compositorDroppedFrames = 0;
- EMEDebugInfo EMEInfo = {};
- MediaDecoderDebugInfo decoder = {};
- };
-
- /* ---------------------- MediaDeviceInfo ----------------------------- */
- /* ./webidl/MediaDeviceInfo.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
- */
- enum MediaDeviceKind {
- "audioinput",
- "audiooutput",
- "videoinput"
- };
- [Func="Navigator::HasUserMediaSupport",
- Exposed=Window]
- interface MediaDeviceInfo {
- readonly attribute DOMString deviceId;
- readonly attribute MediaDeviceKind kind;
- readonly attribute DOMString label;
- readonly attribute DOMString groupId;
- [Default] object toJSON();
- };
-
- /* ---------------------- MediaDevices ----------------------------- */
- /* ./webidl/MediaDevices.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Func="Navigator::HasUserMediaSupport",
- Exposed=Window]
- interface MediaDevices : EventTarget {
- [Pref="media.ondevicechange.enabled"]
- attribute EventHandler ondevicechange;
- MediaTrackSupportedConstraints getSupportedConstraints();
- [NewObject, UseCounter]
- Promise<sequence<MediaDeviceInfo>> enumerateDevices();
- [NewObject, NeedsCallerType, UseCounter]
- Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints = {});
- // We need [SecureContext] in case media.devices.insecure.enabled = true
- // because we don't want that legacy pref to expose this newer method.
- [SecureContext, Pref="media.getdisplaymedia.enabled", NewObject, NeedsCallerType, UseCounter]
- Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints = {});
- };
- // https://w3c.github.io/mediacapture-output/#audiooutputoptions-dictionary
- dictionary AudioOutputOptions {
- DOMString deviceId = "";
- };
- // https://w3c.github.io/mediacapture-output/#mediadevices-extensions
- partial interface MediaDevices {
- [SecureContext, Pref="media.setsinkid.enabled", NewObject, NeedsCallerType]
- Promise<MediaDeviceInfo> selectAudioOutput(optional AudioOutputOptions options = {});
- };
-
- /* ---------------------- MediaElementAudioSourceNode ----------------------------- */
- /* ./webidl/MediaElementAudioSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary MediaElementAudioSourceOptions {
- required HTMLMediaElement mediaElement;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface MediaElementAudioSourceNode : AudioNode {
- [Throws]
- constructor(AudioContext context, MediaElementAudioSourceOptions options);
- readonly attribute HTMLMediaElement mediaElement;
- };
- // Mozilla extensions
- MediaElementAudioSourceNode includes AudioNodePassThrough;
-
- /* ---------------------- MediaEncryptedEvent ----------------------------- */
- /* ./webidl/MediaEncryptedEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface MediaEncryptedEvent : Event {
- [Throws]
- constructor(DOMString type,
- optional MediaKeyNeededEventInit eventInitDict = {});
- readonly attribute DOMString initDataType;
- [Throws]
- readonly attribute ArrayBuffer? initData;
- };
- dictionary MediaKeyNeededEventInit : EventInit {
- DOMString initDataType = "";
- ArrayBuffer? initData = null;
- };
-
- /* ---------------------- MediaError ----------------------------- */
- /* ./webidl/MediaError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/html/#mediaerror
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface MediaError {
- // Keep these constants in sync with the ones defined in HTMLMediaElement.h
- const unsigned short MEDIA_ERR_ABORTED = 1;
- const unsigned short MEDIA_ERR_NETWORK = 2;
- const unsigned short MEDIA_ERR_DECODE = 3;
- const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
- [Constant]
- readonly attribute unsigned short code;
- readonly attribute DOMString message;
- };
-
- /* ---------------------- MediaKeyError ----------------------------- */
- /* ./webidl/MediaKeyError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- // According to the spec, "The future of error events and MediaKeyError
- // is uncertain."
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=21798
- [Exposed=Window]
- interface MediaKeyError : Event {
- readonly attribute unsigned long systemCode;
- };
-
- /* ---------------------- MediaKeyMessageEvent ----------------------------- */
- /* ./webidl/MediaKeyMessageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- enum MediaKeyMessageType {
- "license-request",
- "license-renewal",
- "license-release",
- "individualization-request"
- };
- [Exposed=Window]
- interface MediaKeyMessageEvent : Event {
- [Throws]
- constructor(DOMString type, MediaKeyMessageEventInit eventInitDict);
- readonly attribute MediaKeyMessageType messageType;
- [Throws]
- readonly attribute ArrayBuffer message;
- };
- dictionary MediaKeyMessageEventInit : EventInit {
- required MediaKeyMessageType messageType;
- required ArrayBuffer message;
- };
-
- /* ---------------------- MediaKeys ----------------------------- */
- /* ./webidl/MediaKeys.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- // Note: "persistent-usage-record" session type is unsupported yet, as
- // it's marked as "at risk" in the spec, and Chrome doesn't support it.
- enum MediaKeySessionType {
- "temporary",
- "persistent-license",
- // persistent-usage-record,
- };
- // https://w3c.github.io/encrypted-media/#idl-def-hdcpversion
- enum HDCPVersion {
- "1.0",
- "1.1",
- "1.2",
- "1.3",
- "1.4",
- "2.0",
- "2.1",
- "2.2",
- "2.3",
- };
- // https://w3c.github.io/encrypted-media/#idl-def-mediakeyspolicy
- dictionary MediaKeysPolicy {
- HDCPVersion minHdcpVersion;
- };
- [Exposed=Window]
- interface MediaKeys {
- readonly attribute DOMString keySystem;
- [NewObject, Throws]
- MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary");
- [NewObject]
- Promise<undefined> setServerCertificate(BufferSource serverCertificate);
- [Pref="media.eme.hdcp-policy-check.enabled", NewObject]
- Promise<MediaKeyStatus> getStatusForPolicy(optional MediaKeysPolicy policy = {});
- };
-
- /* ---------------------- MediaKeySession ----------------------------- */
- /* ./webidl/MediaKeySession.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface MediaKeySession : EventTarget {
- // error state
- readonly attribute MediaKeyError? error;
- // session properties
- readonly attribute DOMString sessionId;
- readonly attribute unrestricted double expiration;
- readonly attribute Promise<undefined> closed;
- readonly attribute MediaKeyStatusMap keyStatuses;
- attribute EventHandler onkeystatuseschange;
- attribute EventHandler onmessage;
- [NewObject]
- Promise<undefined> generateRequest(DOMString initDataType, BufferSource initData);
- [NewObject]
- Promise<boolean> load(DOMString sessionId);
- // session operations
- [NewObject]
- Promise<undefined> update(BufferSource response);
- [NewObject]
- Promise<undefined> close();
- [NewObject]
- Promise<undefined> remove();
- };
-
- /* ---------------------- MediaKeysRequestStatus ----------------------------- */
- /* ./webidl/MediaKeysRequestStatus.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- enum MediaKeySystemStatus {
- "available",
- "api-disabled",
- "cdm-disabled",
- "cdm-not-supported",
- "cdm-not-installed",
- "cdm-created",
- };
- /* Note: This dictionary and enum is only used by Gecko to convey messages
- * to chrome JS code. It is not exposed to the web.
- */
- [GenerateToJSON]
- dictionary RequestMediaKeySystemAccessNotification {
- required DOMString keySystem;
- required MediaKeySystemStatus status;
- };
-
- /* ---------------------- MediaKeyStatusMap ----------------------------- */
- /* ./webidl/MediaKeyStatusMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- enum MediaKeyStatus {
- "usable",
- "expired",
- "released",
- "output-restricted",
- "output-downscaled",
- "status-pending",
- "internal-error"
- };
- [Exposed=Window]
- interface MediaKeyStatusMap {
- iterable<ArrayBuffer,MediaKeyStatus>;
- readonly attribute unsigned long size;
- boolean has (BufferSource keyId);
- [Throws]
- (MediaKeyStatus or undefined) get (BufferSource keyId);
- };
-
- /* ---------------------- MediaKeySystemAccess ----------------------------- */
- /* ./webidl/MediaKeySystemAccess.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- enum MediaKeysRequirement {
- "required",
- "optional",
- "not-allowed"
- };
- dictionary MediaKeySystemMediaCapability {
- DOMString contentType = "";
- DOMString robustness = "";
- [Pref="media.eme.encrypted-media-encryption-scheme.enabled"]
- DOMString? encryptionScheme = null;
- };
- dictionary MediaKeySystemConfiguration {
- DOMString label = "";
- sequence<DOMString> initDataTypes = [];
- sequence<MediaKeySystemMediaCapability> audioCapabilities = [];
- sequence<MediaKeySystemMediaCapability> videoCapabilities = [];
- MediaKeysRequirement distinctiveIdentifier = "optional";
- MediaKeysRequirement persistentState = "optional";
- sequence<DOMString> sessionTypes;
- };
- [Exposed=Window]
- interface MediaKeySystemAccess {
- readonly attribute DOMString keySystem;
- [NewObject]
- MediaKeySystemConfiguration getConfiguration();
- [NewObject]
- Promise<MediaKeys> createMediaKeys();
- };
-
- /* ---------------------- MediaList ----------------------------- */
- /* ./webidl/MediaList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- // https://drafts.csswg.org/cssom/#the-medialist-interface
- [Exposed=Window]
- interface MediaList {
- stringifier attribute [LegacyNullToEmptyString] UTF8String mediaText;
- readonly attribute unsigned long length;
- getter UTF8String? item(unsigned long index);
- [Throws]
- undefined deleteMedium(UTF8String oldMedium);
- [Throws]
- undefined appendMedium(UTF8String newMedium);
- };
-
- /* ---------------------- MediaQueryList ----------------------------- */
- /* ./webidl/MediaQueryList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/cssom-view/#mediaquerylist
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [ProbablyShortLivingWrapper,
- Exposed=Window]
- interface MediaQueryList : EventTarget {
- readonly attribute UTF8String media;
- readonly attribute boolean matches;
- [Throws]
- undefined addListener(EventListener? listener);
- [Throws]
- undefined removeListener(EventListener? listener);
- attribute EventHandler onchange;
- };
-
- /* ---------------------- MediaQueryListEvent ----------------------------- */
- /* ./webidl/MediaQueryListEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * https://drafts.csswg.org/cssom-view/#mediaquerylistevent
- */
- [Exposed=Window]
- interface MediaQueryListEvent : Event {
- constructor(DOMString type,
- optional MediaQueryListEventInit eventInitDict = {});
- readonly attribute UTF8String media;
- readonly attribute boolean matches;
- };
- dictionary MediaQueryListEventInit : EventInit {
- UTF8String media = "";
- boolean matches = false;
- };
-
- /* ---------------------- MediaRecorder ----------------------------- */
- /* ./webidl/MediaRecorder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum BitrateMode { "constant", "variable" };
- enum RecordingState { "inactive", "recording", "paused" };
- [Exposed=Window]
- interface MediaRecorder : EventTarget {
- [Throws]
- constructor(MediaStream stream, optional MediaRecorderOptions options = {});
- [Throws]
- constructor(AudioNode node, optional unsigned long output = 0,
- optional MediaRecorderOptions options = {});
- readonly attribute MediaStream stream;
- readonly attribute DOMString mimeType;
- readonly attribute RecordingState state;
- attribute EventHandler onstart;
- attribute EventHandler onstop;
- attribute EventHandler ondataavailable;
- attribute EventHandler onpause;
- attribute EventHandler onresume;
- attribute EventHandler onerror;
- readonly attribute unsigned long videoBitsPerSecond;
- readonly attribute unsigned long audioBitsPerSecond;
- [Throws]
- undefined start(optional unsigned long timeslice);
- [Throws]
- undefined stop();
- [Throws]
- undefined pause();
- [Throws]
- undefined resume();
- [Throws]
- undefined requestData();
- static boolean isTypeSupported(DOMString type);
- };
- dictionary MediaRecorderOptions {
- DOMString mimeType = "";
- unsigned long audioBitsPerSecond;
- unsigned long videoBitsPerSecond;
- unsigned long bitsPerSecond;
- };
-
- /* ---------------------- MediaRecorderErrorEvent ----------------------------- */
- /* ./webidl/MediaRecorderErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/mediacapture-record/
- *
- * Copyright © 2017 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark
- * and document use rules apply.
- */
- dictionary MediaRecorderErrorEventInit : EventInit {
- required DOMException error;
- };
- [Exposed=Window]
- interface MediaRecorderErrorEvent : Event {
- constructor(DOMString type, MediaRecorderErrorEventInit eventInitDict);
- [SameObject] readonly attribute DOMException error;
- };
-
- /* ---------------------- MediaSession ----------------------------- */
- /* ./webidl/MediaSession.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/mediasession/#idl-index
- */
- enum MediaSessionPlaybackState {
- "none",
- "paused",
- "playing"
- };
- enum MediaSessionAction {
- "play",
- "pause",
- "seekbackward",
- "seekforward",
- "previoustrack",
- "nexttrack",
- "skipad",
- "seekto",
- "stop",
- };
- callback MediaSessionActionHandler = undefined(MediaSessionActionDetails details);
- [Exposed=Window]
- interface MediaSession {
- attribute MediaMetadata? metadata;
- attribute MediaSessionPlaybackState playbackState;
- undefined setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler);
- [Throws]
- undefined setPositionState(optional MediaPositionState state = {});
- // Fire the action handler. It's test-only for now.
- [ChromeOnly]
- undefined notifyHandler(MediaSessionActionDetails details);
- };
- [Exposed=Window]
- interface MediaMetadata {
- [Throws]
- constructor(optional MediaMetadataInit init = {});
- attribute DOMString title;
- attribute DOMString artist;
- attribute DOMString album;
- // https://github.com/w3c/mediasession/issues/237
- // Take and return `MediaImage` on setter and getter.
- [Frozen, Cached, Pure, Throws]
- attribute sequence<object> artwork;
- };
- dictionary MediaMetadataInit {
- DOMString title = "";
- DOMString artist = "";
- DOMString album = "";
- sequence<MediaImage> artwork = [];
- };
- dictionary MediaImage {
- required USVString src;
- DOMString sizes = "";
- DOMString type = "";
- };
- // Spec issue https://github.com/w3c/mediasession/issues/254
- dictionary MediaSessionActionDetails {
- required MediaSessionAction action;
- double seekOffset;
- double seekTime;
- boolean fastSeek;
- };
- dictionary MediaPositionState {
- double duration;
- double playbackRate;
- double position;
- };
-
- /* ---------------------- MediaSource ----------------------------- */
- /* ./webidl/MediaSource.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum MediaSourceReadyState {
- "closed",
- "open",
- "ended"
- };
- enum MediaSourceEndOfStreamError {
- "network",
- "decode"
- };
- [Pref="media.mediasource.enabled",
- Exposed=Window]
- interface MediaSource : EventTarget {
- [Throws]
- constructor();
- readonly attribute SourceBufferList sourceBuffers;
- readonly attribute SourceBufferList activeSourceBuffers;
- readonly attribute MediaSourceReadyState readyState;
- [SetterThrows]
- attribute unrestricted double duration;
- attribute EventHandler onsourceopen;
- attribute EventHandler onsourceended;
- attribute EventHandler onsourceclose;
- [NewObject, Throws]
- SourceBuffer addSourceBuffer(DOMString type);
- [Throws]
- undefined removeSourceBuffer(SourceBuffer sourceBuffer);
- [Throws]
- undefined endOfStream(optional MediaSourceEndOfStreamError error);
- [Throws]
- undefined setLiveSeekableRange(double start, double end);
- [Throws]
- undefined clearLiveSeekableRange();
- static boolean isTypeSupported(DOMString type);
- [NewObject, ChromeOnly]
- Promise<MediaSourceDecoderDebugInfo> mozDebugReaderData();
- };
-
- /* ---------------------- MediaStream ----------------------------- */
- /* ./webidl/MediaStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origins of this IDL file are
- * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
- *
- * Copyright � 2012 W3C� (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // These dictionaries need to be in a separate file from their
- // MediaTrackConstraints* counterparts due to a webidl compiler limitation.
- dictionary MediaStreamConstraints {
- (boolean or MediaTrackConstraints) audio = false;
- (boolean or MediaTrackConstraints) video = false;
- boolean picture = false; // Mozilla legacy
- boolean fake; // For testing purpose. Generates frames of solid
- // colors if video is enabled, and sound of 1Khz sine
- // wave if audio is enabled.
- DOMString? peerIdentity = null;
- };
- dictionary DisplayMediaStreamConstraints {
- (boolean or MediaTrackConstraints) video = true;
- (boolean or MediaTrackConstraints) audio = false;
- };
- [Exposed=Window]
- interface MediaStream : EventTarget {
- [Throws]
- constructor();
- [Throws]
- constructor(MediaStream stream);
- [Throws]
- constructor(sequence<MediaStreamTrack> tracks);
- readonly attribute DOMString id;
- sequence<MediaStreamTrack> getAudioTracks ();
- sequence<MediaStreamTrack> getVideoTracks ();
- sequence<MediaStreamTrack> getTracks ();
- MediaStreamTrack? getTrackById (DOMString trackId);
- undefined addTrack (MediaStreamTrack track);
- undefined removeTrack (MediaStreamTrack track);
- MediaStream clone ();
- readonly attribute boolean active;
- attribute EventHandler onaddtrack;
- attribute EventHandler onremovetrack;
- [ChromeOnly, NewObject]
- static Promise<long> countUnderlyingStreams();
- // Webrtc allows the remote side to name a stream whatever it wants, and we
- // need to surface this to content.
- [ChromeOnly]
- undefined assignId(DOMString id);
- };
-
- /* ---------------------- MediaStreamAudioDestinationNode ----------------------------- */
- /* ./webidl/MediaStreamAudioDestinationNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface MediaStreamAudioDestinationNode : AudioNode {
- [Throws]
- constructor(AudioContext context, optional AudioNodeOptions options = {});
- [BinaryName="DOMStream"]
- readonly attribute MediaStream stream;
- };
-
- /* ---------------------- MediaStreamAudioSourceNode ----------------------------- */
- /* ./webidl/MediaStreamAudioSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary MediaStreamAudioSourceOptions {
- required MediaStream mediaStream;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface MediaStreamAudioSourceNode : AudioNode {
- [Throws]
- constructor(AudioContext context, MediaStreamAudioSourceOptions options);
- [BinaryName="GetMediaStream"]
- readonly attribute MediaStream mediaStream;
- };
- // Mozilla extensions
- MediaStreamAudioSourceNode includes AudioNodePassThrough;
-
- /* ---------------------- MediaStreamError ----------------------------- */
- /* ./webidl/MediaStreamError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/mediacapture-main/getusermedia.html#idl-def-MediaStreamError
- */
- // The future of MediaStreamError is uncertain.
- // https://www.w3.org/Bugs/Public/show_bug.cgi?id=26776
- // TODO: This is an 'exception', not an interface, by virtue of needing to be
- // passed as a promise rejection-reason. Revisit if DOMException grows a customArg
- [ExceptionClass, LegacyNoInterfaceObject,
- Exposed=Window]
- interface MediaStreamError {
- readonly attribute DOMString name;
- readonly attribute DOMString? message;
- readonly attribute DOMString? constraint;
- };
-
- /* ---------------------- MediaStreamEvent ----------------------------- */
- /* ./webidl/MediaStreamEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
- */
- dictionary MediaStreamEventInit : EventInit {
- MediaStream? stream = null;
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface MediaStreamEvent : Event {
- constructor(DOMString type, optional MediaStreamEventInit eventInitDict = {});
- readonly attribute MediaStream? stream;
- };
-
- /* ---------------------- MediaStreamTrack ----------------------------- */
- /* ./webidl/MediaStreamTrack.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // These two enums are in the spec even though they're not used directly in the
- // API due to https://www.w3.org/Bugs/Public/show_bug.cgi?id=19936
- // Their binding code is used in the implementation.
- enum VideoFacingModeEnum {
- "user",
- "environment",
- "left",
- "right"
- };
- enum MediaSourceEnum {
- "camera",
- "screen",
- "application",
- "window",
- "browser",
- "microphone",
- "audioCapture",
- "other"
- // If values are added, adjust n_values in Histograms.json (2 places)
- };
- dictionary ConstrainLongRange {
- long min;
- long max;
- long exact;
- long ideal;
- };
- dictionary ConstrainDoubleRange {
- double min;
- double max;
- double exact;
- double ideal;
- };
- dictionary ConstrainBooleanParameters {
- boolean exact;
- boolean ideal;
- };
- dictionary ConstrainDOMStringParameters {
- (DOMString or sequence<DOMString>) exact;
- (DOMString or sequence<DOMString>) ideal;
- };
- typedef (long or ConstrainLongRange) ConstrainLong;
- typedef (double or ConstrainDoubleRange) ConstrainDouble;
- typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
- typedef (DOMString or sequence<DOMString> or ConstrainDOMStringParameters) ConstrainDOMString;
- // Note: When adding new constraints, remember to update the SelectSettings()
- // function in MediaManager.cpp to make OverconstrainedError's constraint work!
- dictionary MediaTrackConstraintSet {
- ConstrainLong width;
- ConstrainLong height;
- ConstrainDouble frameRate;
- ConstrainDOMString facingMode;
- DOMString mediaSource;
- long long browserWindow;
- boolean scrollWithPage;
- ConstrainDOMString deviceId;
- ConstrainDOMString groupId;
- ConstrainLong viewportOffsetX;
- ConstrainLong viewportOffsetY;
- ConstrainLong viewportWidth;
- ConstrainLong viewportHeight;
- ConstrainBoolean echoCancellation;
- ConstrainBoolean noiseSuppression;
- ConstrainBoolean autoGainControl;
- ConstrainLong channelCount;
- };
- [GenerateToJSON]
- dictionary MediaTrackConstraints : MediaTrackConstraintSet {
- sequence<MediaTrackConstraintSet> advanced;
- };
- enum MediaStreamTrackState {
- "live",
- "ended"
- };
- [Exposed=Window]
- interface MediaStreamTrack : EventTarget {
- readonly attribute DOMString kind;
- readonly attribute DOMString id;
- [NeedsCallerType]
- readonly attribute DOMString label;
- attribute boolean enabled;
- readonly attribute boolean muted;
- attribute EventHandler onmute;
- attribute EventHandler onunmute;
- readonly attribute MediaStreamTrackState readyState;
- attribute EventHandler onended;
- MediaStreamTrack clone ();
- undefined stop ();
- // MediaTrackCapabilities getCapabilities ();
- MediaTrackConstraints getConstraints ();
- [NeedsCallerType]
- MediaTrackSettings getSettings ();
- [NewObject, NeedsCallerType]
- Promise<undefined> applyConstraints (optional MediaTrackConstraints constraints = {});
- // attribute EventHandler onoverconstrained;
- };
-
- /* ---------------------- MediaStreamTrackAudioSourceNode ----------------------------- */
- /* ./webidl/MediaStreamTrackAudioSourceNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary MediaStreamTrackAudioSourceOptions {
- required MediaStreamTrack mediaStreamTrack;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface MediaStreamTrackAudioSourceNode : AudioNode {
- [Throws]
- constructor(AudioContext context, MediaStreamTrackAudioSourceOptions options);
- };
- // Mozilla extensions
- MediaStreamTrackAudioSourceNode includes AudioNodePassThrough;
-
- /* ---------------------- MediaStreamTrackEvent ----------------------------- */
- /* ./webidl/MediaStreamTrackEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamevent
- */
- dictionary MediaStreamTrackEventInit : EventInit {
- required MediaStreamTrack track;
- };
- [Exposed=Window]
- interface MediaStreamTrackEvent : Event {
- constructor(DOMString type, MediaStreamTrackEventInit eventInitDict);
- [SameObject]
- readonly attribute MediaStreamTrack track;
- };
-
- /* ---------------------- MediaTrackSettings ----------------------------- */
- /* ./webidl/MediaTrackSettings.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/mediacapture-main/getusermedia.html
- */
- dictionary MediaTrackSettings {
- long width;
- long height;
- double frameRate;
- DOMString facingMode;
- boolean echoCancellation;
- boolean autoGainControl;
- boolean noiseSuppression;
- long channelCount;
- DOMString deviceId;
- DOMString groupId;
- // Mozilla-specific extensions:
- // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
- // OBE by http://w3c.github.io/mediacapture-screen-share
- DOMString mediaSource;
- // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
- long long browserWindow;
- boolean scrollWithPage;
- long viewportOffsetX;
- long viewportOffsetY;
- long viewportWidth;
- long viewportHeight;
- };
-
- /* ---------------------- MediaTrackSupportedConstraints ----------------------------- */
- /* ./webidl/MediaTrackSupportedConstraints.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/getusermedia.html
- */
- dictionary MediaTrackSupportedConstraints {
- boolean width = true;
- boolean height = true;
- boolean aspectRatio; // to be supported
- boolean frameRate = true;
- boolean facingMode = true;
- boolean volume; // to be supported
- boolean sampleRate; // to be supported
- boolean sampleSize; // to be supported
- boolean echoCancellation = true;
- boolean noiseSuppression = true;
- boolean autoGainControl = true;
- boolean latency; // to be supported
- boolean channelCount = true;
- boolean deviceId = true;
- boolean groupId = true;
- // Mozilla-specific extensions:
- // http://fluffy.github.io/w3c-screen-share/#screen-based-video-constraints
- // OBE by http://w3c.github.io/mediacapture-screen-share
- boolean mediaSource = true;
- // Experimental https://bugzilla.mozilla.org/show_bug.cgi?id=1131568#c3
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1193075
- boolean browserWindow = true;
- boolean scrollWithPage = true;
- boolean viewportOffsetX = true;
- boolean viewportOffsetY = true;
- boolean viewportWidth = true;
- boolean viewportHeight = true;
- };
-
- /* ---------------------- MerchantValidationEvent ----------------------------- */
- /* ./webidl/MerchantValidationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://w3c.github.io/payment-request/#merchantvalidationevent-interface
- * https://w3c.github.io/payment-request/#merchantvalidationeventinit-dictionary
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext,
- Exposed=Window,
- Func="mozilla::dom::PaymentRequest::PrefEnabled"]
- interface MerchantValidationEvent : Event {
- [Throws]
- constructor(DOMString type,
- optional MerchantValidationEventInit eventInitDict = {});
- readonly attribute DOMString methodName;
- readonly attribute USVString validationURL;
- [Throws]
- undefined complete(Promise<any> merchantSessionPromise);
- };
- dictionary MerchantValidationEventInit : EventInit {
- DOMString methodName = "";
- USVString validationURL = "";
- };
-
- /* ---------------------- MessageChannel ----------------------------- */
- /* ./webidl/MessageChannel.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
- */
- [Exposed=(Window,Worker)]
- interface MessageChannel {
- [Throws]
- constructor();
- readonly attribute MessagePort port1;
- readonly attribute MessagePort port2;
- };
-
- /* ---------------------- MessageEvent ----------------------------- */
- /* ./webidl/MessageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://html.spec.whatwg.org/#messageevent
- */
- [Exposed=(Window,Worker,AudioWorklet), ProbablyShortLivingWrapper]
- interface MessageEvent : Event {
- constructor(DOMString type, optional MessageEventInit eventInitDict = {});
- /**
- * Custom data associated with this event.
- */
- [GetterThrows]
- readonly attribute any data;
- /**
- * The origin of the site from which this event originated, which is the
- * scheme, ":", and if the URI has a host, "//" followed by the
- * host, and if the port is not the default for the given scheme,
- * ":" followed by that port. This value does not have a trailing slash.
- */
- readonly attribute USVString origin;
- /**
- * The last event ID string of the event source, for server-sent DOM events; this
- * value is the empty string for cross-origin messaging.
- */
- readonly attribute DOMString lastEventId;
- /**
- * The window or port which originated this event.
- */
- readonly attribute MessageEventSource? source;
- [Pure, Cached, Frozen]
- readonly attribute sequence<MessagePort> ports;
- /**
- * Initializes this event with the given data, in a manner analogous to
- * the similarly-named method on the Event interface, also setting the
- * data, origin, source, and lastEventId attributes of this appropriately.
- */
- undefined initMessageEvent(DOMString type,
- optional boolean bubbles = false,
- optional boolean cancelable = false,
- optional any data = null,
- optional DOMString origin = "",
- optional DOMString lastEventId = "",
- optional MessageEventSource? source = null,
- optional sequence<MessagePort> ports = []);
- };
- dictionary MessageEventInit : EventInit {
- any data = null;
- DOMString origin = "";
- DOMString lastEventId = "";
- MessageEventSource? source = null;
- sequence<MessagePort> ports = [];
- };
- typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource;
-
- /* ---------------------- MessagePort ----------------------------- */
- /* ./webidl/MessagePort.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://html.spec.whatwg.org/#message-ports
- */
- [Exposed=(Window,Worker,AudioWorklet)]
- interface MessagePort : EventTarget {
- [Throws]
- undefined postMessage(any message, sequence<object> transferable);
- [Throws]
- undefined postMessage(any message, optional StructuredSerializeOptions options = {});
- undefined start();
- undefined close();
- // event handlers
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
- // Used to declare which objects should be transferred.
- dictionary StructuredSerializeOptions {
- sequence<object> transfer = [];
- };
-
- /* ---------------------- MIDIAccess ----------------------------- */
- /* ./webidl/MIDIAccess.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIAccess : EventTarget {
- readonly attribute MIDIInputMap inputs;
- readonly attribute MIDIOutputMap outputs;
- attribute EventHandler onstatechange;
- readonly attribute boolean sysexEnabled;
- };
-
- /* ---------------------- MIDIConnectionEvent ----------------------------- */
- /* ./webidl/MIDIConnectionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext,
- Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIConnectionEvent : Event
- {
- constructor(DOMString type,
- optional MIDIConnectionEventInit eventInitDict = {});
- readonly attribute MIDIPort? port;
- };
- dictionary MIDIConnectionEventInit : EventInit
- {
- MIDIPort? port = null;
- };
-
- /* ---------------------- MIDIInput ----------------------------- */
- /* ./webidl/MIDIInput.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIInput : MIDIPort {
- attribute EventHandler onmidimessage;
- };
-
- /* ---------------------- MIDIInputMap ----------------------------- */
- /* ./webidl/MIDIInputMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIInputMap {
- readonly maplike<DOMString, MIDIInput>;
- };
-
- /* ---------------------- MIDIMessageEvent ----------------------------- */
- /* ./webidl/MIDIMessageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext,
- Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIMessageEvent : Event
- {
- [Throws]
- constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {});
- [Throws]
- readonly attribute Uint8Array data;
- };
- dictionary MIDIMessageEventInit : EventInit
- {
- Uint8Array data;
- };
-
- /* ---------------------- MIDIOptions ----------------------------- */
- /* ./webidl/MIDIOptions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- dictionary MIDIOptions {
- boolean sysex = false;
- boolean software = false;
- };
-
- /* ---------------------- MIDIOutput ----------------------------- */
- /* ./webidl/MIDIOutput.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIOutput : MIDIPort {
- [Throws]
- undefined send(sequence<octet> data, optional DOMHighResTimeStamp timestamp);
- undefined clear();
- };
-
- /* ---------------------- MIDIOutputMap ----------------------------- */
- /* ./webidl/MIDIOutputMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIOutputMap {
- readonly maplike<DOMString, MIDIOutput>;
- };
-
- /* ---------------------- MIDIPort ----------------------------- */
- /* ./webidl/MIDIPort.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-midi-api/
- */
- enum MIDIPortType {
- "input",
- "output"
- };
- enum MIDIPortDeviceState {
- "disconnected",
- "connected"
- };
- enum MIDIPortConnectionState {
- "open",
- "closed",
- "pending"
- };
- [SecureContext, Pref="dom.webmidi.enabled",
- Exposed=Window]
- interface MIDIPort : EventTarget {
- readonly attribute DOMString id;
- readonly attribute DOMString? manufacturer;
- readonly attribute DOMString? name;
- readonly attribute DOMString? version;
- readonly attribute MIDIPortType type;
- readonly attribute MIDIPortDeviceState state;
- readonly attribute MIDIPortConnectionState connection;
- attribute EventHandler onstatechange;
- [Throws]
- Promise<MIDIPort> open();
- [Throws]
- Promise<MIDIPort> close();
- };
-
- /* ---------------------- MimeType ----------------------------- */
- /* ./webidl/MimeType.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface MimeType {
- readonly attribute DOMString type;
- readonly attribute DOMString description;
- readonly attribute DOMString suffixes;
- readonly attribute Plugin enabledPlugin;
- };
-
- /* ---------------------- MimeTypeArray ----------------------------- */
- /* ./webidl/MimeTypeArray.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface MimeTypeArray {
- readonly attribute unsigned long length;
- getter MimeType? item(unsigned long index);
- getter MimeType? namedItem(DOMString name);
- };
-
- /* ---------------------- MouseEvent ----------------------------- */
- /* ./webidl/MouseEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- * https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface nsIScreen;
- [Exposed=Window]
- interface MouseEvent : UIEvent {
- constructor(DOMString typeArg,
- optional MouseEventInit mouseEventInitDict = {});
- [NeedsCallerType]
- readonly attribute long screenX;
- [NeedsCallerType]
- readonly attribute long screenY;
- [ChromeOnly]
- readonly attribute nsIScreen? screen;
- readonly attribute long pageX;
- readonly attribute long pageY;
- readonly attribute long clientX;
- readonly attribute long clientY;
- [BinaryName="clientX"]
- readonly attribute long x;
- [BinaryName="clientY"]
- readonly attribute long y;
- readonly attribute long offsetX;
- readonly attribute long offsetY;
- readonly attribute boolean ctrlKey;
- readonly attribute boolean shiftKey;
- readonly attribute boolean altKey;
- readonly attribute boolean metaKey;
- readonly attribute short button;
- readonly attribute unsigned short buttons;
- readonly attribute EventTarget? relatedTarget;
- // Pointer Lock
- readonly attribute long movementX;
- readonly attribute long movementY;
- // Deprecated in DOM Level 3:
- [Deprecated="InitMouseEvent"]
- undefined initMouseEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional Window? viewArg = null,
- optional long detailArg = 0,
- optional long screenXArg = 0,
- optional long screenYArg = 0,
- optional long clientXArg = 0,
- optional long clientYArg = 0,
- optional boolean ctrlKeyArg = false,
- optional boolean altKeyArg = false,
- optional boolean shiftKeyArg = false,
- optional boolean metaKeyArg = false,
- optional short buttonArg = 0,
- optional EventTarget? relatedTargetArg = null);
- // Introduced in DOM Level 3:
- boolean getModifierState(DOMString keyArg);
- };
- // Suggested initMouseEvent replacement initializer:
- dictionary MouseEventInit : EventModifierInit {
- // Attributes for MouseEvent:
- long screenX = 0;
- long screenY = 0;
- long clientX = 0;
- long clientY = 0;
- short button = 0;
- // Note: "buttons" was not previously initializable through initMouseEvent!
- unsigned short buttons = 0;
- EventTarget? relatedTarget = null;
- // Pointer Lock
- long movementX = 0;
- long movementY = 0;
- };
- // Mozilla extensions
- partial interface MouseEvent
- {
- // Finger or touch pressure event value
- // ranges between 0.0 and 1.0
- // TODO: Remove mozPressure. (bug 1534199)
- [Deprecated="MouseEvent_MozPressure"]
- readonly attribute float mozPressure;
- const unsigned short MOZ_SOURCE_UNKNOWN = 0;
- const unsigned short MOZ_SOURCE_MOUSE = 1;
- const unsigned short MOZ_SOURCE_PEN = 2;
- const unsigned short MOZ_SOURCE_ERASER = 3;
- const unsigned short MOZ_SOURCE_CURSOR = 4;
- const unsigned short MOZ_SOURCE_TOUCH = 5;
- const unsigned short MOZ_SOURCE_KEYBOARD = 6;
- [ChromeOnly]
- readonly attribute unsigned short inputSource;
- [Deprecated="MozInputSource", BinaryName="inputSource"]
- readonly attribute unsigned short mozInputSource;
- // TODO: Remove initNSMouseEvent. (bug 1165213)
- [Deprecated="InitNSMouseEvent"]
- undefined initNSMouseEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional Window? viewArg = null,
- optional long detailArg = 0,
- optional long screenXArg = 0,
- optional long screenYArg = 0,
- optional long clientXArg = 0,
- optional long clientYArg = 0,
- optional boolean ctrlKeyArg = false,
- optional boolean altKeyArg = false,
- optional boolean shiftKeyArg = false,
- optional boolean metaKeyArg = false,
- optional short buttonArg = 0,
- optional EventTarget? relatedTargetArg = null,
- optional float pressure = 0,
- optional unsigned short inputSourceArg = 0);
- /**
- * preventClickEvent() prevents the following "click", "auxclick" and
- * "dblclick" events of "mousedown" and "mouseup" events.
- */
- [ChromeOnly]
- undefined preventClickEvent();
- /**
- * Returns true if the following "click", "auxclick" and "dblclick"
- * events of "mousedown" and "mouseup" events are prevented.
- */
- [ChromeOnly]
- boolean clickEventPrevented();
- };
-
- /* ---------------------- MouseScrollEvent ----------------------------- */
- /* ./webidl/MouseScrollEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface MouseScrollEvent : MouseEvent
- {
- const long HORIZONTAL_AXIS = 1;
- const long VERTICAL_AXIS = 2;
- readonly attribute long axis;
- undefined initMouseScrollEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Window? view = null,
- optional long detail = 0,
- optional long screenX = 0,
- optional long screenY = 0,
- optional long clientX = 0,
- optional long clientY = 0,
- optional boolean ctrlKey = false,
- optional boolean altKey = false,
- optional boolean shiftKey = false,
- optional boolean metaKey = false,
- optional short button = 0,
- optional EventTarget? relatedTarget = null,
- optional long axis = 0);
- };
-
- /* ---------------------- MozApplicationEvent ----------------------------- */
- /* ./webidl/MozApplicationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [ChromeOnly,
- Exposed=Window]
- interface MozApplicationEvent : Event
- {
- constructor(DOMString type,
- optional MozApplicationEventInit eventInitDict = {});
- readonly attribute DOMApplication? application;
- };
- dictionary MozApplicationEventInit : EventInit
- {
- DOMApplication? application = null;
- };
-
- /* ---------------------- MozFrameLoaderOwner ----------------------------- */
- /* ./webidl/MozFrameLoaderOwner.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary RemotenessOptions {
- required UTF8String? remoteType;
- // Used to resume a given channel load within the target process. If present,
- // it will be used rather than the `src` & `srcdoc` attributes on the
- // frameloader to control the load behaviour.
- unsigned long long pendingSwitchID;
- // True if we have an existing channel that we will resume in the
- // target process, either via pendingSwitchID or using messageManager.
- boolean switchingInProgressLoad = false;
- };
- /**
- * A mixin included by elements that are 'browsing context containers'
- * in HTML5 terms (that is, elements such as iframe that creates a new
- * browsing context):
- *
- * https://html.spec.whatwg.org/#browsing-context-container
- *
- * Objects including this mixin must implement nsFrameLoaderOwner in
- * native C++ code.
- */
- interface mixin MozFrameLoaderOwner {
- [ChromeOnly]
- readonly attribute FrameLoader? frameLoader;
- [ChromeOnly]
- readonly attribute BrowsingContext? browsingContext;
- [ChromeOnly, Throws]
- undefined swapFrameLoaders(XULFrameElement aOtherLoaderOwner);
- [ChromeOnly, Throws]
- undefined swapFrameLoaders(HTMLIFrameElement aOtherLoaderOwner);
- [ChromeOnly, Throws]
- undefined changeRemoteness(RemotenessOptions aOptions);
- };
-
- /* ---------------------- MutationEvent ----------------------------- */
- /* ./webidl/MutationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface MutationEvent : Event
- {
- const unsigned short MODIFICATION = 1;
- const unsigned short ADDITION = 2;
- const unsigned short REMOVAL = 3;
- [ChromeOnly]
- const unsigned short SMIL = 4;
- readonly attribute Node? relatedNode;
- readonly attribute DOMString prevValue;
- readonly attribute DOMString newValue;
- readonly attribute DOMString attrName;
- readonly attribute unsigned short attrChange;
- [Throws]
- undefined initMutationEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Node? relatedNode = null,
- optional DOMString prevValue = "",
- optional DOMString newValue = "",
- optional DOMString attrName = "",
- optional unsigned short attrChange = 0);
- };
-
- /* ---------------------- MutationObserver ----------------------------- */
- /* ./webidl/MutationObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org
- */
- [ProbablyShortLivingWrapper,
- Exposed=Window]
- interface MutationRecord {
- [Constant]
- readonly attribute DOMString type;
- // .target is not nullable per the spec, but in order to prevent crashes,
- // if there are GC/CC bugs in Gecko, we let the property to be null.
- [Constant]
- readonly attribute Node? target;
- [Constant]
- readonly attribute NodeList addedNodes;
- [Constant]
- readonly attribute NodeList removedNodes;
- [Constant]
- readonly attribute Node? previousSibling;
- [Constant]
- readonly attribute Node? nextSibling;
- [Constant]
- readonly attribute DOMString? attributeName;
- [Constant]
- readonly attribute DOMString? attributeNamespace;
- [Constant]
- readonly attribute DOMString? oldValue;
- [Constant, Cached, ChromeOnly]
- readonly attribute sequence<Animation> addedAnimations;
- [Constant, Cached, ChromeOnly]
- readonly attribute sequence<Animation> changedAnimations;
- [Constant, Cached, ChromeOnly]
- readonly attribute sequence<Animation> removedAnimations;
- };
- [Exposed=Window]
- interface MutationObserver {
- [Throws]
- constructor(MutationCallback mutationCallback);
- [Throws, NeedsSubjectPrincipal]
- undefined observe(Node target, optional MutationObserverInit options = {});
- undefined disconnect();
- sequence<MutationRecord> takeRecords();
- [ChromeOnly, Throws]
- sequence<MutationObservingInfo?> getObservingInfo();
- [ChromeOnly]
- readonly attribute MutationCallback mutationCallback;
- [ChromeOnly]
- attribute boolean mergeAttributeRecords;
- };
- callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer);
- dictionary MutationObserverInit {
- boolean childList = false;
- boolean attributes;
- boolean characterData;
- boolean subtree = false;
- boolean attributeOldValue;
- boolean characterDataOldValue;
- [ChromeOnly]
- boolean chromeOnlyNodes = false;
- [ChromeOnly]
- boolean animations = false;
- sequence<DOMString> attributeFilter;
- };
- dictionary MutationObservingInfo : MutationObserverInit
- {
- Node? observedNode = null;
- };
-
- /* ---------------------- NamedNodeMap ----------------------------- */
- /* ./webidl/NamedNodeMap.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface NamedNodeMap {
- getter Attr? getNamedItem(DOMString name);
- [CEReactions, Throws, BinaryName="setNamedItemNS"]
- Attr? setNamedItem(Attr arg);
- [CEReactions, Throws]
- Attr removeNamedItem(DOMString name);
- getter Attr? item(unsigned long index);
- readonly attribute unsigned long length;
- Attr? getNamedItemNS(DOMString? namespaceURI, DOMString localName);
- [CEReactions, Throws]
- Attr? setNamedItemNS(Attr arg);
- [CEReactions, Throws]
- Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
- };
-
- /* ---------------------- NavigationPreloadManager ----------------------------- */
- /* ./webidl/NavigationPreloadManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/ServiceWorker/#navigation-preload-manager
- */
- [Func="NavigationPreloadManager::IsEnabled", SecureContext,
- Exposed=(Window,Worker)]
- interface NavigationPreloadManager {
- [NewObject]
- Promise<undefined> enable();
- [NewObject]
- Promise<undefined> disable();
- [NewObject]
- Promise<undefined> setHeaderValue(ByteString value);
- [NewObject]
- Promise<NavigationPreloadState> getState();
- };
- dictionary NavigationPreloadState {
- boolean enabled = false;
- ByteString headerValue;
- };
-
- /* ---------------------- Navigator ----------------------------- */
- /* ./webidl/Navigator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/#the-navigator-object
- * http://www.w3.org/TR/tracking-dnt/
- * http://www.w3.org/TR/geolocation-API/#geolocation_interface
- * http://www.w3.org/TR/battery-status/#navigatorbattery-interface
- * http://www.w3.org/TR/vibration/#vibration-interface
- * http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1
- * https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
- * http://www.w3.org/TR/beacon/#sec-beacon-method
- * https://html.spec.whatwg.org/#navigatorconcurrenthardware
- * http://wicg.github.io/netinfo/#extensions-to-the-navigator-interface
- * https://w3c.github.io/webappsec-credential-management/#framework-credential-management
- * https://w3c.github.io/webdriver/webdriver-spec.html#interface
- * https://wicg.github.io/media-capabilities/#idl-index
- * https://w3c.github.io/mediasession/#idl-index
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- interface URI;
- // https://html.spec.whatwg.org/#the-navigator-object
- [HeaderFile="Navigator.h",
- Exposed=Window,
- InstrumentedProps=(canShare,
- clearAppBadge,
- setAppBadge,
- share,
- userActivation,
- wakeLock)]
- interface Navigator {
- // objects implementing this interface also implement the interfaces given below
- };
- Navigator includes NavigatorID;
- Navigator includes NavigatorLanguage;
- Navigator includes NavigatorOnLine;
- Navigator includes NavigatorContentUtils;
- Navigator includes NavigatorStorageUtils;
- Navigator includes NavigatorConcurrentHardware;
- Navigator includes NavigatorStorage;
- Navigator includes NavigatorAutomationInformation;
- Navigator includes NavigatorGPU;
- Navigator includes GlobalPrivacyControl;
- interface mixin NavigatorID {
- // WebKit/Blink/Trident/Presto support this (hardcoded "Mozilla").
- [Constant, Cached, Throws]
- readonly attribute DOMString appCodeName; // constant "Mozilla"
- [Constant, Cached]
- readonly attribute DOMString appName; // constant "Netscape"
- [Constant, Cached, Throws, NeedsCallerType]
- readonly attribute DOMString appVersion;
- [Pure, Cached, Throws, NeedsCallerType]
- readonly attribute DOMString platform;
- [Pure, Cached, Throws, NeedsCallerType]
- readonly attribute DOMString userAgent;
- [Constant, Cached]
- readonly attribute DOMString product; // constant "Gecko"
- // Everyone but WebKit/Blink supports this. See bug 679971.
- [Exposed=Window]
- boolean taintEnabled(); // constant false
- };
- interface mixin NavigatorLanguage {
- // These two attributes are cached because this interface is also implemented
- // by Workernavigator and this way we don't have to go back to the
- // main-thread from the worker thread anytime we need to retrieve them. They
- // are updated when pref intl.accept_languages is changed.
- [Pure, Cached]
- readonly attribute DOMString? language;
- [Pure, Cached, Frozen]
- readonly attribute sequence<DOMString> languages;
- };
- interface mixin NavigatorOnLine {
- readonly attribute boolean onLine;
- };
- interface mixin NavigatorContentUtils {
- // content handler registration
- [Throws, ChromeOnly]
- undefined checkProtocolHandlerAllowed(DOMString scheme, URI handlerURI, URI documentURI);
- [Throws, SecureContext]
- undefined registerProtocolHandler(DOMString scheme, DOMString url);
- // NOT IMPLEMENTED
- //undefined unregisterProtocolHandler(DOMString scheme, DOMString url);
- };
- [SecureContext]
- interface mixin NavigatorStorage {
- readonly attribute StorageManager storage;
- };
- interface mixin NavigatorStorageUtils {
- // NOT IMPLEMENTED
- //undefined yieldForStorageUpdates();
- };
- partial interface Navigator {
- [Throws]
- readonly attribute Permissions permissions;
- };
- partial interface Navigator {
- [Throws, SameObject]
- readonly attribute MimeTypeArray mimeTypes;
- [Throws, SameObject]
- readonly attribute PluginArray plugins;
- readonly attribute boolean pdfViewerEnabled;
- };
- // http://www.w3.org/TR/tracking-dnt/ sort of
- partial interface Navigator {
- readonly attribute DOMString doNotTrack;
- };
- // https://globalprivacycontrol.github.io/gpc-spec/
- interface mixin GlobalPrivacyControl {
- [Pref="privacy.globalprivacycontrol.functionality.enabled"]
- readonly attribute boolean globalPrivacyControl;
- };
- // http://www.w3.org/TR/geolocation-API/#geolocation_interface
- interface mixin NavigatorGeolocation {
- [Throws, Pref="geo.enabled"]
- readonly attribute Geolocation geolocation;
- };
- Navigator includes NavigatorGeolocation;
- // http://www.w3.org/TR/battery-status/#navigatorbattery-interface
- partial interface Navigator {
- // ChromeOnly to prevent web content from fingerprinting users' batteries.
- [Throws, ChromeOnly, Pref="dom.battery.enabled"]
- Promise<BatteryManager> getBattery();
- };
- // http://www.w3.org/TR/vibration/#vibration-interface
- partial interface Navigator {
- // We don't support sequences in unions yet
- //boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
- boolean vibrate(unsigned long duration);
- boolean vibrate(sequence<unsigned long> pattern);
- };
- // http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface
- partial interface Navigator {
- [NeedsCallerType]
- readonly attribute long maxTouchPoints;
- };
- // https://wicg.github.io/media-capabilities/#idl-index
- [Exposed=Window]
- partial interface Navigator {
- [SameObject, Func="mozilla::dom::MediaCapabilities::Enabled"]
- readonly attribute MediaCapabilities mediaCapabilities;
- };
- // Mozilla-specific extensions
- // Chrome-only interface for Vibration API permission handling.
- partial interface Navigator {
- /* Set permission state to device vibration.
- * @param permitted permission state (true for allowing vibration)
- * @param persistent make the permission session-persistent
- */
- [ChromeOnly]
- undefined setVibrationPermission(boolean permitted,
- optional boolean persistent = true);
- };
- partial interface Navigator {
- [Throws, Constant, Cached, NeedsCallerType]
- readonly attribute DOMString oscpu;
- // WebKit/Blink support this; Trident/Presto do not.
- readonly attribute DOMString vendor;
- // WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
- readonly attribute DOMString vendorSub;
- // WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
- readonly attribute DOMString productSub;
- // WebKit/Blink/Trident/Presto support this.
- readonly attribute boolean cookieEnabled;
- [Throws, Constant, Cached, NeedsCallerType]
- readonly attribute DOMString buildID;
- // WebKit/Blink/Trident/Presto support this.
- [Affects=Nothing, DependsOn=Nothing]
- boolean javaEnabled();
- };
- // Addon manager bits
- partial interface Navigator {
- [Throws, Func="mozilla::AddonManagerWebAPI::IsAPIEnabled"]
- readonly attribute AddonManager mozAddonManager;
- };
- // NetworkInformation
- partial interface Navigator {
- [Throws, Pref="dom.netinfo.enabled"]
- readonly attribute NetworkInformation connection;
- };
- // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
- partial interface Navigator {
- [Throws, Pref="dom.gamepad.enabled"]
- sequence<Gamepad?> getGamepads();
- };
- partial interface Navigator {
- [Throws, Pref="dom.gamepad.test.enabled"]
- GamepadServiceTest requestGamepadServiceTest();
- };
- // https://immersive-web.github.io/webvr/spec/1.1/#interface-navigator
- partial interface Navigator {
- [NewObject, SecureContext, Pref="dom.vr.enabled"]
- Promise<sequence<VRDisplay>> getVRDisplays();
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [SecureContext, Frozen, Cached, Pure, Pref="dom.vr.enabled"]
- readonly attribute sequence<VRDisplay> activeVRDisplays;
- [ChromeOnly, Pref="dom.vr.enabled"]
- readonly attribute boolean isWebVRContentDetected;
- [ChromeOnly, Pref="dom.vr.enabled"]
- readonly attribute boolean isWebVRContentPresenting;
- [ChromeOnly, Pref="dom.vr.enabled"]
- undefined requestVRPresentation(VRDisplay display);
- };
- partial interface Navigator {
- [Throws, Pref="dom.vr.puppet.enabled"]
- VRServiceTest requestVRServiceTest();
- };
- // https://immersive-web.github.io/webxr/#dom-navigator-xr
- partial interface Navigator {
- [SecureContext, SameObject, Throws, Pref="dom.vr.webxr.enabled"]
- readonly attribute XRSystem xr;
- };
- // http://webaudio.github.io/web-midi-api/#requestmidiaccess
- partial interface Navigator {
- [NewObject, Func="Navigator::HasMidiSupport"]
- Promise<MIDIAccess> requestMIDIAccess(optional MIDIOptions options = {});
- };
- callback NavigatorUserMediaSuccessCallback = undefined (MediaStream stream);
- callback NavigatorUserMediaErrorCallback = undefined (MediaStreamError error);
- partial interface Navigator {
- [Throws, Func="Navigator::HasUserMediaSupport"]
- readonly attribute MediaDevices mediaDevices;
- // Deprecated. Use mediaDevices.getUserMedia instead.
- [Deprecated="NavigatorGetUserMedia", Throws,
- Func="Navigator::HasUserMediaSupport",
- NeedsCallerType,
- UseCounter]
- undefined mozGetUserMedia(MediaStreamConstraints constraints,
- NavigatorUserMediaSuccessCallback successCallback,
- NavigatorUserMediaErrorCallback errorCallback);
- };
- // Service Workers/Navigation Controllers
- partial interface Navigator {
- [Func="ServiceWorkersEnabled", SameObject, BinaryName="serviceWorkerJS"]
- readonly attribute ServiceWorkerContainer serviceWorker;
- };
- partial interface Navigator {
- [Throws, Pref="beacon.enabled"]
- boolean sendBeacon(DOMString url,
- optional BodyInit? data = null);
- };
- partial interface Navigator {
- [NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
- readonly attribute LegacyMozTCPSocket mozTCPSocket;
- };
- partial interface Navigator {
- [NewObject]
- Promise<MediaKeySystemAccess>
- requestMediaKeySystemAccess(DOMString keySystem,
- sequence<MediaKeySystemConfiguration> supportedConfigurations);
- };
- interface mixin NavigatorConcurrentHardware {
- readonly attribute unsigned long long hardwareConcurrency;
- };
- // https://w3c.github.io/webappsec-credential-management/#framework-credential-management
- partial interface Navigator {
- [Pref="security.webauth.webauthn", SecureContext, SameObject]
- readonly attribute CredentialsContainer credentials;
- };
- // https://w3c.github.io/webdriver/webdriver-spec.html#interface
- interface mixin NavigatorAutomationInformation {
- [Constant, Cached]
- readonly attribute boolean webdriver;
- };
- // https://www.w3.org/TR/clipboard-apis/#navigator-interface
- partial interface Navigator {
- [SecureContext, SameObject]
- readonly attribute Clipboard clipboard;
- };
- // Used for testing of origin trials.
- partial interface Navigator {
- [Trial="TestTrial"]
- readonly attribute boolean testTrialGatedAttribute;
- };
- // https://wicg.github.io/web-share/#navigator-interface
- partial interface Navigator {
- [SecureContext, NewObject, Func="Navigator::HasShareSupport"]
- Promise<undefined> share(optional ShareData data = {});
- [SecureContext, Func="Navigator::HasShareSupport"]
- boolean canShare(optional ShareData data = {});
- };
- // https://wicg.github.io/web-share/#sharedata-dictionary
- dictionary ShareData {
- USVString title;
- USVString text;
- USVString url;
- // Note: we don't actually support files yet
- // we have it here for the .canShare() checks.
- sequence<File> files;
- };
- // https://w3c.github.io/mediasession/#idl-index
- [Exposed=Window]
- partial interface Navigator {
- [SameObject]
- readonly attribute MediaSession mediaSession;
- };
- // https://w3c.github.io/web-locks/#navigator-mixins
- [SecureContext]
- interface mixin NavigatorLocks {
- readonly attribute LockManager locks;
- };
- Navigator includes NavigatorLocks;
- // https://w3c.github.io/autoplay/#autoplay-policy
- enum AutoplayPolicy {
- "allowed",
- "allowed-muted",
- "disallowed"
- };
- enum AutoplayPolicyMediaType {
- "mediaelement",
- "audiocontext"
- };
- // https://w3c.github.io/autoplay/#autoplay-detection-methods
- partial interface Navigator {
- [Pref="dom.media.autoplay-policy-detection.enabled"]
- AutoplayPolicy getAutoplayPolicy(AutoplayPolicyMediaType type);
- [Pref="dom.media.autoplay-policy-detection.enabled"]
- AutoplayPolicy getAutoplayPolicy(HTMLMediaElement element);
- [Pref="dom.media.autoplay-policy-detection.enabled"]
- AutoplayPolicy getAutoplayPolicy(AudioContext context);
- };
- // https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface
- partial interface Navigator {
- [SameObject] readonly attribute UserActivation userActivation;
- };
- // https://w3c.github.io/screen-wake-lock/#extensions-to-the-navigator-interface
- [SecureContext]
- partial interface Navigator {
- [SameObject, Pref="dom.screenwakelock.enabled"]
- readonly attribute WakeLock wakeLock;
- };
-
- /* ---------------------- NetErrorInfo ----------------------------- */
- /* ./webidl/NetErrorInfo.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * This dictionary is used for exposing failed channel info
- * to about:neterror to built UI.
- */
- dictionary NetErrorInfo {
- DOMString errorCodeString = "";
- };
-
- /* ---------------------- NetworkInformation ----------------------------- */
- /* ./webidl/NetworkInformation.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is https://w3c.github.io/netinfo/
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum ConnectionType {
- "cellular",
- "bluetooth",
- "ethernet",
- "wifi",
- "other",
- "none",
- "unknown"
- };
- [Pref="dom.netinfo.enabled",
- Exposed=(Window,Worker)]
- interface NetworkInformation : EventTarget {
- readonly attribute ConnectionType type;
- attribute EventHandler ontypechange;
- };
-
- /* ---------------------- NetworkOptions ----------------------------- */
- /* ./webidl/NetworkOptions.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * This dictionary holds the parameters sent to the network worker.
- */
- dictionary NetworkCommandOptions
- {
- long id = 0; // opaque id.
- DOMString cmd = ""; // the command name.
- DOMString ifname; // for "removeNetworkRoute", "setDNS",
- // "setDefaultRouteAndDNS", "removeDefaultRoute"
- // "addHostRoute", "removeHostRoute"
- // "removeHostRoutes".
- DOMString ip; // for "removeNetworkRoute", "setWifiTethering".
- unsigned long prefixLength; // for "removeNetworkRoute".
- DOMString domain; // for "setDNS"
- sequence<DOMString> dnses; // for "setDNS", "setDefaultRouteAndDNS".
- DOMString gateway; // for "addSecondaryRoute", "removeSecondaryRoute".
- sequence<DOMString> gateways; // for "setDefaultRouteAndDNS", "removeDefaultRoute".
- DOMString mode; // for "setWifiOperationMode".
- boolean report; // for "setWifiOperationMode".
- boolean enabled; // for "setDhcpServer".
- DOMString wifictrlinterfacename; // for "setWifiTethering".
- DOMString internalIfname; // for "setWifiTethering".
- DOMString externalIfname; // for "setWifiTethering".
- boolean enable; // for "setWifiTethering".
- DOMString ssid; // for "setWifiTethering".
- DOMString security; // for "setWifiTethering".
- DOMString key; // for "setWifiTethering".
- DOMString prefix; // for "setWifiTethering", "setDhcpServer".
- DOMString link; // for "setWifiTethering", "setDhcpServer".
- sequence<DOMString> interfaceList; // for "setWifiTethering".
- DOMString wifiStartIp; // for "setWifiTethering".
- DOMString wifiEndIp; // for "setWifiTethering".
- DOMString usbStartIp; // for "setWifiTethering".
- DOMString usbEndIp; // for "setWifiTethering".
- DOMString dns1; // for "setWifiTethering".
- DOMString dns2; // for "setWifiTethering".
- long long threshold; // for "setNetworkInterfaceAlarm",
- // "enableNetworkInterfaceAlarm".
- DOMString startIp; // for "setDhcpServer".
- DOMString endIp; // for "setDhcpServer".
- DOMString serverIp; // for "setDhcpServer".
- DOMString maskLength; // for "setDhcpServer".
- DOMString preInternalIfname; // for "updateUpStream".
- DOMString preExternalIfname; // for "updateUpStream".
- DOMString curInternalIfname; // for "updateUpStream".
- DOMString curExternalIfname; // for "updateUpStream".
- long ipaddr; // for "ifc_configure".
- long mask; // for "ifc_configure".
- long gateway_long; // for "ifc_configure".
- long dns1_long; // for "ifc_configure".
- long dns2_long; // for "ifc_configure".
- long mtu; // for "setMtu".
- };
- /**
- * This dictionary holds the parameters sent back to NetworkService.js.
- */
- dictionary NetworkResultOptions
- {
- long id = 0; // opaque id.
- boolean ret = false; // for sync command.
- boolean broadcast = false; // for netd broadcast message.
- DOMString topic = ""; // for netd broadcast message.
- DOMString reason = ""; // for netd broadcast message.
- long resultCode = 0; // for all commands.
- DOMString resultReason = ""; // for all commands.
- boolean error = false; // for all commands.
- boolean enable = false; // for "setWifiTethering", "setUSBTethering"
- // "enableUsbRndis".
- boolean result = false; // for "enableUsbRndis".
- boolean success = false; // for "setDhcpServer".
- DOMString curExternalIfname = ""; // for "updateUpStream".
- DOMString curInternalIfname = ""; // for "updateUpStream".
- DOMString reply = ""; // for "command".
- DOMString route = ""; // for "ifc_get_default_route".
- DOMString ipaddr_str = ""; // The following are for the result of
- // dhcp_do_request.
- DOMString gateway_str = "";
- DOMString dns1_str = "";
- DOMString dns2_str = "";
- DOMString mask_str = "";
- DOMString server_str = "";
- DOMString vendor_str = "";
- long lease = 0;
- long prefixLength = 0;
- long mask = 0;
- long ipaddr = 0;
- long gateway = 0;
- long dns1 = 0;
- long dns2 = 0;
- long server = 0;
- DOMString netId = ""; // for "getNetId".
- sequence<DOMString> interfaceList; // for "getInterfaceList".
- DOMString flag = "down"; // for "getInterfaceConfig".
- DOMString macAddr = ""; // for "getInterfaceConfig".
- DOMString ipAddr = ""; // for "getInterfaceConfig".
- };
-
- /* ---------------------- Node ----------------------------- */
- /* ./webidl/Node.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface Principal;
- interface URI;
- [Exposed=Window]
- interface Node : EventTarget {
- const unsigned short ELEMENT_NODE = 1;
- const unsigned short ATTRIBUTE_NODE = 2; // historical
- const unsigned short TEXT_NODE = 3;
- const unsigned short CDATA_SECTION_NODE = 4; // historical
- const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
- const unsigned short ENTITY_NODE = 6; // historical
- const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
- const unsigned short COMMENT_NODE = 8;
- const unsigned short DOCUMENT_NODE = 9;
- const unsigned short DOCUMENT_TYPE_NODE = 10;
- const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
- const unsigned short NOTATION_NODE = 12; // historical
- [Constant]
- readonly attribute unsigned short nodeType;
- [Pure]
- readonly attribute DOMString nodeName;
- [Pure, Throws, NeedsCallerType, BinaryName="baseURIFromJS"]
- readonly attribute DOMString? baseURI;
- [Pure, BinaryName=isInComposedDoc]
- readonly attribute boolean isConnected;
- [Pure]
- readonly attribute Document? ownerDocument;
- [Pure]
- Node getRootNode(optional GetRootNodeOptions options = {});
- [Pure]
- readonly attribute Node? parentNode;
- [Pure]
- readonly attribute Element? parentElement;
- [Pure]
- boolean hasChildNodes();
- [SameObject]
- readonly attribute NodeList childNodes;
- [Pure]
- readonly attribute Node? firstChild;
- [Pure]
- readonly attribute Node? lastChild;
- [Pure]
- readonly attribute Node? previousSibling;
- [Pure]
- readonly attribute Node? nextSibling;
- [CEReactions, SetterThrows, Pure]
- attribute DOMString? nodeValue;
- [CEReactions, SetterThrows, GetterCanOOM,
- SetterNeedsSubjectPrincipal=NonSystem, Pure]
- attribute DOMString? textContent;
- // These DOM methods cannot be accessed by UA Widget scripts
- // because the DOM element reflectors will be in the content scope,
- // instead of the desired UA Widget scope.
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node insertBefore(Node node, Node? child);
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node appendChild(Node node);
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node replaceChild(Node node, Node child);
- [CEReactions, Throws]
- Node removeChild(Node child);
- [CEReactions]
- undefined normalize();
- [CEReactions, Throws, Func="IsNotUAWidget"]
- Node cloneNode(optional boolean deep = false);
- [Pure]
- boolean isSameNode(Node? node);
- [Pure]
- boolean isEqualNode(Node? node);
- const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
- const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
- const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
- const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
- const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
- const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; // historical
- [Pure]
- unsigned short compareDocumentPosition(Node other);
- [Pure]
- boolean contains(Node? other);
- [Pure]
- DOMString? lookupPrefix(DOMString? namespace);
- [Pure]
- DOMString? lookupNamespaceURI(DOMString? prefix);
- [Pure]
- boolean isDefaultNamespace(DOMString? namespace);
- // Mozilla-specific stuff
- [ChromeOnly]
- readonly attribute Principal nodePrincipal;
- [ChromeOnly]
- readonly attribute URI? baseURIObject;
- [ChromeOnly]
- DOMString generateXPath();
- [ChromeOnly, Pure, BinaryName="flattenedTreeParentNodeNonInline"]
- readonly attribute Node? flattenedTreeParentNode;
- [ChromeOnly, Pure, BinaryName="isInNativeAnonymousSubtree"]
- readonly attribute boolean isNativeAnonymous;
- // Maybe this would be useful to authors? https://github.com/whatwg/dom/issues/826
- [Func="IsChromeOrUAWidget", Pure, BinaryName="containingShadow"]
- readonly attribute ShadowRoot? containingShadowRoot;
- // Mozilla devtools-specific stuff
- /**
- * If this element is a flex item (or has one or more anonymous box ancestors
- * that chain up to an anonymous flex item), then this method returns the
- * flex container that the flex item participates in. Otherwise, this method
- * returns null.
- */
- [ChromeOnly]
- readonly attribute Element? parentFlexElement;
- #ifdef ACCESSIBILITY
- [Func="mozilla::dom::AccessibleNode::IsAOMEnabled", SameObject]
- readonly attribute AccessibleNode? accessibleNode;
- #endif
- };
- dictionary GetRootNodeOptions {
- boolean composed = false;
- };
-
- /* ---------------------- NodeFilter ----------------------------- */
- /* ./webidl/NodeFilter.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#interface-nodefilter
- */
- [Exposed=Window]
- callback interface NodeFilter {
- // Constants for acceptNode()
- const unsigned short FILTER_ACCEPT = 1;
- const unsigned short FILTER_REJECT = 2;
- const unsigned short FILTER_SKIP = 3;
- // Constants for whatToShow
- const unsigned long SHOW_ALL = 0xFFFFFFFF;
- const unsigned long SHOW_ELEMENT = 0x1;
- const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
- const unsigned long SHOW_TEXT = 0x4;
- const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
- const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
- const unsigned long SHOW_ENTITY = 0x20; // historical
- const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
- const unsigned long SHOW_COMMENT = 0x80;
- const unsigned long SHOW_DOCUMENT = 0x100;
- const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
- const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
- const unsigned long SHOW_NOTATION = 0x800; // historical
- unsigned short acceptNode(Node node);
- };
-
- /* ---------------------- NodeIterator ----------------------------- */
- /* ./webidl/NodeIterator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface NodeIterator {
- [Constant]
- readonly attribute Node root;
- [Pure]
- readonly attribute Node? referenceNode;
- [Pure]
- readonly attribute boolean pointerBeforeReferenceNode;
- [Constant]
- readonly attribute unsigned long whatToShow;
- [Constant]
- readonly attribute NodeFilter? filter;
- [Throws]
- Node? nextNode();
- [Throws]
- Node? previousNode();
- undefined detach();
- };
-
- /* ---------------------- NodeList ----------------------------- */
- /* ./webidl/NodeList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [ProbablyShortLivingWrapper,
- Exposed=Window]
- interface NodeList {
- getter Node? item(unsigned long index);
- readonly attribute unsigned long length;
- iterable<Node?>;
- };
-
- /* ---------------------- NonElementParentNode ----------------------------- */
- /* ./webidl/NonElementParentNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#nonelementparentnode
- */
- interface mixin NonElementParentNode {
- [Pure]
- Element? getElementById(DOMString elementId);
- };
-
- /* ---------------------- Notification ----------------------------- */
- /* ./webidl/Notification.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://notifications.spec.whatwg.org/
- *
- * Copyright:
- * To the extent possible under law, the editors have waived all copyright and
- * related or neighboring rights to this work.
- */
- [Exposed=(Window,Worker),
- Func="mozilla::dom::Notification::PrefEnabled"]
- interface Notification : EventTarget {
- [Throws]
- constructor(DOMString title, optional NotificationOptions options = {});
- [GetterThrows]
- static readonly attribute NotificationPermission permission;
- [NewObject, Func="mozilla::dom::Notification::RequestPermissionEnabledForScope"]
- static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback permissionCallback);
- attribute EventHandler onclick;
- attribute EventHandler onshow;
- attribute EventHandler onerror;
- attribute EventHandler onclose;
- [Pure]
- readonly attribute DOMString title;
- [Pure]
- readonly attribute NotificationDirection dir;
- [Pure]
- readonly attribute DOMString? lang;
- [Pure]
- readonly attribute DOMString? body;
- [Constant]
- readonly attribute DOMString? tag;
- [Pure]
- readonly attribute DOMString? icon;
- [Constant, Pref="dom.webnotifications.requireinteraction.enabled"]
- readonly attribute boolean requireInteraction;
- [Constant, Pref="dom.webnotifications.silent.enabled"]
- readonly attribute boolean silent;
- [Cached, Frozen, Pure, Pref="dom.webnotifications.vibrate.enabled"]
- readonly attribute sequence<unsigned long> vibrate;
- [Constant]
- readonly attribute any data;
- undefined close();
- };
- typedef (unsigned long or sequence<unsigned long>) VibratePattern;
- dictionary NotificationOptions {
- NotificationDirection dir = "auto";
- DOMString lang = "";
- DOMString body = "";
- DOMString tag = "";
- DOMString icon = "";
- boolean requireInteraction = false;
- boolean silent = false;
- VibratePattern vibrate;
- any data = null;
- NotificationBehavior mozbehavior = {};
- };
- dictionary GetNotificationOptions {
- DOMString tag = "";
- };
- [GenerateToJSON]
- dictionary NotificationBehavior {
- boolean noscreen = false;
- boolean noclear = false;
- boolean showOnlyOnce = false;
- DOMString soundFile = "";
- sequence<unsigned long> vibrationPattern;
- };
- enum NotificationPermission {
- "default",
- "denied",
- "granted"
- };
- callback NotificationPermissionCallback = undefined (NotificationPermission permission);
- enum NotificationDirection {
- "auto",
- "ltr",
- "rtl"
- };
-
- /* ---------------------- NotificationEvent ----------------------------- */
- /* ./webidl/NotificationEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://notifications.spec.whatwg.org/
- *
- * Copyright:
- * To the extent possible under law, the editors have waived all copyright and
- * related or neighboring rights to this work.
- */
- [Exposed=ServiceWorker,Func="mozilla::dom::Notification::PrefEnabled"]
- interface NotificationEvent : ExtendableEvent {
- constructor(DOMString type, NotificationEventInit eventInitDict);
- [BinaryName="notification_"]
- readonly attribute Notification notification;
- };
- dictionary NotificationEventInit : ExtendableEventInit {
- required Notification notification;
- };
-
- /* ---------------------- NotifyPaintEvent ----------------------------- */
- /* ./webidl/NotifyPaintEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * The NotifyPaintEvent interface is used for the MozDOMAfterPaint
- * event, which fires at a window when painting has happened in
- * that window.
- */
- [ChromeOnly,
- Exposed=Window]
- interface NotifyPaintEvent : Event
- {
- /**
- * Get a list of rectangles which are affected. The rectangles are
- * in CSS pixels relative to the viewport origin.
- */
- [ChromeOnly, NeedsCallerType]
- readonly attribute DOMRectList clientRects;
- /**
- * Get the bounding box of the rectangles which are affected. The rectangle
- * is in CSS pixels relative to the viewport origin.
- */
- [ChromeOnly, NeedsCallerType]
- readonly attribute DOMRect boundingClientRect;
- [ChromeOnly, NeedsCallerType]
- readonly attribute PaintRequestList paintRequests;
- [ChromeOnly, NeedsCallerType]
- readonly attribute unsigned long long transactionId;
- [ChromeOnly, NeedsCallerType]
- readonly attribute DOMHighResTimeStamp paintTimeStamp;
- };
-
- /* ---------------------- OfflineAudioCompletionEvent ----------------------------- */
- /* ./webidl/OfflineAudioCompletionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary OfflineAudioCompletionEventInit : EventInit {
- required AudioBuffer renderedBuffer;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface OfflineAudioCompletionEvent : Event {
- constructor(DOMString type, OfflineAudioCompletionEventInit eventInitDict);
- readonly attribute AudioBuffer renderedBuffer;
- };
-
- /* ---------------------- OfflineAudioContext ----------------------------- */
- /* ./webidl/OfflineAudioContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary OfflineAudioContextOptions {
- unsigned long numberOfChannels = 1;
- required unsigned long length;
- required float sampleRate;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface OfflineAudioContext : BaseAudioContext {
- [Throws]
- constructor(OfflineAudioContextOptions contextOptions);
- [Throws]
- constructor(unsigned long numberOfChannels, unsigned long length,
- float sampleRate);
- [NewObject]
- Promise<AudioBuffer> startRendering();
- // TODO: Promise<undefined> suspend (double suspendTime);
- readonly attribute unsigned long length;
- attribute EventHandler oncomplete;
- };
-
- /* ---------------------- OffscreenCanvas ----------------------------- */
- /* ./webidl/OffscreenCanvas.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://html.spec.whatwg.org/#the-offscreencanvas-interface
- */
- typedef (OffscreenCanvasRenderingContext2D or ImageBitmapRenderingContext or WebGLRenderingContext or WebGL2RenderingContext or GPUCanvasContext) OffscreenRenderingContext;
- dictionary ImageEncodeOptions {
- DOMString type = "image/png";
- unrestricted double quality;
- };
- enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2", "webgpu" };
- [Exposed=(Window,Worker), Pref="gfx.offscreencanvas.enabled"]
- interface OffscreenCanvas : EventTarget {
- [Throws]
- constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height);
- [Pure, SetterThrows]
- attribute [EnforceRange] unsigned long width;
- [Pure, SetterThrows]
- attribute [EnforceRange] unsigned long height;
- [Throws]
- OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId,
- optional any contextOptions = null);
- [Throws]
- ImageBitmap transferToImageBitmap();
- [NewObject]
- Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {});
- attribute EventHandler oncontextlost;
- attribute EventHandler oncontextrestored;
- // Deprecated by convertToBlob
- [Deprecated="OffscreenCanvasToBlob", NewObject]
- Promise<Blob> toBlob(optional DOMString type = "",
- optional any encoderOptions);
- };
-
- /* ---------------------- OffscreenCanvasRenderingContext2D ----------------------------- */
- /* ./webidl/OffscreenCanvasRenderingContext2D.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface, please see
- * https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context
- */
- [Exposed=(Window,Worker), Pref="gfx.offscreencanvas.enabled"]
- interface OffscreenCanvasRenderingContext2D {
- [Throws]
- undefined commit();
- readonly attribute OffscreenCanvas canvas;
- };
- OffscreenCanvasRenderingContext2D includes CanvasState;
- OffscreenCanvasRenderingContext2D includes CanvasTransform;
- OffscreenCanvasRenderingContext2D includes CanvasCompositing;
- OffscreenCanvasRenderingContext2D includes CanvasImageSmoothing;
- OffscreenCanvasRenderingContext2D includes CanvasFillStrokeStyles;
- OffscreenCanvasRenderingContext2D includes CanvasShadowStyles;
- OffscreenCanvasRenderingContext2D includes CanvasFilters;
- OffscreenCanvasRenderingContext2D includes CanvasRect;
- OffscreenCanvasRenderingContext2D includes CanvasDrawPath;
- OffscreenCanvasRenderingContext2D includes CanvasText;
- OffscreenCanvasRenderingContext2D includes CanvasDrawImage;
- OffscreenCanvasRenderingContext2D includes CanvasImageData;
- OffscreenCanvasRenderingContext2D includes CanvasPathDrawingStyles;
- OffscreenCanvasRenderingContext2D includes CanvasTextDrawingStyles;
- OffscreenCanvasRenderingContext2D includes CanvasPathMethods;
-
- /* ---------------------- OscillatorNode ----------------------------- */
- /* ./webidl/OscillatorNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum OscillatorType {
- "sine",
- "square",
- "sawtooth",
- "triangle",
- "custom"
- };
- dictionary OscillatorOptions : AudioNodeOptions {
- OscillatorType type = "sine";
- float frequency = 440;
- float detune = 0;
- PeriodicWave periodicWave;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface OscillatorNode : AudioScheduledSourceNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional OscillatorOptions options = {});
- [SetterThrows]
- attribute OscillatorType type;
- readonly attribute AudioParam frequency; // in Hertz
- readonly attribute AudioParam detune; // in Cents
- undefined setPeriodicWave(PeriodicWave periodicWave);
- };
- // Mozilla extensions
- OscillatorNode includes AudioNodePassThrough;
-
- /* ---------------------- PageTransitionEvent ----------------------------- */
- /* ./webidl/PageTransitionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * The PageTransitionEvent interface is used for the pageshow and
- * pagehide events, which are generic events that apply to both page
- * load/unload and saving/restoring a document from session history.
- */
- [Exposed=Window]
- interface PageTransitionEvent : Event
- {
- constructor(DOMString type,
- optional PageTransitionEventInit eventInitDict = {});
- /**
- * Set to true if the document has been or will be persisted across
- * firing of the event. For example, if a document is being cached in
- * session history, |persisted| is true for the PageHide event.
- */
- readonly attribute boolean persisted;
- // Whether the document is in the middle of a frame swap.
- [ChromeOnly]
- readonly attribute boolean inFrameSwap;
- };
- dictionary PageTransitionEventInit : EventInit
- {
- boolean persisted = false;
- boolean inFrameSwap = false;
- };
-
- /* ---------------------- PaintRequest ----------------------------- */
- /* ./webidl/PaintRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * These objects are exposed by the MozDOMAfterPaint event. Each one represents
- * a request to repaint a rectangle that was generated by the browser.
- */
- [Exposed=Window]
- interface PaintRequest {
- /**
- * The client rect where invalidation was triggered.
- */
- readonly attribute DOMRect clientRect;
- /**
- * The reason for the request, as a string. If an empty string, then we don't know
- * the reason (this is common). Reasons include "scroll repaint", meaning that we
- * needed to repaint the rectangle due to scrolling, and "scroll copy", meaning
- * that we updated the rectangle due to scrolling but instead of painting
- * manually, we were able to do a copy from another area of the screen.
- */
- readonly attribute DOMString reason;
- };
-
- /* ---------------------- PaintRequestList ----------------------------- */
- /* ./webidl/PaintRequestList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface PaintRequestList {
- readonly attribute unsigned long length;
- getter PaintRequest? item(unsigned long index);
- };
-
- /* ---------------------- PaintWorkletGlobalScope ----------------------------- */
- /* ./webidl/PaintWorkletGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.css-houdini.org/css-paint-api-1/#paintworkletglobalscope
- */
- [Global=(Worklet,PaintWorklet),Exposed=PaintWorklet]
- interface PaintWorkletGlobalScope : WorkletGlobalScope {
- undefined registerPaint(DOMString name, VoidFunction paintCtor);
- };
-
- /* ---------------------- PannerNode ----------------------------- */
- /* ./webidl/PannerNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum PanningModelType {
- "equalpower",
- "HRTF"
- };
- enum DistanceModelType {
- "linear",
- "inverse",
- "exponential"
- };
- dictionary PannerOptions : AudioNodeOptions {
- PanningModelType panningModel = "equalpower";
- DistanceModelType distanceModel = "inverse";
- float positionX = 0;
- float positionY = 0;
- float positionZ = 0;
- float orientationX = 1;
- float orientationY = 0;
- float orientationZ = 0;
- double refDistance = 1;
- double maxDistance = 10000;
- double rolloffFactor = 1;
- double coneInnerAngle = 360;
- double coneOuterAngle = 360;
- double coneOuterGain = 0;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface PannerNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context, optional PannerOptions options = {});
- // Default for stereo is equalpower
- attribute PanningModelType panningModel;
- // Uses a 3D cartesian coordinate system
- [Throws]
- undefined setPosition(double x, double y, double z);
- [Throws]
- undefined setOrientation(double x, double y, double z);
- // Cartesian coordinate for position
- readonly attribute AudioParam positionX;
- readonly attribute AudioParam positionY;
- readonly attribute AudioParam positionZ;
- // Cartesian coordinate for orientation
- readonly attribute AudioParam orientationX;
- readonly attribute AudioParam orientationY;
- readonly attribute AudioParam orientationZ;
- // Distance model and attributes
- attribute DistanceModelType distanceModel;
- [SetterThrows]
- attribute double refDistance;
- [SetterThrows]
- attribute double maxDistance;
- [SetterThrows]
- attribute double rolloffFactor;
- // Directional sound cone
- attribute double coneInnerAngle;
- attribute double coneOuterAngle;
- [SetterThrows]
- attribute double coneOuterGain;
- };
- // Mozilla extension
- PannerNode includes AudioNodePassThrough;
-
- /* ---------------------- ParentNode ----------------------------- */
- /* ./webidl/ParentNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#interface-parentnode
- */
- interface mixin ParentNode {
- [Constant]
- readonly attribute HTMLCollection children;
- [Pure]
- readonly attribute Element? firstElementChild;
- [Pure]
- readonly attribute Element? lastElementChild;
- [Pure]
- readonly attribute unsigned long childElementCount;
- [ChromeOnly]
- HTMLCollection getElementsByAttribute(DOMString name,
- [LegacyNullToEmptyString] DOMString value);
- [ChromeOnly, Throws]
- HTMLCollection getElementsByAttributeNS(DOMString? namespaceURI, DOMString name,
- [LegacyNullToEmptyString] DOMString value);
- [CEReactions, Throws, Unscopable]
- undefined prepend((Node or DOMString)... nodes);
- [CEReactions, Throws, Unscopable]
- undefined append((Node or DOMString)... nodes);
- [CEReactions, Throws, Unscopable]
- undefined replaceChildren((Node or DOMString)... nodes);
- [Throws, Pure]
- Element? querySelector(UTF8String selectors);
- [Throws, Pure]
- NodeList querySelectorAll(UTF8String selectors);
- };
-
- /* ---------------------- PaymentAddress ----------------------------- */
- /* ./webidl/PaymentAddress.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://www.w3.org/TR/payment-request/#paymentaddress-interface
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext,
- Func="mozilla::dom::PaymentRequest::PrefEnabled",
- Exposed=Window]
- interface PaymentAddress {
- [Default] object toJSON();
- readonly attribute DOMString country;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- // readonly attribute FrozenArray<DOMString> addressLine;
- [Frozen, Cached, Pure]
- readonly attribute sequence<DOMString> addressLine;
- readonly attribute DOMString region;
- readonly attribute DOMString regionCode;
- readonly attribute DOMString city;
- readonly attribute DOMString dependentLocality;
- readonly attribute DOMString postalCode;
- readonly attribute DOMString sortingCode;
- readonly attribute DOMString organization;
- readonly attribute DOMString recipient;
- readonly attribute DOMString phone;
- };
-
- /* ---------------------- PaymentMethodChangeEvent ----------------------------- */
- /* ./webidl/PaymentMethodChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext,
- Exposed=Window,
- Func="mozilla::dom::PaymentRequest::PrefEnabled"]
- interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
- constructor(DOMString type,
- optional PaymentMethodChangeEventInit eventInitDict = {});
- readonly attribute DOMString methodName;
- readonly attribute object? methodDetails;
- };
- dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit {
- DOMString methodName = "";
- object? methodDetails = null;
- };
-
- /* ---------------------- PaymentRequest ----------------------------- */
- /* ./webidl/PaymentRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://w3c.github.io/payment-request/#paymentrequest-interface
- * https://w3c.github.io/payment-request/#idl-index
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary PaymentMethodData {
- required DOMString supportedMethods;
- object data;
- };
- dictionary PaymentCurrencyAmount {
- required DOMString currency;
- required DOMString value;
- };
- dictionary PaymentItem {
- required DOMString label;
- required PaymentCurrencyAmount amount;
- boolean pending = false;
- };
- dictionary PaymentShippingOption {
- required DOMString id;
- required DOMString label;
- required PaymentCurrencyAmount amount;
- boolean selected = false;
- };
- dictionary PaymentDetailsModifier {
- required DOMString supportedMethods;
- PaymentItem total;
- sequence<PaymentItem> additionalDisplayItems;
- object data;
- };
- dictionary PaymentDetailsBase {
- sequence<PaymentItem> displayItems;
- sequence<PaymentShippingOption> shippingOptions;
- sequence<PaymentDetailsModifier> modifiers;
- };
- dictionary PaymentDetailsInit : PaymentDetailsBase {
- DOMString id;
- required PaymentItem total;
- };
- [GenerateInitFromJSON, GenerateToJSON]
- dictionary AddressErrors {
- DOMString addressLine;
- DOMString city;
- DOMString country;
- DOMString dependentLocality;
- DOMString organization;
- DOMString phone;
- DOMString postalCode;
- DOMString recipient;
- DOMString region;
- DOMString regionCode;
- DOMString sortingCode;
- };
- dictionary PaymentValidationErrors {
- PayerErrors payer;
- AddressErrors shippingAddress;
- DOMString error;
- object paymentMethod;
- };
- [GenerateInitFromJSON, GenerateToJSON]
- dictionary PayerErrors {
- DOMString email;
- DOMString name;
- DOMString phone;
- };
- dictionary PaymentDetailsUpdate : PaymentDetailsBase {
- DOMString error;
- AddressErrors shippingAddressErrors;
- PayerErrors payerErrors;
- object paymentMethodErrors;
- PaymentItem total;
- };
- enum PaymentShippingType {
- "shipping",
- "delivery",
- "pickup"
- };
- dictionary PaymentOptions {
- boolean requestPayerName = false;
- boolean requestPayerEmail = false;
- boolean requestPayerPhone = false;
- boolean requestShipping = false;
- boolean requestBillingAddress = false;
- PaymentShippingType shippingType = "shipping";
- };
- [SecureContext,
- Func="mozilla::dom::PaymentRequest::PrefEnabled",
- Exposed=Window]
- interface PaymentRequest : EventTarget {
- [Throws]
- constructor(sequence<PaymentMethodData> methodData,
- PaymentDetailsInit details,
- optional PaymentOptions options = {});
- [NewObject]
- Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise);
- [NewObject]
- Promise<undefined> abort();
- [NewObject]
- Promise<boolean> canMakePayment();
- readonly attribute DOMString id;
- readonly attribute PaymentAddress? shippingAddress;
- readonly attribute DOMString? shippingOption;
- readonly attribute PaymentShippingType? shippingType;
- attribute EventHandler onmerchantvalidation;
- attribute EventHandler onshippingaddresschange;
- attribute EventHandler onshippingoptionchange;
- attribute EventHandler onpaymentmethodchange;
- };
-
- /* ---------------------- PaymentRequestUpdateEvent ----------------------------- */
- /* ./webidl/PaymentRequestUpdateEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https://w3c.github.io/payment-request/#paymentrequestupdateevent-interface
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext,
- Func="mozilla::dom::PaymentRequest::PrefEnabled",
- Exposed=Window]
- interface PaymentRequestUpdateEvent : Event {
- constructor(DOMString type,
- optional PaymentRequestUpdateEventInit eventInitDict = {});
- [Throws]
- undefined updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
- };
- dictionary PaymentRequestUpdateEventInit : EventInit {
- };
-
- /* ---------------------- PaymentResponse ----------------------------- */
- /* ./webidl/PaymentResponse.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this WebIDL file is
- * https:/w3c.github.io/payment-request/#paymentresponse-interface
- *
- * Copyright © 2018 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum PaymentComplete {
- "success",
- "fail",
- "unknown"
- };
- [SecureContext,
- Func="mozilla::dom::PaymentRequest::PrefEnabled",
- Exposed=Window]
- interface PaymentResponse : EventTarget {
- [Default] object toJSON();
- readonly attribute DOMString requestId;
- readonly attribute DOMString methodName;
- readonly attribute object details;
- readonly attribute PaymentAddress? shippingAddress;
- readonly attribute DOMString? shippingOption;
- readonly attribute DOMString? payerName;
- readonly attribute DOMString? payerEmail;
- readonly attribute DOMString? payerPhone;
- [NewObject]
- Promise<undefined> complete(optional PaymentComplete result = "unknown");
- // If the dictionary argument has no required members, it must be optional.
- [NewObject]
- Promise<undefined> retry(optional PaymentValidationErrors errorFields = {});
- attribute EventHandler onpayerdetailchange;
- };
-
- /* ---------------------- PeerConnectionImpl ----------------------------- */
- /* ./webidl/PeerConnectionImpl.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * PeerConnection.js' interface to the C++ PeerConnectionImpl.
- *
- * Do not confuse with RTCPeerConnection. This interface is purely for
- * communication between the PeerConnection JS DOM binding and the C++
- * implementation.
- *
- * See media/webrtc/signaling/include/PeerConnectionImpl.h
- *
- */
- interface nsISupports;
- callback ChainedOperation = Promise<any> ();
- /* Must be created first. Observer events will be dispatched on the thread provided */
- [ChromeOnly,
- Exposed=Window]
- interface PeerConnectionImpl {
- constructor();
- /* Must be called first. Observer events dispatched on the thread provided */
- [Throws]
- undefined initialize(PeerConnectionObserver observer, Window window);
- /* JSEP calls */
- [Throws]
- undefined createOffer(optional RTCOfferOptions options = {});
- [Throws]
- undefined createAnswer();
- [Throws]
- undefined setLocalDescription(long action, DOMString sdp);
- [Throws]
- undefined setRemoteDescription(long action, DOMString sdp);
- Promise<RTCStatsReport> getStats(MediaStreamTrack? selector);
- sequence<MediaStream> getRemoteStreams();
- /* Adds the tracks created by GetUserMedia */
- [Throws]
- RTCRtpTransceiver addTransceiver(RTCRtpTransceiverInit init,
- DOMString kind,
- MediaStreamTrack? sendTrack,
- boolean addTrackMagic);
- sequence<RTCRtpTransceiver> getTransceivers();
- [Throws]
- undefined closeStreams();
- [Throws]
- undefined enablePacketDump(unsigned long level,
- mozPacketDumpType type,
- boolean sending);
- [Throws]
- undefined disablePacketDump(unsigned long level,
- mozPacketDumpType type,
- boolean sending);
- /* As the ICE candidates roll in this one should be called each time
- * in order to keep the candidate list up-to-date for the next SDP-related
- * call PeerConnectionImpl does not parse ICE candidates, just sticks them
- * into the SDP.
- */
- [Throws]
- undefined addIceCandidate(DOMString candidate,
- DOMString mid,
- DOMString ufrag,
- unsigned short? level);
- /* Shuts down threads, deletes state */
- [Throws]
- undefined close();
- [Throws]
- undefined setConfiguration(optional RTCConfiguration config = {});
- undefined restartIce();
- undefined restartIceNoRenegotiationNeeded();
- /* Notify DOM window if this plugin crash is ours. */
- boolean pluginCrash(unsigned long long pluginId, DOMString name);
- // Only throws if promise creation fails
- [Throws]
- Promise<undefined> onSetDescriptionSuccess(RTCSdpType type, boolean remote);
- undefined onSetDescriptionError();
- /* Attributes */
- /* This provides the implementation with the certificate it uses to
- * authenticate itself. The JS side must set this before calling
- * createOffer/createAnswer or retrieving the value of fingerprint. This has
- * to be delayed because generating the certificate takes some time. */
- attribute RTCCertificate certificate;
- [Constant]
- readonly attribute DOMString fingerprint;
- readonly attribute DOMString currentLocalDescription;
- readonly attribute DOMString pendingLocalDescription;
- readonly attribute DOMString currentRemoteDescription;
- readonly attribute DOMString pendingRemoteDescription;
- readonly attribute boolean? currentOfferer;
- readonly attribute boolean? pendingOfferer;
- readonly attribute RTCIceConnectionState iceConnectionState;
- readonly attribute RTCIceGatheringState iceGatheringState;
- readonly attribute RTCPeerConnectionState connectionState;
- readonly attribute RTCSignalingState signalingState;
- attribute DOMString id;
- [SetterThrows]
- attribute DOMString peerIdentity;
- readonly attribute boolean privacyRequested;
- readonly attribute RTCSctpTransport? sctp;
- /* Data channels */
- [Throws]
- RTCDataChannel createDataChannel(DOMString label, DOMString protocol,
- unsigned short type, boolean ordered,
- unsigned short maxTime, unsigned short maxNum,
- boolean externalNegotiated, unsigned short stream);
- [Throws]
- Promise<any> chain(ChainedOperation op);
- undefined updateNegotiationNeeded();
- boolean createdSender(RTCRtpSender sender);
- };
-
- /* ---------------------- PeerConnectionObserver ----------------------------- */
- /* ./webidl/PeerConnectionObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- interface nsISupports;
- dictionary PCErrorData
- {
- required PCError name;
- required DOMString message;
- // Will need to add more stuff (optional) for RTCError
- };
- [ChromeOnly,
- JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
- Exposed=Window]
- interface PeerConnectionObserver
- {
- [Throws]
- constructor(RTCPeerConnection domPC);
- /* JSEP callbacks */
- undefined onCreateOfferSuccess(DOMString offer);
- undefined onCreateOfferError(PCErrorData error);
- undefined onCreateAnswerSuccess(DOMString answer);
- undefined onCreateAnswerError(PCErrorData error);
- undefined onSetDescriptionSuccess();
- undefined onSetDescriptionError(PCErrorData error);
- undefined onAddIceCandidateSuccess();
- undefined onAddIceCandidateError(PCErrorData error);
- undefined onIceCandidate(unsigned short level, DOMString mid, DOMString candidate, DOMString ufrag);
- /* Data channel callbacks */
- undefined notifyDataChannel(RTCDataChannel channel);
- /* Notification of one of several types of state changed */
- undefined onStateChange(PCObserverStateType state);
- /*
- Lets PeerConnectionImpl fire track events on the RTCPeerConnection
- */
- undefined fireTrackEvent(RTCRtpReceiver receiver, sequence<MediaStream> streams);
- /*
- Lets PeerConnectionImpl fire addstream events on the RTCPeerConnection
- */
- undefined fireStreamEvent(MediaStream stream);
- undefined fireNegotiationNeededEvent();
- /* Packet dump callback */
- undefined onPacket(unsigned long level, mozPacketDumpType type, boolean sending,
- ArrayBuffer packet);
- };
-
- /* ---------------------- PeerConnectionObserverEnums ----------------------------- */
- /* ./webidl/PeerConnectionObserverEnums.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This is in a separate file so it can be shared with unittests.
- */
- enum PCObserverStateType {
- "None",
- "IceConnectionState",
- "IceGatheringState",
- "SignalingState",
- "ConnectionState",
- };
- enum PCError {
- "UnknownError",
- "InvalidAccessError",
- "InvalidStateError",
- "InvalidModificationError",
- "OperationError",
- "NotSupportedError",
- "SyntaxError",
- "NotReadableError",
- "TypeError",
- "RangeError",
- "InvalidCharacterError"
- };
-
- /* ---------------------- Performance ----------------------------- */
- /* ./webidl/Performance.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/hr-time/#sec-performance
- * https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
- * https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
- * https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
- * https://w3c.github.io/user-timing/#extensions-performance-interface
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang).
- * W3C liability, trademark and document use rules apply.
- */
- // DOMTimeStamp is deprecated, use EpochTimeStamp instead.
- typedef unsigned long long DOMTimeStamp;
- typedef unsigned long long EpochTimeStamp;
- typedef double DOMHighResTimeStamp;
- typedef sequence <PerformanceEntry> PerformanceEntryList;
- // https://w3c.github.io/hr-time/#sec-performance
- [Exposed=(Window,Worker)]
- interface Performance : EventTarget {
- [DependsOn=DeviceState, Affects=Nothing]
- DOMHighResTimeStamp now();
- [Constant]
- readonly attribute DOMHighResTimeStamp timeOrigin;
- [Default] object toJSON();
- };
- // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
- [Exposed=Window]
- partial interface Performance {
- [Constant]
- readonly attribute PerformanceTiming timing;
- [Constant]
- readonly attribute PerformanceNavigation navigation;
- };
- // https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
- [Exposed=(Window,Worker)]
- partial interface Performance {
- PerformanceEntryList getEntries();
- PerformanceEntryList getEntriesByType(DOMString entryType);
- PerformanceEntryList getEntriesByName(DOMString name, optional DOMString
- entryType);
- };
- // https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
- [Exposed=(Window,Worker)]
- partial interface Performance {
- undefined clearResourceTimings();
- undefined setResourceTimingBufferSize(unsigned long maxSize);
- attribute EventHandler onresourcetimingbufferfull;
- };
- // GC microbenchmarks, pref-guarded, not for general use (bug 1125412)
- [Exposed=Window]
- partial interface Performance {
- [Pref="dom.enable_memory_stats"]
- readonly attribute object mozMemory;
- };
- // https://w3c.github.io/user-timing/#extensions-performance-interface
- dictionary PerformanceMarkOptions {
- any detail;
- DOMHighResTimeStamp startTime;
- };
- // https://w3c.github.io/user-timing/#extensions-performance-interface
- dictionary PerformanceMeasureOptions {
- any detail;
- (DOMString or DOMHighResTimeStamp) start;
- DOMHighResTimeStamp duration;
- (DOMString or DOMHighResTimeStamp) end;
- };
- // https://w3c.github.io/user-timing/#extensions-performance-interface
- [Exposed=(Window,Worker)]
- partial interface Performance {
- [Throws]
- PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions = {});
- undefined clearMarks(optional DOMString markName);
- [Throws]
- PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions = {}, optional DOMString endMark);
- undefined clearMeasures(optional DOMString measureName);
- };
- [Exposed=Window]
- partial interface Performance {
- [Pref="dom.enable_event_timing", SameObject]
- readonly attribute EventCounts eventCounts;
- };
-
- /* ---------------------- PerformanceEntry ----------------------------- */
- /* ./webidl/PerformanceEntry.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/performance-timeline/#dom-performanceentry
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface PerformanceEntry
- {
- readonly attribute DOMString name;
- readonly attribute DOMString entryType;
- readonly attribute DOMHighResTimeStamp startTime;
- readonly attribute DOMHighResTimeStamp duration;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceEntryEvent ----------------------------- */
- /* ./webidl/PerformanceEntryEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary PerformanceEntryEventInit : EventInit
- {
- DOMString name = "";
- DOMString entryType = "";
- DOMHighResTimeStamp startTime = 0;
- DOMHighResTimeStamp duration = 0;
- double epoch = 0;
- DOMString origin = "";
- };
- [ChromeOnly,
- Exposed=Window]
- interface PerformanceEntryEvent : Event
- {
- constructor(DOMString type,
- optional PerformanceEntryEventInit eventInitDict = {});
- readonly attribute DOMString name;
- readonly attribute DOMString entryType;
- readonly attribute DOMHighResTimeStamp startTime;
- readonly attribute DOMHighResTimeStamp duration;
- readonly attribute double epoch;
- readonly attribute DOMString origin;
- };
-
- /* ---------------------- PerformanceEventTiming ----------------------------- */
- /* ./webidl/PerformanceEventTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.enable_event_timing",
- Exposed=Window]
- interface EventCounts {
- readonly maplike<DOMString, unsigned long long>;
- };
- [Pref="dom.enable_event_timing",
- Exposed=Window]
- interface PerformanceEventTiming : PerformanceEntry {
- readonly attribute DOMHighResTimeStamp processingStart;
- readonly attribute DOMHighResTimeStamp processingEnd;
- readonly attribute boolean cancelable;
- readonly attribute Node? target;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceLargestContentfulPaint ----------------------------- */
- /* ./webidl/PerformanceLargestContentfulPaint.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/largest-contentful-paint/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.enable_largest_contentful_paint",
- Exposed=Window]
- interface LargestContentfulPaint : PerformanceEntry {
- readonly attribute DOMHighResTimeStamp renderTime;
- readonly attribute DOMHighResTimeStamp loadTime;
- readonly attribute unsigned long size;
- readonly attribute DOMString id;
- readonly attribute DOMString url;
- readonly attribute Element? element;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceMark ----------------------------- */
- /* ./webidl/PerformanceMark.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/user-timing/#performancemark
- */
- [Exposed=(Window,Worker)]
- interface PerformanceMark : PerformanceEntry
- {
- [Throws]
- constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {});
- readonly attribute any detail;
- };
-
- /* ---------------------- PerformanceMeasure ----------------------------- */
- /* ./webidl/PerformanceMeasure.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/user-timing/#performancemeasure
- */
- [Exposed=(Window,Worker)]
- interface PerformanceMeasure : PerformanceEntry
- {
- readonly attribute any detail;
- };
-
- /* ---------------------- PerformanceNavigation ----------------------------- */
- /* ./webidl/PerformanceNavigation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface PerformanceNavigation {
- const unsigned short TYPE_NAVIGATE = 0;
- const unsigned short TYPE_RELOAD = 1;
- const unsigned short TYPE_BACK_FORWARD = 2;
- const unsigned short TYPE_RESERVED = 255;
- readonly attribute unsigned short type;
- readonly attribute unsigned short redirectCount;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceNavigationTiming ----------------------------- */
- /* ./webidl/PerformanceNavigationTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming
- *
- * Copyright © 2016 W3C® (MIT, ERCIM, Keio, Beihang).
- * W3C liability, trademark and document use rules apply.
- */
- enum NavigationType {
- "navigate",
- "reload",
- "back_forward",
- "prerender"
- };
- [Exposed=Window,
- Func="mozilla::dom::PerformanceNavigationTiming::Enabled"]
- interface PerformanceNavigationTiming : PerformanceResourceTiming {
- readonly attribute DOMHighResTimeStamp unloadEventStart;
- readonly attribute DOMHighResTimeStamp unloadEventEnd;
- readonly attribute DOMHighResTimeStamp domInteractive;
- readonly attribute DOMHighResTimeStamp domContentLoadedEventStart;
- readonly attribute DOMHighResTimeStamp domContentLoadedEventEnd;
- readonly attribute DOMHighResTimeStamp domComplete;
- readonly attribute DOMHighResTimeStamp loadEventStart;
- readonly attribute DOMHighResTimeStamp loadEventEnd;
- readonly attribute NavigationType type;
- readonly attribute unsigned short redirectCount;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceObserver ----------------------------- */
- /* ./webidl/PerformanceObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface
- */
- dictionary PerformanceObserverInit {
- sequence<DOMString> entryTypes;
- DOMString type;
- boolean buffered;
- [Pref="dom.enable_event_timing"]
- DOMHighResTimeStamp durationThreshold;
- };
- callback PerformanceObserverCallback = undefined (PerformanceObserverEntryList entries,
- PerformanceObserver observer);
- [Pref="dom.enable_performance_observer",
- Exposed=(Window,Worker)]
- interface PerformanceObserver {
- [Throws]
- constructor(PerformanceObserverCallback callback);
- [Throws] undefined observe(optional PerformanceObserverInit options = {});
- undefined disconnect();
- PerformanceEntryList takeRecords();
- static readonly attribute object supportedEntryTypes;
- };
-
- /* ---------------------- PerformanceObserverEntryList ----------------------------- */
- /* ./webidl/PerformanceObserverEntryList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/performance-timeline/#the-performanceobserverentrylist-interface
- */
- // XXX should be moved into Performance.webidl.
- dictionary PerformanceEntryFilterOptions {
- DOMString name;
- DOMString entryType;
- DOMString initiatorType;
- };
- [Pref="dom.enable_performance_observer",
- Exposed=(Window,Worker)]
- interface PerformanceObserverEntryList {
- PerformanceEntryList getEntries(optional PerformanceEntryFilterOptions filter = {});
- PerformanceEntryList getEntriesByType(DOMString entryType);
- PerformanceEntryList getEntriesByName(DOMString name,
- optional DOMString entryType);
- };
-
- /* ---------------------- PerformancePaintTiming ----------------------------- */
- /* ./webidl/PerformancePaintTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window)]
- interface PerformancePaintTiming : PerformanceEntry
- {
- };
-
- /* ---------------------- PerformanceResourceTiming ----------------------------- */
- /* ./webidl/PerformanceResourceTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/resource-timing/#sec-performanceresourcetiming
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,Worker)]
- interface PerformanceResourceTiming : PerformanceEntry
- {
- readonly attribute DOMString initiatorType;
- readonly attribute DOMString nextHopProtocol;
- readonly attribute DOMHighResTimeStamp workerStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp redirectStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp redirectEnd;
- readonly attribute DOMHighResTimeStamp fetchStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp domainLookupStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp domainLookupEnd;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp connectStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp connectEnd;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp secureConnectionStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp requestStart;
- [NeedsSubjectPrincipal]
- readonly attribute DOMHighResTimeStamp responseStart;
- readonly attribute DOMHighResTimeStamp responseEnd;
- [NeedsSubjectPrincipal]
- readonly attribute unsigned long long transferSize;
- [NeedsSubjectPrincipal]
- readonly attribute unsigned long long encodedBodySize;
- [NeedsSubjectPrincipal]
- readonly attribute unsigned long long decodedBodySize;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- // readonly attribute FrozenArray<PerformanceServerTiming> serverTiming;
- [SecureContext, Frozen, Cached, Pure, NeedsSubjectPrincipal]
- readonly attribute sequence<PerformanceServerTiming> serverTiming;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceServerTiming ----------------------------- */
- /* ./webidl/PerformanceServerTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/server-timing/#the-performanceservertiming-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [SecureContext,Exposed=(Window,Worker)]
- interface PerformanceServerTiming {
- readonly attribute DOMString name;
- readonly attribute DOMHighResTimeStamp duration;
- readonly attribute DOMString description;
- [Default] object toJSON();
- };
-
- /* ---------------------- PerformanceTiming ----------------------------- */
- /* ./webidl/PerformanceTiming.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/navigation-timing/#the-performancetiming-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface PerformanceTiming {
- readonly attribute unsigned long long navigationStart;
- readonly attribute unsigned long long unloadEventStart;
- readonly attribute unsigned long long unloadEventEnd;
- readonly attribute unsigned long long redirectStart;
- readonly attribute unsigned long long redirectEnd;
- readonly attribute unsigned long long fetchStart;
- readonly attribute unsigned long long domainLookupStart;
- readonly attribute unsigned long long domainLookupEnd;
- readonly attribute unsigned long long connectStart;
- readonly attribute unsigned long long connectEnd;
- readonly attribute unsigned long long secureConnectionStart;
- readonly attribute unsigned long long requestStart;
- readonly attribute unsigned long long responseStart;
- readonly attribute unsigned long long responseEnd;
- readonly attribute unsigned long long domLoading;
- readonly attribute unsigned long long domInteractive;
- readonly attribute unsigned long long domContentLoadedEventStart;
- readonly attribute unsigned long long domContentLoadedEventEnd;
- readonly attribute unsigned long long domComplete;
- readonly attribute unsigned long long loadEventStart;
- readonly attribute unsigned long long loadEventEnd;
- // This is a Chrome proprietary extension and not part of the
- // performance/navigation timing specification.
- // Returns 0 if a non-blank paint has not happened.
- [Pref="dom.performance.time_to_non_blank_paint.enabled"]
- readonly attribute unsigned long long timeToNonBlankPaint;
- // Returns 0 if a contentful paint has not happened.
- [Pref="dom.performance.time_to_contentful_paint.enabled"]
- readonly attribute unsigned long long timeToContentfulPaint;
- // This is a Mozilla proprietary extension and not part of the
- // performance/navigation timing specification. It marks the
- // completion of the first presentation flush after DOMContentLoaded.
- [Pref="dom.performance.time_to_dom_content_flushed.enabled"]
- readonly attribute unsigned long long timeToDOMContentFlushed;
- // This is a Chrome proprietary extension and not part of the
- // performance/navigation timing specification.
- // Returns 0 if a time-to-interactive measurement has not happened.
- [Pref="dom.performance.time_to_first_interactive.enabled"]
- readonly attribute unsigned long long timeToFirstInteractive;
- [Default] object toJSON();
- };
-
- /* ---------------------- PeriodicWave ----------------------------- */
- /* ./webidl/PeriodicWave.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary PeriodicWaveConstraints {
- boolean disableNormalization = false;
- };
- dictionary PeriodicWaveOptions : PeriodicWaveConstraints {
- sequence<float> real;
- sequence<float> imag;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface PeriodicWave {
- [Throws]
- constructor(BaseAudioContext context,
- optional PeriodicWaveOptions options = {});
- };
-
- /* ---------------------- Permissions ----------------------------- */
- /* ./webidl/Permissions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/permissions/#permissions-interface
- */
- enum PermissionName {
- "geolocation",
- "notifications",
- "push",
- "persistent-storage",
- "midi",
- "storage-access", // Defined in https://privacycg.github.io/storage-access/#permissions-integration
- "screen-wake-lock" // Defined in https://w3c.github.io/screen-wake-lock/
- };
- [GenerateInit]
- dictionary PermissionDescriptor {
- required PermissionName name;
- };
- // https://webaudio.github.io/web-midi-api/#permissions-integration
- [GenerateInit]
- dictionary MidiPermissionDescriptor : PermissionDescriptor {
- boolean sysex = false;
- };
- // We don't implement `PushPermissionDescriptor` because we use a background
- // message quota instead of `userVisibleOnly`.
- [Exposed=Window]
- interface Permissions {
- [NewObject]
- Promise<PermissionStatus> query(object permission);
- // http://w3c.github.io/permissions/#webdriver-command-set-permission
- [ChromeOnly, Throws]
- PermissionStatus parseSetParameters(PermissionSetParameters parameters);
- };
-
- /* ---------------------- PermissionStatus ----------------------------- */
- /* ./webidl/PermissionStatus.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/permissions/#status-of-a-permission
- */
- enum PermissionState {
- "granted",
- "denied",
- "prompt"
- };
- [Exposed=Window]
- interface PermissionStatus : EventTarget {
- readonly attribute PermissionName name;
- readonly attribute PermissionState state;
- attribute EventHandler onchange;
- [ChromeOnly]
- readonly attribute UTF8String type;
- };
-
- /* ---------------------- Plugin ----------------------------- */
- /* ./webidl/Plugin.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface Plugin {
- readonly attribute DOMString description;
- readonly attribute DOMString filename;
- readonly attribute DOMString name;
- readonly attribute unsigned long length;
- getter MimeType? item(unsigned long index);
- getter MimeType? namedItem(DOMString name);
- };
-
- /* ---------------------- PluginArray ----------------------------- */
- /* ./webidl/PluginArray.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [LegacyUnenumerableNamedProperties,
- Exposed=Window]
- interface PluginArray {
- undefined refresh();
- readonly attribute unsigned long length;
- getter Plugin? item(unsigned long index);
- getter Plugin? namedItem(DOMString name);
- };
-
- /* ---------------------- PointerEvent ----------------------------- */
- /* ./webidl/PointerEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information see nsIPointerEvent.idl.
- *
- * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
- interface WindowProxy;
- [Exposed=Window]
- interface PointerEvent : MouseEvent
- {
- constructor(DOMString type, optional PointerEventInit eventInitDict = {});
- readonly attribute long pointerId;
- readonly attribute long width;
- readonly attribute long height;
- readonly attribute float pressure;
- readonly attribute float tangentialPressure;
- readonly attribute long tiltX;
- readonly attribute long tiltY;
- readonly attribute long twist;
- readonly attribute DOMString pointerType;
- readonly attribute boolean isPrimary;
- [Func="mozilla::dom::PointerEvent::EnableGetCoalescedEvents"]
- sequence<PointerEvent> getCoalescedEvents();
- sequence<PointerEvent> getPredictedEvents();
- };
- dictionary PointerEventInit : MouseEventInit
- {
- long pointerId = 0;
- long width = 1;
- long height = 1;
- float pressure = 0;
- float tangentialPressure = 0;
- long tiltX = 0;
- long tiltY = 0;
- long twist = 0;
- DOMString pointerType = "";
- boolean isPrimary = false;
- sequence<PointerEvent> coalescedEvents = [];
- sequence<PointerEvent> predictedEvents = [];
- };
-
- /* ---------------------- PopoverInvokerElement ----------------------------- */
- /* ./webidl/PopoverInvokerElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/popover.html#popoverinvokerelement
- */
- interface mixin PopoverInvokerElement {
- [Pref="dom.element.popover.enabled", CEReactions] attribute Element? popoverTargetElement;
- [Pref="dom.element.popover.enabled", CEReactions] attribute DOMString popoverTargetAction;
- };
-
- /* ---------------------- PopStateEvent ----------------------------- */
- /* ./webidl/PopStateEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface PopStateEvent : Event
- {
- constructor(DOMString type, optional PopStateEventInit eventInitDict = {});
- readonly attribute any state;
- };
- dictionary PopStateEventInit : EventInit
- {
- any state = null;
- };
-
- /* ---------------------- PopupBlockedEvent ----------------------------- */
- /* ./webidl/PopupBlockedEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- interface URI;
- [Exposed=Window]
- interface PopupBlockedEvent : Event
- {
- constructor(DOMString type,
- optional PopupBlockedEventInit eventInitDict = {});
- readonly attribute Window? requestingWindow;
- readonly attribute URI? popupWindowURI;
- readonly attribute DOMString? popupWindowName;
- readonly attribute DOMString? popupWindowFeatures;
- };
- dictionary PopupBlockedEventInit : EventInit
- {
- Window? requestingWindow = null;
- URI? popupWindowURI = null;
- DOMString popupWindowName = "";
- DOMString popupWindowFeatures = "";
- };
-
- /* ---------------------- PositionStateEvent ----------------------------- */
- /* ./webidl/PositionStateEvent.webidl */
-
- /**
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary PositionStateEventInit : EventInit {
- required double duration;
- required double playbackRate;
- required double position;
- };
- [Exposed=Window, ChromeOnly]
- interface PositionStateEvent : Event {
- constructor(DOMString type, optional PositionStateEventInit eventInitDict = {});
- readonly attribute double duration;
- readonly attribute double playbackRate;
- readonly attribute double position;
- };
-
- /* ---------------------- ProcessingInstruction ----------------------------- */
- /* ./webidl/ProcessingInstruction.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#interface-processinginstruction
- * https://drafts.csswg.org/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // https://dom.spec.whatwg.org/#interface-processinginstruction
- [Exposed=Window]
- interface ProcessingInstruction : CharacterData {
- readonly attribute DOMString target;
- };
- // https://drafts.csswg.org/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction
- ProcessingInstruction includes LinkStyle;
-
- /* ---------------------- ProgressEvent ----------------------------- */
- /* ./webidl/ProgressEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=(Window,Worker)]
- interface ProgressEvent : Event
- {
- constructor(DOMString type, optional ProgressEventInit eventInitDict = {});
- readonly attribute boolean lengthComputable;
- readonly attribute unsigned long long loaded;
- readonly attribute unsigned long long total;
- };
- dictionary ProgressEventInit : EventInit
- {
- boolean lengthComputable = false;
- unsigned long long loaded = 0;
- unsigned long long total = 0;
- };
-
- /* ---------------------- Promise ----------------------------- */
- /* ./webidl/Promise.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This IDL file contains utilities to help connect JS promises to our
- * Web IDL infrastructure.
- */
- callback PromiseJobCallback = undefined();
- [TreatNonCallableAsNull]
- callback AnyCallback = any (any value);
- // Hack to allow us to have JS owning and properly tracing/CCing/etc a
- // PromiseNativeHandler.
- [LegacyNoInterfaceObject, Exposed=(Window,Worker)]
- interface PromiseNativeHandler {
- };
-
- /* ---------------------- PromiseRejectionEvent ----------------------------- */
- /* ./webidl/PromiseRejectionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/webappapis.html#the-promiserejectionevent-interface
- */
- [Exposed=(Window,Worker)]
- interface PromiseRejectionEvent : Event
- {
- constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
- [BinaryName="rejectedPromise"]
- readonly attribute Promise<any> promise;
- readonly attribute any reason;
- };
- dictionary PromiseRejectionEventInit : EventInit {
- required Promise<any> promise;
- any reason;
- };
-
- /* ---------------------- PushEvent ----------------------------- */
- /* ./webidl/PushEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/push-api/
- */
- [Pref="dom.push.enabled",
- Exposed=ServiceWorker]
- interface PushEvent : ExtendableEvent {
- [Throws]
- constructor(DOMString type, optional PushEventInit eventInitDict = {});
- readonly attribute PushMessageData? data;
- };
- typedef (BufferSource or USVString) PushMessageDataInit;
- dictionary PushEventInit : ExtendableEventInit {
- PushMessageDataInit data;
- };
-
- /* ---------------------- PushManager ----------------------------- */
- /* ./webidl/PushManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/push-api/
- */
- dictionary PushSubscriptionOptionsInit {
- // boolean userVisibleOnly = false;
- (BufferSource or DOMString)? applicationServerKey = null;
- };
- // The main thread JS implementation. Please see comments in
- // dom/push/PushManager.h for the split between PushManagerImpl and PushManager.
- [JSImplementation="@mozilla.org/push/PushManager;1",
- ChromeOnly,
- Exposed=Window]
- interface PushManagerImpl {
- [Throws]
- constructor(DOMString scope);
- Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options = {});
- Promise<PushSubscription?> getSubscription();
- Promise<PermissionState> permissionState(optional PushSubscriptionOptionsInit options = {});
- };
- [Exposed=(Window,Worker), Func="PushManager::IsEnabled"]
- interface PushManager {
- [Throws, ChromeOnly]
- constructor(DOMString scope);
- [Throws, UseCounter]
- Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options = {});
- [Throws]
- Promise<PushSubscription?> getSubscription();
- [Throws]
- Promise<PermissionState> permissionState(optional PushSubscriptionOptionsInit options = {});
- };
-
- /* ---------------------- PushMessageData ----------------------------- */
- /* ./webidl/PushMessageData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/push-api/
- */
- [Pref="dom.push.enabled",
- Exposed=ServiceWorker]
- interface PushMessageData
- {
- [Throws]
- ArrayBuffer arrayBuffer();
- [Throws]
- Blob blob();
- [Throws]
- any json();
- USVString text();
- };
-
- /* ---------------------- PushSubscription ----------------------------- */
- /* ./webidl/PushSubscription.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/push-api/
- */
- interface Principal;
- enum PushEncryptionKeyName
- {
- "p256dh",
- "auth"
- };
- dictionary PushSubscriptionKeys
- {
- ByteString p256dh;
- ByteString auth;
- };
- dictionary PushSubscriptionJSON
- {
- USVString endpoint;
- // FIXME: bug 1493860: should this "= {}" be here? For that matter, this
- // PushSubscriptionKeys thing is not even in the spec; "keys" is a record
- // there.
- PushSubscriptionKeys keys = {};
- EpochTimeStamp? expirationTime;
- };
- dictionary PushSubscriptionInit
- {
- required USVString endpoint;
- required USVString scope;
- ArrayBuffer? p256dhKey;
- ArrayBuffer? authSecret;
- BufferSource? appServerKey;
- EpochTimeStamp? expirationTime = null;
- };
- [Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
- interface PushSubscription
- {
- [Throws, ChromeOnly]
- constructor(PushSubscriptionInit initDict);
- readonly attribute USVString endpoint;
- readonly attribute PushSubscriptionOptions options;
- readonly attribute EpochTimeStamp? expirationTime;
- [Throws]
- ArrayBuffer? getKey(PushEncryptionKeyName name);
- [NewObject, UseCounter]
- Promise<boolean> unsubscribe();
- // Implements the custom serializer specified in Push API, section 9.
- [Throws]
- PushSubscriptionJSON toJSON();
- };
-
- /* ---------------------- PushSubscriptionOptions ----------------------------- */
- /* ./webidl/PushSubscriptionOptions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/push-api/
- */
- [Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
- interface PushSubscriptionOptions
- {
- [SameObject, Throws]
- readonly attribute ArrayBuffer? applicationServerKey;
- };
-
- /* ---------------------- QueuingStrategy ----------------------------- */
- /* ./webidl/QueuingStrategy.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#qs
- */
- dictionary QueuingStrategy {
- unrestricted double highWaterMark;
- QueuingStrategySize size;
- };
- callback QueuingStrategySize = unrestricted double (optional any chunk);
- dictionary QueuingStrategyInit {
- required unrestricted double highWaterMark;
- };
- [Exposed=*]
- interface CountQueuingStrategy {
- constructor(QueuingStrategyInit init);
- readonly attribute unrestricted double highWaterMark;
- [Throws]
- readonly attribute Function size;
- };
- [Exposed=*]
- interface ByteLengthQueuingStrategy {
- constructor(QueuingStrategyInit init);
- readonly attribute unrestricted double highWaterMark;
- [Throws]
- readonly attribute Function size;
- };
-
- /* ---------------------- RadioNodeList ----------------------------- */
- /* ./webidl/RadioNodeList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection-0
- *
- * © Copyright 2004-2014 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface RadioNodeList : NodeList {
- [NeedsCallerType]
- attribute DOMString value;
- };
-
- /* ---------------------- Range ----------------------------- */
- /* ./webidl/Range.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dom.spec.whatwg.org/#range
- * http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
- * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // Use ProbablyShortLivingWrapper so that the Range object could be deleted
- // as soon as possible, and thus slow down DOM operations less.
- [Exposed=Window, ProbablyShortLivingWrapper]
- interface Range : AbstractRange {
- [Throws]
- constructor();
- [Throws]
- readonly attribute Node commonAncestorContainer;
- [Throws, BinaryName="setStartJS"]
- undefined setStart(Node refNode, unsigned long offset);
- [Throws, BinaryName="setEndJS"]
- undefined setEnd(Node refNode, unsigned long offset);
- [Throws, BinaryName="setStartBeforeJS"]
- undefined setStartBefore(Node refNode);
- [Throws, BinaryName="setStartAfterJS"]
- undefined setStartAfter(Node refNode);
- [Throws, BinaryName="setEndBeforeJS"]
- undefined setEndBefore(Node refNode);
- [Throws, BinaryName="setEndAfterJS"]
- undefined setEndAfter(Node refNode);
- [BinaryName="collapseJS"]
- undefined collapse(optional boolean toStart = false);
- [Throws, BinaryName="selectNodeJS"]
- undefined selectNode(Node refNode);
- [Throws, BinaryName="selectNodeContentsJS"]
- undefined selectNodeContents(Node refNode);
- const unsigned short START_TO_START = 0;
- const unsigned short START_TO_END = 1;
- const unsigned short END_TO_END = 2;
- const unsigned short END_TO_START = 3;
- [Throws]
- short compareBoundaryPoints(unsigned short how, Range sourceRange);
- [CEReactions, Throws]
- undefined deleteContents();
- [CEReactions, Throws]
- DocumentFragment extractContents();
- [CEReactions, Throws]
- DocumentFragment cloneContents();
- [CEReactions, Throws]
- undefined insertNode(Node node);
- [CEReactions, Throws]
- undefined surroundContents(Node newParent);
- Range cloneRange();
- undefined detach();
- [Throws]
- boolean isPointInRange(Node node, unsigned long offset);
- [Throws]
- short comparePoint(Node node, unsigned long offset);
- [Throws]
- boolean intersectsNode(Node node);
- [Throws, BinaryName="ToString"]
- stringifier;
- };
- // http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
- partial interface Range {
- [CEReactions, Throws, UseCounter]
- DocumentFragment createContextualFragment(DOMString fragment);
- };
- // http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
- partial interface Range {
- DOMRectList? getClientRects();
- DOMRect getBoundingClientRect();
- };
- dictionary ClientRectsAndTexts {
- required DOMRectList rectList;
- required sequence<DOMString> textList;
- };
- partial interface Range {
- [ChromeOnly, Throws]
- ClientRectsAndTexts getClientRectsAndTexts();
- };
- // ChromeOnly methods that allow setting Range boundaries to cross
- // shadow boundary.
- partial interface Range {
- [ChromeOnly, Throws]
- undefined setStartAllowCrossShadowBoundary(Node refNode, unsigned long offset);
- [ChromeOnly, Throws]
- undefined setEndAllowCrossShadowBoundary(Node refNode, unsigned long offset);
- };
-
- /* ---------------------- ReadableByteStreamController ----------------------------- */
- /* ./webidl/ReadableByteStreamController.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#rbs-controller-class-definition
- */
- [Exposed=*]
- interface ReadableByteStreamController {
- [Throws] // Throws on OOM
- readonly attribute ReadableStreamBYOBRequest? byobRequest;
- readonly attribute unrestricted double? desiredSize;
- [Throws]
- undefined close();
- [Throws]
- undefined enqueue(ArrayBufferView chunk);
- [Throws]
- undefined error(optional any e);
- };
-
- /* ---------------------- ReadableStream ----------------------------- */
- /* ./webidl/ReadableStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#rs-class-definition
- */
- [Exposed=*] // [Transferable] - See Bug 1562065
- interface ReadableStream {
- [Throws]
- constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
- [Pref="dom.streams.from.enabled", Throws]
- static ReadableStream from(any asyncIterable);
- readonly attribute boolean locked;
- [NewObject]
- Promise<undefined> cancel(optional any reason);
- [Throws]
- ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
- [Throws]
- ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
- [NewObject]
- Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
- [Throws]
- sequence<ReadableStream> tee();
- [GenerateReturnMethod]
- async iterable<any>(optional ReadableStreamIteratorOptions options = {});
- };
- enum ReadableStreamReaderMode { "byob" };
- dictionary ReadableStreamGetReaderOptions {
- ReadableStreamReaderMode mode;
- };
- dictionary ReadableStreamIteratorOptions {
- boolean preventCancel = false;
- };
- dictionary ReadableWritablePair {
- required ReadableStream readable;
- required WritableStream writable;
- };
- dictionary StreamPipeOptions {
- boolean preventClose = false;
- boolean preventAbort = false;
- boolean preventCancel = false;
- AbortSignal signal;
- };
-
- /* ---------------------- ReadableStreamBYOBReader ----------------------------- */
- /* ./webidl/ReadableStreamBYOBReader.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#byob-reader-class-definition
- */
- [Exposed=*]
- interface ReadableStreamBYOBReader {
- [Throws]
- constructor(ReadableStream stream);
- [NewObject]
- Promise<ReadableStreamReadResult> read(ArrayBufferView view);
- [Throws]
- undefined releaseLock();
- };
- ReadableStreamBYOBReader includes ReadableStreamGenericReader;
-
- /* ---------------------- ReadableStreamBYOBRequest ----------------------------- */
- /* ./webidl/ReadableStreamBYOBRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#rs-byob-request-class-definition
- */
- [Exposed=*]
- interface ReadableStreamBYOBRequest {
- readonly attribute ArrayBufferView? view;
- [Throws]
- undefined respond([EnforceRange] unsigned long long bytesWritten);
- [Throws]
- undefined respondWithNewView(ArrayBufferView view);
- };
-
- /* ---------------------- ReadableStreamDefaultController ----------------------------- */
- /* ./webidl/ReadableStreamDefaultController.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#rs-default-controller-class-definition
- */
- [Exposed=*]
- interface ReadableStreamDefaultController {
- readonly attribute unrestricted double? desiredSize;
- [Throws]
- undefined close();
- [Throws]
- undefined enqueue(optional any chunk);
- [Throws]
- undefined error(optional any e);
- };
-
- /* ---------------------- ReadableStreamDefaultReader ----------------------------- */
- /* ./webidl/ReadableStreamDefaultReader.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#generic-reader-mixin-definition
- * https://streams.spec.whatwg.org/#default-reader-class-definition
- */
- typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
- enum ReadableStreamType { "bytes" };
- interface mixin ReadableStreamGenericReader {
- readonly attribute Promise<undefined> closed;
- [NewObject]
- Promise<undefined> cancel(optional any reason);
- };
- [Exposed=*]
- interface ReadableStreamDefaultReader {
- [Throws]
- constructor(ReadableStream stream);
- [NewObject]
- Promise<ReadableStreamReadResult> read();
- [Throws]
- undefined releaseLock();
- };
- ReadableStreamDefaultReader includes ReadableStreamGenericReader;
- dictionary ReadableStreamReadResult {
- any value;
- boolean done;
- };
-
- /* ---------------------- ReferrerPolicy ----------------------------- */
- /* ./webidl/ReferrerPolicy.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information please see
- * https://w3c.github.io/webappsec-referrer-policy#idl-index
- */
- enum ReferrerPolicy {
- "",
- "no-referrer",
- "no-referrer-when-downgrade",
- "origin",
- "origin-when-cross-origin",
- "unsafe-url", "same-origin",
- "strict-origin",
- "strict-origin-when-cross-origin"
- };
-
- /* ---------------------- Reporting ----------------------------- */
- /* ./webidl/Reporting.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/reporting/#interface-reporting-observer
- */
- [Pref="dom.reporting.enabled",
- Exposed=(Window,Worker)]
- interface ReportBody {
- [Default] object toJSON
- ();
- };
- [Pref="dom.reporting.enabled",
- Exposed=(Window,Worker)]
- interface Report {
- [Default] object toJSON
- ();
- readonly attribute DOMString type;
- readonly attribute DOMString url;
- readonly attribute ReportBody? body;
- };
- [Pref="dom.reporting.enabled",
- Exposed=(Window,Worker)]
- interface ReportingObserver {
- [Throws]
- constructor(ReportingObserverCallback callback, optional ReportingObserverOptions options = {});
- undefined observe();
- undefined disconnect();
- ReportList takeRecords();
- };
- callback ReportingObserverCallback = undefined (sequence<Report> reports, ReportingObserver observer);
- dictionary ReportingObserverOptions {
- sequence<DOMString> types;
- boolean buffered = false;
- };
- typedef sequence<Report> ReportList;
- [Pref="dom.reporting.enabled",
- Exposed=Window]
- interface DeprecationReportBody : ReportBody {
- readonly attribute DOMString id;
- // The spec currently has Date, but that's not a type that exists in Web IDL.
- // In any case, we always return null, so we just need _some_ nullable type
- // here.
- readonly attribute DOMTimeStamp? anticipatedRemoval;
- readonly attribute DOMString message;
- readonly attribute DOMString? sourceFile;
- readonly attribute unsigned long? lineNumber;
- readonly attribute unsigned long? columnNumber;
- };
- [Deprecated="DeprecatedTestingInterface",
- Pref="dom.reporting.testing.enabled",
- Exposed=(Window,DedicatedWorker)]
- interface TestingDeprecatedInterface {
- constructor();
- [Deprecated="DeprecatedTestingMethod"]
- undefined deprecatedMethod();
- [Deprecated="DeprecatedTestingAttribute"]
- readonly attribute boolean deprecatedAttribute;
- };
- // Used internally to process the JSON
- [GenerateInit]
- dictionary ReportingHeaderValue {
- sequence<ReportingItem> items;
- };
- // Used internally to process the JSON
- dictionary ReportingItem {
- // This is a long.
- any max_age;
- // This is a sequence of ReportingEndpoint.
- any endpoints;
- // This is a string. If missing, the value is 'default'.
- any group;
- boolean include_subdomains = false;
- };
- // Used internally to process the JSON
- [GenerateInit]
- dictionary ReportingEndpoint {
- // This is a string.
- any url;
- // This is an unsigned long.
- any priority;
- // This is an unsigned long.
- any weight;
- };
-
- /* ---------------------- Request ----------------------------- */
- /* ./webidl/Request.webidl */
-
- /* -*- Mode: IDL; tab-width: 1; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://fetch.spec.whatwg.org/#request-class
- */
- typedef (Request or USVString) RequestInfo;
- typedef unsigned long nsContentPolicyType;
- [Exposed=(Window,Worker)]
- interface Request {
- /**
- * Note that Requests created from system principal (ie "privileged"/chrome)
- * code will default to omitting credentials. You can override this behaviour
- * using the ``credentials`` member on the ``init`` dictionary.
- */
- [Throws]
- constructor(RequestInfo input, optional RequestInit init = {});
- readonly attribute ByteString method;
- readonly attribute USVString url;
- [SameObject, BinaryName="headers_"] readonly attribute Headers headers;
- readonly attribute RequestDestination destination;
- readonly attribute USVString referrer;
- [BinaryName="referrerPolicy_"]
- readonly attribute ReferrerPolicy referrerPolicy;
- readonly attribute RequestMode mode;
- readonly attribute RequestCredentials credentials;
- readonly attribute RequestCache cache;
- readonly attribute RequestRedirect redirect;
- readonly attribute DOMString integrity;
- [Pref="dom.fetchKeepalive.enabled"]
- readonly attribute boolean keepalive;
- // If a main-thread fetch() promise rejects, the error passed will be a
- // nsresult code.
- [ChromeOnly]
- readonly attribute boolean mozErrors;
- [BinaryName="getOrCreateSignal"]
- readonly attribute AbortSignal signal;
- [Throws,
- NewObject] Request clone();
- // Bug 1124638 - Allow chrome callers to set the context.
- [ChromeOnly]
- undefined overrideContentPolicyType(nsContentPolicyType context);
- };
- Request includes Body;
- // <https://fetch.spec.whatwg.org/#requestinit>.
- dictionary RequestInit {
- ByteString method;
- HeadersInit headers;
- BodyInit? body;
- USVString referrer;
- ReferrerPolicy referrerPolicy;
- RequestMode mode;
- /**
- * If not set, defaults to "same-origin", except for system principal (chrome)
- * requests where the default is "omit".
- */
- RequestCredentials credentials;
- RequestCache cache;
- RequestRedirect redirect;
- DOMString integrity;
- [Pref="dom.fetchKeepalive.enabled"]
- boolean keepalive;
- [ChromeOnly]
- boolean mozErrors;
- AbortSignal? signal;
- [Pref="network.fetchpriority.enabled"]
- RequestPriority priority;
- [Pref="dom.fetchObserver.enabled"]
- ObserverCallback observe;
- };
- enum RequestDestination {
- "",
- "audio", "audioworklet", "document", "embed", "font", "frame", "iframe",
- "image", "manifest", "object", "paintworklet", "report", "script",
- "sharedworker", "style", "track", "video", "worker", "xslt"
- };
- enum RequestMode { "same-origin", "no-cors", "cors", "navigate" };
- enum RequestCredentials { "omit", "same-origin", "include" };
- enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
- enum RequestRedirect { "follow", "error", "manual" };
- enum RequestPriority { "high" , "low" , "auto" };
-
- /* ---------------------- ResizeObserver ----------------------------- */
- /* ./webidl/ResizeObserver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/resize-observer/
- */
- enum ResizeObserverBoxOptions {
- "border-box",
- "content-box",
- "device-pixel-content-box"
- };
- dictionary ResizeObserverOptions {
- ResizeObserverBoxOptions box = "content-box";
- };
- [Exposed=Window]
- interface ResizeObserver {
- [Throws]
- constructor(ResizeObserverCallback callback);
- undefined observe(Element target, optional ResizeObserverOptions options = {});
- undefined unobserve(Element target);
- undefined disconnect();
- };
- callback ResizeObserverCallback = undefined (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
- [Exposed=Window]
- interface ResizeObserverEntry {
- readonly attribute Element target;
- readonly attribute DOMRectReadOnly contentRect;
- // We are using [Pure, Cached, Frozen] sequence until `FrozenArray` is implemented.
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=1236777 for more details.
- [Frozen, Cached, Pure]
- readonly attribute sequence<ResizeObserverSize> borderBoxSize;
- [Frozen, Cached, Pure]
- readonly attribute sequence<ResizeObserverSize> contentBoxSize;
- [Frozen, Cached, Pure]
- readonly attribute sequence<ResizeObserverSize> devicePixelContentBoxSize;
- };
- [Exposed=Window]
- interface ResizeObserverSize {
- readonly attribute unrestricted double inlineSize;
- readonly attribute unrestricted double blockSize;
- };
-
- /* ---------------------- Response ----------------------------- */
- /* ./webidl/Response.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://fetch.spec.whatwg.org/#response-class
- */
- [Exposed=(Window,Worker)]
- interface Response {
- // This should be constructor(optional BodyInit... but BodyInit doesn't
- // include ReadableStream yet because we don't want to expose Streams API to
- // Request.
- [Throws]
- constructor(optional (Blob or BufferSource or FormData or URLSearchParams or ReadableStream or USVString)? body = null,
- optional ResponseInit init = {});
- [NewObject] static Response error();
- [Throws,
- NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
- [BinaryName=CreateFromJson, Throws,
- NewObject] static Response json(any data, optional ResponseInit init = {});
- readonly attribute ResponseType type;
- readonly attribute USVString url;
- readonly attribute boolean redirected;
- readonly attribute unsigned short status;
- readonly attribute boolean ok;
- readonly attribute ByteString statusText;
- [SameObject, BinaryName="headers_"] readonly attribute Headers headers;
- [Throws,
- NewObject] Response clone();
- [ChromeOnly, NewObject, Throws] Response cloneUnfiltered();
- // For testing only.
- [ChromeOnly] readonly attribute boolean hasCacheInfoChannel;
- };
- Response includes Body;
- // This should be part of Body but we don't want to expose body to request yet.
- // See bug 1387483.
- partial interface Response {
- [GetterThrows]
- readonly attribute ReadableStream? body;
- };
- dictionary ResponseInit {
- unsigned short status = 200;
- ByteString statusText = "";
- HeadersInit headers;
- };
- enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
-
- /* ---------------------- RTCCertificate ----------------------------- */
- /* ./webidl/RTCCertificate.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Specification: http://w3c.github.io/webrtc-pc/#certificate-management
- */
- [GenerateInit]
- dictionary RTCCertificateExpiration {
- [EnforceRange]
- DOMTimeStamp expires;
- };
- [Pref="media.peerconnection.enabled", Serializable,
- Exposed=Window]
- interface RTCCertificate {
- readonly attribute DOMTimeStamp expires;
- };
-
- /* ---------------------- RTCConfiguration ----------------------------- */
- /* ./webidl/RTCConfiguration.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCConfiguration
- */
- enum RTCIceCredentialType {
- "password",
- };
- dictionary RTCIceServer {
- (DOMString or sequence<DOMString>) urls;
- DOMString url; //deprecated
- DOMString username;
- DOMString credential;
- RTCIceCredentialType credentialType = "password";
- };
- enum RTCIceTransportPolicy {
- "relay",
- "all"
- };
- enum RTCBundlePolicy {
- "balanced",
- "max-compat",
- "max-bundle"
- };
- dictionary RTCConfiguration {
- sequence<RTCIceServer> iceServers = [];
- RTCIceTransportPolicy iceTransportPolicy = "all";
- RTCBundlePolicy bundlePolicy = "balanced";
- DOMString? peerIdentity = null;
- sequence<RTCCertificate> certificates = [];
- // Non-standard. Only here to be able to detect and warn in web console.
- // Uses DOMString over enum as a trade-off between type errors and safety.
- // TODO: Remove once sdpSemantics usage drops to zero (bug 1632243).
- DOMString sdpSemantics;
- };
-
- /* ---------------------- RTCDataChannel ----------------------------- */
- /* ./webidl/RTCDataChannel.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- enum RTCDataChannelState {
- "connecting",
- "open",
- "closing",
- "closed"
- };
- enum RTCDataChannelType {
- "arraybuffer",
- "blob"
- };
- [Exposed=Window]
- interface RTCDataChannel : EventTarget
- {
- readonly attribute DOMString label;
- readonly attribute boolean negotiated;
- readonly attribute boolean ordered;
- readonly attribute boolean reliable;
- readonly attribute unsigned short? maxPacketLifeTime;
- readonly attribute unsigned short? maxRetransmits;
- readonly attribute USVString protocol;
- readonly attribute unsigned short? id;
- readonly attribute RTCDataChannelState readyState;
- readonly attribute unsigned long bufferedAmount;
- attribute unsigned long bufferedAmountLowThreshold;
- attribute EventHandler onopen;
- attribute EventHandler onerror;
- attribute EventHandler onclose;
- undefined close();
- attribute EventHandler onmessage;
- attribute EventHandler onbufferedamountlow;
- attribute RTCDataChannelType binaryType;
- [Throws]
- undefined send(DOMString data);
- [Throws]
- undefined send(Blob data);
- [Throws]
- undefined send(ArrayBuffer data);
- [Throws]
- undefined send(ArrayBufferView data);
- };
-
- /* ---------------------- RTCDataChannelEvent ----------------------------- */
- /* ./webidl/RTCDataChannelEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelEvent
- */
- dictionary RTCDataChannelEventInit : EventInit {
- required RTCDataChannel channel;
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCDataChannelEvent : Event {
- constructor(DOMString type, RTCDataChannelEventInit eventInitDict);
- readonly attribute RTCDataChannel channel;
- };
-
- /* ---------------------- RTCDtlsTransport ----------------------------- */
- /* ./webidl/RTCDtlsTransport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/#rtcdtlstransport-interface
- */
- enum RTCDtlsTransportState {
- "new",
- "connecting",
- "connected",
- "closed",
- "failed"
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCDtlsTransport : EventTarget {
- [SameObject] readonly attribute RTCIceTransport iceTransport;
- readonly attribute RTCDtlsTransportState state;
- attribute EventHandler onstatechange;
- };
-
- /* ---------------------- RTCDTMFSender ----------------------------- */
- /* ./webidl/RTCDTMFSender.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc/#rtcdtmfsender
- */
- [Exposed=Window]
- interface RTCDTMFSender : EventTarget {
- [Throws]
- undefined insertDTMF(DOMString tones,
- optional unsigned long duration = 100,
- optional unsigned long interToneGap = 70);
- attribute EventHandler ontonechange;
- readonly attribute DOMString toneBuffer;
- };
-
- /* ---------------------- RTCDTMFToneChangeEvent ----------------------------- */
- /* ./webidl/RTCDTMFToneChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc/#rtcdtmftonechangeevent
- */
- [Exposed=Window]
- interface RTCDTMFToneChangeEvent : Event {
- constructor(DOMString type,
- optional RTCDTMFToneChangeEventInit eventInitDict = {});
- readonly attribute DOMString tone;
- };
- dictionary RTCDTMFToneChangeEventInit : EventInit {
- DOMString tone = "";
- };
-
- /* ---------------------- RTCEncodedAudioFrame ----------------------------- */
- /* ./webidl/RTCEncodedAudioFrame.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-encoded-transform
- */
- dictionary RTCEncodedAudioFrameMetadata {
- unsigned long synchronizationSource;
- octet payloadType;
- sequence<unsigned long> contributingSources;
- short sequenceNumber;
- };
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled",
- Exposed=(Window,DedicatedWorker)]
- interface RTCEncodedAudioFrame {
- readonly attribute unsigned long timestamp;
- attribute ArrayBuffer data;
- RTCEncodedAudioFrameMetadata getMetadata();
- };
-
- /* ---------------------- RTCEncodedVideoFrame ----------------------------- */
- /* ./webidl/RTCEncodedVideoFrame.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc-encoded-transform
- */
- // New enum for video frame types. Will eventually re-use the equivalent defined
- // by WebCodecs.
- enum RTCEncodedVideoFrameType {
- "empty",
- "key",
- "delta",
- };
- dictionary RTCEncodedVideoFrameMetadata {
- unsigned long long frameId;
- sequence<unsigned long long> dependencies;
- unsigned short width;
- unsigned short height;
- unsigned long spatialIndex;
- unsigned long temporalIndex;
- unsigned long synchronizationSource;
- octet payloadType;
- sequence<unsigned long> contributingSources;
- long long timestamp; // microseconds
- };
- // New interfaces to define encoded video and audio frames. Will eventually
- // re-use or extend the equivalent defined in WebCodecs.
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled",
- Exposed=(Window,DedicatedWorker)]
- interface RTCEncodedVideoFrame {
- readonly attribute RTCEncodedVideoFrameType type;
- readonly attribute unsigned long timestamp;
- attribute ArrayBuffer data;
- RTCEncodedVideoFrameMetadata getMetadata();
- };
-
- /* ---------------------- RTCIceCandidate ----------------------------- */
- /* ./webidl/RTCIceCandidate.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
- */
- dictionary RTCIceCandidateInit {
- DOMString candidate = "";
- DOMString? sdpMid = null;
- unsigned short? sdpMLineIndex = null;
- DOMString? usernameFragment = null;
- };
- enum RTCIceComponent {
- "rtp",
- "rtcp"
- };
- enum RTCIceProtocol {
- "udp",
- "tcp"
- };
- enum RTCIceCandidateType {
- "host",
- "srflx",
- "prflx",
- "relay"
- };
- enum RTCIceTcpCandidateType {
- "active",
- "passive",
- "so"
- };
- [Pref="media.peerconnection.enabled",
- JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
- Exposed=Window]
- interface RTCIceCandidate {
- [Throws]
- constructor(optional RTCIceCandidateInit candidateInitDict = {});
- readonly attribute DOMString candidate;
- readonly attribute DOMString? sdpMid;
- readonly attribute unsigned short? sdpMLineIndex;
- readonly attribute DOMString? foundation;
- readonly attribute RTCIceComponent? component;
- readonly attribute unsigned long? priority;
- readonly attribute DOMString? address;
- readonly attribute RTCIceProtocol? protocol;
- readonly attribute unsigned short? port;
- readonly attribute RTCIceCandidateType? type;
- readonly attribute RTCIceTcpCandidateType? tcpType;
- readonly attribute DOMString? relatedAddress;
- readonly attribute unsigned short? relatedPort;
- readonly attribute DOMString? usernameFragment;
- // TODO: add remaining members relayProtocol and url (bug 1886013)
- // readonly attribute RTCIceServerTransportProtocol? relayProtocol;
- // readonly attribute DOMString? url;
- RTCIceCandidateInit toJSON();
- };
-
- /* ---------------------- RTCIceTransport ----------------------------- */
- /* ./webidl/RTCIceTransport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/#dom-rtcicetransport
- */
- enum RTCIceTransportState {
- "closed",
- "failed",
- "disconnected",
- "new",
- "checking",
- "completed",
- "connected"
- };
- enum RTCIceGathererState {
- "new",
- "gathering",
- "complete"
- };
- [Exposed=Window]
- interface RTCIceTransport : EventTarget {
- // TODO(bug 1307994)
- // readonly attribute RTCIceRole role;
- // readonly attribute RTCIceComponent component;
- readonly attribute RTCIceTransportState state;
- readonly attribute RTCIceGathererState gatheringState;
- // TODO(bug 1307994)
- // sequence<RTCIceCandidate> getLocalCandidates();
- // sequence<RTCIceCandidate> getRemoteCandidates();
- // RTCIceCandidatePair? getSelectedCandidatePair();
- // RTCIceParameters? getLocalParameters();
- // RTCIceParameters? getRemoteParameters();
- attribute EventHandler onstatechange;
- attribute EventHandler ongatheringstatechange;
- // TODO(bug 1307994)
- // attribute EventHandler onselectedcandidatepairchange;
- };
-
- /* ---------------------- RTCIdentityAssertion ----------------------------- */
- /* ./webidl/RTCIdentityAssertion.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#idl-def-RTCIdentityAssertion
- */
- dictionary RTCIdentityAssertion {
- DOMString idp;
- DOMString name;
- };
-
- /* ---------------------- RTCIdentityProvider ----------------------------- */
- /* ./webidl/RTCIdentityProvider.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * http://w3c.github.io/webrtc-pc/ (with https://github.com/w3c/webrtc-pc/pull/178)
- */
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface RTCIdentityProviderRegistrar {
- undefined register(RTCIdentityProvider idp);
- /* Whether an IdP was passed to register() to chrome code. */
- [ChromeOnly]
- readonly attribute boolean hasIdp;
- /* The following two chrome-only functions forward to the corresponding
- * function on the registered IdP. This is necessary because the
- * JS-implemented WebIDL can't see these functions on `idp` above, chrome JS
- * gets an Xray onto the content code that suppresses functions, see
- * https://developer.mozilla.org/en-US/docs/Xray_vision#Xrays_for_JavaScript_objects
- */
- /* Forward to idp.generateAssertion() */
- [ChromeOnly, Throws]
- Promise<RTCIdentityAssertionResult>
- generateAssertion(DOMString contents, DOMString origin,
- optional RTCIdentityProviderOptions options = {});
- /* Forward to idp.validateAssertion() */
- [ChromeOnly, Throws]
- Promise<RTCIdentityValidationResult>
- validateAssertion(DOMString assertion, DOMString origin);
- };
- dictionary RTCIdentityProvider {
- required GenerateAssertionCallback generateAssertion;
- required ValidateAssertionCallback validateAssertion;
- };
- callback GenerateAssertionCallback =
- Promise<RTCIdentityAssertionResult>
- (DOMString contents, DOMString origin,
- RTCIdentityProviderOptions options);
- callback ValidateAssertionCallback =
- Promise<RTCIdentityValidationResult> (DOMString assertion, DOMString origin);
- dictionary RTCIdentityAssertionResult {
- required RTCIdentityProviderDetails idp;
- required DOMString assertion;
- };
- dictionary RTCIdentityProviderDetails {
- required DOMString domain;
- DOMString protocol = "default";
- };
- dictionary RTCIdentityValidationResult {
- required DOMString identity;
- required DOMString contents;
- };
- dictionary RTCIdentityProviderOptions {
- DOMString protocol = "default";
- DOMString usernameHint;
- DOMString peerIdentity;
- };
-
- /* ---------------------- RTCPeerConnection ----------------------------- */
- /* ./webidl/RTCPeerConnection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#interface-definition
- */
- callback RTCSessionDescriptionCallback = undefined (RTCSessionDescriptionInit description);
- callback RTCPeerConnectionErrorCallback = undefined (DOMException error);
- callback RTCStatsCallback = undefined (RTCStatsReport report);
- enum RTCSignalingState {
- "stable",
- "have-local-offer",
- "have-remote-offer",
- "have-local-pranswer",
- "have-remote-pranswer",
- "closed"
- };
- enum RTCIceGatheringState {
- "new",
- "gathering",
- "complete"
- };
- enum RTCIceConnectionState {
- "closed",
- "failed",
- "disconnected",
- "new",
- "checking",
- "completed",
- "connected"
- };
- enum RTCPeerConnectionState {
- "closed",
- "failed",
- "disconnected",
- "new",
- "connecting",
- "connected"
- };
- enum mozPacketDumpType {
- "rtp", // dump unencrypted rtp as the MediaPipeline sees it
- "srtp", // dump encrypted rtp as the MediaPipeline sees it
- "rtcp", // dump unencrypted rtcp as the MediaPipeline sees it
- "srtcp" // dump encrypted rtcp as the MediaPipeline sees it
- };
- callback mozPacketCallback = undefined (unsigned long level,
- mozPacketDumpType type,
- boolean sending,
- ArrayBuffer packet);
- dictionary RTCDataChannelInit {
- boolean ordered = true;
- [EnforceRange]
- unsigned short maxPacketLifeTime;
- [EnforceRange]
- unsigned short maxRetransmits;
- DOMString protocol = "";
- boolean negotiated = false;
- [EnforceRange]
- unsigned short id;
- // These are deprecated due to renaming in the spec, but still supported for Fx53
- unsigned short maxRetransmitTime;
- };
- dictionary RTCOfferAnswerOptions {
- // boolean voiceActivityDetection = true; // TODO: support this (Bug 1184712)
- };
- dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
- };
- dictionary RTCOfferOptions : RTCOfferAnswerOptions {
- boolean offerToReceiveVideo;
- boolean offerToReceiveAudio;
- boolean iceRestart = false;
- };
- [Pref="media.peerconnection.enabled",
- JSImplementation="@mozilla.org/dom/peerconnection;1",
- Exposed=Window]
- interface RTCPeerConnection : EventTarget {
- [Throws]
- constructor(optional RTCConfiguration configuration = {});
- [Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
- static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
- undefined setIdentityProvider (DOMString provider,
- optional RTCIdentityProviderOptions options = {});
- Promise<DOMString> getIdentityAssertion();
- Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {});
- Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {});
- Promise<undefined> setLocalDescription(optional RTCLocalSessionDescriptionInit description = {});
- readonly attribute RTCSessionDescription? localDescription;
- readonly attribute RTCSessionDescription? currentLocalDescription;
- readonly attribute RTCSessionDescription? pendingLocalDescription;
- Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description);
- readonly attribute RTCSessionDescription? remoteDescription;
- readonly attribute RTCSessionDescription? currentRemoteDescription;
- readonly attribute RTCSessionDescription? pendingRemoteDescription;
- readonly attribute RTCSignalingState signalingState;
- Promise<undefined> addIceCandidate (optional (RTCIceCandidateInit or RTCIceCandidate) candidate = {});
- readonly attribute boolean? canTrickleIceCandidates;
- readonly attribute RTCIceGatheringState iceGatheringState;
- readonly attribute RTCIceConnectionState iceConnectionState;
- readonly attribute RTCPeerConnectionState connectionState;
- undefined restartIce ();
- readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
- readonly attribute DOMString? idpLoginUrl;
- [ChromeOnly]
- attribute DOMString id;
- RTCConfiguration getConfiguration ();
- undefined setConfiguration(optional RTCConfiguration configuration = {});
- [Deprecated="RTCPeerConnectionGetStreams"]
- sequence<MediaStream> getLocalStreams ();
- [Deprecated="RTCPeerConnectionGetStreams"]
- sequence<MediaStream> getRemoteStreams ();
- undefined addStream (MediaStream stream);
- // replaces addStream; fails if already added
- // because a track can be part of multiple streams, stream parameters
- // indicate which particular streams should be referenced in signaling
- RTCRtpSender addTrack(MediaStreamTrack track,
- MediaStream... streams);
- undefined removeTrack(RTCRtpSender sender);
- [Throws]
- RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind,
- optional RTCRtpTransceiverInit init = {});
- sequence<RTCRtpSender> getSenders();
- sequence<RTCRtpReceiver> getReceivers();
- sequence<RTCRtpTransceiver> getTransceivers();
- [ChromeOnly]
- undefined mozSetPacketCallback(mozPacketCallback callback);
- [ChromeOnly]
- undefined mozEnablePacketDump(unsigned long level,
- mozPacketDumpType type,
- boolean sending);
- [ChromeOnly]
- undefined mozDisablePacketDump(unsigned long level,
- mozPacketDumpType type,
- boolean sending);
- undefined close ();
- attribute EventHandler onnegotiationneeded;
- attribute EventHandler onicecandidate;
- attribute EventHandler onsignalingstatechange;
- attribute EventHandler onaddstream; // obsolete
- attribute EventHandler onaddtrack; // obsolete
- attribute EventHandler ontrack; // replaces onaddtrack and onaddstream.
- attribute EventHandler oniceconnectionstatechange;
- attribute EventHandler onicegatheringstatechange;
- attribute EventHandler onconnectionstatechange;
- Promise<RTCStatsReport> getStats (optional MediaStreamTrack? selector = null);
- readonly attribute RTCSctpTransport? sctp;
- // Data channel.
- RTCDataChannel createDataChannel (DOMString label,
- optional RTCDataChannelInit dataChannelDict = {});
- attribute EventHandler ondatachannel;
- };
- // Legacy callback API
- partial interface RTCPeerConnection {
- // Legacy Interface Extensions
- // Supporting the methods in this section is optional.
- // If these methods are supported
- // they must be implemented as defined
- // in section "Legacy Interface Extensions"
- Promise<undefined> createOffer(RTCSessionDescriptionCallback successCallback,
- RTCPeerConnectionErrorCallback failureCallback,
- optional RTCOfferOptions options = {});
- Promise<undefined> setLocalDescription(RTCLocalSessionDescriptionInit description,
- VoidFunction successCallback,
- RTCPeerConnectionErrorCallback failureCallback);
- Promise<undefined> createAnswer(RTCSessionDescriptionCallback successCallback,
- RTCPeerConnectionErrorCallback failureCallback);
- Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description,
- VoidFunction successCallback,
- RTCPeerConnectionErrorCallback failureCallback);
- Promise<undefined> addIceCandidate(RTCIceCandidateInit candidate,
- VoidFunction successCallback,
- RTCPeerConnectionErrorCallback failureCallback);
- };
-
- /* ---------------------- RTCPeerConnectionIceEvent ----------------------------- */
- /* ./webidl/RTCPeerConnectionIceEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCPeerConnectionIceEvent
- */
- dictionary RTCPeerConnectionIceEventInit : EventInit {
- RTCIceCandidate? candidate = null;
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCPeerConnectionIceEvent : Event {
- constructor(DOMString type,
- optional RTCPeerConnectionIceEventInit eventInitDict = {});
- readonly attribute RTCIceCandidate? candidate;
- };
-
- /* ---------------------- RTCPeerConnectionStatic ----------------------------- */
- /* ./webidl/RTCPeerConnectionStatic.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /*
- Right now, it is not possible to add static functions to a JS implemented
- interface (see bug 863952), so we need to create a simple interface with a
- trivial constructor and no data to hold these functions that really ought to
- be static in RTCPeerConnection.
- TODO([email protected]) Merge this code into RTCPeerConnection once this
- limitation is gone. (Bug 1017082)
- */
- enum RTCLifecycleEvent {
- "initialized",
- "icegatheringstatechange",
- "iceconnectionstatechange",
- "connectionstatechange",
- };
- callback PeerConnectionLifecycleCallback = undefined (RTCPeerConnection pc,
- unsigned long long windowId,
- RTCLifecycleEvent eventType);
- [ChromeOnly,
- Pref="media.peerconnection.enabled",
- JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
- Exposed=Window]
- interface RTCPeerConnectionStatic {
- [Throws]
- constructor();
- /* One slot per window (the window in which the register call is made),
- automatically unregistered when window goes away.
- Fires when a PC is created, and whenever the ICE connection state or
- gathering state changes. */
- undefined registerPeerConnectionLifecycleCallback(
- PeerConnectionLifecycleCallback cb);
- };
-
- /* ---------------------- RTCRtpCapabilities ----------------------------- */
- /* ./webidl/RTCRtpCapabilities.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/#dom-rtcrtpcapabilities
- */
- dictionary RTCRtpCapabilities {
- required sequence<RTCRtpCodecCapability> codecs;
- required sequence<RTCRtpHeaderExtensionCapability> headerExtensions;
- };
- dictionary RTCRtpCodecCapability : RTCRtpCodec {
- };
- dictionary RTCRtpCodec {
- required DOMString mimeType;
- required unsigned long clockRate;
- unsigned short channels;
- DOMString sdpFmtpLine;
- };
- dictionary RTCRtpHeaderExtensionCapability {
- required DOMString uri;
- };
-
- /* ---------------------- RTCRtpParameters ----------------------------- */
- /* ./webidl/RTCRtpParameters.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
- */
- enum RTCPriorityType {
- "very-low",
- "low",
- "medium",
- "high"
- };
- enum RTCDegradationPreference {
- "maintain-framerate",
- "maintain-resolution",
- "balanced"
- };
- dictionary RTCRtpEncodingParameters {
- boolean active = true;
- // From https://www.w3.org/TR/webrtc-priority/
- RTCPriorityType priority = "low";
- unsigned long maxBitrate;
- DOMString rid;
- double scaleResolutionDownBy;
- // From https://w3c.github.io/webrtc-extensions/#rtcrtpencodingparameters-dictionary
- double maxFramerate;
- };
- dictionary RTCRtpHeaderExtensionParameters {
- DOMString uri;
- unsigned short id;
- boolean encrypted;
- };
- dictionary RTCRtcpParameters {
- DOMString cname;
- boolean reducedSize;
- };
- dictionary RTCRtpCodecParameters {
- unsigned short payloadType;
- DOMString mimeType;
- unsigned long clockRate;
- unsigned short channels = 1;
- DOMString sdpFmtpLine;
- };
- dictionary RTCRtpParameters {
- // We do not support these, but every wpt test involving parameters insists
- // that these be present, regardless of whether the test-case has anything to
- // do with these in particular (see validateRtpParameters).
- sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
- RTCRtcpParameters rtcp;
- sequence<RTCRtpCodecParameters> codecs;
- };
- dictionary RTCRtpSendParameters : RTCRtpParameters {
- DOMString transactionId;
- required sequence<RTCRtpEncodingParameters> encodings;
- };
-
- /* ---------------------- RTCRtpReceiver ----------------------------- */
- /* ./webidl/RTCRtpReceiver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://lists.w3.org/Archives/Public/public-webrtc/2014May/0067.html
- */
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCRtpReceiver {
- readonly attribute MediaStreamTrack track;
- readonly attribute RTCDtlsTransport? transport;
- static RTCRtpCapabilities? getCapabilities(DOMString kind);
- sequence<RTCRtpContributingSource> getContributingSources();
- sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
- [NewObject]
- Promise<RTCStatsReport> getStats();
- // test-only: for testing getContributingSources
- [ChromeOnly]
- undefined mozInsertAudioLevelForContributingSource(unsigned long source,
- DOMHighResTimeStamp timestamp,
- unsigned long rtpTimestamp,
- boolean hasLevel,
- byte level);
- };
- //https://w3c.github.io/webrtc-extensions/#rtcrtpreceiver-jitterbuffertarget-rtcrtpreceiver-interface
- partial interface RTCRtpReceiver {
- [Throws]
- attribute DOMHighResTimeStamp? jitterBufferTarget;
- };
- // https://w3c.github.io/webrtc-encoded-transform/#specification
- partial interface RTCRtpReceiver {
- [SetterThrows,
- Pref="media.peerconnection.scripttransform.enabled"] attribute RTCRtpTransform? transform;
- };
-
- /* ---------------------- RTCRtpScriptTransform ----------------------------- */
- /* ./webidl/RTCRtpScriptTransform.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc-encoded-transform
- */
- // Spec version is commented out (uncomment if SFrameTransform is implemented)
- // typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
- typedef RTCRtpScriptTransform RTCRtpTransform;
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled",
- Exposed=Window]
- interface RTCRtpScriptTransform {
- [Throws]
- constructor(Worker worker, optional any options, optional sequence<object> transfer);
- };
-
- /* ---------------------- RTCRtpScriptTransformer ----------------------------- */
- /* ./webidl/RTCRtpScriptTransformer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc-encoded-transform
- */
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled",
- Exposed=DedicatedWorker]
- interface RTCRtpScriptTransformer {
- readonly attribute ReadableStream readable;
- readonly attribute WritableStream writable;
- [Throws] readonly attribute any options;
- Promise<unsigned long long> generateKeyFrame(optional DOMString rid);
- Promise<undefined> sendKeyFrameRequest();
- };
-
- /* ---------------------- RTCRtpSender ----------------------------- */
- /* ./webidl/RTCRtpSender.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
- */
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCRtpSender {
- readonly attribute MediaStreamTrack? track;
- readonly attribute RTCDtlsTransport? transport;
- static RTCRtpCapabilities? getCapabilities(DOMString kind);
- [NewObject]
- Promise<undefined> setParameters (RTCRtpSendParameters parameters);
- RTCRtpSendParameters getParameters();
- [Throws]
- Promise<undefined> replaceTrack(MediaStreamTrack? withTrack);
- [Throws]
- undefined setStreams(MediaStream... streams);
- [NewObject]
- Promise<RTCStatsReport> getStats();
- readonly attribute RTCDTMFSender? dtmf;
- [ChromeOnly]
- sequence<MediaStream> getStreams();
- [ChromeOnly]
- undefined setStreamsImpl(MediaStream... streams);
- [ChromeOnly]
- undefined setTrack(MediaStreamTrack? track);
- };
- // https://w3c.github.io/webrtc-encoded-transform/#specification
- partial interface RTCRtpSender {
- [SetterThrows,
- Pref="media.peerconnection.scripttransform.enabled"] attribute RTCRtpTransform? transform;
- };
-
- /* ---------------------- RTCRtpSources ----------------------------- */
- /* ./webidl/RTCRtpSources.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/ Editor's Draft 18 January 2018
- */
- dictionary RTCRtpContributingSource {
- required DOMHighResTimeStamp timestamp;
- required unsigned long source;
- double audioLevel;
- required unsigned long rtpTimestamp;
- };
- dictionary RTCRtpSynchronizationSource : RTCRtpContributingSource {
- boolean? voiceActivityFlag;
- };
- /* Internal enum of types used by RTCRtpSourceEntry */
- enum RTCRtpSourceEntryType {
- "contributing",
- "synchronization",
- };
- /* Internal shared representation of Contributing and Synchronization sources */
- dictionary RTCRtpSourceEntry : RTCRtpSynchronizationSource {
- required RTCRtpSourceEntryType sourceType;
- };
-
- /* ---------------------- RTCRtpTransceiver ----------------------------- */
- /* ./webidl/RTCRtpTransceiver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#rtcrtptransceiver-interface
- */
- enum RTCRtpTransceiverDirection {
- "sendrecv",
- "sendonly",
- "recvonly",
- "inactive",
- "stopped"
- };
- dictionary RTCRtpTransceiverInit {
- RTCRtpTransceiverDirection direction = "sendrecv";
- sequence<MediaStream> streams = [];
- sequence<RTCRtpEncodingParameters> sendEncodings = [];
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCRtpTransceiver {
- readonly attribute DOMString? mid;
- [SameObject]
- readonly attribute RTCRtpSender sender;
- [SameObject]
- readonly attribute RTCRtpReceiver receiver;
- readonly attribute boolean stopped;
- [SetterThrows]
- attribute RTCRtpTransceiverDirection direction;
- readonly attribute RTCRtpTransceiverDirection? currentDirection;
- [Throws]
- undefined stop();
- // TODO: bug 1396922
- // undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
- [ChromeOnly]
- undefined setDirectionInternal(RTCRtpTransceiverDirection direction);
- [ChromeOnly]
- DOMString getKind();
- [ChromeOnly]
- boolean hasBeenUsedToSend();
- };
-
- /* ---------------------- RTCSctpTransport ----------------------------- */
- /* ./webidl/RTCSctpTransport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webrtc-pc/#dom-rtcsctptransport
- */
- enum RTCSctpTransportState {
- "connecting",
- "connected",
- "closed"
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCSctpTransport : EventTarget {
- readonly attribute RTCDtlsTransport transport;
- readonly attribute RTCSctpTransportState state;
- readonly attribute unrestricted double maxMessageSize;
- readonly attribute unsigned short? maxChannels;
- attribute EventHandler onstatechange;
- };
-
- /* ---------------------- RTCSessionDescription ----------------------------- */
- /* ./webidl/RTCSessionDescription.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc/#rtcsessiondescription-class
- */
- enum RTCSdpType {
- "offer",
- "pranswer",
- "answer",
- "rollback"
- };
- dictionary RTCSessionDescriptionInit {
- required RTCSdpType type;
- DOMString sdp = "";
- };
- dictionary RTCLocalSessionDescriptionInit {
- RTCSdpType type;
- DOMString sdp = "";
- };
- [Pref="media.peerconnection.enabled",
- JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
- Exposed=Window]
- interface RTCSessionDescription {
- [Throws]
- constructor(RTCSessionDescriptionInit descriptionInitDict);
- // These should be readonly, but writing causes deprecation warnings for a bit
- attribute RTCSdpType type;
- attribute DOMString sdp;
- [Default] object toJSON();
- };
-
- /* ---------------------- RTCStatsReport ----------------------------- */
- /* ./webidl/RTCStatsReport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcstatsreport-object
- * http://www.w3.org/2011/04/webrtc/wiki/Stats
- * https://www.w3.org/TR/webrtc-stats/
- */
- enum RTCStatsType {
- "codec",
- "inbound-rtp",
- "outbound-rtp",
- "remote-inbound-rtp",
- "remote-outbound-rtp",
- "media-source",
- "peer-connection",
- "csrc",
- "data-channel",
- "session",
- "track",
- "transport",
- "candidate-pair",
- "local-candidate",
- "remote-candidate"
- };
- dictionary RTCStats {
- DOMHighResTimeStamp timestamp;
- RTCStatsType type;
- DOMString id;
- };
- dictionary RTCRtpStreamStats : RTCStats {
- required unsigned long ssrc;
- required DOMString kind;
- DOMString mediaType;
- DOMString transportId;
- DOMString codecId;
- };
- dictionary RTCCodecStats : RTCStats {
- required unsigned long payloadType;
- RTCCodecType codecType;
- required DOMString transportId;
- required DOMString mimeType;
- unsigned long clockRate;
- unsigned long channels;
- DOMString sdpFmtpLine;
- };
- enum RTCCodecType {
- "encode",
- "decode",
- };
- dictionary RTCReceivedRtpStreamStats: RTCRtpStreamStats {
- unsigned long long packetsReceived;
- long long packetsLost;
- double jitter;
- unsigned long discardedPackets; // non-standard alias for packetsDiscarded
- unsigned long packetsDiscarded;
- };
- dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
- required DOMString trackIdentifier;
- DOMString remoteId;
- unsigned long framesDecoded;
- unsigned long framesDropped;
- unsigned long frameWidth;
- unsigned long frameHeight;
- double framesPerSecond;
- unsigned long long qpSum;
- double totalDecodeTime;
- double totalInterFrameDelay;
- double totalSquaredInterFrameDelay;
- DOMHighResTimeStamp lastPacketReceivedTimestamp;
- unsigned long long headerBytesReceived;
- unsigned long long fecPacketsReceived;
- unsigned long long fecPacketsDiscarded;
- unsigned long long bytesReceived;
- unsigned long nackCount;
- unsigned long firCount;
- unsigned long pliCount;
- double totalProcessingDelay;
- // Always missing from libwebrtc
- // DOMHighResTimeStamp estimatedPlayoutTimestamp;
- double jitterBufferDelay;
- unsigned long long jitterBufferEmittedCount;
- unsigned long long totalSamplesReceived;
- unsigned long long concealedSamples;
- unsigned long long silentConcealedSamples;
- unsigned long long concealmentEvents;
- unsigned long long insertedSamplesForDeceleration;
- unsigned long long removedSamplesForAcceleration;
- double audioLevel;
- double totalAudioEnergy;
- double totalSamplesDuration;
- unsigned long framesReceived;
- };
- dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
- DOMString localId;
- double roundTripTime;
- double totalRoundTripTime;
- double fractionLost;
- unsigned long long roundTripTimeMeasurements;
- };
- dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
- unsigned long packetsSent;
- unsigned long long bytesSent;
- };
- dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
- DOMString remoteId;
- unsigned long framesEncoded;
- unsigned long long qpSum;
- unsigned long nackCount;
- unsigned long firCount;
- unsigned long pliCount;
- unsigned long long headerBytesSent;
- unsigned long long retransmittedPacketsSent;
- unsigned long long retransmittedBytesSent;
- unsigned long long totalEncodedBytesTarget;
- unsigned long frameWidth;
- unsigned long frameHeight;
- double framesPerSecond;
- unsigned long framesSent;
- unsigned long hugeFramesSent;
- double totalEncodeTime;
- };
- dictionary RTCRemoteOutboundRtpStreamStats : RTCSentRtpStreamStats {
- DOMString localId;
- DOMHighResTimeStamp remoteTimestamp;
- };
- dictionary RTCMediaSourceStats : RTCStats {
- required DOMString trackIdentifier;
- required DOMString kind;
- };
- dictionary RTCVideoSourceStats : RTCMediaSourceStats {
- unsigned long width;
- unsigned long height;
- unsigned long frames;
- double framesPerSecond;
- };
- dictionary RTCPeerConnectionStats : RTCStats {
- unsigned long dataChannelsOpened;
- unsigned long dataChannelsClosed;
- };
- dictionary RTCRTPContributingSourceStats : RTCStats {
- unsigned long contributorSsrc;
- DOMString inboundRtpStreamId;
- };
- dictionary RTCDataChannelStats : RTCStats {
- DOMString label;
- DOMString protocol;
- long dataChannelIdentifier;
- // RTCTransportId is not yet implemented - Bug 1225723
- // DOMString transportId;
- RTCDataChannelState state;
- unsigned long messagesSent;
- unsigned long long bytesSent;
- unsigned long messagesReceived;
- unsigned long long bytesReceived;
- };
- enum RTCStatsIceCandidatePairState {
- "frozen",
- "waiting",
- "inprogress",
- "failed",
- "succeeded",
- "cancelled"
- };
- dictionary RTCIceCandidatePairStats : RTCStats {
- DOMString transportId;
- DOMString localCandidateId;
- DOMString remoteCandidateId;
- RTCStatsIceCandidatePairState state;
- unsigned long long priority;
- boolean nominated;
- boolean writable;
- boolean readable;
- unsigned long long bytesSent;
- unsigned long long bytesReceived;
- DOMHighResTimeStamp lastPacketSentTimestamp;
- DOMHighResTimeStamp lastPacketReceivedTimestamp;
- boolean selected;
- [ChromeOnly]
- unsigned long componentId; // moz
- };
- dictionary RTCIceCandidateStats : RTCStats {
- DOMString address;
- long port;
- DOMString protocol;
- RTCIceCandidateType candidateType;
- long priority;
- DOMString relayProtocol;
- // Because we use this internally but don't support RTCIceCandidateStats,
- // we need to keep the field as ChromeOnly. Bug 1225723
- [ChromeOnly]
- DOMString transportId;
- [ChromeOnly]
- DOMString proxied;
- };
- // This is for tracking the frame rate in about:webrtc
- dictionary RTCVideoFrameHistoryEntryInternal {
- required unsigned long width;
- required unsigned long height;
- required unsigned long rotationAngle;
- required DOMHighResTimeStamp firstFrameTimestamp;
- required DOMHighResTimeStamp lastFrameTimestamp;
- required unsigned long long consecutiveFrames;
- required unsigned long localSsrc;
- required unsigned long remoteSsrc;
- };
- // Collection over the entries for a single track for about:webrtc
- dictionary RTCVideoFrameHistoryInternal {
- required DOMString trackIdentifier;
- sequence<RTCVideoFrameHistoryEntryInternal> entries = [];
- };
- // Collection over the libwebrtc bandwidth estimation stats
- dictionary RTCBandwidthEstimationInternal {
- required DOMString trackIdentifier;
- long sendBandwidthBps; // Estimated available send bandwidth
- long maxPaddingBps; // Cumulative configured max padding
- long receiveBandwidthBps; // Estimated available receive bandwidth
- long pacerDelayMs;
- long rttMs;
- };
- // This is used by about:webrtc to report SDP parsing errors
- dictionary RTCSdpParsingErrorInternal {
- required unsigned long lineNumber;
- required DOMString error;
- };
- // This is for tracking the flow of SDP for about:webrtc
- dictionary RTCSdpHistoryEntryInternal {
- required DOMHighResTimeStamp timestamp;
- required boolean isLocal;
- required DOMString sdp;
- sequence<RTCSdpParsingErrorInternal> errors = [];
- };
- // This is intended to be a list of dictionaries that inherit from RTCStats
- // (with some raw ICE candidates thrown in). Unfortunately, we cannot simply
- // store a sequence<RTCStats> because of slicing. So, we have to have a
- // separate list for each type. Used in c++ gecko code.
- dictionary RTCStatsCollection {
- sequence<RTCInboundRtpStreamStats> inboundRtpStreamStats = [];
- sequence<RTCOutboundRtpStreamStats> outboundRtpStreamStats = [];
- sequence<RTCRemoteInboundRtpStreamStats> remoteInboundRtpStreamStats = [];
- sequence<RTCRemoteOutboundRtpStreamStats> remoteOutboundRtpStreamStats = [];
- sequence<RTCMediaSourceStats> mediaSourceStats = [];
- sequence<RTCVideoSourceStats> videoSourceStats = [];
- sequence<RTCPeerConnectionStats> peerConnectionStats = [];
- sequence<RTCRTPContributingSourceStats> rtpContributingSourceStats = [];
- sequence<RTCIceCandidatePairStats> iceCandidatePairStats = [];
- sequence<RTCIceCandidateStats> iceCandidateStats = [];
- sequence<RTCIceCandidateStats> trickledIceCandidateStats = [];
- sequence<RTCDataChannelStats> dataChannelStats = [];
- sequence<RTCCodecStats> codecStats = [];
- // For internal use only
- sequence<DOMString> rawLocalCandidates = [];
- sequence<DOMString> rawRemoteCandidates = [];
- sequence<RTCVideoFrameHistoryInternal> videoFrameHistories = [];
- sequence<RTCBandwidthEstimationInternal> bandwidthEstimations = [];
- };
- // Details that about:webrtc can display about configured ICE servers
- dictionary RTCIceServerInternal {
- sequence<DOMString> urls = [];
- required boolean credentialProvided;
- required boolean userNameProvided;
- };
- // Details that about:webrtc can display about the RTCConfiguration
- // Chrome only
- dictionary RTCConfigurationInternal {
- RTCBundlePolicy bundlePolicy;
- required boolean certificatesProvided;
- sequence<RTCIceServerInternal> iceServers = [];
- RTCIceTransportPolicy iceTransportPolicy;
- required boolean peerIdentityProvided;
- DOMString sdpSemantics;
- };
- dictionary RTCSdpHistoryInternal {
- required DOMString pcid;
- sequence<RTCSdpHistoryEntryInternal> sdpHistory = [];
- };
- // A collection of RTCStats dictionaries, plus some other info. Used by
- // WebrtcGlobalInformation for about:webrtc, and telemetry.
- dictionary RTCStatsReportInternal : RTCStatsCollection {
- required DOMString pcid;
- required unsigned long browserId;
- RTCConfigurationInternal configuration;
- DOMString jsepSessionErrors;
- // TODO demux from RTCStatsReportInternal in bug 1830824
- sequence<RTCSdpHistoryEntryInternal> sdpHistory = [];
- required DOMHighResTimeStamp timestamp;
- double callDurationMs;
- required unsigned long iceRestarts;
- required unsigned long iceRollbacks;
- boolean offerer; // Is the PC the offerer
- required boolean closed; // Is the PC now closed
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCStatsReport {
- // TODO(bug 1586109): Remove this once we no longer need to be able to
- // construct empty RTCStatsReports from JS.
- [ChromeOnly]
- constructor();
- readonly maplike<DOMString, object>;
- };
-
- /* ---------------------- RTCTrackEvent ----------------------------- */
- /* ./webidl/RTCTrackEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://w3c.github.io/webrtc-pc/#idl-def-RTCTrackEvent
- */
- dictionary RTCTrackEventInit : EventInit {
- required RTCRtpReceiver receiver;
- required MediaStreamTrack track;
- sequence<MediaStream> streams = [];
- required RTCRtpTransceiver transceiver;
- };
- [Pref="media.peerconnection.enabled",
- Exposed=Window]
- interface RTCTrackEvent : Event {
- constructor(DOMString type, RTCTrackEventInit eventInitDict);
- readonly attribute RTCRtpReceiver receiver;
- readonly attribute MediaStreamTrack track;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- // readonly attribute FrozenArray<MediaStream> streams;
- [Frozen, Cached, Pure]
- readonly attribute sequence<MediaStream> streams; // workaround
- readonly attribute RTCRtpTransceiver transceiver;
- };
-
- /* ---------------------- RTCTransformEvent ----------------------------- */
- /* ./webidl/RTCTransformEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.w3.org/TR/webrtc-encoded-transform
- */
- [Pref="media.peerconnection.enabled",
- Pref="media.peerconnection.scripttransform.enabled",
- Exposed=DedicatedWorker]
- interface RTCTransformEvent : Event {
- constructor(DOMString type, RTCTransformEventInit eventInitDict);
- readonly attribute RTCRtpScriptTransformer transformer;
- };
- dictionary RTCTransformEventInit : EventInit {
- required RTCRtpScriptTransformer transformer;
- };
-
- /* ---------------------- Sanitizer ----------------------------- */
- /* ./webidl/Sanitizer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://wicg.github.io/sanitizer-api/#sanitizer
- * https://wicg.github.io/sanitizer-api/#config
- *
- * * Copyright © 2020 the Contributors to the HTML Sanitizer API Specification,
- * published by the Web Platform Incubator Community Group under the W3C Community Contributor License Agreement (CLA).
- */
- // NOTE: This IDL is still under development:
- // https://github.com/WICG/sanitizer-api/issues/181
- dictionary SanitizerElementNamespace {
- required DOMString name;
- DOMString? _namespace = "http://www.w3.org/1999/xhtml";
- };
- // Used by "elements"
- dictionary SanitizerElementNamespaceWithAttributes : SanitizerElementNamespace {
- sequence<SanitizerAttribute> attributes;
- sequence<SanitizerAttribute> removeAttributes;
- };
- typedef (DOMString or SanitizerElementNamespace) SanitizerElement;
- typedef (DOMString or SanitizerElementNamespaceWithAttributes) SanitizerElementWithAttributes;
- dictionary SanitizerAttributeNamespace {
- required DOMString name;
- DOMString? _namespace = null;
- };
- typedef (DOMString or SanitizerAttributeNamespace) SanitizerAttribute;
- dictionary SanitizerConfig {
- sequence<SanitizerElementWithAttributes> elements;
- sequence<SanitizerElement> removeElements;
- sequence<SanitizerElement> replaceWithChildrenElements;
- sequence<SanitizerAttribute> attributes;
- sequence<SanitizerAttribute> removeAttributes;
- boolean customElements;
- boolean unknownMarkup; // Name TBD!
- boolean comments;
- };
- typedef (DocumentFragment or Document) SanitizerInput;
- [Exposed=Window, SecureContext, Pref="dom.security.sanitizer.enabled"]
- interface Sanitizer {
- [Throws, UseCounter]
- constructor(optional SanitizerConfig sanitizerConfig = {});
- [UseCounter, Throws]
- DocumentFragment sanitize(SanitizerInput input);
- };
-
- /* ---------------------- Screen ----------------------------- */
- /* ./webidl/Screen.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Exposed=Window]
- interface Screen : EventTarget {
- // CSSOM-View
- // http://dev.w3.org/csswg/cssom-view/#the-screen-interface
- readonly attribute long availWidth;
- readonly attribute long availHeight;
- readonly attribute long width;
- readonly attribute long height;
- readonly attribute long colorDepth;
- readonly attribute long pixelDepth;
- readonly attribute long top;
- readonly attribute long left;
- readonly attribute long availTop;
- readonly attribute long availLeft;
- /**
- * DEPRECATED, use ScreenOrientation API instead.
- * Returns the current screen orientation.
- * Can be: landscape-primary, landscape-secondary,
- * portrait-primary or portrait-secondary.
- */
- [NeedsCallerType]
- readonly attribute DOMString mozOrientation;
- attribute EventHandler onmozorientationchange;
- /**
- * DEPRECATED, use ScreenOrientation API instead.
- * Lock/unlock screen orientation to the specified type.
- *
- * FIXME(emilio): These do literally nothing, we should
- * try to remove these.
- */
- boolean mozLockOrientation(DOMString orientation);
- boolean mozLockOrientation(sequence<DOMString> orientation);
- undefined mozUnlockOrientation();
- };
- // https://w3c.github.io/screen-orientation
- partial interface Screen {
- readonly attribute ScreenOrientation orientation;
- };
- // https://wicg.github.io/media-capabilities/#idl-index
- enum ScreenColorGamut {
- "srgb",
- "p3",
- "rec2020",
- };
- [Func="nsScreen::MediaCapabilitiesEnabled",
- Exposed=Window]
- interface ScreenLuminance {
- readonly attribute double min;
- readonly attribute double max;
- readonly attribute double maxAverage;
- };
- partial interface Screen {
- [Func="nsScreen::MediaCapabilitiesEnabled"]
- readonly attribute ScreenColorGamut colorGamut;
- [Func="nsScreen::MediaCapabilitiesEnabled"]
- readonly attribute ScreenLuminance? luminance;
- [Func="nsScreen::MediaCapabilitiesEnabled"]
- attribute EventHandler onchange;
- };
-
- /* ---------------------- ScreenOrientation ----------------------------- */
- /* ./webidl/ScreenOrientation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/screen-orientation
- *
- * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights
- * Reserved. W3C liability, trademark and document use rules apply.
- */
- enum OrientationType {
- "portrait-primary",
- "portrait-secondary",
- "landscape-primary",
- "landscape-secondary"
- };
- enum OrientationLockType {
- "any",
- "natural",
- "landscape",
- "portrait",
- "portrait-primary",
- "portrait-secondary",
- "landscape-primary",
- "landscape-secondary"
- };
- [Exposed=Window]
- interface ScreenOrientation : EventTarget {
- [NewObject]
- Promise<undefined> lock(OrientationLockType orientation);
- [Throws]
- undefined unlock();
- [Throws, NeedsCallerType]
- readonly attribute OrientationType type;
- [Throws, NeedsCallerType]
- readonly attribute unsigned short angle;
- attribute EventHandler onchange;
- };
-
- /* ---------------------- ScriptProcessorNode ----------------------------- */
- /* ./webidl/ScriptProcessorNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface ScriptProcessorNode : AudioNode {
- attribute EventHandler onaudioprocess;
- readonly attribute long bufferSize;
- };
- // Mozilla extension
- ScriptProcessorNode includes AudioNodePassThrough;
-
- /* ---------------------- ScrollAreaEvent ----------------------------- */
- /* ./webidl/ScrollAreaEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface ScrollAreaEvent : UIEvent
- {
- readonly attribute float x;
- readonly attribute float y;
- readonly attribute float width;
- readonly attribute float height;
- undefined initScrollAreaEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Window? view = null,
- optional long detail = 0,
- optional float x = 0,
- optional float y = 0,
- optional float width = 0,
- optional float height = 0);
- };
-
- /* ---------------------- ScrollViewChangeEvent ----------------------------- */
- /* ./webidl/ScrollViewChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- enum ScrollState {"started", "stopped"};
- dictionary ScrollViewChangeEventInit : EventInit {
- ScrollState state = "started";
- };
- [ChromeOnly,
- Exposed=Window]
- interface ScrollViewChangeEvent : Event {
- constructor(DOMString type,
- optional ScrollViewChangeEventInit eventInit = {});
- readonly attribute ScrollState state;
- };
-
- /* ---------------------- SecurityPolicyViolationEvent ----------------------------- */
- /* ./webidl/SecurityPolicyViolationEvent.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webappsec-csp/#violation-events
- */
- enum SecurityPolicyViolationEventDisposition
- {
- "enforce", "report"
- };
- [Exposed=Window]
- interface SecurityPolicyViolationEvent : Event
- {
- constructor(DOMString type,
- optional SecurityPolicyViolationEventInit eventInitDict = {});
- readonly attribute DOMString documentURI;
- readonly attribute DOMString referrer;
- readonly attribute DOMString blockedURI;
- readonly attribute DOMString violatedDirective; // historical alias of effectiveDirective
- readonly attribute DOMString effectiveDirective;
- readonly attribute DOMString originalPolicy;
- readonly attribute DOMString sourceFile;
- readonly attribute DOMString sample;
- readonly attribute SecurityPolicyViolationEventDisposition disposition;
- readonly attribute unsigned short statusCode;
- readonly attribute unsigned long lineNumber;
- readonly attribute unsigned long columnNumber;
- };
- [GenerateInitFromJSON, GenerateToJSON]
- dictionary SecurityPolicyViolationEventInit : EventInit
- {
- DOMString documentURI = "";
- DOMString referrer = "";
- DOMString blockedURI = "";
- DOMString violatedDirective = "";
- DOMString effectiveDirective = "";
- DOMString originalPolicy = "";
- DOMString sourceFile = "";
- DOMString sample = "";
- SecurityPolicyViolationEventDisposition disposition = "enforce";
- unsigned short statusCode = 0;
- unsigned long lineNumber = 0;
- unsigned long columnNumber = 0;
- };
-
- /* ---------------------- Selection ----------------------------- */
- /* ./webidl/Selection.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/selection-api/#selection-interface
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface Selection {
- [NeedsCallerType]
- readonly attribute Node? anchorNode;
- [NeedsCallerType]
- readonly attribute unsigned long anchorOffset;
- [NeedsCallerType]
- readonly attribute Node? focusNode;
- [NeedsCallerType]
- readonly attribute unsigned long focusOffset;
- readonly attribute boolean isCollapsed;
- /**
- * Returns the number of ranges in the selection.
- */
- readonly attribute unsigned long rangeCount;
- readonly attribute DOMString type;
- readonly attribute DOMString direction;
- /**
- * Returns the range at the specified index. Throws if the index is
- * out of range.
- */
- [Throws]
- Range getRangeAt(unsigned long index);
- /**
- * Adds a range to the current selection.
- */
- [Throws, BinaryName="addRangeJS"]
- undefined addRange(Range range);
- /**
- * Removes a range from the current selection.
- */
- [Throws, BinaryName="removeRangeAndUnselectFramesAndNotifyListeners"]
- undefined removeRange(Range range);
- /**
- * Removes all ranges from the current selection.
- */
- [Throws]
- undefined removeAllRanges();
- [Throws, BinaryName="RemoveAllRanges"]
- undefined empty();
- [Pref="dom.shadowdom.selection_across_boundary_enabled"]
- sequence<StaticRange> getComposedRanges(ShadowRoot... shadowRoots);
- [Throws, BinaryName="collapseJS"]
- undefined collapse(Node? node, optional unsigned long offset = 0);
- [Throws, BinaryName="collapseJS"]
- undefined setPosition(Node? node, optional unsigned long offset = 0);
- [Throws, BinaryName="collapseToStartJS"]
- undefined collapseToStart();
- [Throws, BinaryName="collapseToEndJS"]
- undefined collapseToEnd();
- [Throws, BinaryName="extendJS"]
- undefined extend(Node node, optional unsigned long offset = 0);
- [Throws, BinaryName="setBaseAndExtentJS"]
- undefined setBaseAndExtent(Node anchorNode,
- unsigned long anchorOffset,
- Node focusNode,
- unsigned long focusOffset);
- [Throws, BinaryName="selectAllChildrenJS"]
- undefined selectAllChildren(Node node);
- [CEReactions, Throws]
- undefined deleteFromDocument();
- [Throws]
- boolean containsNode(Node node,
- optional boolean allowPartialContainment = false);
- stringifier DOMString ();
- };
- // Additional methods not currently in the spec
- partial interface Selection {
- [Throws]
- undefined modify(DOMString alter, DOMString direction,
- DOMString granularity);
- };
- // Additional chrome-only methods.
- interface nsISelectionListener;
- partial interface Selection {
- /**
- * A true value means "selection after newline"; false means "selection before
- * newline" when a selection is positioned "between lines".
- */
- [ChromeOnly,Throws, BinaryName=interlinePositionJS]
- attribute boolean interlinePosition;
- [Throws]
- attribute short? caretBidiLevel;
- [ChromeOnly,Throws]
- DOMString toStringWithFormat(DOMString formatType, unsigned long flags, long wrapColumn);
- [ChromeOnly]
- undefined addSelectionListener(nsISelectionListener newListener);
- [ChromeOnly]
- undefined removeSelectionListener(nsISelectionListener listenerToRemove);
- [ChromeOnly,BinaryName="rawType"]
- readonly attribute short selectionType;
- /**
- * Return array of ranges intersecting with the given DOM interval.
- */
- [ChromeOnly,Throws,Pref="dom.testing.selection.GetRangesForInterval"]
- sequence<Range> GetRangesForInterval(Node beginNode, long beginOffset, Node endNode, long endOffset,
- boolean allowAdjacent);
- /**
- * Scrolls a region of the selection, so that it is visible in
- * the scrolled view.
- *
- * @param aRegion the region inside the selection to scroll into view
- * (see selection region constants defined in
- * nsISelectionController).
- * @param aIsSynchronous when true, scrolls the selection into view
- * before returning. If false, posts a request which
- * is processed at some point after the method returns.
- * @param aVPercent how to align the frame vertically.
- * @param aHPercent how to align the frame horizontally.
- */
- [ChromeOnly,Throws]
- undefined scrollIntoView(short aRegion, boolean aIsSynchronous, short aVPercent, short aHPercent);
- /**
- * setColors() sets custom colors for the selection.
- * Currently, this is supported only when the selection type is SELECTION_FIND.
- * Otherwise, throws an exception.
- *
- * @param aForegroundColor The foreground color of the selection.
- * If this is "currentColor", foreground color
- * isn't changed by this selection.
- * @param aBackgroundColor The background color of the selection.
- * If this is "transparent", background color is
- * never painted.
- * @param aAltForegroundColor The alternative foreground color of the
- * selection.
- * If aBackgroundColor doesn't have sufficient
- * contrast with its around or foreground color
- * if "currentColor" is specified, alternative
- * colors are used if it have higher contrast.
- * @param aAltBackgroundColor The alternative background color of the
- * selection.
- */
- [ChromeOnly,Throws]
- undefined setColors(DOMString aForegroundColor, DOMString aBackgroundColor,
- DOMString aAltForegroundColor, DOMString aAltBackgroundColor);
- /**
- * resetColors() forget the customized colors which were set by setColors().
- */
- [ChromeOnly]
- undefined resetColors();
- };
-
- /* ---------------------- ServiceWorker ----------------------------- */
- /* ./webidl/ServiceWorker.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-obj
- *
- */
- // Still unclear what should be subclassed.
- // https://github.com/slightlyoff/ServiceWorker/issues/189
- [Func="ServiceWorkerVisible",
- // FIXME(nsm): Bug 1113522. This is exposed to satisfy webidl constraints, but it won't actually work.
- Exposed=(Window,Worker)]
- interface ServiceWorker : EventTarget {
- readonly attribute USVString scriptURL;
- readonly attribute ServiceWorkerState state;
- attribute EventHandler onstatechange;
- [Throws]
- undefined postMessage(any message, sequence<object> transferable);
- [Throws]
- undefined postMessage(any message, optional StructuredSerializeOptions options = {});
- };
- ServiceWorker includes AbstractWorker;
- enum ServiceWorkerState {
- // https://github.com/w3c/ServiceWorker/issues/1162
- "parsed",
- "installing",
- "installed",
- "activating",
- "activated",
- "redundant"
- };
-
- /* ---------------------- ServiceWorkerContainer ----------------------------- */
- /* ./webidl/ServiceWorkerContainer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/ServiceWorker/#serviceworkercontainer
- *
- */
- [Func="ServiceWorkersEnabled",
- Exposed=Window]
- interface ServiceWorkerContainer : EventTarget {
- // FIXME(nsm):
- // https://github.com/slightlyoff/ServiceWorker/issues/198
- // and discussion at https://etherpad.mozilla.org/serviceworker07apr
- readonly attribute ServiceWorker? controller;
- [Throws]
- readonly attribute Promise<ServiceWorkerRegistration> ready;
- [NewObject, NeedsCallerType]
- Promise<ServiceWorkerRegistration> register(USVString scriptURL,
- optional RegistrationOptions options = {});
- [NewObject]
- Promise<(ServiceWorkerRegistration or undefined)> getRegistration(optional USVString documentURL = "");
- [NewObject]
- Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
- undefined startMessages();
- attribute EventHandler oncontrollerchange;
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
- // Testing only.
- partial interface ServiceWorkerContainer {
- [Throws,Pref="dom.serviceWorkers.testing.enabled"]
- DOMString getScopeForUrl(DOMString url);
- };
- dictionary RegistrationOptions {
- USVString scope;
- ServiceWorkerUpdateViaCache updateViaCache = "imports";
- };
-
- /* ---------------------- ServiceWorkerGlobalScope ----------------------------- */
- /* ./webidl/ServiceWorkerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
- * http://w3c.github.io/push-api/
- * https://notifications.spec.whatwg.org/
- *
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Global=(Worker,ServiceWorker),
- Exposed=ServiceWorker]
- interface ServiceWorkerGlobalScope : WorkerGlobalScope {
- [SameObject, BinaryName="GetClients"]
- readonly attribute Clients clients;
- [SameObject] readonly attribute ServiceWorkerRegistration registration;
- [Throws, NewObject]
- Promise<undefined> skipWaiting();
- attribute EventHandler oninstall;
- attribute EventHandler onactivate;
- attribute EventHandler onfetch;
- // The event.source of these MessageEvents are instances of Client
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
- // These are from w3c.github.io/push-api/
- partial interface ServiceWorkerGlobalScope {
- attribute EventHandler onpush;
- attribute EventHandler onpushsubscriptionchange;
- };
- // https://notifications.spec.whatwg.org/
- partial interface ServiceWorkerGlobalScope {
- attribute EventHandler onnotificationclick;
- attribute EventHandler onnotificationclose;
- };
- // Mixin the WebExtensions API globals (the actual properties are only available to
- // extension service workers, locked behind a Func="extensions::ExtensionAPIAllowed" annotation).
- ServiceWorkerGlobalScope includes ExtensionGlobalsMixin;
-
- /* ---------------------- ServiceWorkerRegistration ----------------------------- */
- /* ./webidl/ServiceWorkerRegistration.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
- * https://w3c.github.io/push-api/
- * https://notifications.spec.whatwg.org/
- */
- [Func="ServiceWorkerVisible",
- Exposed=(Window,Worker)]
- interface ServiceWorkerRegistration : EventTarget {
- readonly attribute ServiceWorker? installing;
- readonly attribute ServiceWorker? waiting;
- readonly attribute ServiceWorker? active;
- [Pref="dom.serviceWorkers.navigationPreload.enabled", SameObject]
- readonly attribute NavigationPreloadManager navigationPreload;
- readonly attribute USVString scope;
- [Throws]
- readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
- [Throws, NewObject]
- Promise<undefined> update();
- [Throws, NewObject]
- Promise<boolean> unregister();
- // event
- attribute EventHandler onupdatefound;
- };
- enum ServiceWorkerUpdateViaCache {
- "imports",
- "all",
- "none"
- };
- // https://w3c.github.io/push-api/
- partial interface ServiceWorkerRegistration {
- [Throws, Exposed=(Window,Worker), Pref="dom.push.enabled"]
- readonly attribute PushManager pushManager;
- };
- // https://notifications.spec.whatwg.org/
- partial interface ServiceWorkerRegistration {
- [NewObject, Func="mozilla::dom::Notification::PrefEnabled"]
- Promise<undefined> showNotification(DOMString title, optional NotificationOptions options = {});
- [NewObject, Func="mozilla::dom::Notification::PrefEnabled"]
- Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter = {});
- };
-
- /* ---------------------- ShadowRealmGlobalScope ----------------------------- */
- /* ./webidl/ShadowRealmGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // This interface exists purely to register a new global as part of
- // code generation so that we can properly hook this into
- // shadow realms.
- [Global=(ShadowRealmGlobal), Exposed=ShadowRealmGlobal, LegacyNoInterfaceObject]
- interface ShadowRealmGlobalScope { };
-
- /* ---------------------- ShadowRoot ----------------------------- */
- /* ./webidl/ShadowRoot.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- // https://dom.spec.whatwg.org/#enumdef-shadowrootmode
- enum ShadowRootMode {
- "open",
- "closed"
- };
- enum SlotAssignmentMode { "manual", "named" };
- // https://dom.spec.whatwg.org/#shadowroot
- [Exposed=Window,
- InstrumentedProps=(pictureInPictureElement)]
- interface ShadowRoot : DocumentFragment
- {
- // Shadow DOM v1
- readonly attribute ShadowRootMode mode;
- readonly attribute boolean delegatesFocus;
- readonly attribute SlotAssignmentMode slotAssignment;
- [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- readonly attribute boolean clonable;
- readonly attribute Element host;
- attribute EventHandler onslotchange;
- Element? getElementById(DOMString elementId);
- // https://w3c.github.io/DOM-Parsing/#the-innerhtml-mixin
- [CEReactions, SetterThrows]
- attribute [LegacyNullToEmptyString] DOMString innerHTML;
- // When JS invokes importNode or createElement, the binding code needs to
- // create a reflector, and so invoking those methods directly on the content
- // document would cause the reflector to be created in the content scope,
- // at which point it would be difficult to move into the UA Widget scope.
- // As such, these methods allow UA widget code to simultaneously create nodes
- // and associate them with the UA widget tree, so that the reflectors get
- // created in the right scope.
- [CEReactions, Throws, Func="IsChromeOrUAWidget"]
- Node importNodeAndAppendChildAt(Node parentNode, Node node, optional boolean deep = false);
- [CEReactions, Throws, Func="IsChromeOrUAWidget"]
- Node createElementAndAppendChildAt(Node parentNode, DOMString localName);
- // For triggering UA Widget scope in tests.
- [ChromeOnly]
- undefined setIsUAWidget();
- [ChromeOnly]
- boolean isUAWidget();
- };
- partial interface ShadowRoot {
- // https://html.spec.whatwg.org/#dom-shadowroot-sethtmlunsafe
- [Pref="dom.webcomponents.shadowdom.declarative.enabled"]
- undefined setHTMLUnsafe(DOMString html);
- };
- ShadowRoot includes DocumentOrShadowRoot;
-
- /* ---------------------- SharedWorker ----------------------------- */
- /* ./webidl/SharedWorker.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface SharedWorker : EventTarget {
- [Throws]
- constructor(USVString scriptURL,
- optional (DOMString or WorkerOptions) options = {});
- readonly attribute MessagePort port;
- };
- SharedWorker includes AbstractWorker;
-
- /* ---------------------- SharedWorkerGlobalScope ----------------------------- */
- /* ./webidl/SharedWorkerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
- * Software ASA.
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Global=(Worker,SharedWorker),
- Exposed=SharedWorker]
- interface SharedWorkerGlobalScope : WorkerGlobalScope {
- [Replaceable]
- readonly attribute DOMString name;
- undefined close();
- attribute EventHandler onconnect;
- };
-
- /* ---------------------- SimpleGestureEvent ----------------------------- */
- /* ./webidl/SimpleGestureEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * The SimpleGestureEvent interface is the datatype for all
- * Mozilla-specific simple gesture events in the Document Object Model.
- *
- * The following events are generated:
- *
- * MozSwipeGestureMayStart - Generated when the user starts a horizontal
- * swipe across the input device, but before we know whether the user
- * is actually scrolling past a scroll edge.
- * This event asks two questions: Should a swipe really be started, and
- * in which directions should the user be able to swipe? The first
- * question is answered by event listeners by calling or not calling
- * preventDefault() on the event. Since a swipe swallows all scroll
- * events, the default action of the swipe start event is *not* to
- * start a swipe. Call preventDefault() if you want a swipe to be
- * started. Doing so won't necessarily result in a swipe being started,
- * it only communicates an intention. Once Gecko determines whether a
- * swipe should actually be started, it will send a MozSwipeGestureStart
- * event.
- * The second question (swipe-able directions) is answered in the
- * allowedDirections field.
- *
- * MozSwipeGestureStart - This event signals the start of a swipe.
- * It guarantees a future MozSwipeGestureEnd event that will signal
- * the end of a swipe animation.
- *
- * MozSwipeGestureUpdate - Generated periodically while the user is
- * continuing a horizontal swipe gesture. The "delta" value represents
- * the current absolute gesture amount. This event may even be sent
- * after a MozSwipeGesture event fired in order to allow for fluid
- * completion of a swipe animation. The direction value is meaningless
- * on swipe update events.
- *
- * MozSwipeGestureEnd - Generated when the swipe animation is completed.
- *
- * MozSwipeGesture - Generated when the user releases a swipe across
- * across the input device. This event signals that the actual swipe
- * operation is complete, even though the animation might not be finished
- * yet. This event can be sent without accompanying start / update / end
- * events, and it can also be handled on its own if the consumer doesn't
- * want to handle swipe animation events.
- * Only the direction value has any significance, the delta value is
- * meaningless.
- *
- * MozMagnifyGestureStart - Generated when the user begins the magnify
- * ("pinch") gesture. The "delta" value represents the initial
- * movement.
- *
- * MozMagnifyGestureUpdate - Generated periodically while the user is
- * continuing the magnify ("pinch") gesture. The "delta" value
- * represents the movement since the last MozMagnifyGestureStart or
- * MozMagnifyGestureUpdate event.
- *
- * MozMagnifyGesture - Generated when the user has completed the
- * magnify ("pinch") gesture. If you only want to receive a single
- * event when the magnify gesture is complete, you only need to hook
- * this event and can safely ignore the MozMagnifyGestureStart and the
- * MozMagnifyGestureUpdate events. The "delta" value is the cumulative
- * amount represented by the user's gesture.
- *
- * MozRotateGestureStart - Generated when the user begins the rotation
- * gesture. The "delta" value represents the initial rotation.
- *
- * MozRotateGestureUpdate - Generated periodically while the user is
- * continuing the rotation gesture. The "delta" value represents the
- * rotation since the last MozRotateGestureStart or
- * MozRotateGestureUpdate event.
- *
- * MozRotateGesture - Generated when the user has completed the
- * rotation gesture. If you only want to receive a single event when
- * the rotation gesture is complete, you only need to hook this event
- * and can safely ignore the MozRotateGestureStart and the
- * MozRotateGestureUpdate events. The "delta" value is the cumulative
- * amount of rotation represented by the user's gesture.
- *
- * MozTapGesture - Generated when the user executes a two finger
- * tap gesture on the input device. Client coordinates contain the
- * center point of the tap.
- * (XXX On OS X, only Lion (10.7) and up)
- *
- * MozPressTapGesture - Generated when the user executes a press
- * and tap two finger gesture (first finger down, second finger down,
- * second finger up, first finger up) on the input device.
- * Client coordinates contain the center pivot point of the action.
- * (XXX Not implemented on Mac)
- *
- * MozEdgeUIGesture - Generated when the user swipes the display to
- * invoke edge ui.
- * (XXX Win8 only)
- *
- * Default behavior:
- *
- * Some operating systems support default behaviors for gesture events
- * when they are not handled by the application. Consumers should
- * use event.preventDefault() to prevent default behavior when
- * consuming events.
- */
- [ChromeOnly,
- Exposed=Window]
- interface SimpleGestureEvent : MouseEvent
- {
- /* Swipe direction constants */
- const unsigned long DIRECTION_UP = 1;
- const unsigned long DIRECTION_DOWN = 2;
- const unsigned long DIRECTION_LEFT = 4;
- const unsigned long DIRECTION_RIGHT = 8;
- /* Rotational direction constants */
- const unsigned long ROTATION_COUNTERCLOCKWISE = 1;
- const unsigned long ROTATION_CLOCKWISE = 2;
- /* Read-write value for swipe events.
- *
- * Reports the directions that can be swiped to; multiple directions
- * should be OR'ed together.
- *
- * The allowedDirections field is designed to be set on SwipeGestureMayStart
- * events by event listeners. Its value after event dispatch determines
- * the behavior of the swipe animation that might be about to begin.
- * Specifically, if the user swipes in a direction that can't be swiped
- * to, the animation will have a bounce effect.
- * Future SwipeGestureUpdate, SwipeGesture and SwipeGestureEnd events
- * will carry the allowDirections value that was set on the SwipeMayStart
- * event. Changing this field on non-SwipeGestureMayStart events doesn't
- * have any effect.
- */
- attribute unsigned long allowedDirections;
- /* Direction of a gesture. Diagonals are indicated by OR'ing the
- * applicable constants together.
- *
- * Swipes gestures may occur in any direction.
- *
- * Magnify gestures do not have a direction.
- *
- * Rotation gestures will be either ROTATION_COUNTERCLOCKWISE or
- * ROTATION_CLOCKWISE.
- */
- readonly attribute unsigned long direction;
- /* Delta value for magnify, rotate and swipe gestures.
- *
- * For rotation, the value is in degrees and is positive for
- * clockwise rotation and negative for counterclockwise
- * rotation.
- *
- * For magnification, the value will be positive for a "zoom in"
- * (i.e, increased magnification) and negative for a "zoom out"
- * (i.e., decreased magnification). The particular units
- * represented by the "delta" are currently implementation specific.
- *
- * XXX - The units for measuring magnification are currently
- * unspecified because the units used by Mac OS X are currently
- * undocumented. The values are typically in the range of 0.0 to
- * 100.0, but it is only safe currently to rely on the delta being
- * positive or negative.
- *
- * For swipe start, update and end events, the value is a fraction
- * of one "page". If the resulting swipe will have DIRECTION_LEFT, the
- * delta value will be positive; for DIRECTION_RIGHT, delta is negative.
- * If this seems backwards to you, look at it this way: If the current
- * page is pushed to the right during the animation (positive delta),
- * the page left to the current page will be visible after the swipe
- * (DIRECTION_LEFT).
- *
- * Units on Windows represent the difference between the initial
- * and current/final width between the two touch points on the input
- * device and are measured in pixels.
- */
- readonly attribute double delta;
- /* Click count value for taps. */
- readonly attribute unsigned long clickCount;
- undefined initSimpleGestureEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional Window? viewArg = null,
- optional long detailArg = 0,
- optional long screenXArg = 0,
- optional long screenYArg = 0,
- optional long clientXArg = 0,
- optional long clientYArg = 0,
- optional boolean ctrlKeyArg = false,
- optional boolean altKeyArg = false,
- optional boolean shiftKeyArg = false,
- optional boolean metaKeyArg = false,
- optional short buttonArg = 0,
- optional EventTarget? relatedTargetArg = null,
- optional unsigned long allowedDirectionsArg = 0,
- optional unsigned long directionArg = 0,
- optional double deltaArg = 0,
- optional unsigned long clickCount = 0);
- };
-
- /* ---------------------- SocketCommon ----------------------------- */
- /* ./webidl/SocketCommon.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#readystate
- */
- enum SocketReadyState {
- "opening",
- "open",
- "closing",
- "closed",
- "halfclosed"
- };
-
- /* ---------------------- SourceBuffer ----------------------------- */
- /* ./webidl/SourceBuffer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum SourceBufferAppendMode {
- "segments",
- "sequence"
- };
- [Pref="media.mediasource.enabled",
- Exposed=Window]
- interface SourceBuffer : EventTarget {
- [SetterThrows]
- attribute SourceBufferAppendMode mode;
- readonly attribute boolean updating;
- [Throws]
- readonly attribute TimeRanges buffered;
- [SetterThrows]
- attribute double timestampOffset;
- //readonly attribute AudioTrackList audioTracks;
- //readonly attribute VideoTrackList videoTracks;
- //readonly attribute TextTrackList textTracks;
- [SetterThrows]
- attribute double appendWindowStart;
- [SetterThrows]
- attribute unrestricted double appendWindowEnd;
- attribute EventHandler onupdatestart;
- attribute EventHandler onupdate;
- attribute EventHandler onupdateend;
- attribute EventHandler onerror;
- attribute EventHandler onabort;
- [Throws]
- undefined appendBuffer(ArrayBuffer data);
- [Throws]
- undefined appendBuffer(ArrayBufferView data);
- //[Throws]
- //undefined appendStream(Stream stream, [EnforceRange] optional unsigned long long maxSize);
- [Throws]
- undefined abort();
- [Throws]
- undefined remove(double start, unrestricted double end);
- };
- // Mozilla extensions for experimental features
- partial interface SourceBuffer {
- // Experimental function as proposed in:
- // https://github.com/w3c/media-source/issues/100 for promise proposal.
- [NewObject, Pref="media.mediasource.experimental.enabled"]
- Promise<undefined> appendBufferAsync(ArrayBuffer data);
- [NewObject, Pref="media.mediasource.experimental.enabled"]
- Promise<undefined> appendBufferAsync(ArrayBufferView data);
- [NewObject, Pref="media.mediasource.experimental.enabled"]
- Promise<undefined> removeAsync(double start, unrestricted double end);
- // Experimental function as proposed in:
- // https://github.com/w3c/media-source/issues/155
- [Throws]
- undefined changeType(DOMString type);
- };
-
- /* ---------------------- SourceBufferList ----------------------------- */
- /* ./webidl/SourceBufferList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.mediasource.enabled",
- Exposed=Window]
- interface SourceBufferList : EventTarget {
- readonly attribute unsigned long length;
- attribute EventHandler onaddsourcebuffer;
- attribute EventHandler onremovesourcebuffer;
- getter SourceBuffer (unsigned long index);
- };
-
- /* ---------------------- SpeechGrammar ----------------------------- */
- /* ./webidl/SpeechGrammar.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- LegacyFactoryFunction=webkitSpeechGrammar,
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechGrammar {
- constructor();
- [Throws]
- attribute DOMString src;
- [Throws]
- attribute float weight;
- };
-
- /* ---------------------- SpeechGrammarList ----------------------------- */
- /* ./webidl/SpeechGrammarList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- LegacyFactoryFunction=webkitSpeechGrammarList,
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechGrammarList {
- constructor();
- readonly attribute unsigned long length;
- [Throws]
- getter SpeechGrammar item(unsigned long index);
- [Throws]
- undefined addFromURI(DOMString src, optional float weight);
- [Throws]
- undefined addFromString(DOMString string, optional float weight);
- };
-
- /* ---------------------- SpeechRecognition ----------------------------- */
- /* ./webidl/SpeechRecognition.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- LegacyFactoryFunction=webkitSpeechRecognition,
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognition : EventTarget {
- [Throws]
- constructor();
- // recognition parameters
- attribute SpeechGrammarList grammars;
- attribute DOMString lang;
- [Throws]
- attribute boolean continuous;
- attribute boolean interimResults;
- attribute unsigned long maxAlternatives;
- [Throws]
- attribute DOMString serviceURI;
- // methods to drive the speech interaction
- [Throws, NeedsCallerType]
- undefined start(optional MediaStream stream);
- undefined stop();
- undefined abort();
- // event methods
- attribute EventHandler onaudiostart;
- attribute EventHandler onsoundstart;
- attribute EventHandler onspeechstart;
- attribute EventHandler onspeechend;
- attribute EventHandler onsoundend;
- attribute EventHandler onaudioend;
- attribute EventHandler onresult;
- attribute EventHandler onnomatch;
- attribute EventHandler onerror;
- attribute EventHandler onstart;
- attribute EventHandler onend;
- };
-
- /* ---------------------- SpeechRecognitionAlternative ----------------------------- */
- /* ./webidl/SpeechRecognitionAlternative.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognitionAlternative {
- readonly attribute DOMString transcript;
- readonly attribute float confidence;
- };
-
- /* ---------------------- SpeechRecognitionError ----------------------------- */
- /* ./webidl/SpeechRecognitionError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- enum SpeechRecognitionErrorCode {
- "no-speech",
- "aborted",
- "audio-capture",
- "network",
- "not-allowed",
- "service-not-allowed",
- "bad-grammar",
- "language-not-supported"
- };
- [Pref="media.webspeech.recognition.enable",
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognitionError : Event
- {
- constructor(DOMString type,
- optional SpeechRecognitionErrorInit eventInitDict = {});
- readonly attribute SpeechRecognitionErrorCode error;
- readonly attribute DOMString? message;
- };
- dictionary SpeechRecognitionErrorInit : EventInit
- {
- SpeechRecognitionErrorCode error = "no-speech";
- DOMString message = "";
- };
-
- /* ---------------------- SpeechRecognitionEvent ----------------------------- */
- /* ./webidl/SpeechRecognitionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- interface nsISupports;
- [Pref="media.webspeech.recognition.enable",
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognitionEvent : Event
- {
- constructor(DOMString type,
- optional SpeechRecognitionEventInit eventInitDict = {});
- readonly attribute unsigned long resultIndex;
- readonly attribute SpeechRecognitionResultList? results;
- readonly attribute any interpretation;
- readonly attribute Document? emma;
- };
- dictionary SpeechRecognitionEventInit : EventInit
- {
- unsigned long resultIndex = 0;
- SpeechRecognitionResultList? results = null;
- any interpretation = null;
- Document? emma = null;
- };
-
- /* ---------------------- SpeechRecognitionResult ----------------------------- */
- /* ./webidl/SpeechRecognitionResult.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognitionResult {
- readonly attribute unsigned long length;
- getter SpeechRecognitionAlternative item(unsigned long index);
- readonly attribute boolean isFinal;
- };
-
- /* ---------------------- SpeechRecognitionResultList ----------------------------- */
- /* ./webidl/SpeechRecognitionResultList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.recognition.enable",
- Func="SpeechRecognition::IsAuthorized",
- Exposed=Window]
- interface SpeechRecognitionResultList {
- readonly attribute unsigned long length;
- getter SpeechRecognitionResult item(unsigned long index);
- };
-
- /* ---------------------- SpeechSynthesis ----------------------------- */
- /* ./webidl/SpeechSynthesis.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.synth.enabled",
- Exposed=Window]
- interface SpeechSynthesis : EventTarget{
- readonly attribute boolean pending;
- readonly attribute boolean speaking;
- readonly attribute boolean paused;
- undefined speak(SpeechSynthesisUtterance utterance);
- undefined cancel();
- undefined pause();
- undefined resume();
- sequence<SpeechSynthesisVoice> getVoices();
- attribute EventHandler onvoiceschanged;
- [ChromeOnly]
- // Force an utterance to end. Circumvents bad speech service implementations.
- undefined forceEnd();
- };
-
- /* ---------------------- SpeechSynthesisErrorEvent ----------------------------- */
- /* ./webidl/SpeechSynthesisErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum SpeechSynthesisErrorCode {
- "canceled",
- "interrupted",
- "audio-busy",
- "audio-hardware",
- "network",
- "synthesis-unavailable",
- "synthesis-failed",
- "language-unavailable",
- "voice-unavailable",
- "text-too-long",
- "invalid-argument",
- };
- [Pref="media.webspeech.synth.enabled",
- Exposed=Window]
- interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
- constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict);
- readonly attribute SpeechSynthesisErrorCode error;
- };
- dictionary SpeechSynthesisErrorEventInit : SpeechSynthesisEventInit
- {
- required SpeechSynthesisErrorCode error;
- };
-
- /* ---------------------- SpeechSynthesisEvent ----------------------------- */
- /* ./webidl/SpeechSynthesisEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.synth.enabled",
- Exposed=Window]
- interface SpeechSynthesisEvent : Event
- {
- constructor(DOMString type, SpeechSynthesisEventInit eventInitDict);
- readonly attribute SpeechSynthesisUtterance utterance;
- readonly attribute unsigned long charIndex;
- readonly attribute unsigned long? charLength;
- readonly attribute float elapsedTime;
- readonly attribute DOMString? name;
- };
- dictionary SpeechSynthesisEventInit : EventInit
- {
- required SpeechSynthesisUtterance utterance;
- unsigned long charIndex = 0;
- unsigned long? charLength = null;
- float elapsedTime = 0;
- DOMString name = "";
- };
-
- /* ---------------------- SpeechSynthesisUtterance ----------------------------- */
- /* ./webidl/SpeechSynthesisUtterance.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.synth.enabled",
- Exposed=Window]
- interface SpeechSynthesisUtterance : EventTarget {
- [Throws]
- constructor();
- [Throws]
- constructor(DOMString text);
- attribute DOMString text;
- attribute DOMString lang;
- attribute SpeechSynthesisVoice? voice;
- attribute float volume;
- attribute float rate;
- attribute float pitch;
- attribute EventHandler onstart;
- attribute EventHandler onend;
- attribute EventHandler onerror;
- attribute EventHandler onpause;
- attribute EventHandler onresume;
- attribute EventHandler onmark;
- attribute EventHandler onboundary;
- [ChromeOnly]
- readonly attribute DOMString chosenVoiceURI;
- };
-
- /* ---------------------- SpeechSynthesisVoice ----------------------------- */
- /* ./webidl/SpeechSynthesisVoice.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.webspeech.synth.enabled",
- Exposed=Window]
- interface SpeechSynthesisVoice {
- readonly attribute DOMString voiceURI;
- readonly attribute DOMString name;
- readonly attribute DOMString lang;
- readonly attribute boolean localService;
- readonly attribute boolean default;
- };
-
- /* ---------------------- StaticRange ----------------------------- */
- /* ./webidl/StaticRange.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dom.spec.whatwg.org/#staticrange
- *
- * Copyright 2012 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface StaticRange : AbstractRange {
- [Throws]
- constructor(StaticRangeInit init);
- // And no additional functions/properties.
- };
- dictionary StaticRangeInit {
- required Node startContainer;
- required unsigned long startOffset;
- required Node endContainer;
- required unsigned long endOffset;
- };
-
- /* ---------------------- StereoPannerNode ----------------------------- */
- /* ./webidl/StereoPannerNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary StereoPannerOptions : AudioNodeOptions {
- float pan = 0;
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface StereoPannerNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional StereoPannerOptions options = {});
- readonly attribute AudioParam pan;
- };
- // Mozilla extension
- StereoPannerNode includes AudioNodePassThrough;
-
- /* ---------------------- Storage ----------------------------- */
- /* ./webidl/Storage.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/html/#the-storage-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface Storage {
- [Throws, NeedsSubjectPrincipal]
- readonly attribute unsigned long length;
- [Throws, NeedsSubjectPrincipal]
- DOMString? key(unsigned long index);
- [Throws, NeedsSubjectPrincipal]
- getter DOMString? getItem(DOMString key);
- [Throws, NeedsSubjectPrincipal]
- setter undefined setItem(DOMString key, DOMString value);
- [Throws, NeedsSubjectPrincipal]
- deleter undefined removeItem(DOMString key);
- [Throws, NeedsSubjectPrincipal]
- undefined clear();
- };
- /**
- * Testing methods that exist only for the benefit of automated glass-box
- * testing. Will never be exposed to content at large and unlikely to be useful
- * in a WebDriver context.
- */
- partial interface Storage {
- /**
- * Does a security-check and ensures the underlying database has been opened
- * without actually calling any database methods. (Read-only methods will
- * have a similar effect but also impact the state of the snapshot.)
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- undefined open();
- /**
- * Automatically ends any explicit snapshot and drops the reference to the
- * underlying database, but does not otherwise perturb the database.
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- undefined close();
- /**
- * Ensures the database has been opened and initiates an explicit snapshot.
- * Snapshots are normally automatically ended and checkpointed back to the
- * parent, but explicitly opened snapshots must be explicitly ended via
- * `endExplicitSnapshot` or `close`.
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- undefined beginExplicitSnapshot();
- /**
- * Checkpoints the explicitly begun snapshot. This is only useful for testing
- * of snapshot re-using when multiple checkpoints are involved. There's no
- * need to call this before `endExplicitSnapshot` because it checkpoints the
- * snapshot before it's ended.
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- undefined checkpointExplicitSnapshot();
- /**
- * Ends the explicitly begun snapshot and retains the underlying database.
- * Compare with `close` which also drops the reference to the database.
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- undefined endExplicitSnapshot();
- /**
- * Returns true if the underlying database has been opened, the database is
- * not being closed and it has a snapshot (initialized implicitly or
- * explicitly).
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- readonly attribute boolean hasSnapshot;
- /**
- * Returns snapshot usage.
- *
- * @throws NS_ERROR_NOT_AVAILABLE if the underlying database hasn't been
- * opened or the database is being closed or it doesn't have a
- * snapshot.
- */
- [Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
- readonly attribute long long snapshotUsage;
- };
-
- /* ---------------------- StorageEvent ----------------------------- */
- /* ./webidl/StorageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Interface for a client side storage. See
- * http://dev.w3.org/html5/webstorage/#the-storage-event
- * for more information.
- *
- * Event sent to a window when a storage area changes.
- */
- [Exposed=Window]
- interface StorageEvent : Event
- {
- constructor(DOMString type, optional StorageEventInit eventInitDict = {});
- readonly attribute DOMString? key;
- readonly attribute DOMString? oldValue;
- readonly attribute DOMString? newValue;
- readonly attribute DOMString? url;
- readonly attribute Storage? storageArea;
- // Bug 1016053 - This is not spec compliant.
- undefined initStorageEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional DOMString? key = null,
- optional DOMString? oldValue = null,
- optional DOMString? newValue = null,
- optional DOMString? url = null,
- optional Storage? storageArea = null);
- };
- dictionary StorageEventInit : EventInit
- {
- DOMString? key = null;
- DOMString? oldValue = null;
- DOMString? newValue = null;
- DOMString url = "";
- Storage? storageArea = null;
- };
-
- /* ---------------------- StorageManager ----------------------------- */
- /* ./webidl/StorageManager.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://storage.spec.whatwg.org/#storagemanager
- *
- */
- [SecureContext, Exposed=(Window,Worker)]
- interface StorageManager {
- [NewObject]
- Promise<boolean> persisted();
- [Exposed=Window, NewObject]
- Promise<boolean> persist();
- [NewObject]
- Promise<StorageEstimate> estimate();
- };
- dictionary StorageEstimate {
- unsigned long long usage;
- unsigned long long quota;
- };
- [SecureContext]
- partial interface StorageManager {
- [Pref="dom.fs.enabled", NewObject]
- Promise<FileSystemDirectoryHandle> getDirectory();
- };
- /**
- * Testing methods that exist only for the benefit of automated glass-box
- * testing. Will never be exposed to content at large and unlikely to be useful
- * in a WebDriver context.
- */
- [SecureContext]
- partial interface StorageManager {
- [ChromeOnly]
- undefined shutdown();
- };
-
- /* ---------------------- StreamFilter ----------------------------- */
- /* ./webidl/StreamFilter.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- /**
- * This is a Mozilla-specific WebExtension API, which is not available to web
- * content. It allows monitoring and filtering of HTTP response stream data.
- *
- * This API should currently be considered experimental, and is not defined by
- * any standard.
- */
- enum StreamFilterStatus {
- /**
- * The StreamFilter is not fully initialized. No methods may be called until
- * a "start" event has been received.
- */
- "uninitialized",
- /**
- * The underlying channel is currently transferring data, which will be
- * dispatched via "data" events.
- */
- "transferringdata",
- /**
- * The underlying channel has finished transferring data. Data may still be
- * written via write() calls at this point.
- */
- "finishedtransferringdata",
- /**
- * Data transfer is currently suspended. It may be resumed by a call to
- * resume(). Data may still be written via write() calls in this state.
- */
- "suspended",
- /**
- * The channel has been closed by a call to close(). No further data wlil be
- * delivered via "data" events, and no further data may be written via
- * write() calls.
- */
- "closed",
- /**
- * The channel has been disconnected by a call to disconnect(). All further
- * data will be delivered directly, without passing through the filter. No
- * further events will be dispatched, and no further data may be written by
- * write() calls.
- */
- "disconnected",
- /**
- * An error has occurred and the channel is disconnected. The `error`
- * property contains the details of the error.
- */
- "failed",
- };
- /**
- * An interface which allows an extension to intercept, and optionally modify,
- * response data from an HTTP request.
- */
- [Exposed=Window,
- Func="mozilla::extensions::StreamFilter::IsAllowedInContext"]
- interface StreamFilter : EventTarget {
- /**
- * Creates a stream filter for the given add-on and the given extension ID.
- */
- [ChromeOnly]
- static StreamFilter create(unsigned long long requestId, DOMString addonId);
- /**
- * Suspends processing of the request. After this is called, no further data
- * will be delivered until the request is resumed.
- */
- [Throws]
- undefined suspend();
- /**
- * Resumes delivery of data for a suspended request.
- */
- [Throws]
- undefined resume();
- /**
- * Closes the request. After this is called, no more data may be written to
- * the stream, and no further data will be delivered.
- *
- * This *must* be called after the consumer is finished writing data, unless
- * disconnect() has already been called.
- */
- [Throws]
- undefined close();
- /**
- * Disconnects the stream filter from the request. After this is called, no
- * further data will be delivered to the filter, and any unprocessed data
- * will be written directly to the output stream.
- */
- [Throws]
- undefined disconnect();
- /**
- * Writes a chunk of data to the output stream. This may not be called
- * before the "start" event has been received.
- */
- [Throws]
- undefined write((ArrayBuffer or Uint8Array) data);
- /**
- * Returns the current status of the stream.
- */
- [Pure]
- readonly attribute StreamFilterStatus status;
- /**
- * After an "error" event has been dispatched, this contains a message
- * describing the error.
- */
- [Pure]
- readonly attribute DOMString error;
- /**
- * Dispatched with a StreamFilterDataEvent whenever incoming data is
- * available on the stream. This data will not be delivered to the output
- * stream unless it is explicitly written via a write() call.
- */
- attribute EventHandler ondata;
- /**
- * Dispatched when the stream is opened, and is about to begin delivering
- * data.
- */
- attribute EventHandler onstart;
- /**
- * Dispatched when the stream has closed, and has no more data to deliver.
- * The output stream remains open and writable until close() is called.
- */
- attribute EventHandler onstop;
- /**
- * Dispatched when an error has occurred. No further data may be read or
- * written after this point.
- */
- attribute EventHandler onerror;
- };
-
- /* ---------------------- StreamFilterDataEvent ----------------------------- */
- /* ./webidl/StreamFilterDataEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * This is a Mozilla-specific WebExtension API, which is not available to web
- * content. It allows monitoring and filtering of HTTP response stream data.
- *
- * This API should currently be considered experimental, and is not defined by
- * any standard.
- */
- [Func="mozilla::extensions::StreamFilter::IsAllowedInContext",
- Exposed=Window]
- interface StreamFilterDataEvent : Event {
- constructor(DOMString type,
- optional StreamFilterDataEventInit eventInitDict = {});
- /**
- * Contains a chunk of data read from the input stream.
- */
- [Pure]
- readonly attribute ArrayBuffer data;
- };
- dictionary StreamFilterDataEventInit : EventInit {
- required ArrayBuffer data;
- };
-
- /* ---------------------- StructuredCloneTester ----------------------------- */
- /* ./webidl/StructuredCloneTester.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=(Window,Worker),
- Pref="dom.testing.structuredclonetester.enabled",
- Serializable]
- interface StructuredCloneTester {
- constructor(boolean serializable, boolean deserializable);
- readonly attribute boolean serializable;
- readonly attribute boolean deserializable;
- };
-
- /* ---------------------- StyleSheet ----------------------------- */
- /* ./webidl/StyleSheet.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom/
- */
- [Exposed=Window]
- interface StyleSheet {
- [Constant]
- readonly attribute DOMString type;
- [Constant, Throws]
- readonly attribute DOMString? href;
- // Spec says "Node", but it can go null when the node gets a new
- // sheet. That's also why it's not [Constant]
- [Pure]
- readonly attribute Node? ownerNode;
- [Pure]
- readonly attribute StyleSheet? parentStyleSheet;
- [Pure]
- readonly attribute DOMString? title;
- [Constant, PutForwards=mediaText]
- readonly attribute MediaList media;
- [Pure]
- attribute boolean disabled;
- // The source map URL for this style sheet. The source map URL can
- // be found in one of two ways.
- //
- // If a SourceMap or X-SourceMap response header is seen, this is
- // the value. If both are seen, SourceMap is preferred. Because
- // this relies on the HTTP response, it can change if checked before
- // the response is available -- which is why it is not [Constant].
- //
- // If the style sheet has the special "# sourceMappingURL=" comment,
- // then this is the URL specified there.
- //
- // If the source map URL is not found by either of these methods,
- // then this is an empty string.
- [ChromeOnly, Pure]
- readonly attribute UTF8String sourceMapURL;
- // The source URL for this style sheet. If the style sheet has the
- // special "# sourceURL=" comment, then this is the URL specified
- // there. If no such comment is found, then this is the empty
- // string.
- [ChromeOnly, Pure]
- readonly attribute UTF8String sourceURL;
- [ChromeOnly, Pure]
- readonly attribute Document? associatedDocument;
- [ChromeOnly, Pure, BinaryName="isConstructed"]
- readonly attribute boolean constructed;
- };
-
- /* ---------------------- StyleSheetList ----------------------------- */
- /* ./webidl/StyleSheetList.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- // https://drafts.csswg.org/cssom/#stylesheetlist
- [Exposed=Window]
- interface StyleSheetList {
- getter CSSStyleSheet? item(unsigned long index);
- readonly attribute unsigned long length;
- };
-
- /* ---------------------- SubmitEvent ----------------------------- */
- /* ./webidl/SubmitEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submitevent
- */
- [Exposed=Window]
- interface SubmitEvent : Event {
- constructor(DOMString type, optional SubmitEventInit eventInitDict = {});
- readonly attribute HTMLElement? submitter;
- };
- dictionary SubmitEventInit : EventInit {
- HTMLElement? submitter = null;
- };
-
- /* ---------------------- SubtleCrypto ----------------------------- */
- /* ./webidl/SubtleCrypto.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/WebCryptoAPI/
- */
- typedef DOMString KeyType;
- typedef DOMString KeyUsage;
- typedef DOMString NamedCurve;
- typedef Uint8Array BigInteger;
- /***** Algorithm dictionaries *****/
- dictionary Algorithm {
- required DOMString name;
- };
- [GenerateInit]
- dictionary AesCbcParams : Algorithm {
- required BufferSource iv;
- };
- [GenerateInit]
- dictionary AesCtrParams : Algorithm {
- required BufferSource counter;
- required [EnforceRange] octet length;
- };
- [GenerateInit]
- dictionary AesGcmParams : Algorithm {
- required BufferSource iv;
- BufferSource additionalData;
- [EnforceRange] octet tagLength;
- };
- dictionary HmacImportParams : Algorithm {
- required AlgorithmIdentifier hash;
- };
- [GenerateInit]
- dictionary Pbkdf2Params : Algorithm {
- required BufferSource salt;
- required [EnforceRange] unsigned long iterations;
- required AlgorithmIdentifier hash;
- };
- [GenerateInit]
- dictionary RsaHashedImportParams {
- required AlgorithmIdentifier hash;
- };
- dictionary AesKeyGenParams : Algorithm {
- required [EnforceRange] unsigned short length;
- };
- [GenerateInit]
- dictionary HmacKeyGenParams : Algorithm {
- required AlgorithmIdentifier hash;
- [EnforceRange] unsigned long length;
- };
- [GenerateInit]
- dictionary RsaHashedKeyGenParams : Algorithm {
- required [EnforceRange] unsigned long modulusLength;
- required BigInteger publicExponent;
- required AlgorithmIdentifier hash;
- };
- [GenerateInit]
- dictionary RsaOaepParams : Algorithm {
- BufferSource label;
- };
- [GenerateInit]
- dictionary RsaPssParams : Algorithm {
- required [EnforceRange] unsigned long saltLength;
- };
- [GenerateInit]
- dictionary EcKeyGenParams : Algorithm {
- required NamedCurve namedCurve;
- };
- [GenerateInit]
- dictionary AesDerivedKeyParams : Algorithm {
- required [EnforceRange] unsigned long length;
- };
- [GenerateInit]
- dictionary HmacDerivedKeyParams : HmacImportParams {
- [EnforceRange] unsigned long length;
- };
- [GenerateInit]
- dictionary EcdhKeyDeriveParams : Algorithm {
- required CryptoKey public;
- };
- [GenerateInit]
- dictionary DhImportKeyParams : Algorithm {
- required BigInteger prime;
- required BigInteger generator;
- };
- [GenerateInit]
- dictionary EcdsaParams : Algorithm {
- required AlgorithmIdentifier hash;
- };
- [GenerateInit]
- dictionary EcKeyImportParams : Algorithm {
- NamedCurve namedCurve;
- };
- [GenerateInit]
- dictionary HkdfParams : Algorithm {
- required AlgorithmIdentifier hash;
- required BufferSource salt;
- required BufferSource info;
- };
- /***** JWK *****/
- dictionary RsaOtherPrimesInfo {
- // The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms
- required DOMString r;
- required DOMString d;
- required DOMString t;
- };
- [GenerateInitFromJSON, GenerateToJSON]
- dictionary JsonWebKey {
- // The following fields are defined in Section 3.1 of JSON Web Key
- required DOMString kty;
- DOMString use;
- sequence<DOMString> key_ops;
- DOMString alg;
- // The following fields are defined in JSON Web Key Parameters Registration
- boolean ext;
- // The following fields are defined in Section 6 of JSON Web Algorithms
- DOMString crv;
- DOMString x;
- DOMString y;
- DOMString d;
- DOMString n;
- DOMString e;
- DOMString p;
- DOMString q;
- DOMString dp;
- DOMString dq;
- DOMString qi;
- sequence<RsaOtherPrimesInfo> oth;
- DOMString k;
- };
- /***** The Main API *****/
- [Serializable,
- SecureContext,
- Exposed=(Window,Worker)]
- interface CryptoKey {
- readonly attribute KeyType type;
- readonly attribute boolean extractable;
- [Cached, Constant, Throws] readonly attribute object algorithm;
- [Cached, Constant, Frozen] readonly attribute sequence<KeyUsage> usages;
- };
- [GenerateConversionToJS]
- dictionary CryptoKeyPair {
- required CryptoKey publicKey;
- required CryptoKey privateKey;
- };
- typedef DOMString KeyFormat;
- typedef (object or DOMString) AlgorithmIdentifier;
- [Exposed=(Window,Worker),
- SecureContext]
- interface SubtleCrypto {
- [NewObject]
- Promise<any> encrypt(AlgorithmIdentifier algorithm,
- CryptoKey key,
- BufferSource data);
- [NewObject]
- Promise<any> decrypt(AlgorithmIdentifier algorithm,
- CryptoKey key,
- BufferSource data);
- [NewObject]
- Promise<any> sign(AlgorithmIdentifier algorithm,
- CryptoKey key,
- BufferSource data);
- [NewObject]
- Promise<any> verify(AlgorithmIdentifier algorithm,
- CryptoKey key,
- BufferSource signature,
- BufferSource data);
- [NewObject]
- Promise<any> digest(AlgorithmIdentifier algorithm,
- BufferSource data);
- [NewObject]
- Promise<any> generateKey(AlgorithmIdentifier algorithm,
- boolean extractable,
- sequence<KeyUsage> keyUsages );
- [NewObject]
- Promise<any> deriveKey(AlgorithmIdentifier algorithm,
- CryptoKey baseKey,
- AlgorithmIdentifier derivedKeyType,
- boolean extractable,
- sequence<KeyUsage> keyUsages );
- [NewObject]
- Promise<any> deriveBits(AlgorithmIdentifier algorithm,
- CryptoKey baseKey,
- unsigned long length);
- [NewObject]
- Promise<any> importKey(KeyFormat format,
- object keyData,
- AlgorithmIdentifier algorithm,
- boolean extractable,
- sequence<KeyUsage> keyUsages );
- [NewObject]
- Promise<any> exportKey(KeyFormat format, CryptoKey key);
- [NewObject]
- Promise<any> wrapKey(KeyFormat format,
- CryptoKey key,
- CryptoKey wrappingKey,
- AlgorithmIdentifier wrapAlgorithm);
- [NewObject]
- Promise<any> unwrapKey(KeyFormat format,
- BufferSource wrappedKey,
- CryptoKey unwrappingKey,
- AlgorithmIdentifier unwrapAlgorithm,
- AlgorithmIdentifier unwrappedKeyAlgorithm,
- boolean extractable,
- sequence<KeyUsage> keyUsages );
- };
-
- /* ---------------------- SVGAElement ----------------------------- */
- /* ./webidl/SVGAElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAElement : SVGGraphicsElement {
- readonly attribute SVGAnimatedString target;
- [SetterThrows]
- attribute DOMString download;
- [SetterThrows]
- attribute DOMString ping;
- [SetterThrows]
- attribute DOMString rel;
- [SetterThrows]
- attribute DOMString referrerPolicy;
- [PutForwards=value]
- readonly attribute DOMTokenList relList;
- [SetterThrows]
- attribute DOMString hreflang;
- [SetterThrows]
- attribute DOMString type;
- [Throws, Pref="svg.SVGAElement.text.enabled"]
- attribute DOMString text;
- };
- SVGAElement includes SVGURIReference;
-
- /* ---------------------- SVGAngle ----------------------------- */
- /* ./webidl/SVGAngle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAngle {
- // Angle Unit Types
- const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
- const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
- const unsigned short SVG_ANGLETYPE_DEG = 2;
- const unsigned short SVG_ANGLETYPE_RAD = 3;
- const unsigned short SVG_ANGLETYPE_GRAD = 4;
- readonly attribute unsigned short unitType;
- [SetterThrows]
- attribute float value;
- [SetterThrows]
- attribute float valueInSpecifiedUnits;
- [SetterThrows]
- attribute DOMString valueAsString;
- [Throws]
- undefined newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
- [Throws]
- undefined convertToSpecifiedUnits(unsigned short unitType);
- };
-
- /* ---------------------- SVGAnimatedAngle ----------------------------- */
- /* ./webidl/SVGAnimatedAngle.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedAngle {
- [Constant]
- readonly attribute SVGAngle baseVal;
- [Constant]
- readonly attribute SVGAngle animVal;
- };
-
- /* ---------------------- SVGAnimatedBoolean ----------------------------- */
- /* ./webidl/SVGAnimatedBoolean.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedBoolean {
- attribute boolean baseVal;
- readonly attribute boolean animVal;
- };
-
- /* ---------------------- SVGAnimatedEnumeration ----------------------------- */
- /* ./webidl/SVGAnimatedEnumeration.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedEnumeration
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedEnumeration {
- [SetterThrows]
- attribute unsigned short baseVal;
- readonly attribute unsigned short animVal;
- };
-
- /* ---------------------- SVGAnimatedInteger ----------------------------- */
- /* ./webidl/SVGAnimatedInteger.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedInteger
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedInteger {
- attribute long baseVal;
- readonly attribute long animVal;
- };
-
- /* ---------------------- SVGAnimatedLength ----------------------------- */
- /* ./webidl/SVGAnimatedLength.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedLength {
- [Constant]
- readonly attribute SVGLength baseVal;
- [Constant]
- readonly attribute SVGLength animVal;
- };
-
- /* ---------------------- SVGAnimatedLengthList ----------------------------- */
- /* ./webidl/SVGAnimatedLengthList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedLengthList {
- [Constant]
- readonly attribute SVGLengthList baseVal;
- [Constant]
- readonly attribute SVGLengthList animVal;
- };
-
- /* ---------------------- SVGAnimatedNumber ----------------------------- */
- /* ./webidl/SVGAnimatedNumber.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumber
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
- * W3C liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedNumber {
- attribute float baseVal;
- readonly attribute float animVal;
- };
-
- /* ---------------------- SVGAnimatedNumberList ----------------------------- */
- /* ./webidl/SVGAnimatedNumberList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedNumberList {
- [Constant]
- readonly attribute SVGNumberList baseVal;
- [Constant]
- readonly attribute SVGNumberList animVal;
- };
-
- /* ---------------------- SVGAnimatedPathData ----------------------------- */
- /* ./webidl/SVGAnimatedPathData.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGAnimatedPathData {
- [Pref="dom.svg.pathSeg.enabled"]
- readonly attribute SVGPathSegList pathSegList;
- [Pref="dom.svg.pathSeg.enabled"]
- readonly attribute SVGPathSegList animatedPathSegList;
- };
-
- /* ---------------------- SVGAnimatedPoints ----------------------------- */
- /* ./webidl/SVGAnimatedPoints.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGAnimatedPoints {
- [Constant]
- readonly attribute SVGPointList points;
- [Constant]
- readonly attribute SVGPointList animatedPoints;
- };
-
- /* ---------------------- SVGAnimatedPreserveAspectRatio ----------------------------- */
- /* ./webidl/SVGAnimatedPreserveAspectRatio.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedPreserveAspectRatio {
- [Constant]
- readonly attribute SVGPreserveAspectRatio baseVal;
- [Constant]
- readonly attribute SVGPreserveAspectRatio animVal;
- };
-
- /* ---------------------- SVGAnimatedRect ----------------------------- */
- /* ./webidl/SVGAnimatedRect.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedRect {
- readonly attribute SVGRect? baseVal;
- readonly attribute SVGRect? animVal;
- };
-
- /* ---------------------- SVGAnimatedString ----------------------------- */
- /* ./webidl/SVGAnimatedString.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedString {
- attribute DOMString baseVal;
- readonly attribute DOMString animVal;
- };
-
- /* ---------------------- SVGAnimatedTransformList ----------------------------- */
- /* ./webidl/SVGAnimatedTransformList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimatedTransformList {
- [Constant]
- readonly attribute SVGTransformList baseVal;
- [Constant]
- readonly attribute SVGTransformList animVal;
- };
-
- /* ---------------------- SVGAnimateElement ----------------------------- */
- /* ./webidl/SVGAnimateElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimateElement : SVGAnimationElement {
- };
-
- /* ---------------------- SVGAnimateMotionElement ----------------------------- */
- /* ./webidl/SVGAnimateMotionElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimateMotionElement : SVGAnimationElement {
- };
-
- /* ---------------------- SVGAnimateTransformElement ----------------------------- */
- /* ./webidl/SVGAnimateTransformElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimateTransformElement : SVGAnimationElement {
- };
-
- /* ---------------------- SVGAnimationElement ----------------------------- */
- /* ./webidl/SVGAnimationElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGAnimationElement : SVGElement {
- readonly attribute SVGElement? targetElement;
- attribute EventHandler onbegin;
- attribute EventHandler onend;
- attribute EventHandler onrepeat;
- [Throws]
- float getStartTime();
- [BinaryName="getCurrentTimeAsFloat"]
- float getCurrentTime();
- [Throws]
- float getSimpleDuration();
- [Throws]
- undefined beginElement();
- [Throws]
- undefined beginElementAt(float offset);
- [Throws]
- undefined endElement();
- [Throws]
- undefined endElementAt(float offset);
- };
- SVGAnimationElement includes SVGTests;
-
- /* ---------------------- SVGCircleElement ----------------------------- */
- /* ./webidl/SVGCircleElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGCircleElement : SVGGeometryElement {
- [Constant]
- readonly attribute SVGAnimatedLength cx;
- [Constant]
- readonly attribute SVGAnimatedLength cy;
- [Constant]
- readonly attribute SVGAnimatedLength r;
- };
-
- /* ---------------------- SVGClipPathElement ----------------------------- */
- /* ./webidl/SVGClipPathElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGClipPathElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedEnumeration clipPathUnits;
- [Constant]
- readonly attribute SVGAnimatedTransformList transform;
- };
-
- /* ---------------------- SVGComponentTransferFunctionElement ----------------------------- */
- /* ./webidl/SVGComponentTransferFunctionElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGComponentTransferFunctionElement : SVGElement {
- // Component Transfer Types
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
- const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
- [Constant]
- readonly attribute SVGAnimatedEnumeration type;
- [Constant]
- readonly attribute SVGAnimatedNumberList tableValues;
- [Constant]
- readonly attribute SVGAnimatedNumber slope;
- [Constant]
- readonly attribute SVGAnimatedNumber intercept;
- [Constant]
- readonly attribute SVGAnimatedNumber amplitude;
- [Constant]
- readonly attribute SVGAnimatedNumber exponent;
- [Constant]
- readonly attribute SVGAnimatedNumber offset;
- };
-
- /* ---------------------- SVGDefsElement ----------------------------- */
- /* ./webidl/SVGDefsElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGDefsElement : SVGGraphicsElement {
- };
-
- /* ---------------------- SVGDescElement ----------------------------- */
- /* ./webidl/SVGDescElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGDescElement : SVGElement {
- };
-
- /* ---------------------- SVGElement ----------------------------- */
- /* ./webidl/SVGElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGElement : Element {
- attribute DOMString id;
- [Constant]
- readonly attribute SVGAnimatedString className;
- readonly attribute SVGSVGElement? ownerSVGElement;
- readonly attribute SVGElement? viewportElement;
- attribute DOMString nonce;
- };
- SVGElement includes GlobalEventHandlers;
- SVGElement includes HTMLOrForeignElement;
- SVGElement includes ElementCSSInlineStyle;
- SVGElement includes TouchEventHandlers;
- SVGElement includes OnErrorEventHandlerForNodes;
-
- /* ---------------------- SVGEllipseElement ----------------------------- */
- /* ./webidl/SVGEllipseElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGEllipseElement : SVGGeometryElement {
- [Constant]
- readonly attribute SVGAnimatedLength cx;
- [Constant]
- readonly attribute SVGAnimatedLength cy;
- [Constant]
- readonly attribute SVGAnimatedLength rx;
- [Constant]
- readonly attribute SVGAnimatedLength ry;
- };
-
- /* ---------------------- SVGFEBlendElement ----------------------------- */
- /* ./webidl/SVGFEBlendElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEBlendElement : SVGElement {
- // Blend Mode Types
- const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
- const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
- const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
- const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
- const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
- const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
- const unsigned short SVG_FEBLEND_MODE_OVERLAY = 6;
- const unsigned short SVG_FEBLEND_MODE_COLOR_DODGE = 7;
- const unsigned short SVG_FEBLEND_MODE_COLOR_BURN = 8;
- const unsigned short SVG_FEBLEND_MODE_HARD_LIGHT = 9;
- const unsigned short SVG_FEBLEND_MODE_SOFT_LIGHT = 10;
- const unsigned short SVG_FEBLEND_MODE_DIFFERENCE = 11;
- const unsigned short SVG_FEBLEND_MODE_EXCLUSION = 12;
- const unsigned short SVG_FEBLEND_MODE_HUE = 13;
- const unsigned short SVG_FEBLEND_MODE_SATURATION = 14;
- const unsigned short SVG_FEBLEND_MODE_COLOR = 15;
- const unsigned short SVG_FEBLEND_MODE_LUMINOSITY = 16;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedString in2;
- [Constant]
- readonly attribute SVGAnimatedEnumeration mode;
- };
- SVGFEBlendElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEColorMatrixElement ----------------------------- */
- /* ./webidl/SVGFEColorMatrixElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEColorMatrixElement : SVGElement {
- // Color Matrix Types
- const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
- const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
- const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
- const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
- const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedEnumeration type;
- [Constant]
- readonly attribute SVGAnimatedNumberList values;
- };
- SVGFEColorMatrixElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEComponentTransferElement ----------------------------- */
- /* ./webidl/SVGFEComponentTransferElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEComponentTransferElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- };
- SVGFEComponentTransferElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFECompositeElement ----------------------------- */
- /* ./webidl/SVGFECompositeElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFECompositeElement : SVGElement {
- // Composite Operators
- const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
- const unsigned short SVG_FECOMPOSITE_OPERATOR_LIGHTER = 7;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedString in2;
- [Constant]
- readonly attribute SVGAnimatedEnumeration operator;
- [Constant]
- readonly attribute SVGAnimatedNumber k1;
- [Constant]
- readonly attribute SVGAnimatedNumber k2;
- [Constant]
- readonly attribute SVGAnimatedNumber k3;
- [Constant]
- readonly attribute SVGAnimatedNumber k4;
- };
- SVGFECompositeElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEConvolveMatrixElement ----------------------------- */
- /* ./webidl/SVGFEConvolveMatrixElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEConvolveMatrixElement : SVGElement {
- // Edge Mode Values
- const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
- const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
- const unsigned short SVG_EDGEMODE_WRAP = 2;
- const unsigned short SVG_EDGEMODE_NONE = 3;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedInteger orderX;
- [Constant]
- readonly attribute SVGAnimatedInteger orderY;
- [Constant]
- readonly attribute SVGAnimatedNumberList kernelMatrix;
- [Constant]
- readonly attribute SVGAnimatedNumber divisor;
- [Constant]
- readonly attribute SVGAnimatedNumber bias;
- [Constant]
- readonly attribute SVGAnimatedInteger targetX;
- [Constant]
- readonly attribute SVGAnimatedInteger targetY;
- [Constant]
- readonly attribute SVGAnimatedEnumeration edgeMode;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthX;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthY;
- [Constant]
- readonly attribute SVGAnimatedBoolean preserveAlpha;
- };
- SVGFEConvolveMatrixElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEDiffuseLightingElement ----------------------------- */
- /* ./webidl/SVGFEDiffuseLightingElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEDiffuseLightingElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedNumber surfaceScale;
- [Constant]
- readonly attribute SVGAnimatedNumber diffuseConstant;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthX;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthY;
- };
- SVGFEDiffuseLightingElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEDisplacementMapElement ----------------------------- */
- /* ./webidl/SVGFEDisplacementMapElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEDisplacementMapElement : SVGElement {
- // Channel Selectors
- const unsigned short SVG_CHANNEL_UNKNOWN = 0;
- const unsigned short SVG_CHANNEL_R = 1;
- const unsigned short SVG_CHANNEL_G = 2;
- const unsigned short SVG_CHANNEL_B = 3;
- const unsigned short SVG_CHANNEL_A = 4;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedString in2;
- [Constant]
- readonly attribute SVGAnimatedNumber scale;
- [Constant]
- readonly attribute SVGAnimatedEnumeration xChannelSelector;
- [Constant]
- readonly attribute SVGAnimatedEnumeration yChannelSelector;
- };
- SVGFEDisplacementMapElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEDistantLightElement ----------------------------- */
- /* ./webidl/SVGFEDistantLightElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEDistantLightElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedNumber azimuth;
- [Constant]
- readonly attribute SVGAnimatedNumber elevation;
- };
-
- /* ---------------------- SVGFEDropShadowElement ----------------------------- */
- /* ./webidl/SVGFEDropShadowElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEDropShadowElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedNumber dx;
- [Constant]
- readonly attribute SVGAnimatedNumber dy;
- [Constant]
- readonly attribute SVGAnimatedNumber stdDeviationX;
- [Constant]
- readonly attribute SVGAnimatedNumber stdDeviationY;
- undefined setStdDeviation(float stdDeviationX, float stdDeviationY);
- };
- SVGFEDropShadowElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEFloodElement ----------------------------- */
- /* ./webidl/SVGFEFloodElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEFloodElement : SVGElement {
- };
- SVGFEFloodElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEFuncAElement ----------------------------- */
- /* ./webidl/SVGFEFuncAElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {
- };
-
- /* ---------------------- SVGFEFuncBElement ----------------------------- */
- /* ./webidl/SVGFEFuncBElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {
- };
-
- /* ---------------------- SVGFEFuncGElement ----------------------------- */
- /* ./webidl/SVGFEFuncGElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {
- };
-
- /* ---------------------- SVGFEFuncRElement ----------------------------- */
- /* ./webidl/SVGFEFuncRElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
- *
- * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {
- };
-
- /* ---------------------- SVGFEGaussianBlurElement ----------------------------- */
- /* ./webidl/SVGFEGaussianBlurElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEGaussianBlurElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedNumber stdDeviationX;
- [Constant]
- readonly attribute SVGAnimatedNumber stdDeviationY;
- undefined setStdDeviation(float stdDeviationX, float stdDeviationY);
- };
- SVGFEGaussianBlurElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEImageElement ----------------------------- */
- /* ./webidl/SVGFEImageElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEImageElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
- [SetterThrows]
- attribute DOMString? crossOrigin;
- };
- SVGFEImageElement includes SVGFilterPrimitiveStandardAttributes;
- SVGFEImageElement includes SVGURIReference;
-
- /* ---------------------- SVGFEMergeElement ----------------------------- */
- /* ./webidl/SVGFEMergeElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEMergeElement : SVGElement {
- };
- SVGFEMergeElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEMergeNodeElement ----------------------------- */
- /* ./webidl/SVGFEMergeNodeElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEMergeNodeElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- };
-
- /* ---------------------- SVGFEMorphologyElement ----------------------------- */
- /* ./webidl/SVGFEMorphologyElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEMorphologyElement : SVGElement {
- // Morphology Operators
- const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
- const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
- const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedEnumeration operator;
- [Constant]
- readonly attribute SVGAnimatedNumber radiusX;
- [Constant]
- readonly attribute SVGAnimatedNumber radiusY;
- };
- SVGFEMorphologyElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEOffsetElement ----------------------------- */
- /* ./webidl/SVGFEOffsetElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEOffsetElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedNumber dx;
- [Constant]
- readonly attribute SVGAnimatedNumber dy;
- };
- SVGFEOffsetElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFEPointLightElement ----------------------------- */
- /* ./webidl/SVGFEPointLightElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFEPointLightElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedNumber x;
- [Constant]
- readonly attribute SVGAnimatedNumber y;
- [Constant]
- readonly attribute SVGAnimatedNumber z;
- };
-
- /* ---------------------- SVGFESpecularLightingElement ----------------------------- */
- /* ./webidl/SVGFESpecularLightingElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFESpecularLightingElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- [Constant]
- readonly attribute SVGAnimatedNumber surfaceScale;
- [Constant]
- readonly attribute SVGAnimatedNumber specularConstant;
- [Constant]
- readonly attribute SVGAnimatedNumber specularExponent;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthX;
- [Constant]
- readonly attribute SVGAnimatedNumber kernelUnitLengthY;
- };
- SVGFESpecularLightingElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFESpotLightElement ----------------------------- */
- /* ./webidl/SVGFESpotLightElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFESpotLightElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedNumber x;
- [Constant]
- readonly attribute SVGAnimatedNumber y;
- [Constant]
- readonly attribute SVGAnimatedNumber z;
- [Constant]
- readonly attribute SVGAnimatedNumber pointsAtX;
- [Constant]
- readonly attribute SVGAnimatedNumber pointsAtY;
- [Constant]
- readonly attribute SVGAnimatedNumber pointsAtZ;
- [Constant]
- readonly attribute SVGAnimatedNumber specularExponent;
- [Constant]
- readonly attribute SVGAnimatedNumber limitingConeAngle;
- };
-
- /* ---------------------- SVGFETileElement ----------------------------- */
- /* ./webidl/SVGFETileElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFETileElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedString in1;
- };
- SVGFETileElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFETurbulenceElement ----------------------------- */
- /* ./webidl/SVGFETurbulenceElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFETurbulenceElement : SVGElement {
- // Turbulence Types
- const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
- const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
- const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
- // Stitch Options
- const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
- const unsigned short SVG_STITCHTYPE_STITCH = 1;
- const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
- [Constant]
- readonly attribute SVGAnimatedNumber baseFrequencyX;
- [Constant]
- readonly attribute SVGAnimatedNumber baseFrequencyY;
- [Constant]
- readonly attribute SVGAnimatedInteger numOctaves;
- [Constant]
- readonly attribute SVGAnimatedNumber seed;
- [Constant]
- readonly attribute SVGAnimatedEnumeration stitchTiles;
- [Constant]
- readonly attribute SVGAnimatedEnumeration type;
- };
- SVGFETurbulenceElement includes SVGFilterPrimitiveStandardAttributes;
-
- /* ---------------------- SVGFilterElement ----------------------------- */
- /* ./webidl/SVGFilterElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGFilterElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedEnumeration filterUnits;
- [Constant]
- readonly attribute SVGAnimatedEnumeration primitiveUnits;
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- // ImageData apply(ImageData source);
- };
- SVGFilterElement includes SVGURIReference;
-
- /* ---------------------- SVGFilterPrimitiveStandardAttributes ----------------------------- */
- /* ./webidl/SVGFilterPrimitiveStandardAttributes.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGFilterPrimitiveStandardAttributes {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- [Constant]
- readonly attribute SVGAnimatedString result;
- };
-
- /* ---------------------- SVGFitToViewBox ----------------------------- */
- /* ./webidl/SVGFitToViewBox.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGFitToViewBox {
- [Constant]
- readonly attribute SVGAnimatedRect viewBox;
- [Constant]
- readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
- };
-
- /* ---------------------- SVGForeignObjectElement ----------------------------- */
- /* ./webidl/SVGForeignObjectElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGForeignObjectElement : SVGGraphicsElement {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- };
-
- /* ---------------------- SVGGElement ----------------------------- */
- /* ./webidl/SVGGElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGGElement : SVGGraphicsElement {
- };
-
- /* ---------------------- SVGGeometryElement ----------------------------- */
- /* ./webidl/SVGGeometryElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGGeometryElement : SVGGraphicsElement {
- [SameObject]
- readonly attribute SVGAnimatedNumber pathLength;
- boolean isPointInFill(optional DOMPointInit point = {});
- boolean isPointInStroke(optional DOMPointInit point = {});
- [BinaryName="getTotalLengthForBinding"]
- float getTotalLength();
- [NewObject, Throws]
- SVGPoint getPointAtLength(float distance);
- };
-
- /* ---------------------- SVGGradientElement ----------------------------- */
- /* ./webidl/SVGGradientElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGGradientElement : SVGElement {
- // Spread Method Types
- const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
- const unsigned short SVG_SPREADMETHOD_PAD = 1;
- const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
- const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
- [Constant]
- readonly attribute SVGAnimatedEnumeration gradientUnits;
- [Constant]
- readonly attribute SVGAnimatedTransformList gradientTransform;
- [Constant]
- readonly attribute SVGAnimatedEnumeration spreadMethod;
- };
- SVGGradientElement includes SVGURIReference;
-
- /* ---------------------- SVGGraphicsElement ----------------------------- */
- /* ./webidl/SVGGraphicsElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary SVGBoundingBoxOptions {
- boolean fill = true;
- boolean stroke = false;
- boolean markers = false;
- boolean clipped = false;
- };
- [Exposed=Window]
- interface SVGGraphicsElement : SVGElement {
- readonly attribute SVGAnimatedTransformList transform;
- [Deprecated="SVGNearestViewportElement",
- Pref="svg.nearestAndFarthestViewportElement.enabled"]
- readonly attribute SVGElement? nearestViewportElement;
- [Deprecated="SVGFarthestViewportElement",
- Pref="svg.nearestAndFarthestViewportElement.enabled"]
- readonly attribute SVGElement? farthestViewportElement;
- [NewObject]
- SVGRect getBBox(optional SVGBoundingBoxOptions aOptions = {});
- SVGMatrix? getCTM();
- SVGMatrix? getScreenCTM();
- };
- SVGGraphicsElement includes SVGTests;
-
- /* ---------------------- SVGImageElement ----------------------------- */
- /* ./webidl/SVGImageElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGImageElement : SVGGraphicsElement {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- [Constant]
- readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
- [SetterThrows]
- attribute DOMString? crossOrigin;
- [CEReactions, SetterThrows]
- attribute DOMString decoding;
- [NewObject]
- Promise<undefined> decode();
- };
- SVGImageElement includes MozImageLoadingContent;
- SVGImageElement includes SVGURIReference;
-
- /* ---------------------- SVGLength ----------------------------- */
- /* ./webidl/SVGLength.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGLength {
- // Length Unit Types
- const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
- const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
- const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
- const unsigned short SVG_LENGTHTYPE_EMS = 3;
- const unsigned short SVG_LENGTHTYPE_EXS = 4;
- const unsigned short SVG_LENGTHTYPE_PX = 5;
- const unsigned short SVG_LENGTHTYPE_CM = 6;
- const unsigned short SVG_LENGTHTYPE_MM = 7;
- const unsigned short SVG_LENGTHTYPE_IN = 8;
- const unsigned short SVG_LENGTHTYPE_PT = 9;
- const unsigned short SVG_LENGTHTYPE_PC = 10;
- readonly attribute unsigned short unitType;
- [Throws]
- attribute float value;
- [SetterThrows]
- attribute float valueInSpecifiedUnits;
- [SetterThrows]
- attribute DOMString valueAsString;
- [Throws]
- undefined newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
- [Throws]
- undefined convertToSpecifiedUnits(unsigned short unitType);
- };
-
- /* ---------------------- SVGLengthList ----------------------------- */
- /* ./webidl/SVGLengthList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG11/
- * https://svgwg.org/svg2-draft/types.html#InterfaceSVGLengthList
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGLengthList {
- readonly attribute unsigned long numberOfItems;
- [Throws]
- undefined clear();
- [Throws]
- SVGLength initialize(SVGLength newItem);
- [Throws]
- getter SVGLength getItem(unsigned long index);
- [Throws]
- SVGLength insertItemBefore(SVGLength newItem, unsigned long index);
- [Throws]
- SVGLength replaceItem(SVGLength newItem, unsigned long index);
- [Throws]
- SVGLength removeItem(unsigned long index);
- [Throws]
- SVGLength appendItem(SVGLength newItem);
- [Throws]
- setter undefined (unsigned long index, SVGLength newItem);
- // Mozilla-specific stuff
- readonly attribute unsigned long length; // synonym for numberOfItems
- };
-
- /* ---------------------- SVGLinearGradientElement ----------------------------- */
- /* ./webidl/SVGLinearGradientElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGLinearGradientElement : SVGGradientElement {
- [Constant]
- readonly attribute SVGAnimatedLength x1;
- [Constant]
- readonly attribute SVGAnimatedLength y1;
- [Constant]
- readonly attribute SVGAnimatedLength x2;
- [Constant]
- readonly attribute SVGAnimatedLength y2;
- };
-
- /* ---------------------- SVGLineElement ----------------------------- */
- /* ./webidl/SVGLineElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGLineElement : SVGGeometryElement {
- [Constant]
- readonly attribute SVGAnimatedLength x1;
- [Constant]
- readonly attribute SVGAnimatedLength y1;
- [Constant]
- readonly attribute SVGAnimatedLength x2;
- [Constant]
- readonly attribute SVGAnimatedLength y2;
- };
-
- /* ---------------------- SVGMarkerElement ----------------------------- */
- /* ./webidl/SVGMarkerElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGMarkerElement : SVGElement {
- // Marker Unit Types
- const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
- const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
- const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
- // Marker Orientation Types
- const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
- const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
- const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
- const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
- [Constant]
- readonly attribute SVGAnimatedLength refX;
- [Constant]
- readonly attribute SVGAnimatedLength refY;
- [Constant]
- readonly attribute SVGAnimatedEnumeration markerUnits;
- [Constant]
- readonly attribute SVGAnimatedLength markerWidth;
- [Constant]
- readonly attribute SVGAnimatedLength markerHeight;
- [Constant]
- readonly attribute SVGAnimatedEnumeration orientType;
- [Constant]
- readonly attribute SVGAnimatedAngle orientAngle;
- undefined setOrientToAuto();
- undefined setOrientToAngle(SVGAngle angle);
- };
- SVGMarkerElement includes SVGFitToViewBox;
-
- /* ---------------------- SVGMaskElement ----------------------------- */
- /* ./webidl/SVGMaskElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGMaskElement : SVGElement {
- // Mask Types
- const unsigned short SVG_MASKTYPE_LUMINANCE = 0;
- const unsigned short SVG_MASKTYPE_ALPHA = 1;
- [Constant]
- readonly attribute SVGAnimatedEnumeration maskUnits;
- [Constant]
- readonly attribute SVGAnimatedEnumeration maskContentUnits;
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- };
-
- /* ---------------------- SVGMatrix ----------------------------- */
- /* ./webidl/SVGMatrix.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGMatrix {
- [SetterThrows]
- attribute float a;
- [SetterThrows]
- attribute float b;
- [SetterThrows]
- attribute float c;
- [SetterThrows]
- attribute float d;
- [SetterThrows]
- attribute float e;
- [SetterThrows]
- attribute float f;
- [NewObject]
- SVGMatrix multiply(SVGMatrix secondMatrix);
- [NewObject, Throws]
- SVGMatrix inverse();
- [NewObject]
- SVGMatrix translate(float x, float y);
- [NewObject]
- SVGMatrix scale(float scaleFactor);
- [NewObject]
- SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY);
- [NewObject]
- SVGMatrix rotate(float angle);
- [NewObject, Throws]
- SVGMatrix rotateFromVector(float x, float y);
- [NewObject]
- SVGMatrix flipX();
- [NewObject]
- SVGMatrix flipY();
- [NewObject, Throws]
- SVGMatrix skewX(float angle);
- [NewObject, Throws]
- SVGMatrix skewY(float angle);
- };
-
- /* ---------------------- SVGMetadataElement ----------------------------- */
- /* ./webidl/SVGMetadataElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGMetadataElement : SVGElement {
- };
-
- /* ---------------------- SVGMPathElement ----------------------------- */
- /* ./webidl/SVGMPathElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGMPathElement : SVGElement {
- };
- SVGMPathElement includes SVGURIReference;
-
- /* ---------------------- SVGNumber ----------------------------- */
- /* ./webidl/SVGNumber.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGNumber {
- [SetterThrows]
- attribute float value;
- };
-
- /* ---------------------- SVGNumberList ----------------------------- */
- /* ./webidl/SVGNumberList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG11/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGNumberList {
- readonly attribute unsigned long numberOfItems;
- [Throws]
- undefined clear();
- [Throws]
- SVGNumber initialize(SVGNumber newItem);
- [Throws]
- getter SVGNumber getItem(unsigned long index);
- [Throws]
- SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index);
- [Throws]
- SVGNumber replaceItem(SVGNumber newItem, unsigned long index);
- [Throws]
- SVGNumber removeItem(unsigned long index);
- [Throws]
- SVGNumber appendItem(SVGNumber newItem);
- // Mozilla-specific stuff
- readonly attribute unsigned long length; // synonym for numberOfItems
- };
-
- /* ---------------------- SVGPathElement ----------------------------- */
- /* ./webidl/SVGPathElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPathElement : SVGGeometryElement {
- [Pref="dom.svg.pathSeg.enabled"]
- unsigned long getPathSegAtLength(float distance);
- };
- SVGPathElement includes SVGAnimatedPathData;
-
- /* ---------------------- SVGPathSeg ----------------------------- */
- /* ./webidl/SVGPathSeg.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSeg {
- // Path Segment Types
- const unsigned short PATHSEG_UNKNOWN = 0;
- const unsigned short PATHSEG_CLOSEPATH = 1;
- const unsigned short PATHSEG_MOVETO_ABS = 2;
- const unsigned short PATHSEG_MOVETO_REL = 3;
- const unsigned short PATHSEG_LINETO_ABS = 4;
- const unsigned short PATHSEG_LINETO_REL = 5;
- const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6;
- const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7;
- const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
- const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9;
- const unsigned short PATHSEG_ARC_ABS = 10;
- const unsigned short PATHSEG_ARC_REL = 11;
- const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
- const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13;
- const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14;
- const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15;
- const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
- const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
- const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
- const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
- [Pure]
- readonly attribute unsigned short pathSegType;
- [Pure]
- readonly attribute DOMString pathSegTypeAsLetter;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegClosePath : SVGPathSeg {
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegMovetoAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegMovetoRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoCubicAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x1;
- [SetterThrows]
- attribute float y1;
- [SetterThrows]
- attribute float x2;
- [SetterThrows]
- attribute float y2;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoCubicRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x1;
- [SetterThrows]
- attribute float y1;
- [SetterThrows]
- attribute float x2;
- [SetterThrows]
- attribute float y2;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x1;
- [SetterThrows]
- attribute float y1;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x1;
- [SetterThrows]
- attribute float y1;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegArcAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float r1;
- [SetterThrows]
- attribute float r2;
- [SetterThrows]
- attribute float angle;
- [SetterThrows]
- attribute boolean largeArcFlag;
- [SetterThrows]
- attribute boolean sweepFlag;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegArcRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float r1;
- [SetterThrows]
- attribute float r2;
- [SetterThrows]
- attribute float angle;
- [SetterThrows]
- attribute boolean largeArcFlag;
- [SetterThrows]
- attribute boolean sweepFlag;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoHorizontalRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoVerticalAbs : SVGPathSeg {
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegLinetoVerticalRel : SVGPathSeg {
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x2;
- [SetterThrows]
- attribute float y2;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float x2;
- [SetterThrows]
- attribute float y2;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- };
-
- /* ---------------------- SVGPathSegList ----------------------------- */
- /* ./webidl/SVGPathSegList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG11/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window,
- Pref="dom.svg.pathSeg.enabled"]
- interface SVGPathSegList {
- readonly attribute unsigned long numberOfItems;
- [Throws]
- getter SVGPathSeg getItem(unsigned long index);
- // Mozilla-specific stuff
- readonly attribute unsigned long length; // synonym for numberOfItems
- };
-
- /* ---------------------- SVGPatternElement ----------------------------- */
- /* ./webidl/SVGPatternElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/pservers.html#InterfaceSVGPatternElement
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPatternElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedEnumeration patternUnits;
- [Constant]
- readonly attribute SVGAnimatedEnumeration patternContentUnits;
- [Constant]
- readonly attribute SVGAnimatedTransformList patternTransform;
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- };
- SVGPatternElement includes SVGFitToViewBox;
- SVGPatternElement includes SVGURIReference;
-
- /* ---------------------- SVGPoint ----------------------------- */
- /* ./webidl/SVGPoint.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPoint {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [NewObject, Throws]
- SVGPoint matrixTransform(optional DOMMatrix2DInit matrix = {});
- };
-
- /* ---------------------- SVGPointList ----------------------------- */
- /* ./webidl/SVGPointList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG11/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPointList {
- readonly attribute unsigned long numberOfItems;
- [Throws]
- undefined clear();
- [Throws]
- SVGPoint initialize(SVGPoint newItem);
- [Throws]
- getter SVGPoint getItem(unsigned long index);
- [Throws]
- SVGPoint insertItemBefore(SVGPoint newItem, unsigned long index);
- [Throws]
- SVGPoint replaceItem(SVGPoint newItem, unsigned long index);
- [Throws]
- SVGPoint removeItem(unsigned long index);
- [Throws]
- SVGPoint appendItem(SVGPoint newItem);
- // Mozilla-specific stuff
- readonly attribute unsigned long length; // synonym for numberOfItems
- };
-
- /* ---------------------- SVGPolygonElement ----------------------------- */
- /* ./webidl/SVGPolygonElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPolygonElement : SVGGeometryElement {
- };
- SVGPolygonElement includes SVGAnimatedPoints;
-
- /* ---------------------- SVGPolylineElement ----------------------------- */
- /* ./webidl/SVGPolylineElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPolylineElement : SVGGeometryElement {
- };
- SVGPolylineElement includes SVGAnimatedPoints;
-
- /* ---------------------- SVGPreserveAspectRatio ----------------------------- */
- /* ./webidl/SVGPreserveAspectRatio.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGPreserveAspectRatio {
- // Alignment Types
- const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
- const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
- const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
- // Meet-or-slice Types
- const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
- const unsigned short SVG_MEETORSLICE_MEET = 1;
- const unsigned short SVG_MEETORSLICE_SLICE = 2;
- [SetterThrows]
- attribute unsigned short align;
- [SetterThrows]
- attribute unsigned short meetOrSlice;
- };
-
- /* ---------------------- SVGRadialGradientElement ----------------------------- */
- /* ./webidl/SVGRadialGradientElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGRadialGradientElement : SVGGradientElement {
- [Constant]
- readonly attribute SVGAnimatedLength cx;
- [Constant]
- readonly attribute SVGAnimatedLength cy;
- [Constant]
- readonly attribute SVGAnimatedLength r;
- [Constant]
- readonly attribute SVGAnimatedLength fx;
- [Constant]
- readonly attribute SVGAnimatedLength fy;
- // XXX: Bug 1242048
- // [SameObject]
- readonly attribute SVGAnimatedLength fr;
- };
-
- /* ---------------------- SVGRect ----------------------------- */
- /* ./webidl/SVGRect.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGRect {
- [SetterThrows]
- attribute float x;
- [SetterThrows]
- attribute float y;
- [SetterThrows]
- attribute float width;
- [SetterThrows]
- attribute float height;
- };
-
- /* ---------------------- SVGRectElement ----------------------------- */
- /* ./webidl/SVGRectElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGRectElement : SVGGeometryElement {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- [Constant]
- readonly attribute SVGAnimatedLength rx;
- [Constant]
- readonly attribute SVGAnimatedLength ry;
- };
-
- /* ---------------------- SVGScriptElement ----------------------------- */
- /* ./webidl/SVGScriptElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGScriptElement : SVGElement {
- [SetterThrows]
- attribute DOMString type;
- // See https://github.com/w3c/svgwg/issues/918
- attribute boolean async;
- attribute boolean defer;
- [SetterThrows]
- attribute DOMString? crossOrigin;
- };
- SVGScriptElement includes SVGURIReference;
-
- /* ---------------------- SVGSetElement ----------------------------- */
- /* ./webidl/SVGSetElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGSetElement : SVGAnimationElement {
- };
-
- /* ---------------------- SVGStopElement ----------------------------- */
- /* ./webidl/SVGStopElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGStopElement : SVGElement {
- [Constant]
- readonly attribute SVGAnimatedNumber offset;
- };
-
- /* ---------------------- SVGStringList ----------------------------- */
- /* ./webidl/SVGStringList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGStringList {
- readonly attribute unsigned long length;
- readonly attribute unsigned long numberOfItems;
- undefined clear();
- [Throws]
- DOMString initialize(DOMString newItem);
- [Throws]
- DOMString getItem(unsigned long index);
- getter DOMString(unsigned long index);
- [Throws]
- DOMString insertItemBefore(DOMString newItem, unsigned long index);
- [Throws]
- DOMString replaceItem(DOMString newItem, unsigned long index);
- [Throws]
- DOMString removeItem(unsigned long index);
- [Throws]
- DOMString appendItem(DOMString newItem);
- //setter undefined (unsigned long index, DOMString newItem);
- };
-
- /* ---------------------- SVGStyleElement ----------------------------- */
- /* ./webidl/SVGStyleElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGStyleElement : SVGElement {
- [Pure]
- attribute boolean disabled;
- [SetterThrows]
- attribute DOMString type;
- [SetterThrows]
- attribute DOMString media;
- [SetterThrows]
- attribute DOMString title;
- };
- SVGStyleElement includes LinkStyle;
-
- /* ---------------------- SVGSVGElement ----------------------------- */
- /* ./webidl/SVGSVGElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGSVGElement : SVGGraphicsElement {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- [UseCounter]
- attribute float currentScale;
- readonly attribute SVGPoint currentTranslate;
- [DependsOn=Nothing, Affects=Nothing]
- unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
- [DependsOn=Nothing, Affects=Nothing]
- undefined unsuspendRedraw(unsigned long suspendHandleID);
- [DependsOn=Nothing, Affects=Nothing]
- undefined unsuspendRedrawAll();
- [DependsOn=Nothing, Affects=Nothing]
- undefined forceRedraw();
- undefined pauseAnimations();
- undefined unpauseAnimations();
- boolean animationsPaused();
- [BinaryName="getCurrentTimeAsFloat"]
- float getCurrentTime();
- undefined setCurrentTime(float seconds);
- // NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
- // NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
- // boolean checkIntersection(SVGElement element, SVGRect rect);
- // boolean checkEnclosure(SVGElement element, SVGRect rect);
- [Deprecated="SVGDeselectAll"]
- undefined deselectAll();
- [NewObject]
- SVGNumber createSVGNumber();
- [NewObject]
- SVGLength createSVGLength();
- [NewObject]
- SVGAngle createSVGAngle();
- [NewObject]
- SVGPoint createSVGPoint();
- [NewObject]
- SVGMatrix createSVGMatrix();
- [NewObject]
- SVGRect createSVGRect();
- [NewObject]
- SVGTransform createSVGTransform();
- [NewObject, Throws]
- SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
- [UseCounter]
- Element? getElementById(DOMString elementId);
- };
- SVGSVGElement includes SVGFitToViewBox;
- SVGSVGElement includes SVGZoomAndPan;
-
- /* ---------------------- SVGSwitchElement ----------------------------- */
- /* ./webidl/SVGSwitchElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGSwitchElement : SVGGraphicsElement {
- };
-
- /* ---------------------- SVGSymbolElement ----------------------------- */
- /* ./webidl/SVGSymbolElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSymbolElement
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGSymbolElement : SVGElement {
- };
- SVGSymbolElement includes SVGFitToViewBox;
- SVGSymbolElement includes SVGTests;
-
- /* ---------------------- SVGTests ----------------------------- */
- /* ./webidl/SVGTests.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGTests {
- readonly attribute SVGStringList requiredExtensions;
- readonly attribute SVGStringList systemLanguage;
- };
-
- /* ---------------------- SVGTextContentElement ----------------------------- */
- /* ./webidl/SVGTextContentElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTextContentElement : SVGGraphicsElement {
- // lengthAdjust Types
- const unsigned short LENGTHADJUST_UNKNOWN = 0;
- const unsigned short LENGTHADJUST_SPACING = 1;
- const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
- [Constant]
- readonly attribute SVGAnimatedLength textLength;
- [Constant]
- readonly attribute SVGAnimatedEnumeration lengthAdjust;
- long getNumberOfChars();
- float getComputedTextLength();
- [Throws]
- float getSubStringLength(unsigned long charnum, unsigned long nchars);
- [Throws]
- SVGPoint getStartPositionOfChar(unsigned long charnum);
- [Throws]
- SVGPoint getEndPositionOfChar(unsigned long charnum);
- [NewObject, Throws]
- SVGRect getExtentOfChar(unsigned long charnum);
- [Throws]
- float getRotationOfChar(unsigned long charnum);
- long getCharNumAtPosition(optional DOMPointInit point = {});
- [Throws]
- undefined selectSubString(unsigned long charnum, unsigned long nchars);
- };
-
- /* ---------------------- SVGTextElement ----------------------------- */
- /* ./webidl/SVGTextElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTextElement : SVGTextPositioningElement {
- };
-
- /* ---------------------- SVGTextPathElement ----------------------------- */
- /* ./webidl/SVGTextPathElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTextPathElement : SVGTextContentElement {
- // textPath Method Types
- const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
- const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
- const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
- // textPath Spacing Types
- const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
- const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
- const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
- [Constant]
- readonly attribute SVGAnimatedLength startOffset;
- [Constant]
- readonly attribute SVGAnimatedEnumeration method;
- [Constant]
- readonly attribute SVGAnimatedEnumeration spacing;
- };
- SVGTextPathElement includes SVGURIReference;
-
- /* ---------------------- SVGTextPositioningElement ----------------------------- */
- /* ./webidl/SVGTextPositioningElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTextPositioningElement : SVGTextContentElement {
- [Constant]
- readonly attribute SVGAnimatedLengthList x;
- [Constant]
- readonly attribute SVGAnimatedLengthList y;
- [Constant]
- readonly attribute SVGAnimatedLengthList dx;
- [Constant]
- readonly attribute SVGAnimatedLengthList dy;
- [Constant]
- readonly attribute SVGAnimatedNumberList rotate;
- };
-
- /* ---------------------- SVGTitleElement ----------------------------- */
- /* ./webidl/SVGTitleElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTitleElement : SVGElement {
- };
-
- /* ---------------------- SVGTransform ----------------------------- */
- /* ./webidl/SVGTransform.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTransform {
- // Transform Types
- const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
- const unsigned short SVG_TRANSFORM_MATRIX = 1;
- const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
- const unsigned short SVG_TRANSFORM_SCALE = 3;
- const unsigned short SVG_TRANSFORM_ROTATE = 4;
- const unsigned short SVG_TRANSFORM_SKEWX = 5;
- const unsigned short SVG_TRANSFORM_SKEWY = 6;
- readonly attribute unsigned short type;
- [BinaryName="getMatrix"]
- readonly attribute SVGMatrix matrix;
- readonly attribute float angle;
- [Throws]
- undefined setMatrix(optional DOMMatrix2DInit matrix = {});
- [Throws]
- undefined setTranslate(float tx, float ty);
- [Throws]
- undefined setScale(float sx, float sy);
- [Throws]
- undefined setRotate(float angle, float cx, float cy);
- [Throws]
- undefined setSkewX(float angle);
- [Throws]
- undefined setSkewY(float angle);
- };
-
- /* ---------------------- SVGTransformList ----------------------------- */
- /* ./webidl/SVGTransformList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG11/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTransformList {
- readonly attribute unsigned long numberOfItems;
- [Throws]
- undefined clear();
- [Throws]
- SVGTransform initialize(SVGTransform newItem);
- [Throws]
- getter SVGTransform getItem(unsigned long index);
- [Throws]
- SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index);
- [Throws]
- SVGTransform replaceItem(SVGTransform newItem, unsigned long index);
- [Throws]
- SVGTransform removeItem(unsigned long index);
- [Throws]
- SVGTransform appendItem(SVGTransform newItem);
- [Throws]
- SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
- [Throws]
- SVGTransform? consolidate();
- // Mozilla-specific stuff
- readonly attribute unsigned long length; // synonym for numberOfItems
- };
-
- /* ---------------------- SVGTSpanElement ----------------------------- */
- /* ./webidl/SVGTSpanElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGTSpanElement : SVGTextPositioningElement {
- };
-
- /* ---------------------- SVGUnitTypes ----------------------------- */
- /* ./webidl/SVGUnitTypes.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://svgwg.org/svg2-draft/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGUnitTypes {
- // Unit Types
- const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
- const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
- const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
- };
-
- /* ---------------------- SVGURIReference ----------------------------- */
- /* ./webidl/SVGURIReference.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGURIReference {
- [Constant]
- readonly attribute SVGAnimatedString href;
- };
-
- /* ---------------------- SVGUseElement ----------------------------- */
- /* ./webidl/SVGUseElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGUseElement : SVGGraphicsElement {
- [Constant]
- readonly attribute SVGAnimatedLength x;
- [Constant]
- readonly attribute SVGAnimatedLength y;
- [Constant]
- readonly attribute SVGAnimatedLength width;
- [Constant]
- readonly attribute SVGAnimatedLength height;
- //readonly attribute SVGElementInstance instanceRoot;
- //readonly attribute SVGElementInstance animatedInstanceRoot;
- };
- SVGUseElement includes SVGURIReference;
-
- /* ---------------------- SVGViewElement ----------------------------- */
- /* ./webidl/SVGViewElement.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface SVGViewElement : SVGElement {
- };
- SVGViewElement includes SVGFitToViewBox;
- SVGViewElement includes SVGZoomAndPan;
-
- /* ---------------------- SVGZoomAndPan ----------------------------- */
- /* ./webidl/SVGZoomAndPan.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/SVG2/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface mixin SVGZoomAndPan {
- // Zoom and Pan Types
- const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
- const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
- const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
- [SetterThrows]
- attribute unsigned short zoomAndPan;
- };
-
- /* ---------------------- TaskPriorityChangeEvent ----------------------------- */
- /* ./webidl/TaskPriorityChangeEvent.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
- [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
- interface TaskPriorityChangeEvent : Event {
- constructor (DOMString type , TaskPriorityChangeEventInit priorityChangeEventInitDict);
- readonly attribute TaskPriority previousPriority;
- };
- dictionary TaskPriorityChangeEventInit : EventInit {
- required TaskPriority previousPriority;
- };
-
- /* ---------------------- TCPServerSocket ----------------------------- */
- /* ./webidl/TCPServerSocket.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * TCPServerSocket
- *
- * An interface to a server socket that can accept incoming connections for gaia apps.
- */
- dictionary ServerSocketOptions {
- TCPSocketBinaryType binaryType = "string";
- };
- [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Exposed=Window]
- interface TCPServerSocket : EventTarget {
- [Throws]
- constructor(unsigned short port, optional ServerSocketOptions options = {},
- optional unsigned short backlog = 0);
- /**
- * The port of this server socket object.
- */
- readonly attribute unsigned short localPort;
- /**
- * The "connect" event is dispatched when a client connection is accepted.
- * The event object will be a TCPServerSocketEvent containing a TCPSocket
- * instance, which is used for communication between client and server.
- */
- attribute EventHandler onconnect;
- /**
- * The "error" event will be dispatched when a listening server socket is
- * unexpectedly disconnected.
- */
- attribute EventHandler onerror;
- /**
- * Close the server socket.
- */
- undefined close();
- };
-
- /* ---------------------- TCPServerSocketEvent ----------------------------- */
- /* ./webidl/TCPServerSocketEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Exposed=Window]
- interface TCPServerSocketEvent : Event {
- constructor(DOMString type,
- optional TCPServerSocketEventInit eventInitDict = {});
- readonly attribute TCPSocket socket;
- };
- dictionary TCPServerSocketEventInit : EventInit {
- TCPSocket? socket = null;
- };
-
- /* ---------------------- TCPSocket ----------------------------- */
- /* ./webidl/TCPSocket.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * TCPSocket exposes a TCP client socket (no server sockets yet)
- * to highly privileged apps. It provides a buffered, non-blocking
- * interface for sending. For receiving, it uses an asynchronous,
- * event handler based interface.
- */
- interface nsISocketTransport;
- enum TCPSocketBinaryType {
- "arraybuffer",
- "string"
- };
- dictionary SocketOptions {
- boolean useSecureTransport = false;
- TCPSocketBinaryType binaryType = "string";
- };
- enum TCPReadyState {
- "connecting",
- "open",
- "closing",
- "closed",
- };
- [LegacyNoInterfaceObject,
- Exposed=Window]
- interface LegacyMozTCPSocket {
- /**
- * Legacy constructor for API compatibility.
- */
- [Throws]
- TCPSocket open(DOMString host, unsigned short port, optional SocketOptions options = {});
- [Throws]
- TCPServerSocket listen(unsigned short port, optional ServerSocketOptions options = {}, optional unsigned short backlog = 0);
- };
- [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Exposed=Window]
- interface TCPSocket : EventTarget {
- [Throws]
- constructor(DOMString host, unsigned short port,
- optional SocketOptions options = {});
- /**
- * Upgrade an insecure connection to use TLS. Throws if the ready state is not OPEN.
- */
- [Throws] undefined upgradeToSecure();
- /**
- * The raw internal socket transport.
- */
- readonly attribute nsISocketTransport? transport;
- /**
- * The UTF16 host of this socket object.
- */
- readonly attribute USVString host;
- /**
- * The port of this socket object.
- */
- readonly attribute unsigned short port;
- /**
- * True if this socket object is an SSL socket.
- */
- readonly attribute boolean ssl;
- /**
- * The number of bytes which have previously been buffered by calls to
- * send on this socket.
- */
- readonly attribute unsigned long long bufferedAmount;
- /**
- * Pause reading incoming data and invocations of the ondata handler until
- * resume is called. Can be called multiple times without resuming.
- */
- undefined suspend();
- /**
- * Resume reading incoming data and invoking ondata as usual. There must be
- * an equal number of resume as suspends that took place. Throws if the
- * socket is not suspended.
- */
- [Throws]
- undefined resume();
- /**
- * Close the socket.
- */
- undefined close();
- /**
- * Close the socket immediately without waiting for unsent data.
- */
- [ChromeOnly] undefined closeImmediately();
- /**
- * Write data to the socket.
- *
- * @param data The data to write to the socket.
- *
- * @return Send returns true or false as a hint to the caller that
- * they may either continue sending more data immediately, or
- * may want to wait until the other side has read some of the
- * data which has already been written to the socket before
- * buffering more. If send returns true, then less than 64k
- * has been buffered and it's safe to immediately write more.
- * If send returns false, then more than 64k has been buffered,
- * and the caller may wish to wait until the ondrain event
- * handler has been called before buffering more data by more
- * calls to send.
- *
- * @throws Throws if the ready state is not OPEN.
- */
- [Throws]
- boolean send(ByteString data);
- /**
- * Write data to the socket.
- *
- * @param data The data to write to the socket.
- * @param byteOffset The offset within the data from which to begin writing.
- * @param byteLength The number of bytes to write.
- * Defaults to the byte length of the ArrayBuffer if not present,
- * and clamped to (length - byteOffset).
- *
- * @return Send returns true or false as a hint to the caller that
- * they may either continue sending more data immediately, or
- * may want to wait until the other side has read some of the
- * data which has already been written to the socket before
- * buffering more. If send returns true, then less than 64k
- * has been buffered and it's safe to immediately write more.
- * If send returns false, then more than 64k has been buffered,
- * and the caller may wish to wait until the ondrain event
- * handler has been called before buffering more data by more
- * calls to send.
- *
- * @throws Throws if the ready state is not OPEN.
- */
- [Throws]
- boolean send(ArrayBuffer data, optional unsigned long byteOffset = 0, optional unsigned long byteLength);
- /**
- * The readyState attribute indicates which state the socket is currently
- * in.
- */
- readonly attribute TCPReadyState readyState;
- /**
- * The binaryType attribute indicates which mode this socket uses for
- * sending and receiving data. If the binaryType: "arraybuffer" option
- * was passed to the open method that created this socket, binaryType
- * will be "arraybuffer". Otherwise, it will be "string".
- */
- readonly attribute TCPSocketBinaryType binaryType;
- /**
- * The "open" event is dispatched when the connection to the server
- * has been established. If the connection is refused, the "error" event
- * will be dispatched, instead.
- */
- attribute EventHandler onopen;
- /**
- * After send has buffered more than 64k of data, it returns false to
- * indicate that the client should pause before sending more data, to
- * avoid accumulating large buffers. This is only advisory, and the client
- * is free to ignore it and buffer as much data as desired, but if reducing
- * the size of buffers is important (especially for a streaming application)
- * the "drain" event will be dispatched once the previously-buffered data has
- * been written to the network, at which point the client can resume calling
- * send again.
- */
- attribute EventHandler ondrain;
- /**
- * The "data" event will be dispatched repeatedly and asynchronously after
- * "open" is dispatched, every time some data was available from the server
- * and was read. The event object will be a TCPSocketEvent; if the "arraybuffer"
- * binaryType was passed to the constructor, the data attribute of the event
- * object will be an ArrayBuffer. If not, it will be a normal JavaScript string,
- * truncated at the first null byte found in the payload and the remainder
- * interpreted as ASCII bytes.
- *
- * At any time, the client may choose to pause reading and receiving "data"
- * events by calling the socket's suspend() method. Further "data" events
- * will be paused until resume() is called.
- */
- attribute EventHandler ondata;
- /**
- * The "error" event will be dispatched when there is an error. The event
- * object will be a TCPSocketErrorEvent.
- *
- * If an "error" event is dispatched before an "open" one, the connection
- * was refused, and the "close" event will not be dispatched. If an "error"
- * event is dispatched after an "open" event, the connection was lost,
- * and a "close" event will be dispatched subsequently.
- */
- attribute EventHandler onerror;
- /**
- * The "close" event is dispatched once the underlying network socket
- * has been closed, either by the server, or by the client calling
- * close.
- *
- * If the "error" event was not dispatched before "close", then one of
- * the sides cleanly closed the connection.
- */
- attribute EventHandler onclose;
- };
-
- /* ---------------------- TCPSocketErrorEvent ----------------------------- */
- /* ./webidl/TCPSocketErrorEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* Dispatched as part of the "error" event in the following situations:
- * - if there's an error detected when the TCPSocket closes
- * - if there's an internal error while sending data
- * - if there's an error connecting to the host
- */
- [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Exposed=Window]
- interface TCPSocketErrorEvent : Event {
- constructor(DOMString type,
- optional TCPSocketErrorEventInit eventInitDict = {});
- readonly attribute DOMString name;
- readonly attribute DOMString message;
- readonly attribute unsigned long errorCode; // The internal nsresult error code.
- };
- dictionary TCPSocketErrorEventInit : EventInit
- {
- DOMString name = "";
- DOMString message = "";
- unsigned long errorCode = 0;
- };
-
- /* ---------------------- TCPSocketEvent ----------------------------- */
- /* ./webidl/TCPSocketEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * TCPSocketEvent is the event dispatched for all of the events described by TCPSocket,
- * except the "error" event. It contains the socket that was associated with the event,
- * the type of event, and the data associated with the event if the event is a "data" event.
- */
- [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
- Exposed=Window]
- interface TCPSocketEvent : Event {
- constructor(DOMString type, optional TCPSocketEventInit eventInitDict = {});
- /**
- * If the event is a "data" event, data will be the bytes read from the network;
- * if the binaryType of the socket was "arraybuffer", this value will be of type
- * ArrayBuffer, otherwise, it will be a ByteString.
- *
- * For other events, data will be an empty string.
- */
- //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
- readonly attribute any data;
- };
- dictionary TCPSocketEventInit : EventInit {
- //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
- any data = null;
- };
-
- /* ---------------------- TestFunctions ----------------------------- */
- /* ./webidl/TestFunctions.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- // A dumping ground for random testing functions
- callback PromiseReturner = Promise<any>();
- callback PromiseReturner2 = Promise<any>(any arg, DOMString arg2);
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface WrapperCachedNonISupportsTestInterface {
- [Pref="dom.webidl.test1"] constructor();
- };
- [Trial="TestTrial", Exposed=*]
- interface TestTrialInterface {
- constructor();
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceLength {
- [ChromeOnly]
- constructor(boolean arg);
- };
- // The type of string C++ sees.
- enum StringType {
- "literal", // A string with the LITERAL flag.
- "stringbuffer", // A string with the REFCOUNTED flag.
- "inline", // A string with the INLINE flag.
- "other", // Anything else.
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestFunctions {
- constructor();
- [Throws]
- static undefined throwUncatchableException();
- // Simply returns its argument. Can be used to test Promise
- // argument processing behavior.
- static Promise<any> passThroughPromise(Promise<any> arg);
- // Returns whatever Promise the given PromiseReturner returned.
- [Throws]
- static Promise<any> passThroughCallbackPromise(PromiseReturner callback);
- // Some basic tests for string binding round-tripping behavior.
- undefined setStringData(DOMString arg);
- // Get the string data, using an nsAString argument on the C++ side.
- // This will just use Assign/operator=, whatever that does.
- DOMString getStringDataAsAString();
- // Get the string data, but only "length" chars of it, using an
- // nsAString argument on the C++ side. This will always copy on the
- // C++ side.
- DOMString getStringDataAsAString(unsigned long length);
- // Get the string data, but only "length" chars of it, using a
- // DOMString argument on the C++ side and trying to hand it
- // stringbuffers. If length not passed, use our full length.
- DOMString getStringDataAsDOMString(optional unsigned long length);
- // Get a short (short enough to fit in a JS inline string) literal string.
- DOMString getShortLiteralString();
- // Get a medium (long enough to not be a JS inline, but short enough
- // to fit in a FakeString inline buffer) literal string.
- DOMString getMediumLiteralString();
- // Get a long (long enough to not fit in any inline buffers) literal string.
- DOMString getLongLiteralString();
- // Get a stringbuffer string for whatever string is passed in.
- DOMString getStringbufferString(DOMString input);
- // Get the type of string that the C++ sees after going through bindings.
- StringType getStringType(DOMString str);
- // Returns true if both the incoming string and the stored (via setStringData())
- // string have stringbuffers and they're the same stringbuffer.
- boolean stringbufferMatchesStored(DOMString str);
- // Functions that just punch through to mozITestInterfaceJS.idl
- [Throws]
- undefined testThrowNsresult();
- [Throws]
- undefined testThrowNsresultFromNative();
- // Throws an InvalidStateError to auto-create a rejected promise.
- [Throws]
- static Promise<any> throwToRejectPromise();
- // Some attributes for the toJSON to work with.
- readonly attribute long one;
- [Func="mozilla::dom::TestFunctions::ObjectFromAboutBlank"]
- readonly attribute long two;
- // Testing for how default toJSON behaves.
- [Default] object toJSON();
- // This returns a wrappercached non-ISupports object. While this will always
- // return the same object, no optimization attributes like [Pure] should be
- // used here because the object should not be held alive from JS by the
- // bindings. This is needed to test wrapper preservation for weak map keys.
- // See bug 1351501.
- readonly attribute WrapperCachedNonISupportsTestInterface wrapperCachedNonISupportsObject;
- attribute [Clamp] octet? clampedNullableOctet;
- attribute [EnforceRange] octet? enforcedNullableOctet;
- // Testing for [AllowShared]
- [GetterThrows]
- attribute ArrayBufferView arrayBufferView;
- [GetterThrows]
- attribute [AllowShared] ArrayBufferView allowSharedArrayBufferView;
- [Cached, Pure, GetterThrows]
- attribute sequence<ArrayBufferView> sequenceOfArrayBufferView;
- [Cached, Pure, GetterThrows]
- attribute sequence<[AllowShared] ArrayBufferView> sequenceOfAllowSharedArrayBufferView;
- [GetterThrows]
- attribute ArrayBuffer arrayBuffer;
- [GetterThrows]
- attribute [AllowShared] ArrayBuffer allowSharedArrayBuffer;
- [Cached, Pure, GetterThrows]
- attribute sequence<ArrayBuffer> sequenceOfArrayBuffer;
- [Cached, Pure, GetterThrows]
- attribute sequence<[AllowShared] ArrayBuffer> sequenceOfAllowSharedArrayBuffer;
- undefined testNotAllowShared(ArrayBufferView buffer);
- undefined testNotAllowShared(ArrayBuffer buffer);
- undefined testNotAllowShared(DOMString buffer);
- undefined testAllowShared([AllowShared] ArrayBufferView buffer);
- undefined testAllowShared([AllowShared] ArrayBuffer buffer);
- undefined testDictWithAllowShared(optional DictWithAllowSharedBufferSource buffer = {});
- undefined testUnionOfBuffferSource((ArrayBuffer or ArrayBufferView or DOMString) foo);
- undefined testUnionOfAllowSharedBuffferSource(([AllowShared] ArrayBuffer or [AllowShared] ArrayBufferView) foo);
- boolean staticAndNonStaticOverload();
- static boolean staticAndNonStaticOverload(optional unsigned long foo);
- };
- dictionary DictWithAllowSharedBufferSource {
- ArrayBuffer arrayBuffer;
- ArrayBufferView arrayBufferView;
- [AllowShared] ArrayBuffer allowSharedArrayBuffer;
- [AllowShared] ArrayBufferView allowSharedArrayBufferView;
- };
-
- /* ---------------------- TestInterfaceJS ----------------------------- */
- /* ./webidl/TestInterfaceJS.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary TestInterfaceJSUnionableDictionary {
- object objectMember;
- any anyMember;
- };
- [JSImplementation="@mozilla.org/dom/test-interface-js;1",
- Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceJS : EventTarget {
- [Throws]
- constructor(optional any anyArg, optional object objectArg,
- optional TestInterfaceJSDictionary dictionaryArg = {});
- readonly attribute any anyArg;
- readonly attribute object objectArg;
- TestInterfaceJSDictionary getDictionaryArg();
- attribute any anyAttr;
- attribute object objectAttr;
- TestInterfaceJSDictionary getDictionaryAttr();
- undefined setDictionaryAttr(optional TestInterfaceJSDictionary dict = {});
- any pingPongAny(any arg);
- object pingPongObject(object obj);
- any pingPongObjectOrString((object or DOMString) objOrString);
- TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict = {});
- long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong = {});
- DOMString pingPongRecord(record<DOMString, any> rec);
- long objectSequenceLength(sequence<object> seq);
- long anySequenceLength(sequence<any> seq);
- // For testing bug 968335.
- DOMString getCallerPrincipal();
- DOMString convertSVS(USVString svs);
- (TestInterfaceJS or long) pingPongUnion((TestInterfaceJS or long) something);
- (DOMString or TestInterfaceJS?) pingPongUnionContainingNull((TestInterfaceJS? or DOMString) something);
- (TestInterfaceJS or long)? pingPongNullableUnion((TestInterfaceJS or long)? something);
- (Location or TestInterfaceJS) returnBadUnion();
- // Test for sequence overloading and union behavior
- undefined testSequenceOverload(sequence<DOMString> arg);
- undefined testSequenceOverload(DOMString arg);
- undefined testSequenceUnion((sequence<DOMString> or DOMString) arg);
- // Tests for exception-throwing behavior
- [Throws]
- undefined testThrowError();
- [Throws]
- undefined testThrowDOMException();
- [Throws]
- undefined testThrowTypeError();
- [Throws]
- undefined testThrowCallbackError(Function callback);
- [Throws]
- undefined testThrowXraySelfHosted();
- [Throws]
- undefined testThrowSelfHosted();
- // Tests for promise-rejection behavior
- Promise<undefined> testPromiseWithThrowingChromePromiseInit();
- Promise<undefined> testPromiseWithThrowingContentPromiseInit(Function func);
- Promise<undefined> testPromiseWithDOMExceptionThrowingPromiseInit();
- Promise<undefined> testPromiseWithThrowingChromeThenFunction();
- Promise<undefined> testPromiseWithThrowingContentThenFunction(AnyCallback func);
- Promise<undefined> testPromiseWithDOMExceptionThrowingThenFunction();
- Promise<undefined> testPromiseWithThrowingChromeThenable();
- Promise<undefined> testPromiseWithThrowingContentThenable(object thenable);
- Promise<undefined> testPromiseWithDOMExceptionThrowingThenable();
- // Event handler tests
- attribute EventHandler onsomething;
- };
-
- /* ---------------------- TestInterfaceJSDictionaries ----------------------------- */
- /* ./webidl/TestInterfaceJSDictionaries.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- //
- // These dictionaries are in a separate WebIDL file to avoid circular include
- // problems. One of the dictionary includes a union as a member, so that
- // dictionary's header needs to include UnionTypes.h. But the API in
- // TestInterfaceJS also declares a union of dictionaries, so _that_
- // dictionary's header needs to be included _by_ UnionTypes.h. The solution
- // is to separate those two dictionaries into separate header files.
- //
- dictionary TestInterfaceJSDictionary2 {
- object innerObject;
- };
- dictionary TestInterfaceJSDictionary {
- TestInterfaceJSDictionary2 innerDictionary;
- object objectMember;
- any anyMember;
- (object or DOMString) objectOrStringMember;
- sequence<any> anySequenceMember;
- record<DOMString, object> objectRecordMember;
- };
-
- /* ---------------------- TestInterfaceJSMaplikeSetlikeIterable ----------------------------- */
- /* ./webidl/TestInterfaceJSMaplikeSetlikeIterable.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceMaplike {
- [Throws]
- constructor();
- maplike<DOMString, long>;
- undefined setInternal(DOMString aKey, long aValue);
- undefined clearInternal();
- boolean deleteInternal(DOMString aKey);
- boolean hasInternal(DOMString aKey);
- [Throws]
- long getInternal(DOMString aKey);
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceMaplikeObject {
- [Throws]
- constructor();
- readonly maplike<DOMString, TestInterfaceMaplike>;
- undefined setInternal(DOMString aKey);
- undefined clearInternal();
- boolean deleteInternal(DOMString aKey);
- boolean hasInternal(DOMString aKey);
- [Throws]
- TestInterfaceMaplike? getInternal(DOMString aKey);
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceMaplikeJSObject {
- [Throws]
- constructor();
- readonly maplike<DOMString, object>;
- undefined setInternal(DOMString aKey, object aObject);
- undefined clearInternal();
- boolean deleteInternal(DOMString aKey);
- boolean hasInternal(DOMString aKey);
- [Throws]
- object? getInternal(DOMString aKey);
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceSetlike {
- [Throws]
- constructor();
- setlike<DOMString>;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceSetlikeNode {
- [Throws]
- constructor();
- setlike<Node>;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceIterableSingle {
- [Throws]
- constructor();
- iterable<long>;
- getter long(unsigned long index);
- readonly attribute unsigned long length;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceIterableDouble {
- [Throws]
- constructor();
- iterable<DOMString, DOMString>;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceIterableDoubleUnion {
- [Throws]
- constructor();
- iterable<DOMString, (DOMString or long)>;
- };
- dictionary TestInterfaceAsyncIterableSingleOptions {
- boolean failToInit = false;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceAsyncIterableSingle {
- [Throws]
- constructor(optional TestInterfaceAsyncIterableSingleOptions options = {});
- async iterable<long>;
- };
- callback TestThrowingCallback = undefined();
- dictionary TestInterfaceAsyncIteratorOptions {
- unsigned long multiplier = 1;
- sequence<Promise<any>> blockingPromises = [];
- unsigned long failNextAfter = 4294967295;
- boolean throwFromNext = false;
- TestThrowingCallback throwFromReturn;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceAsyncIterableSingleWithArgs {
- [Throws]
- constructor();
- [GenerateReturnMethod]
- async iterable<long>(optional TestInterfaceAsyncIteratorOptions options = {});
- readonly attribute long returnCallCount;
- readonly attribute any returnLastCalledWith;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceAsyncIterableDouble {
- [Throws]
- constructor();
- async iterable<DOMString, DOMString>;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceAsyncIterableDoubleUnion {
- [Throws]
- constructor();
- async iterable<DOMString, (DOMString or long)>;
- };
-
- /* ---------------------- TestInterfaceObservableArray ----------------------------- */
- /* ./webidl/TestInterfaceObservableArray.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- callback SetDeleteObjectCallback = undefined (object value, unsigned long index);
- callback SetDeleteBooleanCallback = undefined (boolean value, unsigned long index);
- callback SetDeleteInterfaceCallback = undefined (TestInterfaceObservableArray value, unsigned long index);
- dictionary ObservableArrayCallbacks {
- SetDeleteObjectCallback setObjectCallback;
- SetDeleteObjectCallback deleteObjectCallback;
- SetDeleteBooleanCallback setBooleanCallback;
- SetDeleteBooleanCallback deleteBooleanCallback;
- SetDeleteInterfaceCallback setInterfaceCallback;
- SetDeleteInterfaceCallback deleteInterfaceCallback;
- };
- [Pref="dom.expose_test_interfaces",
- Exposed=Window]
- interface TestInterfaceObservableArray {
- [Throws]
- constructor(optional ObservableArrayCallbacks callbacks = {});
- // Testing for ObservableArray
- attribute ObservableArray<boolean> observableArrayBoolean;
- attribute ObservableArray<object> observableArrayObject;
- attribute ObservableArray<TestInterfaceObservableArray> observableArrayInterface;
- // Tests for C++ helper function
- [Throws]
- boolean booleanElementAtInternal(unsigned long index);
- [Throws]
- TestInterfaceObservableArray interfaceElementAtInternal(unsigned long index);
- [Throws]
- object objectElementAtInternal(unsigned long index);
- [Throws]
- undefined booleanReplaceElementAtInternal(unsigned long index, boolean value);
- [Throws]
- undefined interfaceReplaceElementAtInternal(unsigned long index, TestInterfaceObservableArray value);
- [Throws]
- undefined objectReplaceElementAtInternal(unsigned long index, object value);
- [Throws]
- undefined booleanAppendElementInternal(boolean value);
- [Throws]
- undefined interfaceAppendElementInternal(TestInterfaceObservableArray value);
- [Throws]
- undefined objectAppendElementInternal(object value);
- [Throws]
- undefined booleanRemoveLastElementInternal();
- [Throws]
- undefined interfaceRemoveLastElementInternal();
- [Throws]
- undefined objectRemoveLastElementInternal();
- [Throws]
- unsigned long booleanLengthInternal();
- [Throws]
- unsigned long interfaceLengthInternal();
- [Throws]
- unsigned long objectLengthInternal();
- };
-
- /* ---------------------- TestUtils ----------------------------- */
- /* ./webidl/TestUtils.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://testutils.spec.whatwg.org/#the-testutils-namespace
- */
- [Exposed=(Window,Worker),
- Pref="dom.testing.testutils.enabled"]
- namespace TestUtils {
- [NewObject, Throws] Promise<undefined> gc();
- };
-
- /* ---------------------- Text ----------------------------- */
- /* ./webidl/Text.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window, ProbablyShortLivingWrapper]
- interface Text : CharacterData {
- [Throws]
- constructor(optional DOMString data = "");
- [Throws]
- Text splitText(unsigned long offset);
- readonly attribute DOMString wholeText;
- };
- partial interface Text {
- [BinaryName="assignedSlotByMode"]
- readonly attribute HTMLSlotElement? assignedSlot;
- [ChromeOnly, BinaryName="assignedSlot"]
- readonly attribute HTMLSlotElement? openOrClosedAssignedSlot;
- };
- Text includes GeometryUtils;
-
- /* ---------------------- TextClause ----------------------------- */
- /* ./webidl/TextClause.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [ChromeOnly,
- Exposed=Window]
- interface TextClause
- {
- // The start offset of TextClause
- readonly attribute long startOffset;
- // The end offset of TextClause
- readonly attribute long endOffset;
- // If the TextClause is Caret or not
- readonly attribute boolean isCaret;
- // If the TextClause is TargetClause or not
- readonly attribute boolean isTargetClause;
- };
-
- /* ---------------------- TextDecoder ----------------------------- */
- /* ./webidl/TextDecoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://encoding.spec.whatwg.org/#interface-textdecoder
- */
- interface mixin TextDecoderCommon {
- [Constant]
- readonly attribute DOMString encoding;
- [Constant]
- readonly attribute boolean fatal;
- [Constant]
- readonly attribute boolean ignoreBOM;
- };
- [Exposed=(Window,Worker)]
- interface TextDecoder {
- [Throws]
- constructor(optional DOMString label = "utf-8",
- optional TextDecoderOptions options = {});
- [Throws]
- USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
- };
- TextDecoder includes TextDecoderCommon;
- dictionary TextDecoderOptions {
- boolean fatal = false;
- boolean ignoreBOM = false;
- };
- dictionary TextDecodeOptions {
- boolean stream = false;
- };
-
- /* ---------------------- TextDecoderStream ----------------------------- */
- /* ./webidl/TextDecoderStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://encoding.spec.whatwg.org/#interface-textdecoderstream
- */
- [Exposed=*]
- interface TextDecoderStream {
- [Throws]
- constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
- };
- TextDecoderStream includes TextDecoderCommon;
- TextDecoderStream includes GenericTransformStream;
-
- /* ---------------------- TextEncoder ----------------------------- */
- /* ./webidl/TextEncoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://encoding.spec.whatwg.org/#interface-textencoder
- */
- interface mixin TextEncoderCommon {
- /*
- * This is DOMString in the spec, but the value is always ASCII
- * and short. By declaring this as ByteString, we get the same
- * end result (storage as inline Latin1 string in SpiderMonkey)
- * with fewer conversions.
- */
- [Constant]
- readonly attribute ByteString encoding;
- };
- dictionary TextEncoderEncodeIntoResult {
- unsigned long long read;
- unsigned long long written;
- };
- [Exposed=(Window,Worker)]
- interface TextEncoder {
- constructor();
- /*
- * This is spec-wise USVString but marking it as UTF8String as an
- * optimization. (The SpiderMonkey-provided conversion to UTF-8 takes care of
- * replacing lone surrogates with the REPLACEMENT CHARACTER, so the
- * observable behavior of USVString is matched.)
- */
- [NewObject, Throws]
- Uint8Array encode(optional UTF8String input = "");
- /*
- * The same comment about UTF8String as above applies here with JSString.
- *
- * We use JSString because we don't want to encode the full string, just as
- * much as the capacity of the Uint8Array.
- */
- [CanOOM]
- TextEncoderEncodeIntoResult encodeInto(JSString source, Uint8Array destination);
- };
- TextEncoder includes TextEncoderCommon;
-
- /* ---------------------- TextEncoderStream ----------------------------- */
- /* ./webidl/TextEncoderStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://encoding.spec.whatwg.org/#interface-textdecoderstream
- */
- [Exposed=*]
- interface TextEncoderStream {
- [Throws]
- constructor();
- };
- TextEncoderStream includes TextEncoderCommon;
- TextEncoderStream includes GenericTransformStream;
-
- /* ---------------------- TextTrack ----------------------------- */
- /* ./webidl/TextTrack.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#texttrack
- */
- enum TextTrackKind {
- "subtitles",
- "captions",
- "descriptions",
- "chapters",
- "metadata"
- };
- enum TextTrackMode {
- "disabled",
- "hidden",
- "showing"
- };
- [Exposed=Window]
- interface TextTrack : EventTarget {
- readonly attribute TextTrackKind kind;
- readonly attribute DOMString label;
- readonly attribute DOMString language;
- readonly attribute DOMString id;
- readonly attribute DOMString inBandMetadataTrackDispatchType;
- attribute TextTrackMode mode;
- readonly attribute TextTrackCueList? cues;
- readonly attribute TextTrackCueList? activeCues;
- undefined addCue(VTTCue cue);
- [Throws]
- undefined removeCue(VTTCue cue);
- attribute EventHandler oncuechange;
- };
- // Mozilla Extensions
- partial interface TextTrack {
- [ChromeOnly]
- readonly attribute TextTrackList? textTrackList;
- };
-
- /* ---------------------- TextTrackCue ----------------------------- */
- /* ./webidl/TextTrackCue.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/#texttrackcue
- */
- [Exposed=Window]
- interface TextTrackCue : EventTarget {
- readonly attribute TextTrack? track;
- attribute DOMString id;
- attribute double startTime;
- attribute double endTime;
- attribute boolean pauseOnExit;
- attribute EventHandler onenter;
- attribute EventHandler onexit;
- };
-
- /* ---------------------- TextTrackCueList ----------------------------- */
- /* ./webidl/TextTrackCueList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcuelist
- */
- [Exposed=Window]
- interface TextTrackCueList {
- readonly attribute unsigned long length;
- getter VTTCue (unsigned long index);
- VTTCue? getCueById(DOMString id);
- };
-
- /* ---------------------- TextTrackList ----------------------------- */
- /* ./webidl/TextTrackList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#texttracklist
- */
- [Exposed=Window]
- interface TextTrackList : EventTarget {
- readonly attribute unsigned long length;
- getter TextTrack (unsigned long index);
- TextTrack? getTrackById(DOMString id);
- attribute EventHandler onchange;
- attribute EventHandler onaddtrack;
- attribute EventHandler onremovetrack;
- };
- // Mozilla extensions
- partial interface TextTrackList {
- [ChromeOnly]
- readonly attribute HTMLMediaElement? mediaElement;
- };
-
- /* ---------------------- TimeEvent ----------------------------- */
- /* ./webidl/TimeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface TimeEvent : Event
- {
- readonly attribute long detail;
- readonly attribute WindowProxy? view;
- undefined initTimeEvent(DOMString aType,
- optional Window? aView = null,
- optional long aDetail = 0);
- };
-
- /* ---------------------- TimeRanges ----------------------------- */
- /* ./webidl/TimeRanges.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#timeranges
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface TimeRanges {
- readonly attribute unsigned long length;
- [Throws]
- double start(unsigned long index);
- [Throws]
- double end(unsigned long index);
- };
-
- /* ---------------------- ToggleEvent ----------------------------- */
- /* ./webidl/ToggleEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/popover.html#the-toggleevent-interface
- */
- [Exposed=Window]
- interface ToggleEvent : Event {
- constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
- readonly attribute DOMString oldState;
- readonly attribute DOMString newState;
- };
- dictionary ToggleEventInit : EventInit {
- DOMString oldState = "";
- DOMString newState = "";
- };
-
- /* ---------------------- Touch ----------------------------- */
- /* ./webidl/Touch.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- dictionary TouchInit {
- required long identifier;
- required EventTarget target;
- long clientX = 0;
- long clientY = 0;
- long screenX = 0;
- long screenY = 0;
- long pageX = 0;
- long pageY = 0;
- float radiusX = 0;
- float radiusY = 0;
- float rotationAngle = 0;
- float force = 0;
- };
- [Func="mozilla::dom::Touch::PrefEnabled",
- Exposed=Window]
- interface Touch {
- constructor(TouchInit touchInitDict);
- readonly attribute long identifier;
- readonly attribute EventTarget? target;
- [NeedsCallerType]
- readonly attribute long screenX;
- [NeedsCallerType]
- readonly attribute long screenY;
- readonly attribute long clientX;
- readonly attribute long clientY;
- readonly attribute long pageX;
- readonly attribute long pageY;
- [NeedsCallerType]
- readonly attribute long radiusX;
- [NeedsCallerType]
- readonly attribute long radiusY;
- [NeedsCallerType]
- readonly attribute float rotationAngle;
- [NeedsCallerType]
- readonly attribute float force;
- };
-
- /* ---------------------- TouchEvent ----------------------------- */
- /* ./webidl/TouchEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary TouchEventInit : EventModifierInit {
- sequence<Touch> touches = [];
- sequence<Touch> targetTouches = [];
- sequence<Touch> changedTouches = [];
- };
- [Func="mozilla::dom::TouchEvent::PrefEnabled",
- Exposed=Window]
- interface TouchEvent : UIEvent {
- constructor(DOMString type, optional TouchEventInit eventInitDict = {});
- readonly attribute TouchList touches;
- readonly attribute TouchList targetTouches;
- readonly attribute TouchList changedTouches;
- readonly attribute boolean altKey;
- readonly attribute boolean metaKey;
- readonly attribute boolean ctrlKey;
- readonly attribute boolean shiftKey;
- undefined initTouchEvent(DOMString type,
- optional boolean canBubble = false,
- optional boolean cancelable = false,
- optional Window? view = null,
- optional long detail = 0,
- optional boolean ctrlKey = false,
- optional boolean altKey = false,
- optional boolean shiftKey = false,
- optional boolean metaKey = false,
- optional TouchList? touches = null,
- optional TouchList? targetTouches = null,
- optional TouchList? changedTouches = null);
- };
-
- /* ---------------------- TouchList ----------------------------- */
- /* ./webidl/TouchList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Func="mozilla::dom::TouchList::PrefEnabled",
- Exposed=Window]
- interface TouchList {
- [Pure]
- readonly attribute unsigned long length;
- getter Touch? item(unsigned long index);
- };
-
- /* ---------------------- TrackEvent ----------------------------- */
- /* ./webidl/TrackEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#trackevent
- */
- [Exposed=Window]
- interface TrackEvent : Event
- {
- constructor(DOMString type, optional TrackEventInit eventInitDict = {});
- readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
- };
- dictionary TrackEventInit : EventInit
- {
- (VideoTrack or AudioTrack or TextTrack)? track = null;
- };
-
- /* ---------------------- Transformer ----------------------------- */
- /* ./webidl/Transformer.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#transformer-api
- */
- [GenerateInit]
- dictionary Transformer {
- TransformerStartCallback start;
- TransformerTransformCallback transform;
- TransformerFlushCallback flush;
- any readableType;
- any writableType;
- };
- callback TransformerStartCallback = any (TransformStreamDefaultController controller);
- callback TransformerFlushCallback = Promise<undefined> (TransformStreamDefaultController controller);
- callback TransformerTransformCallback = Promise<undefined> (any chunk, TransformStreamDefaultController controller);
-
- /* ---------------------- TransformStream ----------------------------- */
- /* ./webidl/TransformStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#ts-class-definition
- */
- [Exposed=*] // [Transferable] - See Bug 1562065
- interface TransformStream {
- [Throws]
- constructor(optional object transformer,
- optional QueuingStrategy writableStrategy = {},
- optional QueuingStrategy readableStrategy = {});
- readonly attribute ReadableStream readable;
- readonly attribute WritableStream writable;
- };
-
- /* ---------------------- TransformStreamDefaultController ----------------------------- */
- /* ./webidl/TransformStreamDefaultController.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#ts-default-controller-class-definition
- */
- [Exposed=*]
- interface TransformStreamDefaultController {
- readonly attribute unrestricted double? desiredSize;
- [Throws] undefined enqueue(optional any chunk);
- [Throws] undefined error(optional any reason);
- [Throws] undefined terminate();
- };
-
- /* ---------------------- TransitionEvent ----------------------------- */
- /* ./webidl/TransitionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Transition events are defined in:
- * http://www.w3.org/TR/css3-transitions/#transition-events-
- * http://dev.w3.org/csswg/css3-transitions/#transition-events-
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface TransitionEvent : Event {
- constructor(DOMString type, optional TransitionEventInit eventInitDict = {});
- readonly attribute DOMString propertyName;
- readonly attribute float elapsedTime;
- readonly attribute DOMString pseudoElement;
- };
- dictionary TransitionEventInit : EventInit {
- DOMString propertyName = "";
- float elapsedTime = 0;
- DOMString pseudoElement = "";
- };
-
- /* ---------------------- TreeWalker ----------------------------- */
- /* ./webidl/TreeWalker.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120105/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface TreeWalker {
- [Constant]
- readonly attribute Node root;
- [Constant]
- readonly attribute unsigned long whatToShow;
- [Constant]
- readonly attribute NodeFilter? filter;
- [Pure, SetterThrows]
- attribute Node currentNode;
- [Throws]
- Node? parentNode();
- [Throws]
- Node? firstChild();
- [Throws]
- Node? lastChild();
- [Throws]
- Node? previousSibling();
- [Throws]
- Node? nextSibling();
- [Throws]
- Node? previousNode();
- [Throws]
- Node? nextNode();
- };
-
- /* ---------------------- TrustedTypes ----------------------------- */
- /* ./webidl/TrustedTypes.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * <https://w3c.github.io/trusted-types/dist/spec/>.
- * It is augmented with Gecko-specific annotations.
- */
- [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
- interface TrustedHTML {
- stringifier;
- DOMString toJSON();
- };
- [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
- interface TrustedScript {
- stringifier;
- DOMString toJSON();
- };
- [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
- interface TrustedScriptURL {
- stringifier;
- USVString toJSON();
- };
- [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
- interface TrustedTypePolicy {
- readonly attribute DOMString name;
- [NewObject, Throws] TrustedHTML createHTML(DOMString input, any... arguments);
- [NewObject, Throws] TrustedScript createScript(DOMString input, any... arguments);
- [NewObject, Throws] TrustedScriptURL createScriptURL(DOMString input, any... arguments);
- };
- dictionary TrustedTypePolicyOptions {
- CreateHTMLCallback createHTML;
- CreateScriptCallback createScript;
- CreateScriptURLCallback createScriptURL;
- };
- callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments);
- callback CreateScriptCallback = DOMString? (DOMString input, any... arguments);
- callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments);
- [Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
- interface TrustedTypePolicyFactory {
- TrustedTypePolicy createPolicy(DOMString policyName , optional TrustedTypePolicyOptions policyOptions = {});
- boolean isHTML(any value);
- boolean isScript(any value);
- boolean isScriptURL(any value);
- [Pure, StoreInSlot] readonly attribute TrustedHTML emptyHTML;
- [Pure, StoreInSlot] readonly attribute TrustedScript emptyScript;
- DOMString? getAttributeType(
- DOMString tagName,
- DOMString attribute,
- optional DOMString elementNs = "",
- optional DOMString attrNs = "");
- DOMString? getPropertyType(
- DOMString tagName,
- DOMString property,
- optional DOMString elementNs = "");
- readonly attribute TrustedTypePolicy? defaultPolicy;
- };
-
- /* ---------------------- UDPMessageEvent ----------------------------- */
- /* ./webidl/UDPMessageEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/TR/raw-sockets/#interface-udpmessageevent
- */
- //Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
- [Pref="dom.udpsocket.enabled",
- ChromeOnly,
- Exposed=Window]
- interface UDPMessageEvent : Event {
- constructor(DOMString type,
- optional UDPMessageEventInit eventInitDict = {});
- readonly attribute DOMString remoteAddress;
- readonly attribute unsigned short remotePort;
- readonly attribute any data;
- };
- dictionary UDPMessageEventInit : EventInit {
- DOMString remoteAddress = "";
- unsigned short remotePort = 0;
- any data = null;
- };
-
- /* ---------------------- UDPSocket ----------------------------- */
- /* ./webidl/UDPSocket.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#interface-udpsocket
- * http://www.w3.org/2012/sysapps/tcp-udp-sockets/#dictionary-udpoptions
- */
- dictionary UDPOptions {
- DOMString localAddress;
- unsigned short localPort;
- DOMString remoteAddress;
- unsigned short remotePort;
- boolean addressReuse = true;
- boolean loopback = false;
- };
- [Pref="dom.udpsocket.enabled",
- ChromeOnly,
- Exposed=Window]
- interface UDPSocket : EventTarget {
- [Throws]
- constructor(optional UDPOptions options = {});
- readonly attribute DOMString? localAddress;
- readonly attribute unsigned short? localPort;
- readonly attribute DOMString? remoteAddress;
- readonly attribute unsigned short? remotePort;
- readonly attribute boolean addressReuse;
- readonly attribute boolean loopback;
- readonly attribute SocketReadyState readyState;
- readonly attribute Promise<undefined> opened;
- readonly attribute Promise<undefined> closed;
- // readonly attribute ReadableStream input; //Bug 1056444: Stream API is not ready
- // readonly attribute WriteableStream output; //Bug 1056444: Stream API is not ready
- attribute EventHandler onmessage; //Bug 1056444: use event interface before Stream API is ready
- Promise<undefined> close ();
- [Throws] undefined joinMulticastGroup (DOMString multicastGroupAddress);
- [Throws] undefined leaveMulticastGroup (DOMString multicastGroupAddress);
- [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
- };
-
- /* ---------------------- UIEvent ----------------------------- */
- /* ./webidl/UIEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface UIEvent : Event
- {
- constructor(DOMString type, optional UIEventInit eventInitDict = {});
- readonly attribute WindowProxy? view;
- readonly attribute long detail;
- undefined initUIEvent(DOMString aType,
- optional boolean aCanBubble = false,
- optional boolean aCancelable = false,
- optional Window? aView = null,
- optional long aDetail = 0);
- };
- // Additional DOM0 properties.
- partial interface UIEvent {
- const long SCROLL_PAGE_UP = -32768;
- const long SCROLL_PAGE_DOWN = 32768;
- readonly attribute long layerX;
- readonly attribute long layerY;
- [NeedsCallerType]
- readonly attribute unsigned long which;
- readonly attribute Node? rangeParent;
- readonly attribute long rangeOffset;
- };
- dictionary UIEventInit : EventInit
- {
- Window? view = null;
- long detail = 0;
- };
- // NOTE: Gecko doesn't support commented out modifiers yet.
- dictionary EventModifierInit : UIEventInit
- {
- boolean ctrlKey = false;
- boolean shiftKey = false;
- boolean altKey = false;
- boolean metaKey = false;
- boolean modifierAltGraph = false;
- boolean modifierCapsLock = false;
- boolean modifierFn = false;
- boolean modifierFnLock = false;
- // boolean modifierHyper = false;
- boolean modifierNumLock = false;
- boolean modifierOS = false;
- boolean modifierScrollLock = false;
- // boolean modifierSuper = false;
- boolean modifierSymbol = false;
- boolean modifierSymbolLock = false;
- };
-
- /* ---------------------- UnderlyingSink ----------------------------- */
- /* ./webidl/UnderlyingSink.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#underlying-sink-api
- */
- [GenerateInit]
- dictionary UnderlyingSink {
- UnderlyingSinkStartCallback start;
- UnderlyingSinkWriteCallback write;
- UnderlyingSinkCloseCallback close;
- UnderlyingSinkAbortCallback abort;
- any type;
- };
- callback UnderlyingSinkStartCallback = any (WritableStreamDefaultController controller);
- callback UnderlyingSinkWriteCallback = Promise<undefined> (any chunk, WritableStreamDefaultController controller);
- callback UnderlyingSinkCloseCallback = Promise<undefined> ();
- callback UnderlyingSinkAbortCallback = Promise<undefined> (optional any reason);
-
- /* ---------------------- UnderlyingSource ----------------------------- */
- /* ./webidl/UnderlyingSource.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#underlying-source-api
- */
- [GenerateInit]
- dictionary UnderlyingSource {
- UnderlyingSourceStartCallback start;
- UnderlyingSourcePullCallback pull;
- UnderlyingSourceCancelCallback cancel;
- ReadableStreamType type;
- [EnforceRange] unsigned long long autoAllocateChunkSize;
- };
- typedef (ReadableStreamDefaultController or ReadableByteStreamController) ReadableStreamController;
- callback UnderlyingSourceStartCallback = any (ReadableStreamController controller);
- callback UnderlyingSourcePullCallback = Promise<undefined> (ReadableStreamController controller);
- callback UnderlyingSourceCancelCallback = Promise<undefined> (optional any reason);
-
- /* ---------------------- URL ----------------------------- */
- /* ./webidl/URL.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origins of this IDL file are
- * http://url.spec.whatwg.org/#api
- * https://w3c.github.io/FileAPI/#creating-revoking
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface URI;
- [Exposed=(Window,Worker,WorkerDebugger),
- LegacyWindowAlias=webkitURL]
- interface URL {
- [Throws]
- constructor(USVString url, optional USVString base);
- static URL? parse(UTF8String url, optional UTF8String base);
- static boolean canParse(UTF8String url, optional UTF8String base);
- [SetterThrows]
- stringifier attribute USVString href;
- readonly attribute USVString origin;
- attribute USVString protocol;
- attribute USVString username;
- attribute USVString password;
- attribute USVString host;
- attribute USVString hostname;
- attribute USVString port;
- attribute USVString pathname;
- attribute USVString search;
- [SameObject]
- readonly attribute URLSearchParams searchParams;
- attribute USVString hash;
- [ChromeOnly]
- readonly attribute URI URI;
- [ChromeOnly]
- static URL fromURI(URI uri);
- USVString toJSON();
- };
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- partial interface URL {
- [Throws]
- static DOMString createObjectURL(Blob blob);
- [Throws]
- static undefined revokeObjectURL(DOMString url);
- [ChromeOnly, Throws]
- static boolean isValidObjectURL(DOMString url);
- // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
- [Throws]
- static DOMString createObjectURL(MediaSource source);
- };
-
- /* ---------------------- URLSearchParams ----------------------------- */
- /* ./webidl/URLSearchParams.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://url.spec.whatwg.org/#urlsearchparams
- *
- * To the extent possible under law, the editors have waived all copyright
- * and related or neighboring rights to this work. In addition, as of 17
- * February 2013, the editors have made this specification available under
- * the Open Web Foundation Agreement Version 1.0, which is available at
- * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
- */
- [Exposed=(Window,Worker,WorkerDebugger)]
- interface URLSearchParams {
- [Throws]
- constructor(optional (sequence<sequence<USVString>> or
- record<USVString, USVString> or USVString) init = "");
- readonly attribute unsigned long size;
- undefined append(USVString name, USVString value);
- undefined delete(USVString name, optional USVString value);
- USVString? get(USVString name);
- sequence<USVString> getAll(USVString name);
- boolean has(USVString name, optional USVString value);
- undefined set(USVString name, USVString value);
- [Throws]
- undefined sort();
- iterable<USVString, USVString>;
- stringifier;
- };
-
- /* ---------------------- UserActivation ----------------------------- */
- /* ./webidl/UserActivation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface
- */
- [Exposed=Window]
- interface UserActivation {
- readonly attribute boolean hasBeenActive;
- readonly attribute boolean isActive;
- };
-
- /* ---------------------- UserProximityEvent ----------------------------- */
- /* ./webidl/UserProximityEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Pref="device.sensors.proximity.enabled", Func="nsGlobalWindowInner::DeviceSensorsEnabled",
- Exposed=Window]
- interface UserProximityEvent : Event
- {
- constructor(DOMString type,
- optional UserProximityEventInit eventInitDict = {});
- readonly attribute boolean near;
- };
- dictionary UserProximityEventInit : EventInit
- {
- boolean near = false;
- };
-
- /* ---------------------- ValidityState ----------------------------- */
- /* ./webidl/ValidityState.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#validitystate
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
- [Exposed=Window]
- interface ValidityState {
- readonly attribute boolean valueMissing;
- readonly attribute boolean typeMismatch;
- readonly attribute boolean patternMismatch;
- readonly attribute boolean tooLong;
- readonly attribute boolean tooShort;
- readonly attribute boolean rangeUnderflow;
- readonly attribute boolean rangeOverflow;
- readonly attribute boolean stepMismatch;
- readonly attribute boolean badInput;
- readonly attribute boolean customError;
- readonly attribute boolean valid;
- };
-
- /* ---------------------- VideoColorSpace ----------------------------- */
- /* ./webidl/VideoColorSpace.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#videocolorspace
- */
- [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
- interface VideoColorSpace {
- [Throws]
- constructor(optional VideoColorSpaceInit init = {});
- readonly attribute VideoColorPrimaries? primaries;
- readonly attribute VideoTransferCharacteristics? transfer;
- readonly attribute VideoMatrixCoefficients? matrix;
- readonly attribute boolean? fullRange;
- // https://github.com/w3c/webcodecs/issues/486
- [Default] object toJSON();
- };
- dictionary VideoColorSpaceInit {
- VideoColorPrimaries? primaries = null;
- VideoTransferCharacteristics? transfer = null;
- VideoMatrixCoefficients? matrix = null;
- boolean? fullRange = null;
- };
- enum VideoColorPrimaries {
- "bt709", // BT.709, sRGB
- "bt470bg", // BT.601 PAL
- "smpte170m", // BT.601 NTSC
- "bt2020", // BT.2020, BT.2100
- "smpte432", // P3 D65
- };
- enum VideoTransferCharacteristics {
- "bt709", // BT.709
- "smpte170m", // BT.601 (functionally the same as bt709)
- "iec61966-2-1", // sRGB
- "linear", // linear RGB
- "pq", // BT.2100 PQ
- "hlg", // BT.2100 HLG
- };
- enum VideoMatrixCoefficients {
- "rgb", // sRGB
- "bt709", // BT.709
- "bt470bg", // BT.601 PAL
- "smpte170m", // BT.601 NTSC (functionally the same as bt470bg)
- "bt2020-ncl", // BT.2020 NCL
- };
-
- /* ---------------------- VideoDecoder ----------------------------- */
- /* ./webidl/VideoDecoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#videodecoder
- */
- [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
- interface VideoDecoder : EventTarget {
- [Throws]
- constructor(VideoDecoderInit init);
- readonly attribute CodecState state;
- readonly attribute unsigned long decodeQueueSize;
- attribute EventHandler ondequeue;
- [Throws]
- undefined configure(VideoDecoderConfig config);
- [Throws]
- undefined decode(EncodedVideoChunk chunk);
- [NewObject, Throws]
- Promise<undefined> flush();
- [Throws]
- undefined reset();
- [Throws]
- undefined close();
- [NewObject, Throws]
- static Promise<VideoDecoderSupport> isConfigSupported(VideoDecoderConfig config);
- };
- dictionary VideoDecoderInit {
- required VideoFrameOutputCallback output;
- required WebCodecsErrorCallback error;
- };
- callback VideoFrameOutputCallback = undefined(VideoFrame output);
- dictionary VideoDecoderSupport {
- boolean supported;
- VideoDecoderConfig config;
- };
- dictionary VideoDecoderConfig {
- required DOMString codec;
- // Bug 1696216: Should be [AllowShared] BufferSource description;
- ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description;
- [EnforceRange] unsigned long codedWidth;
- [EnforceRange] unsigned long codedHeight;
- [EnforceRange] unsigned long displayAspectWidth;
- [EnforceRange] unsigned long displayAspectHeight;
- VideoColorSpaceInit colorSpace;
- HardwareAcceleration hardwareAcceleration = "no-preference";
- boolean optimizeForLatency;
- };
- enum HardwareAcceleration {
- "no-preference",
- "prefer-hardware",
- "prefer-software",
- };
- enum CodecState {
- "unconfigured",
- "configured",
- "closed"
- };
- callback WebCodecsErrorCallback = undefined(DOMException error);
-
- /* ---------------------- VideoEncoder ----------------------------- */
- /* ./webidl/VideoEncoder.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#videoencoder
- *
- * Some members of this API are codec-specific, in which case the source of the
- * IDL are in the codec-specific registry entries, that are listed in
- * https://w3c.github.io/webcodecs/codec_registry.html. Those members are
- * commented with a link of the document in which the member is listed.
- */
- [Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
- interface VideoEncoder : EventTarget {
- [Throws]
- constructor(VideoEncoderInit init);
- readonly attribute CodecState state;
- readonly attribute unsigned long encodeQueueSize;
- attribute EventHandler ondequeue;
- [Throws]
- undefined configure(VideoEncoderConfig config);
- [Throws, BinaryName="VideoEncoder::EncodeVideoFrame"]
- undefined encode(VideoFrame frame , optional VideoEncoderEncodeOptions options = {});
- [Throws]
- Promise<undefined> flush();
- [Throws]
- undefined reset();
- [Throws]
- undefined close();
- [NewObject, Throws]
- static Promise<VideoEncoderSupport> isConfigSupported(VideoEncoderConfig config);
- };
- dictionary VideoEncoderInit {
- required EncodedVideoChunkOutputCallback output;
- required WebCodecsErrorCallback error;
- };
- callback EncodedVideoChunkOutputCallback =
- undefined (EncodedVideoChunk chunk,
- optional EncodedVideoChunkMetadata metadata = {});
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- enum AvcBitstreamFormat {
- "annexb",
- "avc",
- };
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- dictionary AvcEncoderConfig {
- AvcBitstreamFormat format = "avc";
- };
- dictionary VideoEncoderConfig {
- required DOMString codec;
- required [EnforceRange] unsigned long width;
- required [EnforceRange] unsigned long height;
- [EnforceRange] unsigned long displayWidth;
- [EnforceRange] unsigned long displayHeight;
- [EnforceRange] unsigned long long bitrate;
- double framerate;
- HardwareAcceleration hardwareAcceleration = "no-preference";
- AlphaOption alpha = "discard";
- DOMString scalabilityMode;
- VideoEncoderBitrateMode bitrateMode = "variable";
- LatencyMode latencyMode = "quality";
- DOMString contentHint;
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- AvcEncoderConfig avc;
- };
- dictionary VideoEncoderEncodeOptions {
- boolean keyFrame = false;
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- VideoEncoderEncodeOptionsForAvc avc;
- };
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- dictionary VideoEncoderEncodeOptionsForAvc {
- unsigned short? quantizer;
- };
- enum VideoEncoderBitrateMode {
- "constant",
- "variable",
- // AVC (H264)-specific
- // https://w3c.github.io/webcodecs/avc_codec_registration.html
- "quantizer"
- };
- enum LatencyMode {
- "quality",
- "realtime"
- };
- dictionary VideoEncoderSupport {
- boolean supported;
- VideoEncoderConfig config;
- };
- dictionary EncodedVideoChunkMetadata {
- VideoDecoderConfig decoderConfig;
- SvcOutputMetadata svc;
- // Not implemented https://bugzilla.mozilla.org/show_bug.cgi?id=1867067
- // BufferSource alphaSideData;
- };
- dictionary SvcOutputMetadata {
- unsigned long temporalLayerId;
- };
-
- /* ---------------------- VideoFrame ----------------------------- */
- /* ./webidl/VideoFrame.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webcodecs/#videoframe
- */
- enum AlphaOption {
- "keep",
- "discard",
- };
- // [Serializable, Transferable] are implemented without adding attributes here.
- [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
- interface VideoFrame {
- // The constructors should be shorten to:
- // ```
- // constructor([AllowShared] BufferSource data, VideoFrameBufferInit init);
- // constructor(CanvasImageSource image, optional VideoFrameInit init = {});
- // ```
- // However, `[AllowShared] BufferSource` doesn't work for now (bug 1696216), and
- // `No support for unions as distinguishing arguments yet` error occurs when using
- // `constructor(CanvasImageSource image, optional VideoFrameInit init = {})` and
- // `constructor(([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data, VideoFrameBufferInit init)`
- // at the same time (bug 1786410).
- [Throws]
- constructor(HTMLImageElement imageElement, optional VideoFrameInit init = {});
- [Throws]
- constructor(SVGImageElement svgImageElement, optional VideoFrameInit init = {});
- [Throws]
- constructor(HTMLCanvasElement canvasElement, optional VideoFrameInit init = {});
- [Throws]
- constructor(HTMLVideoElement videoElement, optional VideoFrameInit init = {});
- [Throws]
- constructor(OffscreenCanvas offscreenCanvas, optional VideoFrameInit init = {});
- [Throws]
- constructor(ImageBitmap imageBitmap, optional VideoFrameInit init = {});
- [Throws]
- constructor(VideoFrame videoFrame, optional VideoFrameInit init = {});
- [Throws]
- constructor([AllowShared] ArrayBufferView bufferView, VideoFrameBufferInit init);
- [Throws]
- constructor([AllowShared] ArrayBuffer buffer, VideoFrameBufferInit init);
- readonly attribute VideoPixelFormat? format;
- readonly attribute unsigned long codedWidth;
- readonly attribute unsigned long codedHeight;
- readonly attribute DOMRectReadOnly? codedRect;
- readonly attribute DOMRectReadOnly? visibleRect;
- readonly attribute unsigned long displayWidth;
- readonly attribute unsigned long displayHeight;
- readonly attribute unsigned long long? duration; // microseconds
- readonly attribute long long timestamp; // microseconds
- readonly attribute VideoColorSpace colorSpace;
- [Throws]
- unsigned long allocationSize(
- optional VideoFrameCopyToOptions options = {});
- [Throws]
- Promise<sequence<PlaneLayout>> copyTo(
- // bug 1696216: Should be `copyTo([AllowShared] BufferSource destination, ...)`
- ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination,
- optional VideoFrameCopyToOptions options = {});
- [Throws]
- VideoFrame clone();
- undefined close();
- };
- dictionary VideoFrameInit {
- unsigned long long duration; // microseconds
- long long timestamp; // microseconds
- AlphaOption alpha = "keep";
- // Default matches image. May be used to efficiently crop. Will trigger
- // new computation of displayWidth and displayHeight using image’s pixel
- // aspect ratio unless an explicit displayWidth and displayHeight are given.
- DOMRectInit visibleRect;
- // Default matches image unless visibleRect is provided.
- [EnforceRange] unsigned long displayWidth;
- [EnforceRange] unsigned long displayHeight;
- };
- dictionary VideoFrameBufferInit {
- required VideoPixelFormat format;
- required [EnforceRange] unsigned long codedWidth;
- required [EnforceRange] unsigned long codedHeight;
- required [EnforceRange] long long timestamp; // microseconds
- [EnforceRange] unsigned long long duration; // microseconds
- // Default layout is tightly-packed.
- sequence<PlaneLayout> layout;
- // Default visible rect is coded size positioned at (0,0)
- DOMRectInit visibleRect;
- // Default display dimensions match visibleRect.
- [EnforceRange] unsigned long displayWidth;
- [EnforceRange] unsigned long displayHeight;
- VideoColorSpaceInit colorSpace;
- };
- dictionary VideoFrameCopyToOptions {
- DOMRectInit rect;
- sequence<PlaneLayout> layout;
- };
- dictionary PlaneLayout {
- // TODO: https://github.com/w3c/webcodecs/pull/488
- required [EnforceRange] unsigned long offset;
- required [EnforceRange] unsigned long stride;
- };
- enum VideoPixelFormat {
- // 4:2:0 Y, U, V
- "I420",
- // 4:2:0 Y, U, V, A
- "I420A",
- // 4:2:2 Y, U, V
- "I422",
- // 4:4:4 Y, U, V
- "I444",
- // 4:2:0 Y, UV
- "NV12",
- // 32bpp RGBA
- "RGBA",
- // 32bpp RGBX (opaque)
- "RGBX",
- // 32bpp BGRA
- "BGRA",
- // 32bpp BGRX (opaque)
- "BGRX",
- };
-
- /* ---------------------- VideoPlaybackQuality ----------------------------- */
- /* ./webidl/VideoPlaybackQuality.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Pref="media.mediasource.enabled",
- Exposed=Window]
- interface VideoPlaybackQuality {
- readonly attribute DOMHighResTimeStamp creationTime;
- readonly attribute unsigned long totalVideoFrames;
- readonly attribute unsigned long droppedVideoFrames;
- // At Risk: readonly attribute double totalFrameDelay;
- };
-
- /* ---------------------- VideoTrack ----------------------------- */
- /* ./webidl/VideoTrack.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#videotrack
- */
- [Pref="media.track.enabled",
- Exposed=Window]
- interface VideoTrack {
- readonly attribute DOMString id;
- readonly attribute DOMString kind;
- readonly attribute DOMString label;
- readonly attribute DOMString language;
- attribute boolean selected;
- };
-
- /* ---------------------- VideoTrackList ----------------------------- */
- /* ./webidl/VideoTrackList.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/#videotracklist
- */
- [Pref="media.track.enabled",
- Exposed=Window]
- interface VideoTrackList : EventTarget {
- readonly attribute unsigned long length;
- getter VideoTrack (unsigned long index);
- VideoTrack? getTrackById(DOMString id);
- readonly attribute long selectedIndex;
- attribute EventHandler onchange;
- attribute EventHandler onaddtrack;
- attribute EventHandler onremovetrack;
- };
-
- /* ---------------------- VisualViewport ----------------------------- */
- /* ./webidl/VisualViewport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://wicg.github.io/visual-viewport/#the-visualviewport-interface
- */
- [Exposed=Window]
- interface VisualViewport : EventTarget {
- readonly attribute double offsetLeft;
- readonly attribute double offsetTop;
- readonly attribute double pageLeft;
- readonly attribute double pageTop;
- readonly attribute double width;
- readonly attribute double height;
- readonly attribute double scale;
- attribute EventHandler onresize;
- attribute EventHandler onscroll;
- };
-
- /* ---------------------- VRDisplay ----------------------------- */
- /* ./webidl/VRDisplay.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webvr/spec/1.1/
- */
- enum VREye {
- "left",
- "right"
- };
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRFieldOfView {
- readonly attribute double upDegrees;
- readonly attribute double rightDegrees;
- readonly attribute double downDegrees;
- readonly attribute double leftDegrees;
- };
- typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
- dictionary VRLayer {
- /**
- * XXX - When WebVR in WebWorkers is implemented, HTMLCanvasElement below
- * should be replaced with VRSource.
- */
- HTMLCanvasElement? source = null;
- /**
- * The left and right viewports contain 4 values defining the viewport
- * rectangles within the canvas to present to the eye in UV space.
- * [0] left offset of the viewport (0.0 - 1.0)
- * [1] top offset of the viewport (0.0 - 1.0)
- * [2] width of the viewport (0.0 - 1.0)
- * [3] height of the viewport (0.0 - 1.0)
- *
- * When no values are passed, they will be processed as though the left
- * and right sides of the viewport were passed:
- *
- * leftBounds: [0.0, 0.0, 0.5, 1.0]
- * rightBounds: [0.5, 0.0, 0.5, 1.0]
- */
- sequence<float> leftBounds = [];
- sequence<float> rightBounds = [];
- };
- /**
- * Values describing the capabilities of a VRDisplay.
- * These are expected to be static per-device/per-user.
- */
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRDisplayCapabilities {
- /**
- * hasPosition is true if the VRDisplay is capable of tracking its position.
- */
- readonly attribute boolean hasPosition;
- /**
- * hasOrientation is true if the VRDisplay is capable of tracking its orientation.
- */
- readonly attribute boolean hasOrientation;
- /**
- * Whether the VRDisplay is separate from the device’s
- * primary display. If presenting VR content will obscure
- * other content on the device, this should be false. When
- * false, the application should not attempt to mirror VR content
- * or update non-VR UI because that content will not be visible.
- */
- readonly attribute boolean hasExternalDisplay;
- /**
- * Whether the VRDisplay is capable of presenting content to an HMD or similar device.
- * Can be used to indicate “magic window” devices that are capable of 6DoF tracking but for
- * which requestPresent is not meaningful. If false then calls to requestPresent should
- * always fail, and getEyeParameters should return null.
- */
- readonly attribute boolean canPresent;
- /**
- * Indicates the maximum length of the array that requestPresent() will accept. MUST be 1 if
- canPresent is true, 0 otherwise.
- */
- readonly attribute unsigned long maxLayers;
- };
- /**
- * Values describing the the stage / play area for devices
- * that support room-scale experiences.
- */
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRStageParameters {
- /**
- * A 16-element array containing the components of a column-major 4x4
- * affine transform matrix. This matrix transforms the sitting-space position
- * returned by get{Immediate}Pose() to a standing-space position.
- */
- [Throws] readonly attribute Float32Array sittingToStandingTransform;
- /**
- * Dimensions of the play-area bounds. The bounds are defined
- * as an axis-aligned rectangle on the floor.
- * The center of the rectangle is at (0,0,0) in standing-space
- * coordinates.
- * These bounds are defined for safety purposes.
- * Content should not require the user to move beyond these
- * bounds; however, it is possible for the user to ignore
- * the bounds resulting in position values outside of
- * this rectangle.
- */
- readonly attribute float sizeX;
- readonly attribute float sizeZ;
- };
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRPose
- {
- /**
- * position, linearVelocity, and linearAcceleration are 3-component vectors.
- * position is relative to a sitting space. Transforming this point with
- * VRStageParameters.sittingToStandingTransform converts this to standing space.
- */
- [Constant, Throws] readonly attribute Float32Array? position;
- [Constant, Throws] readonly attribute Float32Array? linearVelocity;
- [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
- /* orientation is a 4-entry array representing the components of a quaternion. */
- [Constant, Throws] readonly attribute Float32Array? orientation;
- /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
- [Constant, Throws] readonly attribute Float32Array? angularVelocity;
- [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
- };
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRFrameData {
- constructor();
- readonly attribute DOMHighResTimeStamp timestamp;
- [Throws, Pure] readonly attribute Float32Array leftProjectionMatrix;
- [Throws, Pure] readonly attribute Float32Array leftViewMatrix;
- [Throws, Pure] readonly attribute Float32Array rightProjectionMatrix;
- [Throws, Pure] readonly attribute Float32Array rightViewMatrix;
- [Pure] readonly attribute VRPose pose;
- };
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VREyeParameters {
- /**
- * offset is a 3-component vector representing an offset to
- * translate the eye. This value may vary from frame
- * to frame if the user adjusts their headset ipd.
- */
- [Constant, Throws] readonly attribute Float32Array offset;
- /* These values may vary as the user adjusts their headset ipd. */
- [Constant] readonly attribute VRFieldOfView fieldOfView;
- /**
- * renderWidth and renderHeight specify the recommended render target
- * size of each eye viewport, in pixels. If multiple eyes are rendered
- * in a single render target, then the render target should be made large
- * enough to fit both viewports.
- */
- [Constant] readonly attribute unsigned long renderWidth;
- [Constant] readonly attribute unsigned long renderHeight;
- };
- [Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h",
- SecureContext,
- Exposed=Window]
- interface VRDisplay : EventTarget {
- /**
- * presentingGroups is a bitmask indicating which VR session groups
- * have an active VR presentation.
- */
- [ChromeOnly] readonly attribute unsigned long presentingGroups;
- /**
- * Setting groupMask causes submitted frames by VR sessions that
- * aren't included in the bitmasked groups to be ignored.
- * Non-chrome content is not aware of the value of groupMask.
- * VRDisplay.RequestAnimationFrame will still fire for VR sessions
- * that are hidden by groupMask, enabling their performance to be
- * measured by chrome UI that is presented in other groups.
- * This is expected to be used in cases where chrome UI is presenting
- * information during link traversal or presenting options when content
- * performance is too low for comfort.
- * The VR refresh / VSync cycle is driven by the visible content
- * and the non-visible content may have a throttled refresh rate.
- */
- [ChromeOnly] attribute unsigned long groupMask;
- readonly attribute boolean isConnected;
- readonly attribute boolean isPresenting;
- /**
- * Dictionary of capabilities describing the VRDisplay.
- */
- [Constant] readonly attribute VRDisplayCapabilities capabilities;
- /**
- * If this VRDisplay supports room-scale experiences, the optional
- * stage attribute contains details on the room-scale parameters.
- */
- readonly attribute VRStageParameters? stageParameters;
- /* Return the current VREyeParameters for the given eye. */
- VREyeParameters getEyeParameters(VREye whichEye);
- /**
- * An identifier for this distinct VRDisplay. Used as an
- * association point in the Gamepad API.
- */
- [Constant] readonly attribute unsigned long displayId;
- /**
- * A display name, a user-readable name identifying it.
- */
- [Constant] readonly attribute DOMString displayName;
- /**
- * Populates the passed VRFrameData with the information required to render
- * the current frame.
- */
- boolean getFrameData(VRFrameData frameData);
- /**
- * Return a VRPose containing the future predicted pose of the VRDisplay
- * when the current frame will be presented. Subsequent calls to getPose()
- * MUST return a VRPose with the same values until the next call to
- * submitFrame().
- *
- * The VRPose will contain the position, orientation, velocity,
- * and acceleration of each of these properties.
- */
- [NewObject] VRPose getPose();
- /**
- * Reset the pose for this display, treating its current position and
- * orientation as the "origin/zero" values. VRPose.position,
- * VRPose.orientation, and VRStageParameters.sittingToStandingTransform may be
- * updated when calling resetPose(). This should be called in only
- * sitting-space experiences.
- */
- undefined resetPose();
- /**
- * z-depth defining the near plane of the eye view frustum
- * enables mapping of values in the render target depth
- * attachment to scene coordinates. Initially set to 0.01.
- */
- attribute double depthNear;
- /**
- * z-depth defining the far plane of the eye view frustum
- * enables mapping of values in the render target depth
- * attachment to scene coordinates. Initially set to 10000.0.
- */
- attribute double depthFar;
- /**
- * The callback passed to `requestAnimationFrame` will be called
- * any time a new frame should be rendered. When the VRDisplay is
- * presenting the callback will be called at the native refresh
- * rate of the HMD. When not presenting this function acts
- * identically to how window.requestAnimationFrame acts. Content should
- * make no assumptions of frame rate or vsync behavior as the HMD runs
- * asynchronously from other displays and at differing refresh rates.
- */
- [Throws] long requestAnimationFrame(FrameRequestCallback callback);
- /**
- * Passing the value returned by `requestAnimationFrame` to
- * `cancelAnimationFrame` will unregister the callback.
- */
- [Throws] undefined cancelAnimationFrame(long handle);
- /**
- * Begin presenting to the VRDisplay. Must be called in response to a user gesture.
- * Repeat calls while already presenting will update the VRLayers being displayed.
- */
- [NewObject, NeedsCallerType] Promise<undefined> requestPresent(sequence<VRLayer> layers);
- /**
- * Stops presenting to the VRDisplay.
- */
- [NewObject] Promise<undefined> exitPresent();
- /**
- * Get the layers currently being presented.
- */
- sequence<VRLayer> getLayers();
- /**
- * The VRLayer provided to the VRDisplay will be captured and presented
- * in the HMD. Calling this function has the same effect on the source
- * canvas as any other operation that uses its source image, and canvases
- * created without preserveDrawingBuffer set to true will be cleared.
- */
- undefined submitFrame();
- };
-
- /* ---------------------- VRDisplayEvent ----------------------------- */
- /* ./webidl/VRDisplayEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- enum VRDisplayEventReason {
- "mounted",
- "navigation",
- "requested",
- "unmounted",
- };
- dictionary VRDisplayEventInit : EventInit {
- required VRDisplay display;
- VRDisplayEventReason reason;
- };
- [Pref="dom.vr.enabled",
- SecureContext,
- Exposed=Window]
- interface VRDisplayEvent : Event {
- constructor(DOMString type, VRDisplayEventInit eventInitDict);
- readonly attribute VRDisplay display;
- readonly attribute VRDisplayEventReason? reason;
- };
-
- /* ---------------------- VRServiceTest ----------------------------- */
- /* ./webidl/VRServiceTest.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This WebIDL is just for WebVR testing.
- */
- [Pref="dom.vr.puppet.enabled",
- HeaderFile="mozilla/dom/VRServiceTest.h",
- Exposed=Window]
- interface VRMockDisplay {
- undefined create();
- attribute boolean capPosition;
- attribute boolean capOrientation;
- attribute boolean capPresent;
- attribute boolean capExternal;
- attribute boolean capAngularAcceleration;
- attribute boolean capLinearAcceleration;
- attribute boolean capStageParameters;
- attribute boolean capMountDetection;
- attribute boolean capPositionEmulated;
- undefined setEyeFOV(VREye eye,
- double upDegree, double rightDegree,
- double downDegree, double leftDegree);
- undefined setEyeOffset(VREye eye, double offsetX,
- double offsetY, double offsetZ);
- undefined setEyeResolution(unsigned long renderWidth,
- unsigned long renderHeight);
- undefined setConnected(boolean connected);
- undefined setMounted(boolean mounted);
- undefined setStageSize(double width, double height);
- [Throws] undefined setSittingToStandingTransform(Float32Array sittingToStandingTransform);
- [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
- Float32Array? linearAcceleration, Float32Array? orientation,
- Float32Array? angularVelocity, Float32Array? angularAcceleration);
- };
- [Pref="dom.vr.puppet.enabled",
- HeaderFile="mozilla/dom/VRServiceTest.h",
- Exposed=Window]
- interface VRMockController {
- undefined create();
- undefined clear();
- attribute GamepadHand hand;
- attribute boolean capPosition;
- attribute boolean capOrientation;
- attribute boolean capAngularAcceleration;
- attribute boolean capLinearAcceleration;
- attribute unsigned long axisCount;
- attribute unsigned long buttonCount;
- attribute unsigned long hapticCount;
- [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
- Float32Array? linearAcceleration, Float32Array? orientation,
- Float32Array? angularVelocity, Float32Array? angularAcceleration);
- undefined setButtonPressed(unsigned long buttonIdx, boolean pressed);
- undefined setButtonTouched(unsigned long buttonIdx, boolean touched);
- undefined setButtonTrigger(unsigned long buttonIdx, double trigger);
- undefined setAxisValue(unsigned long axisIdx, double value);
- };
- [Pref="dom.vr.puppet.enabled",
- HeaderFile="mozilla/dom/VRServiceTest.h",
- Exposed=Window]
- interface VRServiceTest {
- VRMockDisplay getVRDisplay();
- [Throws] VRMockController getVRController(unsigned long controllerIdx);
- [NewObject] Promise<undefined> run();
- [NewObject] Promise<undefined> reset();
- undefined commit();
- undefined end();
- undefined clearAll();
- undefined timeout(unsigned long duration);
- undefined wait(unsigned long duration);
- undefined waitSubmit();
- undefined waitPresentationStart();
- undefined waitPresentationEnd();
- [Throws]
- undefined waitHapticIntensity(unsigned long controllerIdx, unsigned long hapticIdx, double intensity);
- undefined captureFrame();
- undefined acknowledgeFrame();
- undefined rejectFrame();
- undefined startTimer();
- undefined stopTimer();
- };
-
- /* ---------------------- VTTCue ----------------------------- */
- /* ./webidl/VTTCue.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://dev.w3.org/html5/webvtt/#the-vttcue-interface
- */
- enum AutoKeyword { "auto" };
- enum LineAlignSetting {
- "start",
- "center",
- "end"
- };
- enum PositionAlignSetting {
- "line-left",
- "center",
- "line-right",
- "auto"
- };
- enum AlignSetting {
- "start",
- "center",
- "end",
- "left",
- "right"
- };
- enum DirectionSetting {
- "",
- "rl",
- "lr"
- };
- [Exposed=Window]
- interface VTTCue : TextTrackCue {
- [Throws]
- constructor(double startTime, double endTime, DOMString text);
- attribute VTTRegion? region;
- attribute DirectionSetting vertical;
- attribute boolean snapToLines;
- attribute (double or AutoKeyword) line;
- [SetterThrows]
- attribute LineAlignSetting lineAlign;
- [SetterThrows]
- attribute (double or AutoKeyword) position;
- [SetterThrows]
- attribute PositionAlignSetting positionAlign;
- [SetterThrows]
- attribute double size;
- attribute AlignSetting align;
- attribute DOMString text;
- DocumentFragment getCueAsHTML();
- };
- // Mozilla extensions.
- partial interface VTTCue {
- [ChromeOnly]
- attribute HTMLDivElement? displayState;
- [ChromeOnly]
- readonly attribute boolean hasBeenReset;
- [ChromeOnly]
- readonly attribute double computedLine;
- [ChromeOnly]
- readonly attribute double computedPosition;
- [ChromeOnly]
- readonly attribute PositionAlignSetting computedPositionAlign;
- [ChromeOnly]
- readonly attribute boolean getActive;
- };
-
- /* ---------------------- VTTRegion ----------------------------- */
- /* ./webidl/VTTRegion.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webvtt/#the-vttregion-interface
- */
- enum ScrollSetting {
- "",
- "up"
- };
- [Exposed=Window]
- interface VTTRegion {
- [Throws]
- constructor();
- attribute DOMString id;
- [SetterThrows]
- attribute double width;
- [SetterThrows]
- attribute long lines;
- [SetterThrows]
- attribute double regionAnchorX;
- [SetterThrows]
- attribute double regionAnchorY;
- [SetterThrows]
- attribute double viewportAnchorX;
- [SetterThrows]
- attribute double viewportAnchorY;
- attribute ScrollSetting scroll;
- };
-
- /* ---------------------- WakeLock ----------------------------- */
- /* ./webidl/WakeLock.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/screen-wake-lock/
- */
- [SecureContext, Exposed=(Window), Pref="dom.screenwakelock.enabled"]
- interface WakeLock {
- [Throws]
- Promise<WakeLockSentinel> request(optional WakeLockType type = "screen");
- };
- enum WakeLockType { "screen" };
-
- /* ---------------------- WakeLockSentinel ----------------------------- */
- /* ./webidl/WakeLockSentinel.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/screen-wake-lock/
- */
- [SecureContext, Exposed=(Window), Pref="dom.screenwakelock.enabled"]
- interface WakeLockSentinel : EventTarget {
- readonly attribute boolean released;
- readonly attribute WakeLockType type;
- [BinaryName="releaseLock", Throws]
- Promise<undefined> release();
- attribute EventHandler onrelease;
- };
-
- /* ---------------------- WaveShaperNode ----------------------------- */
- /* ./webidl/WaveShaperNode.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://webaudio.github.io/web-audio-api/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- enum OverSampleType {
- "none",
- "2x",
- "4x"
- };
- dictionary WaveShaperOptions : AudioNodeOptions {
- sequence<float> curve;
- OverSampleType oversample = "none";
- };
- [Pref="dom.webaudio.enabled",
- Exposed=Window]
- interface WaveShaperNode : AudioNode {
- [Throws]
- constructor(BaseAudioContext context,
- optional WaveShaperOptions options = {});
- [Cached, Pure, Throws]
- attribute Float32Array? curve;
- attribute OverSampleType oversample;
- };
- // Mozilla extension
- WaveShaperNode includes AudioNodePassThrough;
-
- /* ---------------------- WebAuthentication ----------------------------- */
- /* ./webidl/WebAuthentication.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/webauthn/
- */
- /***** Interfaces to Data *****/
- [SecureContext, Pref="security.webauth.webauthn",
- Exposed=Window]
- interface PublicKeyCredential : Credential {
- [SameObject, Throws] readonly attribute ArrayBuffer rawId;
- [SameObject] readonly attribute AuthenticatorResponse response;
- readonly attribute DOMString? authenticatorAttachment;
- AuthenticationExtensionsClientOutputs getClientExtensionResults();
- [NewObject] static Promise<boolean> isConditionalMediationAvailable();
- [Throws, Pref="security.webauthn.enable_json_serialization_methods"] object toJSON();
- };
- typedef DOMString Base64URLString;
- [GenerateConversionToJS]
- dictionary RegistrationResponseJSON {
- required Base64URLString id;
- required Base64URLString rawId;
- required AuthenticatorAttestationResponseJSON response;
- DOMString authenticatorAttachment;
- required AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
- required DOMString type;
- };
- [GenerateConversionToJS]
- dictionary AuthenticatorAttestationResponseJSON {
- required Base64URLString clientDataJSON;
- required Base64URLString authenticatorData;
- required sequence<DOMString> transports;
- // The publicKey field will be missing if pubKeyCredParams was used to
- // negotiate a public-key algorithm that the user agent doesn’t
- // understand. (See section “Easily accessing credential data” for a
- // list of which algorithms user agents must support.) If using such an
- // algorithm then the public key must be parsed directly from
- // attestationObject or authenticatorData.
- Base64URLString publicKey;
- required long long publicKeyAlgorithm;
- // This value contains copies of some of the fields above. See
- // section “Easily accessing credential data”.
- required Base64URLString attestationObject;
- };
- [GenerateConversionToJS]
- dictionary AuthenticationResponseJSON {
- required Base64URLString id;
- required Base64URLString rawId;
- required AuthenticatorAssertionResponseJSON response;
- DOMString authenticatorAttachment;
- required AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
- required DOMString type;
- };
- [GenerateConversionToJS]
- dictionary AuthenticatorAssertionResponseJSON {
- required Base64URLString clientDataJSON;
- required Base64URLString authenticatorData;
- required Base64URLString signature;
- Base64URLString userHandle;
- Base64URLString attestationObject;
- };
- [GenerateConversionToJS]
- dictionary AuthenticationExtensionsClientOutputsJSON {
- };
- [SecureContext]
- partial interface PublicKeyCredential {
- [NewObject] static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
- };
- [SecureContext]
- partial interface PublicKeyCredential {
- [Throws, Pref="security.webauthn.enable_json_serialization_methods"] static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options);
- };
- dictionary PublicKeyCredentialCreationOptionsJSON {
- required PublicKeyCredentialRpEntity rp;
- required PublicKeyCredentialUserEntityJSON user;
- required Base64URLString challenge;
- required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
- unsigned long timeout;
- sequence<PublicKeyCredentialDescriptorJSON> excludeCredentials = [];
- AuthenticatorSelectionCriteria authenticatorSelection;
- sequence<DOMString> hints = [];
- DOMString attestation = "none";
- sequence<DOMString> attestationFormats = [];
- AuthenticationExtensionsClientInputsJSON extensions;
- };
- dictionary PublicKeyCredentialUserEntityJSON {
- required Base64URLString id;
- required DOMString name;
- required DOMString displayName;
- };
- dictionary PublicKeyCredentialDescriptorJSON {
- required Base64URLString id;
- required DOMString type;
- sequence<DOMString> transports;
- };
- dictionary AuthenticationExtensionsClientInputsJSON {
- };
- [SecureContext]
- partial interface PublicKeyCredential {
- [Throws, Pref="security.webauthn.enable_json_serialization_methods"] static PublicKeyCredentialRequestOptions parseRequestOptionsFromJSON(PublicKeyCredentialRequestOptionsJSON options);
- };
- dictionary PublicKeyCredentialRequestOptionsJSON {
- required Base64URLString challenge;
- unsigned long timeout;
- DOMString rpId;
- sequence<PublicKeyCredentialDescriptorJSON> allowCredentials = [];
- DOMString userVerification = "preferred";
- sequence<DOMString> hints = [];
- DOMString attestation = "none";
- sequence<DOMString> attestationFormats = [];
- AuthenticationExtensionsClientInputsJSON extensions;
- };
- [SecureContext, Pref="security.webauth.webauthn",
- Exposed=Window]
- interface AuthenticatorResponse {
- [SameObject, Throws] readonly attribute ArrayBuffer clientDataJSON;
- };
- [SecureContext, Pref="security.webauth.webauthn",
- Exposed=Window]
- interface AuthenticatorAttestationResponse : AuthenticatorResponse {
- [SameObject, Throws] readonly attribute ArrayBuffer attestationObject;
- sequence<DOMString> getTransports();
- [Throws] ArrayBuffer getAuthenticatorData();
- [Throws] ArrayBuffer? getPublicKey();
- [Throws] COSEAlgorithmIdentifier getPublicKeyAlgorithm();
- };
- [SecureContext, Pref="security.webauth.webauthn",
- Exposed=Window]
- interface AuthenticatorAssertionResponse : AuthenticatorResponse {
- [SameObject, Throws] readonly attribute ArrayBuffer authenticatorData;
- [SameObject, Throws] readonly attribute ArrayBuffer signature;
- [SameObject, Throws] readonly attribute ArrayBuffer? userHandle;
- };
- dictionary PublicKeyCredentialParameters {
- required DOMString type;
- required COSEAlgorithmIdentifier alg;
- };
- dictionary PublicKeyCredentialCreationOptions {
- required PublicKeyCredentialRpEntity rp;
- required PublicKeyCredentialUserEntity user;
- required BufferSource challenge;
- required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
- unsigned long timeout;
- sequence<PublicKeyCredentialDescriptor> excludeCredentials = [];
- // FIXME: bug 1493860: should this "= {}" be here?
- AuthenticatorSelectionCriteria authenticatorSelection = {};
- DOMString attestation = "none";
- // FIXME: bug 1493860: should this "= {}" be here?
- AuthenticationExtensionsClientInputs extensions = {};
- };
- dictionary PublicKeyCredentialEntity {
- required DOMString name;
- };
- dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity {
- DOMString id;
- };
- dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
- required BufferSource id;
- required DOMString displayName;
- };
- dictionary AuthenticatorSelectionCriteria {
- DOMString authenticatorAttachment;
- DOMString residentKey;
- boolean requireResidentKey = false;
- DOMString userVerification = "preferred";
- };
- dictionary PublicKeyCredentialRequestOptions {
- required BufferSource challenge;
- unsigned long timeout;
- USVString rpId;
- sequence<PublicKeyCredentialDescriptor> allowCredentials = [];
- DOMString userVerification = "preferred";
- // FIXME: bug 1493860: should this "= {}" be here?
- AuthenticationExtensionsClientInputs extensions = {};
- };
- dictionary AuthenticationExtensionsClientInputs {
- };
- dictionary AuthenticationExtensionsClientOutputs {
- };
- typedef record<DOMString, DOMString> AuthenticationExtensionsAuthenticatorInputs;
- [GenerateToJSON]
- dictionary CollectedClientData {
- required DOMString type;
- required DOMString challenge;
- required DOMString origin;
- TokenBinding tokenBinding;
- };
- dictionary TokenBinding {
- required DOMString status;
- DOMString id;
- };
- dictionary PublicKeyCredentialDescriptor {
- required DOMString type;
- required BufferSource id;
- // Transports is a string that is matched against the AuthenticatorTransport
- // enumeration so that we have forward-compatibility for new transports.
- sequence<DOMString> transports;
- };
- typedef long COSEAlgorithmIdentifier;
- typedef sequence<AAGUID> AuthenticatorSelectionList;
- typedef BufferSource AAGUID;
- partial dictionary AuthenticationExtensionsClientInputs {
- USVString appid;
- };
- partial dictionary AuthenticationExtensionsClientOutputs {
- boolean appid;
- };
- // The spec does not define any partial dictionaries that modify
- // AuthenticationExtensionsClientInputsJSON, but this seems to be an error. All changes to
- // AuthenticationExtensionsClientInputs must be accompanied by changes to
- // AuthenticationExtensionsClientInputsJSON for parseCreationOptionsFromJSON and
- // parseRequestOptionsFromJSON to function correctly.
- // (see: https://github.com/w3c/webauthn/issues/1968).
- partial dictionary AuthenticationExtensionsClientInputsJSON {
- USVString appid;
- };
- // We also deviate from the spec by mirroring changes to AuthenticationExtensionsClientOutputs in
- // AuthenticationExtensionsClientOutputsJSON.
- partial dictionary AuthenticationExtensionsClientOutputsJSON {
- boolean appid;
- };
- partial dictionary AuthenticationExtensionsClientInputs {
- boolean credProps;
- };
- partial dictionary AuthenticationExtensionsClientInputsJSON {
- boolean credProps;
- };
- dictionary CredentialPropertiesOutput {
- boolean rk;
- };
- partial dictionary AuthenticationExtensionsClientOutputs {
- CredentialPropertiesOutput credProps;
- };
- partial dictionary AuthenticationExtensionsClientOutputsJSON {
- CredentialPropertiesOutput credProps;
- };
- /*
- * CTAP2 Extensions
- * <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-defined-extensions>
- */
- // hmac-secret
- // <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-hmac-secret-extension>
- // note: we don't support hmac-secret in get(), so we only define the create()
- // inputs and outputs here.
- partial dictionary AuthenticationExtensionsClientInputs {
- boolean hmacCreateSecret;
- };
- partial dictionary AuthenticationExtensionsClientOutputs {
- boolean hmacCreateSecret;
- };
- partial dictionary AuthenticationExtensionsClientInputsJSON {
- boolean hmacCreateSecret;
- };
- partial dictionary AuthenticationExtensionsClientOutputsJSON {
- boolean hmacCreateSecret;
- };
- // hmac-secret
- // <https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-errata-20220621.html#sctn-minpinlength-extension>
- partial dictionary AuthenticationExtensionsClientInputs {
- boolean minPinLength;
- };
- partial dictionary AuthenticationExtensionsClientInputsJSON {
- boolean minPinLength;
- };
-
- /* ---------------------- WebGL2RenderingContext ----------------------------- */
- /* ./webidl/WebGL2RenderingContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The source for this IDL is found at https://www.khronos.org/registry/webgl/specs/latest/2.0
- * This IDL depends on WebGLRenderingContext.webidl
- */
- typedef long long GLint64;
- typedef unsigned long long GLuint64;
- [Pref="webgl.enable-webgl2",
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
- Exposed=(Window,Worker)]
- interface WebGLSampler {
- };
- [Pref="webgl.enable-webgl2",
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
- Exposed=(Window,Worker)]
- interface WebGLSync {
- };
- [Pref="webgl.enable-webgl2",
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
- Exposed=(Window,Worker)]
- interface WebGLTransformFeedback {
- };
- typedef ([AllowShared] Uint32Array or sequence<GLuint>) Uint32List;
- // WebGL2 spec has this as an empty interface that pulls in everything
- // via WebGL2RenderingContextBase.
- [Pref="webgl.enable-webgl2",
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread",
- Exposed=(Window,Worker)]
- interface WebGL2RenderingContext
- {
- };
- interface mixin WebGL2RenderingContextBase
- {
- const GLenum READ_BUFFER = 0x0C02;
- const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
- const GLenum UNPACK_SKIP_ROWS = 0x0CF3;
- const GLenum UNPACK_SKIP_PIXELS = 0x0CF4;
- const GLenum PACK_ROW_LENGTH = 0x0D02;
- const GLenum PACK_SKIP_ROWS = 0x0D03;
- const GLenum PACK_SKIP_PIXELS = 0x0D04;
- const GLenum COLOR = 0x1800;
- const GLenum DEPTH = 0x1801;
- const GLenum STENCIL = 0x1802;
- const GLenum RED = 0x1903;
- const GLenum RGB8 = 0x8051;
- const GLenum RGBA8 = 0x8058;
- const GLenum RGB10_A2 = 0x8059;
- const GLenum TEXTURE_BINDING_3D = 0x806A;
- const GLenum UNPACK_SKIP_IMAGES = 0x806D;
- const GLenum UNPACK_IMAGE_HEIGHT = 0x806E;
- const GLenum TEXTURE_3D = 0x806F;
- const GLenum TEXTURE_WRAP_R = 0x8072;
- const GLenum MAX_3D_TEXTURE_SIZE = 0x8073;
- const GLenum UNSIGNED_INT_2_10_10_10_REV = 0x8368;
- const GLenum MAX_ELEMENTS_VERTICES = 0x80E8;
- const GLenum MAX_ELEMENTS_INDICES = 0x80E9;
- const GLenum TEXTURE_MIN_LOD = 0x813A;
- const GLenum TEXTURE_MAX_LOD = 0x813B;
- const GLenum TEXTURE_BASE_LEVEL = 0x813C;
- const GLenum TEXTURE_MAX_LEVEL = 0x813D;
- const GLenum MIN = 0x8007;
- const GLenum MAX = 0x8008;
- const GLenum DEPTH_COMPONENT24 = 0x81A6;
- const GLenum MAX_TEXTURE_LOD_BIAS = 0x84FD;
- const GLenum TEXTURE_COMPARE_MODE = 0x884C;
- const GLenum TEXTURE_COMPARE_FUNC = 0x884D;
- const GLenum CURRENT_QUERY = 0x8865;
- const GLenum QUERY_RESULT = 0x8866;
- const GLenum QUERY_RESULT_AVAILABLE = 0x8867;
- const GLenum STREAM_READ = 0x88E1;
- const GLenum STREAM_COPY = 0x88E2;
- const GLenum STATIC_READ = 0x88E5;
- const GLenum STATIC_COPY = 0x88E6;
- const GLenum DYNAMIC_READ = 0x88E9;
- const GLenum DYNAMIC_COPY = 0x88EA;
- const GLenum MAX_DRAW_BUFFERS = 0x8824;
- const GLenum DRAW_BUFFER0 = 0x8825;
- const GLenum DRAW_BUFFER1 = 0x8826;
- const GLenum DRAW_BUFFER2 = 0x8827;
- const GLenum DRAW_BUFFER3 = 0x8828;
- const GLenum DRAW_BUFFER4 = 0x8829;
- const GLenum DRAW_BUFFER5 = 0x882A;
- const GLenum DRAW_BUFFER6 = 0x882B;
- const GLenum DRAW_BUFFER7 = 0x882C;
- const GLenum DRAW_BUFFER8 = 0x882D;
- const GLenum DRAW_BUFFER9 = 0x882E;
- const GLenum DRAW_BUFFER10 = 0x882F;
- const GLenum DRAW_BUFFER11 = 0x8830;
- const GLenum DRAW_BUFFER12 = 0x8831;
- const GLenum DRAW_BUFFER13 = 0x8832;
- const GLenum DRAW_BUFFER14 = 0x8833;
- const GLenum DRAW_BUFFER15 = 0x8834;
- const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
- const GLenum MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
- const GLenum SAMPLER_3D = 0x8B5F;
- const GLenum SAMPLER_2D_SHADOW = 0x8B62;
- const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
- const GLenum PIXEL_PACK_BUFFER = 0x88EB;
- const GLenum PIXEL_UNPACK_BUFFER = 0x88EC;
- const GLenum PIXEL_PACK_BUFFER_BINDING = 0x88ED;
- const GLenum PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
- const GLenum FLOAT_MAT2x3 = 0x8B65;
- const GLenum FLOAT_MAT2x4 = 0x8B66;
- const GLenum FLOAT_MAT3x2 = 0x8B67;
- const GLenum FLOAT_MAT3x4 = 0x8B68;
- const GLenum FLOAT_MAT4x2 = 0x8B69;
- const GLenum FLOAT_MAT4x3 = 0x8B6A;
- const GLenum SRGB = 0x8C40;
- const GLenum SRGB8 = 0x8C41;
- const GLenum SRGB8_ALPHA8 = 0x8C43;
- const GLenum COMPARE_REF_TO_TEXTURE = 0x884E;
- const GLenum RGBA32F = 0x8814;
- const GLenum RGB32F = 0x8815;
- const GLenum RGBA16F = 0x881A;
- const GLenum RGB16F = 0x881B;
- const GLenum VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
- const GLenum MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
- const GLenum MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
- const GLenum MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
- const GLenum MAX_VARYING_COMPONENTS = 0x8B4B;
- const GLenum TEXTURE_2D_ARRAY = 0x8C1A;
- const GLenum TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
- const GLenum R11F_G11F_B10F = 0x8C3A;
- const GLenum UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
- const GLenum RGB9_E5 = 0x8C3D;
- const GLenum UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
- const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
- const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
- const GLenum TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
- const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
- const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
- const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
- const GLenum RASTERIZER_DISCARD = 0x8C89;
- const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
- const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
- const GLenum INTERLEAVED_ATTRIBS = 0x8C8C;
- const GLenum SEPARATE_ATTRIBS = 0x8C8D;
- const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
- const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
- const GLenum RGBA32UI = 0x8D70;
- const GLenum RGB32UI = 0x8D71;
- const GLenum RGBA16UI = 0x8D76;
- const GLenum RGB16UI = 0x8D77;
- const GLenum RGBA8UI = 0x8D7C;
- const GLenum RGB8UI = 0x8D7D;
- const GLenum RGBA32I = 0x8D82;
- const GLenum RGB32I = 0x8D83;
- const GLenum RGBA16I = 0x8D88;
- const GLenum RGB16I = 0x8D89;
- const GLenum RGBA8I = 0x8D8E;
- const GLenum RGB8I = 0x8D8F;
- const GLenum RED_INTEGER = 0x8D94;
- const GLenum RGB_INTEGER = 0x8D98;
- const GLenum RGBA_INTEGER = 0x8D99;
- const GLenum SAMPLER_2D_ARRAY = 0x8DC1;
- const GLenum SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
- const GLenum SAMPLER_CUBE_SHADOW = 0x8DC5;
- const GLenum UNSIGNED_INT_VEC2 = 0x8DC6;
- const GLenum UNSIGNED_INT_VEC3 = 0x8DC7;
- const GLenum UNSIGNED_INT_VEC4 = 0x8DC8;
- const GLenum INT_SAMPLER_2D = 0x8DCA;
- const GLenum INT_SAMPLER_3D = 0x8DCB;
- const GLenum INT_SAMPLER_CUBE = 0x8DCC;
- const GLenum INT_SAMPLER_2D_ARRAY = 0x8DCF;
- const GLenum UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
- const GLenum UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
- const GLenum UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
- const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
- const GLenum DEPTH_COMPONENT32F = 0x8CAC;
- const GLenum DEPTH32F_STENCIL8 = 0x8CAD;
- const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
- const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
- const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
- const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
- const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
- const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
- const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
- const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
- const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
- const GLenum FRAMEBUFFER_DEFAULT = 0x8218;
- const GLenum UNSIGNED_INT_24_8 = 0x84FA;
- const GLenum DEPTH24_STENCIL8 = 0x88F0;
- const GLenum UNSIGNED_NORMALIZED = 0x8C17;
- const GLenum DRAW_FRAMEBUFFER_BINDING = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */
- const GLenum READ_FRAMEBUFFER = 0x8CA8;
- const GLenum DRAW_FRAMEBUFFER = 0x8CA9;
- const GLenum READ_FRAMEBUFFER_BINDING = 0x8CAA;
- const GLenum RENDERBUFFER_SAMPLES = 0x8CAB;
- const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
- const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF;
- const GLenum COLOR_ATTACHMENT1 = 0x8CE1;
- const GLenum COLOR_ATTACHMENT2 = 0x8CE2;
- const GLenum COLOR_ATTACHMENT3 = 0x8CE3;
- const GLenum COLOR_ATTACHMENT4 = 0x8CE4;
- const GLenum COLOR_ATTACHMENT5 = 0x8CE5;
- const GLenum COLOR_ATTACHMENT6 = 0x8CE6;
- const GLenum COLOR_ATTACHMENT7 = 0x8CE7;
- const GLenum COLOR_ATTACHMENT8 = 0x8CE8;
- const GLenum COLOR_ATTACHMENT9 = 0x8CE9;
- const GLenum COLOR_ATTACHMENT10 = 0x8CEA;
- const GLenum COLOR_ATTACHMENT11 = 0x8CEB;
- const GLenum COLOR_ATTACHMENT12 = 0x8CEC;
- const GLenum COLOR_ATTACHMENT13 = 0x8CED;
- const GLenum COLOR_ATTACHMENT14 = 0x8CEE;
- const GLenum COLOR_ATTACHMENT15 = 0x8CEF;
- const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
- const GLenum MAX_SAMPLES = 0x8D57;
- const GLenum HALF_FLOAT = 0x140B;
- const GLenum RG = 0x8227;
- const GLenum RG_INTEGER = 0x8228;
- const GLenum R8 = 0x8229;
- const GLenum RG8 = 0x822B;
- const GLenum R16F = 0x822D;
- const GLenum R32F = 0x822E;
- const GLenum RG16F = 0x822F;
- const GLenum RG32F = 0x8230;
- const GLenum R8I = 0x8231;
- const GLenum R8UI = 0x8232;
- const GLenum R16I = 0x8233;
- const GLenum R16UI = 0x8234;
- const GLenum R32I = 0x8235;
- const GLenum R32UI = 0x8236;
- const GLenum RG8I = 0x8237;
- const GLenum RG8UI = 0x8238;
- const GLenum RG16I = 0x8239;
- const GLenum RG16UI = 0x823A;
- const GLenum RG32I = 0x823B;
- const GLenum RG32UI = 0x823C;
- const GLenum VERTEX_ARRAY_BINDING = 0x85B5;
- const GLenum R8_SNORM = 0x8F94;
- const GLenum RG8_SNORM = 0x8F95;
- const GLenum RGB8_SNORM = 0x8F96;
- const GLenum RGBA8_SNORM = 0x8F97;
- const GLenum SIGNED_NORMALIZED = 0x8F9C;
- const GLenum COPY_READ_BUFFER = 0x8F36;
- const GLenum COPY_WRITE_BUFFER = 0x8F37;
- const GLenum COPY_READ_BUFFER_BINDING = 0x8F36; /* Same as COPY_READ_BUFFER */
- const GLenum COPY_WRITE_BUFFER_BINDING = 0x8F37; /* Same as COPY_WRITE_BUFFER */
- const GLenum UNIFORM_BUFFER = 0x8A11;
- const GLenum UNIFORM_BUFFER_BINDING = 0x8A28;
- const GLenum UNIFORM_BUFFER_START = 0x8A29;
- const GLenum UNIFORM_BUFFER_SIZE = 0x8A2A;
- const GLenum MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
- const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
- const GLenum MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
- const GLenum MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
- const GLenum MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
- const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
- const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
- const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
- const GLenum ACTIVE_UNIFORM_BLOCKS = 0x8A36;
- const GLenum UNIFORM_TYPE = 0x8A37;
- const GLenum UNIFORM_SIZE = 0x8A38;
- const GLenum UNIFORM_BLOCK_INDEX = 0x8A3A;
- const GLenum UNIFORM_OFFSET = 0x8A3B;
- const GLenum UNIFORM_ARRAY_STRIDE = 0x8A3C;
- const GLenum UNIFORM_MATRIX_STRIDE = 0x8A3D;
- const GLenum UNIFORM_IS_ROW_MAJOR = 0x8A3E;
- const GLenum UNIFORM_BLOCK_BINDING = 0x8A3F;
- const GLenum UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
- const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
- const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
- const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
- const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
- const GLenum INVALID_INDEX = 0xFFFFFFFF;
- const GLenum MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
- const GLenum MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
- const GLenum MAX_SERVER_WAIT_TIMEOUT = 0x9111;
- const GLenum OBJECT_TYPE = 0x9112;
- const GLenum SYNC_CONDITION = 0x9113;
- const GLenum SYNC_STATUS = 0x9114;
- const GLenum SYNC_FLAGS = 0x9115;
- const GLenum SYNC_FENCE = 0x9116;
- const GLenum SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
- const GLenum UNSIGNALED = 0x9118;
- const GLenum SIGNALED = 0x9119;
- const GLenum ALREADY_SIGNALED = 0x911A;
- const GLenum TIMEOUT_EXPIRED = 0x911B;
- const GLenum CONDITION_SATISFIED = 0x911C;
- const GLenum WAIT_FAILED = 0x911D;
- const GLenum SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
- const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
- const GLenum ANY_SAMPLES_PASSED = 0x8C2F;
- const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
- const GLenum SAMPLER_BINDING = 0x8919;
- const GLenum RGB10_A2UI = 0x906F;
- const GLenum INT_2_10_10_10_REV = 0x8D9F;
- const GLenum TRANSFORM_FEEDBACK = 0x8E22;
- const GLenum TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
- const GLenum TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
- const GLenum TRANSFORM_FEEDBACK_BINDING = 0x8E25;
- const GLenum TEXTURE_IMMUTABLE_FORMAT = 0x912F;
- const GLenum MAX_ELEMENT_INDEX = 0x8D6B;
- const GLenum TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
- const GLint64 TIMEOUT_IGNORED = -1;
- /* WebGL-specific enums */
- const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247;
- /* Buffer objects */
- // WebGL1:
- undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
- undefined bufferData(GLenum target, [AllowShared] ArrayBuffer? srcData, GLenum usage);
- undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage);
- undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBuffer srcData);
- undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBufferView srcData);
- // WebGL2:
- undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage,
- GLuint srcOffset, optional GLuint length = 0);
- undefined bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData,
- GLuint srcOffset, optional GLuint length = 0);
- undefined copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
- GLintptr writeOffset, GLsizeiptr size);
- // MapBufferRange, in particular its read-only and write-only modes,
- // can not be exposed safely to JavaScript. GetBufferSubData
- // replaces it for the purpose of fetching data back from the GPU.
- undefined getBufferSubData(GLenum target, GLintptr srcByteOffset, [AllowShared] ArrayBufferView dstData,
- optional GLuint dstOffset = 0, optional GLuint length = 0);
- /* Framebuffer objects */
- undefined blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0,
- GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
- undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level,
- GLint layer);
- [Throws]
- undefined invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
- [Throws]
- undefined invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments,
- GLint x, GLint y, GLsizei width, GLsizei height);
- undefined readBuffer(GLenum src);
- /* Renderbuffer objects */
- [Throws]
- any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
- undefined renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat,
- GLsizei width, GLsizei height);
- /* Texture objects */
- undefined texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
- GLsizei height);
- undefined texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
- GLsizei height, GLsizei depth);
- // WebGL1 legacy entrypoints:
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLint border, GLenum format,
- GLenum type, [AllowShared] ArrayBufferView? pixels);
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, ImageData source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, VideoFrame source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, ImageData source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, VideoFrame source);
- // WebGL2 entrypoints:
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type, GLintptr pboOffset);
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- ImageData source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type,
- VideoFrame source);
- [Throws] // Another overhead throws.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
- GLuint srcOffset);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset);
- [Throws]
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- ImageData source);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type,
- VideoFrame source);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? srcData);
- [Throws] // Another overhead throws.
- undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
- GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
- GLuint srcOffset);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type, GLintptr pboOffset);
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- ImageData source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type,
- VideoFrame source);
- [Throws] // Another overhead throws.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData,
- GLuint srcOffset);
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- GLintptr pboOffset);
- [Throws]
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- HTMLCanvasElement source); // May throw DOMException
- [Throws]
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- HTMLImageElement source); // May throw DOMException
- [Throws]
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- HTMLVideoElement source); // May throw DOMException
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- ImageBitmap source);
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- ImageData source);
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- OffscreenCanvas source);
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- VideoFrame source);
- [Throws] // Another overhead throws.
- undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
- [AllowShared] ArrayBufferView? srcData, optional GLuint srcOffset = 0);
- undefined copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y, GLsizei width, GLsizei height);
- undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
- GLsizei height, GLint border, GLsizei imageSize, GLintptr offset);
- undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
- GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData,
- optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
- undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
- GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLintptr offset);
- undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width,
- GLsizei height, GLsizei depth, GLint border, [AllowShared] ArrayBufferView srcData,
- optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0);
- undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset);
- undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height, GLenum format,
- [AllowShared] ArrayBufferView srcData,
- optional GLuint srcOffset = 0,
- optional GLuint srcLengthOverride = 0);
- undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLsizei imageSize, GLintptr offset);
- undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, [AllowShared] ArrayBufferView srcData,
- optional GLuint srcOffset = 0,
- optional GLuint srcLengthOverride = 0);
- /* Programs and shaders */
- [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name);
- /* Uniforms */
- undefined uniform1ui(WebGLUniformLocation? location, GLuint v0);
- undefined uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
- undefined uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
- undefined uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
- undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0,
- optional GLuint srcLength = 0);
- undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data,
- optional GLuint srcOffset = 0, optional GLuint srcLength = 0);
- /* Vertex attribs */
- undefined vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
- undefined vertexAttribI4iv(GLuint index, Int32List values);
- undefined vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
- undefined vertexAttribI4uiv(GLuint index, Uint32List values);
- undefined vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
- /* Writing to the drawing buffer */
- undefined vertexAttribDivisor(GLuint index, GLuint divisor);
- undefined drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
- undefined drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
- undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
- /* Reading back pixels */
- // WebGL1:
- [Throws, NeedsCallerType] // Throws on readback in a write-only context.
- undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
- [AllowShared] ArrayBufferView? dstData);
- // WebGL2:
- [Throws, NeedsCallerType] // Throws on readback in a write-only context.
- undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
- GLintptr offset);
- [Throws, NeedsCallerType] // Throws on readback in a write-only context.
- undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
- [AllowShared] ArrayBufferView dstData, GLuint dstOffset);
- /* Multiple Render Targets */
- undefined drawBuffers(sequence<GLenum> buffers);
- undefined clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values,
- optional GLuint srcOffset = 0);
- undefined clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values,
- optional GLuint srcOffset = 0);
- undefined clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values,
- optional GLuint srcOffset = 0);
- undefined clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
- /* Query Objects */
- WebGLQuery? createQuery();
- undefined deleteQuery(WebGLQuery? query);
- [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query);
- undefined beginQuery(GLenum target, WebGLQuery query);
- undefined endQuery(GLenum target);
- any getQuery(GLenum target, GLenum pname);
- any getQueryParameter(WebGLQuery query, GLenum pname);
- /* Sampler Objects */
- WebGLSampler? createSampler();
- undefined deleteSampler(WebGLSampler? sampler);
- [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler);
- undefined bindSampler(GLuint unit, WebGLSampler? sampler);
- undefined samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param);
- undefined samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param);
- any getSamplerParameter(WebGLSampler sampler, GLenum pname);
- /* Sync objects */
- WebGLSync? fenceSync(GLenum condition, GLbitfield flags);
- [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync);
- undefined deleteSync(WebGLSync? sync);
- GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
- undefined waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout);
- any getSyncParameter(WebGLSync sync, GLenum pname);
- /* Transform Feedback */
- WebGLTransformFeedback? createTransformFeedback();
- undefined deleteTransformFeedback(WebGLTransformFeedback? tf);
- [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf);
- undefined bindTransformFeedback(GLenum target, WebGLTransformFeedback? tf);
- undefined beginTransformFeedback(GLenum primitiveMode);
- undefined endTransformFeedback();
- undefined transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode);
- [NewObject]
- WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index);
- undefined pauseTransformFeedback();
- undefined resumeTransformFeedback();
- /* Uniform Buffer Objects and Transform Feedback Buffers */
- undefined bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
- undefined bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
- [Throws] // GetOrCreateDOMReflector can fail.
- any getIndexedParameter(GLenum target, GLuint index);
- sequence<GLuint>? getUniformIndices(WebGLProgram program, sequence<DOMString> uniformNames);
- any getActiveUniforms(WebGLProgram program, sequence<GLuint> uniformIndices, GLenum pname);
- GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName);
- [Throws] // Creating a Uint32Array can fail.
- any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname);
- DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex);
- undefined uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
- /* Vertex Array Objects */
- WebGLVertexArrayObject? createVertexArray();
- undefined deleteVertexArray(WebGLVertexArrayObject? vertexArray);
- [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray);
- undefined bindVertexArray(WebGLVertexArrayObject? array);
- };
- WebGL2RenderingContext includes WebGLRenderingContextBase;
- WebGL2RenderingContext includes WebGL2RenderingContextBase;
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_color_buffer_float {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OVR_multiview2 {
- const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630;
- const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632;
- const GLenum MAX_VIEWS_OVR = 0x9631;
- const GLenum FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633;
- undefined framebufferTextureMultiviewOVR(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint baseViewIndex, GLsizei numViews);
- };
-
- /* ---------------------- WebGLContextEvent ----------------------------- */
- /* ./webidl/WebGLContextEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- * The origin of this IDL file is
- * https://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event
- */
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLContextEvent : Event {
- constructor(DOMString type, optional WebGLContextEventInit eventInit = {});
- readonly attribute DOMString statusMessage;
- };
- // EventInit is defined in the DOM4 specification.
- dictionary WebGLContextEventInit : EventInit {
- DOMString statusMessage = "";
- };
-
- /* ---------------------- WebGLRenderingContext ----------------------------- */
- /* ./webidl/WebGLRenderingContext.webidl */
-
- /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://www.khronos.org/registry/webgl/specs/latest/webgl.idl
- *
- * Copyright © 2012 Khronos Group
- */
- // WebGL IDL definitions scraped from the Khronos specification:
- // https://www.khronos.org/registry/webgl/specs/latest/
- //
- // This IDL depends on the typed array specification defined at:
- // https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl
- typedef unsigned long GLenum;
- typedef boolean GLboolean;
- typedef unsigned long GLbitfield;
- typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */
- typedef short GLshort;
- typedef long GLint;
- typedef long GLsizei;
- typedef long long GLintptr;
- typedef long long GLsizeiptr;
- // Ideally the typedef below would use 'unsigned byte', but that doesn't currently exist in Web IDL.
- typedef octet GLubyte; /* 'octet' should be an unsigned 8 bit type. */
- typedef unsigned short GLushort;
- typedef unsigned long GLuint;
- typedef unrestricted float GLfloat;
- typedef unrestricted float GLclampf;
- typedef unsigned long long GLuint64EXT;
- // The power preference settings are documented in the WebGLContextAttributes
- // section of the specification.
- enum WebGLPowerPreference { "default", "low-power", "high-performance" };
- enum PredefinedColorSpace { "srgb", "display-p3" };
- [GenerateInit]
- dictionary WebGLContextAttributes {
- // We deviate from the spec for alpha and antialias:
- // * alpha: Historically, we might use rgb565 instead of rgb(x)8, for
- // memory bandwidth optimization.
- // * antialias: On Android, DPI is high and mem-bandwidth is low, so we
- // default to antialias:false if it's not set.
- GLboolean alpha; // = true; // Default is controlled by webgl.default-no-alpha.
- GLboolean depth = true;
- GLboolean stencil = false;
- GLboolean antialias; // = true; // Default is controlled by webgl.default-antialias.
- GLboolean premultipliedAlpha = true;
- GLboolean preserveDrawingBuffer = false;
- GLboolean failIfMajorPerformanceCaveat = false;
- WebGLPowerPreference powerPreference = "default";
- // We are experimenting here, though this should be close to where we end up.
- [Pref="webgl.colorspaces.prototype"]
- PredefinedColorSpace colorSpace; // = "srgb"; Default is gfx::ColorSpace2::UNKNOWN for now.
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLBuffer {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLFramebuffer {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLProgram {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLRenderbuffer {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLShader {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLTexture {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLUniformLocation {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLVertexArrayObject {
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLActiveInfo {
- readonly attribute GLint size;
- readonly attribute GLenum type;
- readonly attribute DOMString name;
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLShaderPrecisionFormat {
- readonly attribute GLint rangeMin;
- readonly attribute GLint rangeMax;
- readonly attribute GLint precision;
- };
- typedef ([AllowShared] Float32Array or sequence<GLfloat>) Float32List;
- typedef ([AllowShared] Int32Array or sequence<GLint>) Int32List;
- // Shared mixin for the things that WebGLRenderingContext and
- // WebGL2RenderingContext have in common. This doesn't have all the things they
- // have in common, because we don't support splitting multiple overloads of the
- // same method across separate interfaces and pulling them in with "includes".
- [Exposed=(Window, Worker)]
- interface mixin WebGLRenderingContextBase {
- /* ClearBufferMask */
- const GLenum DEPTH_BUFFER_BIT = 0x00000100;
- const GLenum STENCIL_BUFFER_BIT = 0x00000400;
- const GLenum COLOR_BUFFER_BIT = 0x00004000;
- /* BeginMode */
- const GLenum POINTS = 0x0000;
- const GLenum LINES = 0x0001;
- const GLenum LINE_LOOP = 0x0002;
- const GLenum LINE_STRIP = 0x0003;
- const GLenum TRIANGLES = 0x0004;
- const GLenum TRIANGLE_STRIP = 0x0005;
- const GLenum TRIANGLE_FAN = 0x0006;
- /* AlphaFunction (not supported in ES20) */
- /* NEVER */
- /* LESS */
- /* EQUAL */
- /* LEQUAL */
- /* GREATER */
- /* NOTEQUAL */
- /* GEQUAL */
- /* ALWAYS */
- /* BlendingFactorDest */
- const GLenum ZERO = 0;
- const GLenum ONE = 1;
- const GLenum SRC_COLOR = 0x0300;
- const GLenum ONE_MINUS_SRC_COLOR = 0x0301;
- const GLenum SRC_ALPHA = 0x0302;
- const GLenum ONE_MINUS_SRC_ALPHA = 0x0303;
- const GLenum DST_ALPHA = 0x0304;
- const GLenum ONE_MINUS_DST_ALPHA = 0x0305;
- /* BlendingFactorSrc */
- /* ZERO */
- /* ONE */
- const GLenum DST_COLOR = 0x0306;
- const GLenum ONE_MINUS_DST_COLOR = 0x0307;
- const GLenum SRC_ALPHA_SATURATE = 0x0308;
- /* SRC_ALPHA */
- /* ONE_MINUS_SRC_ALPHA */
- /* DST_ALPHA */
- /* ONE_MINUS_DST_ALPHA */
- /* BlendEquationSeparate */
- const GLenum FUNC_ADD = 0x8006;
- const GLenum BLEND_EQUATION = 0x8009;
- const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */
- const GLenum BLEND_EQUATION_ALPHA = 0x883D;
- /* BlendSubtract */
- const GLenum FUNC_SUBTRACT = 0x800A;
- const GLenum FUNC_REVERSE_SUBTRACT = 0x800B;
- /* Separate Blend Functions */
- const GLenum BLEND_DST_RGB = 0x80C8;
- const GLenum BLEND_SRC_RGB = 0x80C9;
- const GLenum BLEND_DST_ALPHA = 0x80CA;
- const GLenum BLEND_SRC_ALPHA = 0x80CB;
- const GLenum CONSTANT_COLOR = 0x8001;
- const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002;
- const GLenum CONSTANT_ALPHA = 0x8003;
- const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004;
- const GLenum BLEND_COLOR = 0x8005;
- /* Buffer Objects */
- const GLenum ARRAY_BUFFER = 0x8892;
- const GLenum ELEMENT_ARRAY_BUFFER = 0x8893;
- const GLenum ARRAY_BUFFER_BINDING = 0x8894;
- const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
- const GLenum STREAM_DRAW = 0x88E0;
- const GLenum STATIC_DRAW = 0x88E4;
- const GLenum DYNAMIC_DRAW = 0x88E8;
- const GLenum BUFFER_SIZE = 0x8764;
- const GLenum BUFFER_USAGE = 0x8765;
- const GLenum CURRENT_VERTEX_ATTRIB = 0x8626;
- /* CullFaceMode */
- const GLenum FRONT = 0x0404;
- const GLenum BACK = 0x0405;
- const GLenum FRONT_AND_BACK = 0x0408;
- /* DepthFunction */
- /* NEVER */
- /* LESS */
- /* EQUAL */
- /* LEQUAL */
- /* GREATER */
- /* NOTEQUAL */
- /* GEQUAL */
- /* ALWAYS */
- /* EnableCap */
- /* TEXTURE_2D */
- const GLenum CULL_FACE = 0x0B44;
- const GLenum BLEND = 0x0BE2;
- const GLenum DITHER = 0x0BD0;
- const GLenum STENCIL_TEST = 0x0B90;
- const GLenum DEPTH_TEST = 0x0B71;
- const GLenum SCISSOR_TEST = 0x0C11;
- const GLenum POLYGON_OFFSET_FILL = 0x8037;
- const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
- const GLenum SAMPLE_COVERAGE = 0x80A0;
- /* ErrorCode */
- const GLenum NO_ERROR = 0;
- const GLenum INVALID_ENUM = 0x0500;
- const GLenum INVALID_VALUE = 0x0501;
- const GLenum INVALID_OPERATION = 0x0502;
- const GLenum OUT_OF_MEMORY = 0x0505;
- /* FrontFaceDirection */
- const GLenum CW = 0x0900;
- const GLenum CCW = 0x0901;
- /* GetPName */
- const GLenum LINE_WIDTH = 0x0B21;
- const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D;
- const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E;
- const GLenum CULL_FACE_MODE = 0x0B45;
- const GLenum FRONT_FACE = 0x0B46;
- const GLenum DEPTH_RANGE = 0x0B70;
- const GLenum DEPTH_WRITEMASK = 0x0B72;
- const GLenum DEPTH_CLEAR_VALUE = 0x0B73;
- const GLenum DEPTH_FUNC = 0x0B74;
- const GLenum STENCIL_CLEAR_VALUE = 0x0B91;
- const GLenum STENCIL_FUNC = 0x0B92;
- const GLenum STENCIL_FAIL = 0x0B94;
- const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95;
- const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96;
- const GLenum STENCIL_REF = 0x0B97;
- const GLenum STENCIL_VALUE_MASK = 0x0B93;
- const GLenum STENCIL_WRITEMASK = 0x0B98;
- const GLenum STENCIL_BACK_FUNC = 0x8800;
- const GLenum STENCIL_BACK_FAIL = 0x8801;
- const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
- const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
- const GLenum STENCIL_BACK_REF = 0x8CA3;
- const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4;
- const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5;
- const GLenum VIEWPORT = 0x0BA2;
- const GLenum SCISSOR_BOX = 0x0C10;
- /* SCISSOR_TEST */
- const GLenum COLOR_CLEAR_VALUE = 0x0C22;
- const GLenum COLOR_WRITEMASK = 0x0C23;
- const GLenum UNPACK_ALIGNMENT = 0x0CF5;
- const GLenum PACK_ALIGNMENT = 0x0D05;
- const GLenum MAX_TEXTURE_SIZE = 0x0D33;
- const GLenum MAX_VIEWPORT_DIMS = 0x0D3A;
- const GLenum SUBPIXEL_BITS = 0x0D50;
- const GLenum RED_BITS = 0x0D52;
- const GLenum GREEN_BITS = 0x0D53;
- const GLenum BLUE_BITS = 0x0D54;
- const GLenum ALPHA_BITS = 0x0D55;
- const GLenum DEPTH_BITS = 0x0D56;
- const GLenum STENCIL_BITS = 0x0D57;
- const GLenum POLYGON_OFFSET_UNITS = 0x2A00;
- /* POLYGON_OFFSET_FILL */
- const GLenum POLYGON_OFFSET_FACTOR = 0x8038;
- const GLenum TEXTURE_BINDING_2D = 0x8069;
- const GLenum SAMPLE_BUFFERS = 0x80A8;
- const GLenum SAMPLES = 0x80A9;
- const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA;
- const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB;
- /* GetTextureParameter */
- /* TEXTURE_MAG_FILTER */
- /* TEXTURE_MIN_FILTER */
- /* TEXTURE_WRAP_S */
- /* TEXTURE_WRAP_T */
- const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3;
- /* HintMode */
- const GLenum DONT_CARE = 0x1100;
- const GLenum FASTEST = 0x1101;
- const GLenum NICEST = 0x1102;
- /* HintTarget */
- const GLenum GENERATE_MIPMAP_HINT = 0x8192;
- /* DataType */
- const GLenum BYTE = 0x1400;
- const GLenum UNSIGNED_BYTE = 0x1401;
- const GLenum SHORT = 0x1402;
- const GLenum UNSIGNED_SHORT = 0x1403;
- const GLenum INT = 0x1404;
- const GLenum UNSIGNED_INT = 0x1405;
- const GLenum FLOAT = 0x1406;
- /* PixelFormat */
- const GLenum DEPTH_COMPONENT = 0x1902;
- const GLenum ALPHA = 0x1906;
- const GLenum RGB = 0x1907;
- const GLenum RGBA = 0x1908;
- const GLenum LUMINANCE = 0x1909;
- const GLenum LUMINANCE_ALPHA = 0x190A;
- /* PixelType */
- /* UNSIGNED_BYTE */
- const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033;
- const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034;
- const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363;
- /* Shaders */
- const GLenum FRAGMENT_SHADER = 0x8B30;
- const GLenum VERTEX_SHADER = 0x8B31;
- const GLenum MAX_VERTEX_ATTRIBS = 0x8869;
- const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
- const GLenum MAX_VARYING_VECTORS = 0x8DFC;
- const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
- const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
- const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872;
- const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
- const GLenum SHADER_TYPE = 0x8B4F;
- const GLenum DELETE_STATUS = 0x8B80;
- const GLenum LINK_STATUS = 0x8B82;
- const GLenum VALIDATE_STATUS = 0x8B83;
- const GLenum ATTACHED_SHADERS = 0x8B85;
- const GLenum ACTIVE_UNIFORMS = 0x8B86;
- const GLenum ACTIVE_ATTRIBUTES = 0x8B89;
- const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C;
- const GLenum CURRENT_PROGRAM = 0x8B8D;
- /* StencilFunction */
- const GLenum NEVER = 0x0200;
- const GLenum LESS = 0x0201;
- const GLenum EQUAL = 0x0202;
- const GLenum LEQUAL = 0x0203;
- const GLenum GREATER = 0x0204;
- const GLenum NOTEQUAL = 0x0205;
- const GLenum GEQUAL = 0x0206;
- const GLenum ALWAYS = 0x0207;
- /* StencilOp */
- /* ZERO */
- const GLenum KEEP = 0x1E00;
- const GLenum REPLACE = 0x1E01;
- const GLenum INCR = 0x1E02;
- const GLenum DECR = 0x1E03;
- const GLenum INVERT = 0x150A;
- const GLenum INCR_WRAP = 0x8507;
- const GLenum DECR_WRAP = 0x8508;
- /* StringName */
- const GLenum VENDOR = 0x1F00;
- const GLenum RENDERER = 0x1F01;
- const GLenum VERSION = 0x1F02;
- /* TextureMagFilter */
- const GLenum NEAREST = 0x2600;
- const GLenum LINEAR = 0x2601;
- /* TextureMinFilter */
- /* NEAREST */
- /* LINEAR */
- const GLenum NEAREST_MIPMAP_NEAREST = 0x2700;
- const GLenum LINEAR_MIPMAP_NEAREST = 0x2701;
- const GLenum NEAREST_MIPMAP_LINEAR = 0x2702;
- const GLenum LINEAR_MIPMAP_LINEAR = 0x2703;
- /* TextureParameterName */
- const GLenum TEXTURE_MAG_FILTER = 0x2800;
- const GLenum TEXTURE_MIN_FILTER = 0x2801;
- const GLenum TEXTURE_WRAP_S = 0x2802;
- const GLenum TEXTURE_WRAP_T = 0x2803;
- /* TextureTarget */
- const GLenum TEXTURE_2D = 0x0DE1;
- const GLenum TEXTURE = 0x1702;
- const GLenum TEXTURE_CUBE_MAP = 0x8513;
- const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514;
- const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
- const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
- const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
- const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
- const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
- const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
- const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
- /* TextureUnit */
- const GLenum TEXTURE0 = 0x84C0;
- const GLenum TEXTURE1 = 0x84C1;
- const GLenum TEXTURE2 = 0x84C2;
- const GLenum TEXTURE3 = 0x84C3;
- const GLenum TEXTURE4 = 0x84C4;
- const GLenum TEXTURE5 = 0x84C5;
- const GLenum TEXTURE6 = 0x84C6;
- const GLenum TEXTURE7 = 0x84C7;
- const GLenum TEXTURE8 = 0x84C8;
- const GLenum TEXTURE9 = 0x84C9;
- const GLenum TEXTURE10 = 0x84CA;
- const GLenum TEXTURE11 = 0x84CB;
- const GLenum TEXTURE12 = 0x84CC;
- const GLenum TEXTURE13 = 0x84CD;
- const GLenum TEXTURE14 = 0x84CE;
- const GLenum TEXTURE15 = 0x84CF;
- const GLenum TEXTURE16 = 0x84D0;
- const GLenum TEXTURE17 = 0x84D1;
- const GLenum TEXTURE18 = 0x84D2;
- const GLenum TEXTURE19 = 0x84D3;
- const GLenum TEXTURE20 = 0x84D4;
- const GLenum TEXTURE21 = 0x84D5;
- const GLenum TEXTURE22 = 0x84D6;
- const GLenum TEXTURE23 = 0x84D7;
- const GLenum TEXTURE24 = 0x84D8;
- const GLenum TEXTURE25 = 0x84D9;
- const GLenum TEXTURE26 = 0x84DA;
- const GLenum TEXTURE27 = 0x84DB;
- const GLenum TEXTURE28 = 0x84DC;
- const GLenum TEXTURE29 = 0x84DD;
- const GLenum TEXTURE30 = 0x84DE;
- const GLenum TEXTURE31 = 0x84DF;
- const GLenum ACTIVE_TEXTURE = 0x84E0;
- /* TextureWrapMode */
- const GLenum REPEAT = 0x2901;
- const GLenum CLAMP_TO_EDGE = 0x812F;
- const GLenum MIRRORED_REPEAT = 0x8370;
- /* Uniform Types */
- const GLenum FLOAT_VEC2 = 0x8B50;
- const GLenum FLOAT_VEC3 = 0x8B51;
- const GLenum FLOAT_VEC4 = 0x8B52;
- const GLenum INT_VEC2 = 0x8B53;
- const GLenum INT_VEC3 = 0x8B54;
- const GLenum INT_VEC4 = 0x8B55;
- const GLenum BOOL = 0x8B56;
- const GLenum BOOL_VEC2 = 0x8B57;
- const GLenum BOOL_VEC3 = 0x8B58;
- const GLenum BOOL_VEC4 = 0x8B59;
- const GLenum FLOAT_MAT2 = 0x8B5A;
- const GLenum FLOAT_MAT3 = 0x8B5B;
- const GLenum FLOAT_MAT4 = 0x8B5C;
- const GLenum SAMPLER_2D = 0x8B5E;
- const GLenum SAMPLER_CUBE = 0x8B60;
- /* Vertex Arrays */
- const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
- const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
- const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
- const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
- const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
- const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
- const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
- /* Read Format */
- const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
- const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
- /* Shader Source */
- const GLenum COMPILE_STATUS = 0x8B81;
- /* Shader Precision-Specified Types */
- const GLenum LOW_FLOAT = 0x8DF0;
- const GLenum MEDIUM_FLOAT = 0x8DF1;
- const GLenum HIGH_FLOAT = 0x8DF2;
- const GLenum LOW_INT = 0x8DF3;
- const GLenum MEDIUM_INT = 0x8DF4;
- const GLenum HIGH_INT = 0x8DF5;
- /* Framebuffer Object. */
- const GLenum FRAMEBUFFER = 0x8D40;
- const GLenum RENDERBUFFER = 0x8D41;
- const GLenum RGBA4 = 0x8056;
- const GLenum RGB5_A1 = 0x8057;
- const GLenum RGB565 = 0x8D62;
- const GLenum DEPTH_COMPONENT16 = 0x81A5;
- const GLenum STENCIL_INDEX8 = 0x8D48;
- const GLenum DEPTH_STENCIL = 0x84F9;
- const GLenum RENDERBUFFER_WIDTH = 0x8D42;
- const GLenum RENDERBUFFER_HEIGHT = 0x8D43;
- const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
- const GLenum RENDERBUFFER_RED_SIZE = 0x8D50;
- const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51;
- const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52;
- const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53;
- const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54;
- const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55;
- const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
- const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
- const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
- const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
- const GLenum COLOR_ATTACHMENT0 = 0x8CE0;
- const GLenum DEPTH_ATTACHMENT = 0x8D00;
- const GLenum STENCIL_ATTACHMENT = 0x8D20;
- const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A;
- const GLenum NONE = 0;
- const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5;
- const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
- const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
- const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
- const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
- const GLenum FRAMEBUFFER_BINDING = 0x8CA6;
- const GLenum RENDERBUFFER_BINDING = 0x8CA7;
- const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8;
- const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506;
- /* WebGL-specific enums */
- const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240;
- const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
- const GLenum CONTEXT_LOST_WEBGL = 0x9242;
- const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
- const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
- // The canvas might actually be null in some cases, apparently.
- readonly attribute CanvasSource? canvas;
- readonly attribute GLsizei drawingBufferWidth;
- readonly attribute GLsizei drawingBufferHeight;
- [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
- [WebGLHandlesContextLoss] boolean isContextLost();
- [NeedsCallerType]
- sequence<DOMString>? getSupportedExtensions();
- [Throws, NeedsCallerType]
- object? getExtension(DOMString name);
- undefined activeTexture(GLenum texture);
- undefined attachShader(WebGLProgram program, WebGLShader shader);
- undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name);
- undefined bindBuffer(GLenum target, WebGLBuffer? buffer);
- undefined bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer);
- undefined bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer);
- undefined bindTexture(GLenum target, WebGLTexture? texture);
- undefined blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
- undefined blendEquation(GLenum mode);
- undefined blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
- undefined blendFunc(GLenum sfactor, GLenum dfactor);
- undefined blendFuncSeparate(GLenum srcRGB, GLenum dstRGB,
- GLenum srcAlpha, GLenum dstAlpha);
- [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target);
- undefined clear(GLbitfield mask);
- undefined clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
- undefined clearDepth(GLclampf depth);
- undefined clearStencil(GLint s);
- undefined colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
- undefined compileShader(WebGLShader shader);
- undefined copyTexImage2D(GLenum target, GLint level, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLsizei height,
- GLint border);
- undefined copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLint x, GLint y, GLsizei width, GLsizei height);
- WebGLBuffer? createBuffer();
- WebGLFramebuffer? createFramebuffer();
- WebGLProgram? createProgram();
- WebGLRenderbuffer? createRenderbuffer();
- WebGLShader? createShader(GLenum type);
- WebGLTexture? createTexture();
- undefined cullFace(GLenum mode);
- undefined deleteBuffer(WebGLBuffer? buffer);
- undefined deleteFramebuffer(WebGLFramebuffer? framebuffer);
- undefined deleteProgram(WebGLProgram? program);
- undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer);
- undefined deleteShader(WebGLShader? shader);
- undefined deleteTexture(WebGLTexture? texture);
- undefined depthFunc(GLenum func);
- undefined depthMask(GLboolean flag);
- undefined depthRange(GLclampf zNear, GLclampf zFar);
- undefined detachShader(WebGLProgram program, WebGLShader shader);
- undefined disable(GLenum cap);
- undefined disableVertexAttribArray(GLuint index);
- undefined drawArrays(GLenum mode, GLint first, GLsizei count);
- undefined drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset);
- undefined enable(GLenum cap);
- undefined enableVertexAttribArray(GLuint index);
- undefined finish();
- undefined flush();
- undefined framebufferRenderbuffer(GLenum target, GLenum attachment,
- GLenum renderbuffertarget,
- WebGLRenderbuffer? renderbuffer);
- undefined framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
- WebGLTexture? texture, GLint level);
- undefined frontFace(GLenum mode);
- undefined generateMipmap(GLenum target);
- [NewObject]
- WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index);
- [NewObject]
- WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index);
- sequence<WebGLShader>? getAttachedShaders(WebGLProgram program);
- [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram program, DOMString name);
- any getBufferParameter(GLenum target, GLenum pname);
- [Throws]
- any getParameter(GLenum pname);
- [WebGLHandlesContextLoss] GLenum getError();
- [Throws]
- any getFramebufferAttachmentParameter(GLenum target, GLenum attachment,
- GLenum pname);
- any getProgramParameter(WebGLProgram program, GLenum pname);
- DOMString? getProgramInfoLog(WebGLProgram program);
- any getRenderbufferParameter(GLenum target, GLenum pname);
- any getShaderParameter(WebGLShader shader, GLenum pname);
- [NewObject]
- WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
- DOMString? getShaderInfoLog(WebGLShader shader);
- DOMString? getShaderSource(WebGLShader shader);
- any getTexParameter(GLenum target, GLenum pname);
- any getUniform(WebGLProgram program, WebGLUniformLocation location);
- [NewObject]
- WebGLUniformLocation? getUniformLocation(WebGLProgram program, DOMString name);
- [Throws]
- any getVertexAttrib(GLuint index, GLenum pname);
- [WebGLHandlesContextLoss] GLintptr getVertexAttribOffset(GLuint index, GLenum pname);
- undefined hint(GLenum target, GLenum mode);
- [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer);
- [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap);
- [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer);
- [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program);
- [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer);
- [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader);
- [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture);
- undefined lineWidth(GLfloat width);
- undefined linkProgram(WebGLProgram program);
- undefined pixelStorei(GLenum pname, GLint param);
- undefined polygonOffset(GLfloat factor, GLfloat units);
- undefined renderbufferStorage(GLenum target, GLenum internalformat,
- GLsizei width, GLsizei height);
- undefined sampleCoverage(GLclampf value, GLboolean invert);
- undefined scissor(GLint x, GLint y, GLsizei width, GLsizei height);
- undefined shaderSource(WebGLShader shader, DOMString source);
- undefined stencilFunc(GLenum func, GLint ref, GLuint mask);
- undefined stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
- undefined stencilMask(GLuint mask);
- undefined stencilMaskSeparate(GLenum face, GLuint mask);
- undefined stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
- undefined stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
- undefined texParameterf(GLenum target, GLenum pname, GLfloat param);
- undefined texParameteri(GLenum target, GLenum pname, GLint param);
- undefined uniform1f(WebGLUniformLocation? location, GLfloat x);
- undefined uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y);
- undefined uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z);
- undefined uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- undefined uniform1i(WebGLUniformLocation? location, GLint x);
- undefined uniform2i(WebGLUniformLocation? location, GLint x, GLint y);
- undefined uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z);
- undefined uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w);
- undefined useProgram(WebGLProgram? program);
- undefined validateProgram(WebGLProgram program);
- undefined vertexAttrib1f(GLuint indx, GLfloat x);
- undefined vertexAttrib1fv(GLuint indx, Float32List values);
- undefined vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
- undefined vertexAttrib2fv(GLuint indx, Float32List values);
- undefined vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
- undefined vertexAttrib3fv(GLuint indx, Float32List values);
- undefined vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
- undefined vertexAttrib4fv(GLuint indx, Float32List values);
- undefined vertexAttribPointer(GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, GLintptr offset);
- undefined viewport(GLint x, GLint y, GLsizei width, GLsizei height);
- };
- [Exposed=(Window,Worker),
- Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
- interface WebGLRenderingContext {
- // bufferData has WebGL2 overloads.
- undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage);
- undefined bufferData(GLenum target, [AllowShared] ArrayBuffer? data, GLenum usage);
- undefined bufferData(GLenum target, [AllowShared] ArrayBufferView data, GLenum usage);
- // bufferSubData has WebGL2 overloads.
- undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBuffer data);
- undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] ArrayBufferView data);
- // compressedTexImage2D has WebGL2 overloads.
- undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat,
- GLsizei width, GLsizei height, GLint border,
- [AllowShared] ArrayBufferView data);
- // compressedTexSubImage2D has WebGL2 overloads.
- undefined compressedTexSubImage2D(GLenum target, GLint level,
- GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height, GLenum format,
- [AllowShared] ArrayBufferView data);
- // readPixels has WebGL2 overloads.
- [Throws, NeedsCallerType]
- undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
- // texImage2D has WebGL2 overloads.
- // Overloads must share [Throws].
- [Throws] // Can't actually throw.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLint border, GLenum format,
- GLenum type, [AllowShared] ArrayBufferView? pixels);
- [Throws] // Can't actually throw.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, ImageBitmap pixels);
- [Throws] // Can't actually throw.
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, ImageData pixels);
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, OffscreenCanvas canvas); // May throw DOMException
- [Throws]
- undefined texImage2D(GLenum target, GLint level, GLint internalformat,
- GLenum format, GLenum type, VideoFrame videoFrame); // May throw DOMException
- // texSubImage2D has WebGL2 overloads.
- [Throws] // Can't actually throw.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels);
- [Throws] // Can't actually throw.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, ImageBitmap pixels);
- [Throws] // Can't actually throw.
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, ImageData pixels);
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLImageElement image); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLCanvasElement canvas); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, HTMLVideoElement video); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, OffscreenCanvas canvas); // May throw DOMException
- [Throws]
- undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLenum format, GLenum type, VideoFrame videoFrame); // May throw DOMException
- // uniform*fv have WebGL2 overloads, or rather extensions, that are not
- // distinguishable from the WebGL1 versions when called with two arguments.
- undefined uniform1fv(WebGLUniformLocation? location, Float32List data);
- undefined uniform2fv(WebGLUniformLocation? location, Float32List data);
- undefined uniform3fv(WebGLUniformLocation? location, Float32List data);
- undefined uniform4fv(WebGLUniformLocation? location, Float32List data);
- // uniform*iv have WebGL2 overloads, or rather extensions, that are not
- // distinguishable from the WebGL1 versions when called with two arguments.
- undefined uniform1iv(WebGLUniformLocation? location, Int32List data);
- undefined uniform2iv(WebGLUniformLocation? location, Int32List data);
- undefined uniform3iv(WebGLUniformLocation? location, Int32List data);
- undefined uniform4iv(WebGLUniformLocation? location, Int32List data);
- // uniformMatrix*fv have WebGL2 overloads, or rather extensions, that are
- // not distinguishable from the WebGL1 versions when called with two
- // arguments.
- undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
- undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
- undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
- };
- WebGLRenderingContext includes WebGLRenderingContextBase;
- ////////////////////////////////////////
- // specific extension interfaces
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_texture_compression_bptc {
- const GLenum COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C;
- const GLenum COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D;
- const GLenum COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E;
- const GLenum COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_texture_compression_rgtc {
- const GLenum COMPRESSED_RED_RGTC1_EXT = 0x8DBB;
- const GLenum COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC;
- const GLenum COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD;
- const GLenum COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE;
- };
- // https://www.khronos.org/registry/webgl/extensions/EXT_texture_norm16/
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_texture_norm16 {
- const GLenum R16_EXT = 0x822A;
- const GLenum RG16_EXT = 0x822C;
- const GLenum RGB16_EXT = 0x8054;
- const GLenum RGBA16_EXT = 0x805B;
- const GLenum R16_SNORM_EXT = 0x8F98;
- const GLenum RG16_SNORM_EXT = 0x8F99;
- const GLenum RGB16_SNORM_EXT = 0x8F9A;
- const GLenum RGBA16_SNORM_EXT = 0x8F9B;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_s3tc
- {
- const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
- const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
- const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
- const GLenum COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_s3tc_srgb {
- /* Compressed Texture Formats */
- const GLenum COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
- const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D;
- const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E;
- const GLenum COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_astc {
- /* Compressed Texture Format */
- const GLenum COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
- const GLenum COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1;
- const GLenum COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2;
- const GLenum COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3;
- const GLenum COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4;
- const GLenum COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5;
- const GLenum COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6;
- const GLenum COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7;
- const GLenum COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8;
- const GLenum COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9;
- const GLenum COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA;
- const GLenum COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB;
- const GLenum COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC;
- const GLenum COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD;
- // Profile query support.
- sequence<DOMString>? getSupportedProfiles();
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_etc
- {
- const GLenum COMPRESSED_R11_EAC = 0x9270;
- const GLenum COMPRESSED_SIGNED_R11_EAC = 0x9271;
- const GLenum COMPRESSED_RG11_EAC = 0x9272;
- const GLenum COMPRESSED_SIGNED_RG11_EAC = 0x9273;
- const GLenum COMPRESSED_RGB8_ETC2 = 0x9274;
- const GLenum COMPRESSED_SRGB8_ETC2 = 0x9275;
- const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
- const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
- const GLenum COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
- const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_etc1
- {
- const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_compressed_texture_pvrtc
- {
- const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
- const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01;
- const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
- const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_debug_renderer_info
- {
- const GLenum UNMASKED_VENDOR_WEBGL = 0x9245;
- const GLenum UNMASKED_RENDERER_WEBGL = 0x9246;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_debug_shaders
- {
- DOMString getTranslatedShaderSource(WebGLShader shader);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_depth_texture
- {
- const GLenum UNSIGNED_INT_24_8_WEBGL = 0x84FA;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_element_index_uint
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_frag_depth
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_lose_context {
- undefined loseContext();
- undefined restoreContext();
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_texture_filter_anisotropic
- {
- const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
- const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_sRGB
- {
- const GLenum SRGB_EXT = 0x8C40;
- const GLenum SRGB_ALPHA_EXT = 0x8C42;
- const GLenum SRGB8_ALPHA8_EXT = 0x8C43;
- const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_standard_derivatives {
- const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_texture_float
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_draw_buffers {
- const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
- const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
- const GLenum COLOR_ATTACHMENT2_WEBGL = 0x8CE2;
- const GLenum COLOR_ATTACHMENT3_WEBGL = 0x8CE3;
- const GLenum COLOR_ATTACHMENT4_WEBGL = 0x8CE4;
- const GLenum COLOR_ATTACHMENT5_WEBGL = 0x8CE5;
- const GLenum COLOR_ATTACHMENT6_WEBGL = 0x8CE6;
- const GLenum COLOR_ATTACHMENT7_WEBGL = 0x8CE7;
- const GLenum COLOR_ATTACHMENT8_WEBGL = 0x8CE8;
- const GLenum COLOR_ATTACHMENT9_WEBGL = 0x8CE9;
- const GLenum COLOR_ATTACHMENT10_WEBGL = 0x8CEA;
- const GLenum COLOR_ATTACHMENT11_WEBGL = 0x8CEB;
- const GLenum COLOR_ATTACHMENT12_WEBGL = 0x8CEC;
- const GLenum COLOR_ATTACHMENT13_WEBGL = 0x8CED;
- const GLenum COLOR_ATTACHMENT14_WEBGL = 0x8CEE;
- const GLenum COLOR_ATTACHMENT15_WEBGL = 0x8CEF;
- const GLenum DRAW_BUFFER0_WEBGL = 0x8825;
- const GLenum DRAW_BUFFER1_WEBGL = 0x8826;
- const GLenum DRAW_BUFFER2_WEBGL = 0x8827;
- const GLenum DRAW_BUFFER3_WEBGL = 0x8828;
- const GLenum DRAW_BUFFER4_WEBGL = 0x8829;
- const GLenum DRAW_BUFFER5_WEBGL = 0x882A;
- const GLenum DRAW_BUFFER6_WEBGL = 0x882B;
- const GLenum DRAW_BUFFER7_WEBGL = 0x882C;
- const GLenum DRAW_BUFFER8_WEBGL = 0x882D;
- const GLenum DRAW_BUFFER9_WEBGL = 0x882E;
- const GLenum DRAW_BUFFER10_WEBGL = 0x882F;
- const GLenum DRAW_BUFFER11_WEBGL = 0x8830;
- const GLenum DRAW_BUFFER12_WEBGL = 0x8831;
- const GLenum DRAW_BUFFER13_WEBGL = 0x8832;
- const GLenum DRAW_BUFFER14_WEBGL = 0x8833;
- const GLenum DRAW_BUFFER15_WEBGL = 0x8834;
- const GLenum MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF;
- const GLenum MAX_DRAW_BUFFERS_WEBGL = 0x8824;
- undefined drawBuffersWEBGL(sequence<GLenum> buffers);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_texture_float_linear
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_shader_texture_lod
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_texture_half_float
- {
- const GLenum HALF_FLOAT_OES = 0x8D61;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_texture_half_float_linear
- {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_color_buffer_float
- {
- const GLenum RGBA32F_EXT = 0x8814;
- const GLenum RGB32F_EXT = 0x8815;
- const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
- const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_color_buffer_half_float
- {
- const GLenum RGBA16F_EXT = 0x881A;
- const GLenum RGB16F_EXT = 0x881B;
- const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
- const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_vertex_array_object {
- const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
- WebGLVertexArrayObject? createVertexArrayOES();
- undefined deleteVertexArrayOES(WebGLVertexArrayObject? arrayObject);
- [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObject? arrayObject);
- undefined bindVertexArrayOES(WebGLVertexArrayObject? arrayObject);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface ANGLE_instanced_arrays {
- const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
- undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
- undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
- undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_blend_minmax {
- const GLenum MIN_EXT = 0x8007;
- const GLenum MAX_EXT = 0x8008;
- };
- [Exposed=(Window,Worker)]
- interface WebGLQuery {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_disjoint_timer_query {
- const GLenum QUERY_COUNTER_BITS_EXT = 0x8864;
- const GLenum CURRENT_QUERY_EXT = 0x8865;
- const GLenum QUERY_RESULT_EXT = 0x8866;
- const GLenum QUERY_RESULT_AVAILABLE_EXT = 0x8867;
- const GLenum TIME_ELAPSED_EXT = 0x88BF;
- const GLenum TIMESTAMP_EXT = 0x8E28;
- const GLenum GPU_DISJOINT_EXT = 0x8FBB;
- WebGLQuery? createQueryEXT();
- undefined deleteQueryEXT(WebGLQuery? query);
- [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLQuery? query);
- undefined beginQueryEXT(GLenum target, WebGLQuery query);
- undefined endQueryEXT(GLenum target);
- undefined queryCounterEXT(WebGLQuery query, GLenum target);
- any getQueryEXT(GLenum target, GLenum pname);
- any getQueryObjectEXT(WebGLQuery query, GLenum pname);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface MOZ_debug {
- const GLenum EXTENSIONS = 0x1F03;
- const GLenum WSI_INFO = 0x10000;
- const GLenum UNPACK_REQUIRE_FASTPATH = 0x10001;
- const GLenum DOES_INDEX_VALIDATION = 0x10002;
- [Throws]
- any getParameter(GLenum pname);
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface EXT_float_blend {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface OES_fbo_render_mipmap {
- };
- [LegacyNoInterfaceObject,
- Exposed=(Window,Worker)]
- interface WEBGL_explicit_present {
- undefined present();
- };
- // https://www.khronos.org/registry/webgl/extensions/OES_draw_buffers_indexed/
- [Exposed=(Window,Worker), LegacyNoInterfaceObject]
- interface OES_draw_buffers_indexed {
- undefined enableiOES(GLenum target, GLuint index);
- undefined disableiOES(GLenum target, GLuint index);
- undefined blendEquationiOES(GLuint buf, GLenum mode);
- undefined blendEquationSeparateiOES(GLuint buf,
- GLenum modeRGB, GLenum modeAlpha);
- undefined blendFunciOES(GLuint buf,
- GLenum src, GLenum dst);
- undefined blendFuncSeparateiOES(GLuint buf,
- GLenum srcRGB, GLenum dstRGB,
- GLenum srcAlpha, GLenum dstAlpha);
- undefined colorMaskiOES(GLuint buf,
- GLboolean r, GLboolean g, GLboolean b, GLboolean a);
- };
- [Exposed=(Window,Worker), LegacyNoInterfaceObject]
- interface WEBGL_provoking_vertex {
- const GLenum FIRST_VERTEX_CONVENTION_WEBGL = 0x8E4D;
- const GLenum LAST_VERTEX_CONVENTION_WEBGL = 0x8E4E; // default
- const GLenum PROVOKING_VERTEX_WEBGL = 0x8E4F;
- undefined provokingVertexWEBGL(GLenum provokeMode);
- };
- // https://immersive-web.github.io/webxr/#dom-webglcontextattributes-xrcompatible
- partial dictionary WebGLContextAttributes {
- [Pref="dom.vr.webxr.enabled"]
- boolean xrCompatible = false;
- };
- // https://immersive-web.github.io/webxr/#dom-webglrenderingcontextbase-makexrcompatible
- partial interface mixin WebGLRenderingContextBase {
- [NewObject, Pref="dom.vr.webxr.enabled"]
- Promise<undefined> makeXRCompatible();
- };
-
- /* ---------------------- WebGPU ----------------------------- */
- /* ./webidl/WebGPU.webidl */
-
- /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://gpuweb.github.io/gpuweb/
- */
- interface mixin GPUObjectBase {
- attribute USVString? label;
- };
- dictionary GPUObjectDescriptorBase {
- USVString label = "";
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUSupportedLimits {
- readonly attribute unsigned long maxTextureDimension1D;
- readonly attribute unsigned long maxTextureDimension2D;
- readonly attribute unsigned long maxTextureDimension3D;
- readonly attribute unsigned long maxTextureArrayLayers;
- readonly attribute unsigned long maxBindGroups;
- readonly attribute unsigned long maxBindGroupsPlusVertexBuffers;
- readonly attribute unsigned long maxBindingsPerBindGroup;
- readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout;
- readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout;
- readonly attribute unsigned long maxSampledTexturesPerShaderStage;
- readonly attribute unsigned long maxSamplersPerShaderStage;
- readonly attribute unsigned long maxStorageBuffersPerShaderStage;
- readonly attribute unsigned long maxStorageTexturesPerShaderStage;
- readonly attribute unsigned long maxUniformBuffersPerShaderStage;
- readonly attribute unsigned long long maxUniformBufferBindingSize;
- readonly attribute unsigned long long maxStorageBufferBindingSize;
- readonly attribute unsigned long minUniformBufferOffsetAlignment;
- readonly attribute unsigned long minStorageBufferOffsetAlignment;
- readonly attribute unsigned long maxVertexBuffers;
- readonly attribute unsigned long long maxBufferSize;
- readonly attribute unsigned long maxVertexAttributes;
- readonly attribute unsigned long maxVertexBufferArrayStride;
- readonly attribute unsigned long maxInterStageShaderComponents;
- readonly attribute unsigned long maxInterStageShaderVariables;
- readonly attribute unsigned long maxColorAttachments;
- readonly attribute unsigned long maxColorAttachmentBytesPerSample;
- readonly attribute unsigned long maxComputeWorkgroupStorageSize;
- readonly attribute unsigned long maxComputeInvocationsPerWorkgroup;
- readonly attribute unsigned long maxComputeWorkgroupSizeX;
- readonly attribute unsigned long maxComputeWorkgroupSizeY;
- readonly attribute unsigned long maxComputeWorkgroupSizeZ;
- readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUSupportedFeatures {
- readonly setlike<DOMString>;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUAdapterInfo {
- readonly attribute DOMString vendor;
- readonly attribute DOMString architecture;
- readonly attribute DOMString device;
- readonly attribute DOMString description;
- // Non-standard; see <https://bugzilla.mozilla.org/show_bug.cgi?id=1831994>.
- [ChromeOnly] readonly attribute DOMString wgpuName;
- [ChromeOnly] readonly attribute unsigned long wgpuVendor;
- [ChromeOnly] readonly attribute unsigned long wgpuDevice;
- [ChromeOnly] readonly attribute DOMString wgpuDeviceType;
- [ChromeOnly] readonly attribute DOMString wgpuDriver;
- [ChromeOnly] readonly attribute DOMString wgpuDriverInfo;
- [ChromeOnly] readonly attribute DOMString wgpuBackend;
- };
- interface mixin NavigatorGPU {
- [SameObject, Func="mozilla::webgpu::Instance::PrefEnabled", Exposed=(Window, DedicatedWorker), SecureContext] readonly attribute GPU gpu;
- };
- // NOTE: see `dom/webidl/Navigator.webidl`
- // Navigator includes NavigatorGPU;
- // NOTE: see `dom/webidl/WorkerNavigator.webidl`
- // WorkerNavigator includes NavigatorGPU;
- [
- Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext
- ]
- interface GPU {
- [Throws]
- Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});
- GPUTextureFormat getPreferredCanvasFormat();
- };
- dictionary GPURequestAdapterOptions {
- GPUPowerPreference powerPreference;
- boolean forceFallbackAdapter = false;
- };
- enum GPUPowerPreference {
- "low-power",
- "high-performance",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUAdapter {
- [SameObject] readonly attribute GPUSupportedFeatures features;
- [SameObject] readonly attribute GPUSupportedLimits limits;
- readonly attribute boolean isFallbackAdapter;
- [Throws]
- Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
- [Throws]
- Promise<GPUAdapterInfo> requestAdapterInfo(optional sequence<DOMString> unmaskHints = []);
- };
- dictionary GPUDeviceDescriptor
- : GPUObjectDescriptorBase {
- sequence<GPUFeatureName> requiredFeatures = [];
- record<DOMString, GPUSize64> requiredLimits;
- GPUQueueDescriptor defaultQueue = {};
- };
- enum GPUFeatureName {
- "depth-clip-control",
- "depth32float-stencil8",
- "texture-compression-bc",
- "texture-compression-etc2",
- "texture-compression-astc",
- "timestamp-query",
- "indirect-first-instance",
- "shader-f16",
- "rg11b10ufloat-renderable",
- "bgra8unorm-storage",
- "float32-filterable",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUDevice : EventTarget {
- [SameObject] readonly attribute GPUSupportedFeatures features;
- [SameObject] readonly attribute GPUSupportedLimits limits;
- [SameObject, BinaryName="getQueue"] readonly attribute GPUQueue queue;
- undefined destroy();
- [Throws]
- GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
- GPUTexture createTexture(GPUTextureDescriptor descriptor);
- GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {});
- GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor);
- GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor);
- GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor);
- [Throws]
- GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor);
- GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor);
- GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor);
- [Throws]
- Promise<GPUComputePipeline> createComputePipelineAsync(GPUComputePipelineDescriptor descriptor);
- [Throws]
- Promise<GPURenderPipeline> createRenderPipelineAsync(GPURenderPipelineDescriptor descriptor);
- GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
- GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
- //GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);
- };
- GPUDevice includes GPUObjectBase;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUBuffer {
- readonly attribute GPUSize64Out size;
- readonly attribute GPUFlagsConstant usage;
- readonly attribute GPUBufferMapState mapState;
- [Throws]
- Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
- [Throws]
- ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
- [Throws]
- undefined unmap();
- [Throws]
- undefined destroy();
- };
- GPUBuffer includes GPUObjectBase;
- enum GPUBufferMapState {
- "unmapped",
- "pending",
- "mapped",
- };
- dictionary GPUBufferDescriptor
- : GPUObjectDescriptorBase {
- required GPUSize64 size;
- required GPUBufferUsageFlags usage;
- boolean mappedAtCreation = false;
- };
- typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUBufferUsage {
- const GPUFlagsConstant MAP_READ = 0x0001;
- const GPUFlagsConstant MAP_WRITE = 0x0002;
- const GPUFlagsConstant COPY_SRC = 0x0004;
- const GPUFlagsConstant COPY_DST = 0x0008;
- const GPUFlagsConstant INDEX = 0x0010;
- const GPUFlagsConstant VERTEX = 0x0020;
- const GPUFlagsConstant UNIFORM = 0x0040;
- const GPUFlagsConstant STORAGE = 0x0080;
- const GPUFlagsConstant INDIRECT = 0x0100;
- const GPUFlagsConstant QUERY_RESOLVE = 0x0200;
- };
- typedef [EnforceRange] unsigned long GPUMapModeFlags;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUMapMode {
- const GPUFlagsConstant READ = 0x0001;
- const GPUFlagsConstant WRITE = 0x0002;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUTexture {
- GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
- undefined destroy();
- readonly attribute GPUIntegerCoordinateOut width;
- readonly attribute GPUIntegerCoordinateOut height;
- readonly attribute GPUIntegerCoordinateOut depthOrArrayLayers;
- readonly attribute GPUIntegerCoordinateOut mipLevelCount;
- readonly attribute GPUSize32Out sampleCount;
- readonly attribute GPUTextureDimension dimension;
- readonly attribute GPUTextureFormat format;
- readonly attribute GPUFlagsConstant usage;
- };
- GPUTexture includes GPUObjectBase;
- dictionary GPUTextureDescriptor
- : GPUObjectDescriptorBase {
- required GPUExtent3D size;
- GPUIntegerCoordinate mipLevelCount = 1;
- GPUSize32 sampleCount = 1;
- GPUTextureDimension dimension = "2d";
- required GPUTextureFormat format;
- required GPUTextureUsageFlags usage;
- sequence<GPUTextureFormat> viewFormats = [];
- };
- enum GPUTextureDimension {
- "1d",
- "2d",
- "3d",
- };
- typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUTextureUsage {
- const GPUFlagsConstant COPY_SRC = 0x01;
- const GPUFlagsConstant COPY_DST = 0x02;
- const GPUFlagsConstant TEXTURE_BINDING = 0x04;
- const GPUFlagsConstant STORAGE_BINDING = 0x08;
- const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUTextureView {
- };
- GPUTextureView includes GPUObjectBase;
- dictionary GPUTextureViewDescriptor
- : GPUObjectDescriptorBase {
- GPUTextureFormat format;
- GPUTextureViewDimension dimension;
- GPUTextureAspect aspect = "all";
- GPUIntegerCoordinate baseMipLevel = 0;
- GPUIntegerCoordinate mipLevelCount;
- GPUIntegerCoordinate baseArrayLayer = 0;
- GPUIntegerCoordinate arrayLayerCount;
- };
- enum GPUTextureViewDimension {
- "1d",
- "2d",
- "2d-array",
- "cube",
- "cube-array",
- "3d",
- };
- enum GPUTextureAspect {
- "all",
- "stencil-only",
- "depth-only",
- };
- enum GPUTextureFormat {
- // 8-bit formats
- "r8unorm",
- "r8snorm",
- "r8uint",
- "r8sint",
- // 16-bit formats
- "r16uint",
- "r16sint",
- "r16float",
- "rg8unorm",
- "rg8snorm",
- "rg8uint",
- "rg8sint",
- // 32-bit formats
- "r32uint",
- "r32sint",
- "r32float",
- "rg16uint",
- "rg16sint",
- "rg16float",
- "rgba8unorm",
- "rgba8unorm-srgb",
- "rgba8snorm",
- "rgba8uint",
- "rgba8sint",
- "bgra8unorm",
- "bgra8unorm-srgb",
- // Packed 32-bit formats
- "rgb9e5ufloat",
- "rgb10a2unorm",
- "rg11b10ufloat",
- // 64-bit formats
- "rg32uint",
- "rg32sint",
- "rg32float",
- "rgba16uint",
- "rgba16sint",
- "rgba16float",
- // 128-bit formats
- "rgba32uint",
- "rgba32sint",
- "rgba32float",
- // Depth/stencil formats
- "stencil8",
- "depth16unorm",
- "depth24plus",
- "depth24plus-stencil8",
- "depth32float",
- // "depth32float-stencil8" feature
- "depth32float-stencil8",
- // BC compressed formats usable if "texture-compression-bc" is both
- // supported by the device/user agent and enabled in requestDevice.
- "bc1-rgba-unorm",
- "bc1-rgba-unorm-srgb",
- "bc2-rgba-unorm",
- "bc2-rgba-unorm-srgb",
- "bc3-rgba-unorm",
- "bc3-rgba-unorm-srgb",
- "bc4-r-unorm",
- "bc4-r-snorm",
- "bc5-rg-unorm",
- "bc5-rg-snorm",
- "bc6h-rgb-ufloat",
- "bc6h-rgb-float",
- "bc7-rgba-unorm",
- "bc7-rgba-unorm-srgb",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUSampler {
- };
- GPUSampler includes GPUObjectBase;
- dictionary GPUSamplerDescriptor
- : GPUObjectDescriptorBase {
- GPUAddressMode addressModeU = "clamp-to-edge";
- GPUAddressMode addressModeV = "clamp-to-edge";
- GPUAddressMode addressModeW = "clamp-to-edge";
- GPUFilterMode magFilter = "nearest";
- GPUFilterMode minFilter = "nearest";
- GPUMipmapFilterMode mipmapFilter = "nearest";
- float lodMinClamp = 0;
- float lodMaxClamp = 1000.0; // TODO: What should this be?
- GPUCompareFunction compare;
- [Clamp] unsigned short maxAnisotropy = 1;
- };
- enum GPUAddressMode {
- "clamp-to-edge",
- "repeat",
- "mirror-repeat",
- };
- enum GPUFilterMode {
- "nearest",
- "linear",
- };
- enum GPUMipmapFilterMode {
- "nearest",
- "linear",
- };
- enum GPUCompareFunction {
- "never",
- "less",
- "equal",
- "less-equal",
- "greater",
- "not-equal",
- "greater-equal",
- "always",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUBindGroupLayout {
- };
- GPUBindGroupLayout includes GPUObjectBase;
- dictionary GPUBindGroupLayoutDescriptor
- : GPUObjectDescriptorBase {
- required sequence<GPUBindGroupLayoutEntry> entries;
- };
- dictionary GPUBindGroupLayoutEntry {
- required GPUIndex32 binding;
- required GPUShaderStageFlags visibility;
- GPUBufferBindingLayout buffer;
- GPUSamplerBindingLayout sampler;
- GPUTextureBindingLayout texture;
- GPUStorageTextureBindingLayout storageTexture;
- };
- typedef [EnforceRange] unsigned long GPUShaderStageFlags;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUShaderStage {
- const GPUFlagsConstant VERTEX = 0x1;
- const GPUFlagsConstant FRAGMENT = 0x2;
- const GPUFlagsConstant COMPUTE = 0x4;
- };
- enum GPUBufferBindingType {
- "uniform",
- "storage",
- "read-only-storage",
- };
- dictionary GPUBufferBindingLayout {
- GPUBufferBindingType type = "uniform";
- boolean hasDynamicOffset = false;
- GPUSize64 minBindingSize = 0;
- };
- enum GPUSamplerBindingType {
- "filtering",
- "non-filtering",
- "comparison",
- };
- dictionary GPUSamplerBindingLayout {
- GPUSamplerBindingType type = "filtering";
- };
- enum GPUTextureSampleType {
- "float",
- "unfilterable-float",
- "depth",
- "sint",
- "uint",
- };
- dictionary GPUTextureBindingLayout {
- GPUTextureSampleType sampleType = "float";
- GPUTextureViewDimension viewDimension = "2d";
- boolean multisampled = false;
- };
- enum GPUStorageTextureAccess {
- "write-only",
- "read-only",
- "read-write",
- };
- dictionary GPUStorageTextureBindingLayout {
- GPUStorageTextureAccess access = "write-only";
- required GPUTextureFormat format;
- GPUTextureViewDimension viewDimension = "2d";
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUBindGroup {
- };
- GPUBindGroup includes GPUObjectBase;
- dictionary GPUBindGroupDescriptor
- : GPUObjectDescriptorBase {
- required GPUBindGroupLayout layout;
- required sequence<GPUBindGroupEntry> entries;
- };
- typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
- dictionary GPUBindGroupEntry {
- required GPUIndex32 binding;
- required GPUBindingResource resource;
- };
- dictionary GPUBufferBinding {
- required GPUBuffer buffer;
- GPUSize64 offset = 0;
- GPUSize64 size;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUPipelineLayout {
- };
- GPUPipelineLayout includes GPUObjectBase;
- dictionary GPUPipelineLayoutDescriptor
- : GPUObjectDescriptorBase {
- required sequence<GPUBindGroupLayout> bindGroupLayouts;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUShaderModule {
- [Throws]
- Promise<GPUCompilationInfo> compilationInfo(); // To be removed with <https://bugzilla.mozilla.org/show_bug.cgi?id=1846892>
- [Throws]
- Promise<GPUCompilationInfo> getCompilationInfo();
- };
- GPUShaderModule includes GPUObjectBase;
- dictionary GPUShaderModuleDescriptor
- : GPUObjectDescriptorBase {
- // UTF8String is not observably different from USVString
- required UTF8String code;
- object sourceMap;
- };
- enum GPUCompilationMessageType {
- "error",
- "warning",
- "info",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUCompilationMessage {
- readonly attribute DOMString message;
- readonly attribute GPUCompilationMessageType type;
- readonly attribute unsigned long long lineNum;
- readonly attribute unsigned long long linePos;
- readonly attribute unsigned long long offset;
- readonly attribute unsigned long long length;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUCompilationInfo {
- [Cached, Frozen, Pure]
- readonly attribute sequence<GPUCompilationMessage> messages;
- };
- enum GPUAutoLayoutMode {
- "auto",
- };
- dictionary GPUPipelineDescriptorBase
- : GPUObjectDescriptorBase {
- required (GPUPipelineLayout or GPUAutoLayoutMode) layout;
- };
- interface mixin GPUPipelineBase {
- GPUBindGroupLayout getBindGroupLayout(unsigned long index);
- };
- dictionary GPUProgrammableStage {
- required GPUShaderModule module;
- USVString entryPoint;
- };
- //TODO: Serializable
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1696219
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUComputePipeline {
- };
- GPUComputePipeline includes GPUObjectBase;
- GPUComputePipeline includes GPUPipelineBase;
- dictionary GPUComputePipelineDescriptor
- : GPUPipelineDescriptorBase {
- required GPUProgrammableStage compute;
- };
- //TODO: Serializable
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1696219
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPURenderPipeline {
- };
- GPURenderPipeline includes GPUObjectBase;
- GPURenderPipeline includes GPUPipelineBase;
- dictionary GPURenderPipelineDescriptor
- : GPUPipelineDescriptorBase {
- required GPUVertexState vertex;
- GPUPrimitiveState primitive = {};
- GPUDepthStencilState depthStencil;
- GPUMultisampleState multisample = {};
- GPUFragmentState fragment;
- };
- dictionary GPUPrimitiveState {
- GPUPrimitiveTopology topology = "triangle-list";
- GPUIndexFormat stripIndexFormat;
- GPUFrontFace frontFace = "ccw";
- GPUCullMode cullMode = "none";
- // Requires "depth-clip-control" feature.
- boolean unclippedDepth = false;
- };
- enum GPUPrimitiveTopology {
- "point-list",
- "line-list",
- "line-strip",
- "triangle-list",
- "triangle-strip",
- };
- enum GPUFrontFace {
- "ccw",
- "cw",
- };
- enum GPUCullMode {
- "none",
- "front",
- "back",
- };
- dictionary GPUMultisampleState {
- GPUSize32 count = 1;
- GPUSampleMask mask = 0xFFFFFFFF;
- boolean alphaToCoverageEnabled = false;
- };
- dictionary GPUFragmentState
- : GPUProgrammableStage {
- required sequence<GPUColorTargetState> targets;
- };
- dictionary GPUColorTargetState {
- required GPUTextureFormat format;
- GPUBlendState blend;
- GPUColorWriteFlags writeMask = 0xF; // GPUColorWrite.ALL
- };
- dictionary GPUBlendState {
- required GPUBlendComponent color;
- required GPUBlendComponent alpha;
- };
- typedef [EnforceRange] unsigned long GPUColorWriteFlags;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUColorWrite {
- const GPUFlagsConstant RED = 0x1;
- const GPUFlagsConstant GREEN = 0x2;
- const GPUFlagsConstant BLUE = 0x4;
- const GPUFlagsConstant ALPHA = 0x8;
- const GPUFlagsConstant ALL = 0xF;
- };
- dictionary GPUBlendComponent {
- GPUBlendOperation operation = "add";
- GPUBlendFactor srcFactor = "one";
- GPUBlendFactor dstFactor = "zero";
- };
- enum GPUBlendFactor {
- "zero",
- "one",
- "src",
- "one-minus-src",
- "src-alpha",
- "one-minus-src-alpha",
- "dst",
- "one-minus-dst",
- "dst-alpha",
- "one-minus-dst-alpha",
- "src-alpha-saturated",
- "constant",
- "one-minus-constant",
- };
- enum GPUBlendOperation {
- "add",
- "subtract",
- "reverse-subtract",
- "min",
- "max",
- };
- dictionary GPUDepthStencilState {
- required GPUTextureFormat format;
- boolean depthWriteEnabled = false;
- GPUCompareFunction depthCompare = "always";
- GPUStencilFaceState stencilFront = {};
- GPUStencilFaceState stencilBack = {};
- GPUStencilValue stencilReadMask = 0xFFFFFFFF;
- GPUStencilValue stencilWriteMask = 0xFFFFFFFF;
- GPUDepthBias depthBias = 0;
- float depthBiasSlopeScale = 0;
- float depthBiasClamp = 0;
- };
- dictionary GPUStencilFaceState {
- GPUCompareFunction compare = "always";
- GPUStencilOperation failOp = "keep";
- GPUStencilOperation depthFailOp = "keep";
- GPUStencilOperation passOp = "keep";
- };
- enum GPUStencilOperation {
- "keep",
- "zero",
- "replace",
- "invert",
- "increment-clamp",
- "decrement-clamp",
- "increment-wrap",
- "decrement-wrap",
- };
- enum GPUIndexFormat {
- "uint16",
- "uint32",
- };
- enum GPUVertexFormat {
- "uint8x2",
- "uint8x4",
- "sint8x2",
- "sint8x4",
- "unorm8x2",
- "unorm8x4",
- "snorm8x2",
- "snorm8x4",
- "uint16x2",
- "uint16x4",
- "sint16x2",
- "sint16x4",
- "unorm16x2",
- "unorm16x4",
- "snorm16x2",
- "snorm16x4",
- "float16x2",
- "float16x4",
- "float32",
- "float32x2",
- "float32x3",
- "float32x4",
- "uint32",
- "uint32x2",
- "uint32x3",
- "uint32x4",
- "sint32",
- "sint32x2",
- "sint32x3",
- "sint32x4",
- };
- enum GPUVertexStepMode {
- "vertex",
- "instance",
- };
- dictionary GPUVertexState
- : GPUProgrammableStage {
- sequence<GPUVertexBufferLayout?> buffers = [];
- };
- dictionary GPUVertexBufferLayout {
- required GPUSize64 arrayStride;
- GPUVertexStepMode stepMode = "vertex";
- required sequence<GPUVertexAttribute> attributes;
- };
- dictionary GPUVertexAttribute {
- required GPUVertexFormat format;
- required GPUSize64 offset;
- required GPUIndex32 shaderLocation;
- };
- dictionary GPUImageDataLayout {
- GPUSize64 offset = 0;
- GPUSize32 bytesPerRow;
- GPUSize32 rowsPerImage;
- };
- dictionary GPUImageCopyBuffer
- : GPUImageDataLayout {
- required GPUBuffer buffer;
- };
- dictionary GPUImageCopyTexture {
- required GPUTexture texture;
- GPUIntegerCoordinate mipLevel = 0;
- GPUOrigin3D origin;
- GPUTextureAspect aspect = "all";
- };
- dictionary GPUImageCopyTextureTagged
- : GPUImageCopyTexture {
- //GPUPredefinedColorSpace colorSpace = "srgb"; //TODO
- boolean premultipliedAlpha = false;
- };
- dictionary GPUImageCopyExternalImage {
- required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source;
- GPUOrigin2D origin = {};
- boolean flipY = false;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUCommandBuffer {
- };
- GPUCommandBuffer includes GPUObjectBase;
- dictionary GPUCommandBufferDescriptor
- : GPUObjectDescriptorBase {
- };
- interface mixin GPUCommandsMixin {
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUCommandEncoder {
- GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
- GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
- undefined copyBufferToBuffer(
- GPUBuffer source,
- GPUSize64 sourceOffset,
- GPUBuffer destination,
- GPUSize64 destinationOffset,
- GPUSize64 size);
- undefined copyBufferToTexture(
- GPUImageCopyBuffer source,
- GPUImageCopyTexture destination,
- GPUExtent3D copySize);
- undefined copyTextureToBuffer(
- GPUImageCopyTexture source,
- GPUImageCopyBuffer destination,
- GPUExtent3D copySize);
- undefined copyTextureToTexture(
- GPUImageCopyTexture source,
- GPUImageCopyTexture destination,
- GPUExtent3D copySize);
- undefined clearBuffer(
- GPUBuffer buffer,
- optional GPUSize64 offset = 0,
- optional GPUSize64 size);
- GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
- };
- GPUCommandEncoder includes GPUObjectBase;
- GPUCommandEncoder includes GPUCommandsMixin;
- GPUCommandEncoder includes GPUDebugCommandsMixin;
- dictionary GPUCommandEncoderDescriptor
- : GPUObjectDescriptorBase {
- };
- interface mixin GPUBindingCommandsMixin {
- undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
- optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
- };
- interface mixin GPUDebugCommandsMixin {
- undefined pushDebugGroup(USVString groupLabel);
- undefined popDebugGroup();
- undefined insertDebugMarker(USVString markerLabel);
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUComputePassEncoder {
- undefined setPipeline(GPUComputePipeline pipeline);
- undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1);
- [Pref="dom.webgpu.indirect-dispatch.enabled"]
- undefined dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
- undefined end();
- };
- GPUComputePassEncoder includes GPUObjectBase;
- GPUComputePassEncoder includes GPUCommandsMixin;
- GPUComputePassEncoder includes GPUDebugCommandsMixin;
- GPUComputePassEncoder includes GPUBindingCommandsMixin;
- dictionary GPUComputePassDescriptor
- : GPUObjectDescriptorBase {
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPURenderPassEncoder {
- undefined setViewport(float x, float y,
- float width, float height,
- float minDepth, float maxDepth);
- undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y,
- GPUIntegerCoordinate width, GPUIntegerCoordinate height);
- undefined setBlendConstant(GPUColor color);
- undefined setStencilReference(GPUStencilValue reference);
- //undefined beginOcclusionQuery(GPUSize32 queryIndex);
- //undefined endOcclusionQuery();
- undefined executeBundles(sequence<GPURenderBundle> bundles);
- undefined end();
- };
- GPURenderPassEncoder includes GPUObjectBase;
- GPURenderPassEncoder includes GPUCommandsMixin;
- GPURenderPassEncoder includes GPUDebugCommandsMixin;
- GPURenderPassEncoder includes GPUBindingCommandsMixin;
- GPURenderPassEncoder includes GPURenderCommandsMixin;
- dictionary GPURenderPassDescriptor
- : GPUObjectDescriptorBase {
- required sequence<GPURenderPassColorAttachment> colorAttachments;
- GPURenderPassDepthStencilAttachment depthStencilAttachment;
- GPUQuerySet occlusionQuerySet;
- };
- dictionary GPURenderPassColorAttachment {
- required GPUTextureView view;
- GPUTextureView resolveTarget;
- GPUColor clearValue;
- required GPULoadOp loadOp;
- required GPUStoreOp storeOp;
- };
- dictionary GPURenderPassDepthStencilAttachment {
- required GPUTextureView view;
- float depthClearValue;
- GPULoadOp depthLoadOp;
- GPUStoreOp depthStoreOp;
- boolean depthReadOnly = false;
- GPUStencilValue stencilClearValue = 0;
- GPULoadOp stencilLoadOp;
- GPUStoreOp stencilStoreOp;
- boolean stencilReadOnly = false;
- };
- enum GPULoadOp {
- "load",
- "clear",
- };
- enum GPUStoreOp {
- "store",
- "discard",
- };
- dictionary GPURenderPassLayout
- : GPUObjectDescriptorBase {
- required sequence<GPUTextureFormat> colorFormats;
- GPUTextureFormat depthStencilFormat;
- GPUSize32 sampleCount = 1;
- };
- interface mixin GPURenderCommandsMixin {
- undefined setPipeline(GPURenderPipeline pipeline);
- undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
- undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
- undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
- optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
- undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1,
- optional GPUSize32 firstIndex = 0,
- optional GPUSignedOffset32 baseVertex = 0,
- optional GPUSize32 firstInstance = 0);
- [Pref="dom.webgpu.indirect-dispatch.enabled"]
- undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
- [Pref="dom.webgpu.indirect-dispatch.enabled"]
- undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPURenderBundle {
- };
- GPURenderBundle includes GPUObjectBase;
- dictionary GPURenderBundleDescriptor
- : GPUObjectDescriptorBase {
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPURenderBundleEncoder {
- GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
- };
- GPURenderBundleEncoder includes GPUObjectBase;
- GPURenderBundleEncoder includes GPUCommandsMixin;
- GPURenderBundleEncoder includes GPUDebugCommandsMixin;
- GPURenderBundleEncoder includes GPUBindingCommandsMixin;
- GPURenderBundleEncoder includes GPURenderCommandsMixin;
- dictionary GPURenderBundleEncoderDescriptor
- : GPURenderPassLayout {
- boolean depthReadOnly = false;
- boolean stencilReadOnly = false;
- };
- dictionary GPUQueueDescriptor
- : GPUObjectDescriptorBase {
- };
- //TODO: use [AllowShared] on BufferSource
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1696216
- // https://github.com/heycam/webidl/issues/961
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUQueue {
- undefined submit(sequence<GPUCommandBuffer> buffers);
- [Throws]
- Promise<undefined> onSubmittedWorkDone();
- [Throws]
- undefined writeBuffer(
- GPUBuffer buffer,
- GPUSize64 bufferOffset,
- BufferSource data,
- optional GPUSize64 dataOffset = 0,
- optional GPUSize64 size);
- [Throws]
- undefined writeTexture(
- GPUImageCopyTexture destination,
- BufferSource data,
- GPUImageDataLayout dataLayout,
- GPUExtent3D size);
- [Throws]
- undefined copyExternalImageToTexture(
- GPUImageCopyExternalImage source,
- GPUImageCopyTextureTagged destination,
- GPUExtent3D copySize);
- };
- GPUQueue includes GPUObjectBase;
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUQuerySet {
- undefined destroy();
- };
- GPUQuerySet includes GPUObjectBase;
- dictionary GPUQuerySetDescriptor
- : GPUObjectDescriptorBase {
- required GPUQueryType type;
- required GPUSize32 count;
- sequence<GPUPipelineStatisticName> pipelineStatistics = [];
- };
- enum GPUPipelineStatisticName {
- "vertex-shader-invocations",
- "clipper-invocations",
- "clipper-primitives-out",
- "fragment-shader-invocations",
- "compute-shader-invocations"
- };
- enum GPUQueryType {
- "occlusion",
- "pipeline-statistics",
- "timestamp",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUCanvasContext {
- readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
- undefined configure(GPUCanvasConfiguration configuration);
- undefined unconfigure();
- [Throws]
- GPUTexture getCurrentTexture();
- };
- enum GPUCanvasAlphaMode {
- "opaque",
- "premultiplied",
- };
- dictionary GPUCanvasConfiguration {
- required GPUDevice device;
- required GPUTextureFormat format;
- GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT
- sequence<GPUTextureFormat> viewFormats = [];
- //GPUPredefinedColorSpace colorSpace = "srgb"; //TODO
- GPUCanvasAlphaMode alphaMode = "opaque";
- };
- enum GPUDeviceLostReason {
- "destroyed",
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUDeviceLostInfo {
- readonly attribute any reason; // GPUDeviceLostReason or undefined
- readonly attribute DOMString message;
- };
- partial interface GPUDevice {
- [Throws]
- readonly attribute Promise<GPUDeviceLostInfo> lost;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUError {
- readonly attribute DOMString message;
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUValidationError
- : GPUError {
- [Throws]
- constructor(DOMString message);
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUOutOfMemoryError
- : GPUError {
- [Throws]
- constructor(DOMString message);
- };
- [Func="mozilla::webgpu::Instance::PrefEnabled",
- Exposed=(Window, DedicatedWorker), SecureContext]
- interface GPUInternalError
- : GPUError {
- [Throws]
- constructor(DOMString message);
- };
- enum GPUErrorFilter {
- "validation",
- "out-of-memory",
- "internal",
- };
- partial interface GPUDevice {
- undefined pushErrorScope(GPUErrorFilter filter);
- [Throws]
- Promise<GPUError?> popErrorScope();
- };
- partial interface GPUDevice {
- [Exposed=(Window, DedicatedWorker)]
- attribute EventHandler onuncapturederror;
- };
- typedef [EnforceRange] unsigned long GPUBufferDynamicOffset;
- typedef [EnforceRange] unsigned long GPUStencilValue;
- typedef [EnforceRange] unsigned long GPUSampleMask;
- typedef [EnforceRange] long GPUDepthBias;
- typedef [EnforceRange] unsigned long long GPUSize64;
- typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
- typedef [EnforceRange] unsigned long GPUIndex32;
- typedef [EnforceRange] unsigned long GPUSize32;
- typedef [EnforceRange] long GPUSignedOffset32;
- typedef unsigned long long GPUSize64Out;
- typedef unsigned long GPUIntegerCoordinateOut;
- typedef unsigned long GPUSize32Out;
- typedef unsigned long GPUFlagsConstant;
- dictionary GPUColorDict {
- required double r;
- required double g;
- required double b;
- required double a;
- };
- typedef (sequence<double> or GPUColorDict) GPUColor;
- dictionary GPUOrigin2DDict {
- GPUIntegerCoordinate x = 0;
- GPUIntegerCoordinate y = 0;
- };
- typedef (sequence<GPUIntegerCoordinate> or GPUOrigin2DDict) GPUOrigin2D;
- dictionary GPUOrigin3DDict {
- GPUIntegerCoordinate x = 0;
- GPUIntegerCoordinate y = 0;
- GPUIntegerCoordinate z = 0;
- };
- typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
- dictionary GPUExtent3DDict {
- required GPUIntegerCoordinate width;
- GPUIntegerCoordinate height = 1;
- GPUIntegerCoordinate depthOrArrayLayers = 1;
- };
- typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
-
- /* ---------------------- WebrtcGlobalInformation ----------------------------- */
- /* ./webidl/WebrtcGlobalInformation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- dictionary WebrtcGlobalStatisticsReport {
- sequence<RTCStatsReportInternal> reports = [];
- sequence<RTCSdpHistoryInternal> sdpHistories = [];
- };
- dictionary WebrtcGlobalMediaContext {
- required boolean hasH264Hardware;
- };
- callback WebrtcGlobalStatisticsCallback = undefined (WebrtcGlobalStatisticsReport reports);
- callback WebrtcGlobalStatisticsHistoryPcIdsCallback = undefined (sequence<DOMString> pcIds);
- callback WebrtcGlobalStatisticsHistoryCallback = undefined (WebrtcGlobalStatisticsReport reports);
- callback WebrtcGlobalLoggingCallback = undefined (sequence<DOMString> logMessages);
- [ChromeOnly, Exposed=Window]
- namespace WebrtcGlobalInformation {
- [Throws]
- undefined getAllStats(WebrtcGlobalStatisticsCallback callback,
- optional DOMString pcIdFilter);
- [Throws]
- undefined getStatsHistoryPcIds(WebrtcGlobalStatisticsHistoryPcIdsCallback callback);
- [Throws]
- undefined getStatsHistorySince(WebrtcGlobalStatisticsHistoryCallback callback,
- DOMString pcIdFilter,
- optional DOMHighResTimeStamp after,
- optional DOMHighResTimeStamp sdpAfter);
- WebrtcGlobalMediaContext getMediaContext();
- undefined clearAllStats();
- [Throws]
- undefined getLogging(DOMString pattern, WebrtcGlobalLoggingCallback callback);
- undefined clearLogging();
- // WebRTC AEC debugging enable
- attribute boolean aecDebug;
- readonly attribute DOMString aecDebugLogDir;
- };
-
- /* ---------------------- WebSocket ----------------------------- */
- /* ./webidl/WebSocket.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/html/#network
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA.
- * You are granted a license to use, reproduce and create derivative works of this document.
- */
- enum BinaryType { "blob", "arraybuffer" };
- [Exposed=(Window,Worker)]
- interface WebSocket : EventTarget {
- [Throws]
- constructor(DOMString url, optional (DOMString or sequence<DOMString>) protocols = []);
- readonly attribute DOMString url;
- // ready state
- const unsigned short CONNECTING = 0;
- const unsigned short OPEN = 1;
- const unsigned short CLOSING = 2;
- const unsigned short CLOSED = 3;
- readonly attribute unsigned short readyState;
- readonly attribute unsigned long long bufferedAmount;
- // networking
- attribute EventHandler onopen;
- attribute EventHandler onerror;
- attribute EventHandler onclose;
- readonly attribute DOMString extensions;
- readonly attribute DOMString protocol;
- [Throws]
- undefined close(optional [Clamp] unsigned short code, optional DOMString reason);
- // messaging
- attribute EventHandler onmessage;
- attribute BinaryType binaryType;
- [Throws]
- undefined send(DOMString data);
- [Throws]
- undefined send(Blob data);
- [Throws]
- undefined send(ArrayBuffer data);
- [Throws]
- undefined send(ArrayBufferView data);
- };
- // Support for creating server-side chrome-only WebSocket. Used in
- // devtools remote debugging server.
- interface nsITransportProvider;
- partial interface WebSocket {
- [ChromeOnly, NewObject, Throws]
- static WebSocket createServerWebSocket(DOMString url,
- sequence<DOMString> protocols,
- nsITransportProvider transportProvider,
- DOMString negotiatedExtensions);
- };
-
- /* ---------------------- WebTaskScheduling ----------------------------- */
- /* ./webidl/WebTaskScheduling.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
- enum TaskPriority {
- "user-blocking",
- "user-visible",
- "background"
- };
- [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
- interface TaskSignal : AbortSignal {
- readonly attribute TaskPriority priority;
- attribute EventHandler onprioritychange;
- };
- dictionary SchedulerPostTaskOptions {
- AbortSignal signal;
- TaskPriority priority;
- [EnforceRange] unsigned long long delay = 0;
- };
- callback SchedulerPostTaskCallback = any ();
- [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
- interface Scheduler {
- [UseCounter]
- Promise<any> postTask(
- SchedulerPostTaskCallback callback,
- optional SchedulerPostTaskOptions options = {}
- );
- };
- dictionary TaskControllerInit {
- TaskPriority priority = "user-visible";
- };
- [Exposed=(Window,Worker), Pref="dom.enable_web_task_scheduling"]
- interface TaskController : AbortController {
- [Throws]
- constructor(optional TaskControllerInit init = {});
- [Throws]
- undefined setPriority(TaskPriority priority);
- };
-
- /* ---------------------- WebTransport ----------------------------- */
- /* ./webidl/WebTransport.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* https://w3c.github.io/webtransport */
- /* https://w3c.github.io/webtransport/#web-transport-configuration */
- dictionary WebTransportHash {
- DOMString algorithm;
- BufferSource value;
- };
- dictionary WebTransportOptions {
- boolean allowPooling = false;
- boolean requireUnreliable = false;
- sequence<WebTransportHash> serverCertificateHashes;
- WebTransportCongestionControl congestionControl = "default";
- };
- enum WebTransportCongestionControl {
- "default",
- "throughput",
- "low-latency",
- };
- /* https://w3c.github.io/webtransport/#web-transport-close-info */
- dictionary WebTransportCloseInfo {
- unsigned long closeCode = 0;
- UTF8String reason = "";
- };
- /* https://w3c.github.io/webtransport/#uni-stream-options */
- dictionary WebTransportSendStreamOptions {
- long long? sendOrder = null;
- };
- /* https://w3c.github.io/webtransport/#web-transport-stats */
- dictionary WebTransportStats {
- DOMHighResTimeStamp timestamp;
- unsigned long long bytesSent;
- unsigned long long packetsSent;
- unsigned long long packetsLost;
- unsigned long numOutgoingStreamsCreated;
- unsigned long numIncomingStreamsCreated;
- unsigned long long bytesReceived;
- unsigned long long packetsReceived;
- DOMHighResTimeStamp smoothedRtt;
- DOMHighResTimeStamp rttVariation;
- DOMHighResTimeStamp minRtt;
- WebTransportDatagramStats datagrams;
- };
- /* https://w3c.github.io/webtransport/#web-transport-stats%E2%91%A0 */
- dictionary WebTransportDatagramStats {
- DOMHighResTimeStamp timestamp;
- unsigned long long expiredOutgoing;
- unsigned long long droppedIncoming;
- unsigned long long lostOutgoing;
- };
- /* https://w3c.github.io/webtransport/#web-transport */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
- interface WebTransport {
- [Throws]
- constructor(USVString url, optional WebTransportOptions options = {});
- [NewObject]
- Promise<WebTransportStats> getStats();
- readonly attribute Promise<undefined> ready;
- readonly attribute WebTransportReliabilityMode reliability;
- readonly attribute WebTransportCongestionControl congestionControl;
- readonly attribute Promise<WebTransportCloseInfo> closed;
- [Throws] undefined close(optional WebTransportCloseInfo closeInfo = {});
- [Throws] readonly attribute WebTransportDatagramDuplexStream datagrams;
- [NewObject]
- Promise<WebTransportBidirectionalStream> createBidirectionalStream(
- optional WebTransportSendStreamOptions options = {});
- /* a ReadableStream of WebTransportBidirectionalStream objects */
- readonly attribute ReadableStream incomingBidirectionalStreams;
- /* XXX spec says this should be WebTransportSendStream */
- [NewObject]
- Promise<WritableStream> createUnidirectionalStream(
- optional WebTransportSendStreamOptions options = {});
- /* a ReadableStream of WebTransportReceiveStream objects */
- readonly attribute ReadableStream incomingUnidirectionalStreams;
- };
- enum WebTransportReliabilityMode {
- "pending",
- "reliable-only",
- "supports-unreliable",
- };
-
- /* ---------------------- WebTransportDatagramDuplexStream ----------------------------- */
- /* ./webidl/WebTransportDatagramDuplexStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* https://w3c.github.io/webtransport/#duplex-stream */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.datagrams.enabled"]
- interface WebTransportDatagramDuplexStream {
- readonly attribute ReadableStream readable;
- readonly attribute WritableStream writable;
- readonly attribute unsigned long maxDatagramSize;
- [Throws] attribute unrestricted double incomingMaxAge;
- [Throws] attribute unrestricted double outgoingMaxAge;
- [Throws] attribute unrestricted double incomingHighWaterMark;
- [Throws] attribute unrestricted double outgoingHighWaterMark;
- };
-
- /* ---------------------- WebTransportError ----------------------------- */
- /* ./webidl/WebTransportError.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* https://w3c.github.io/webtransport/#web-transport-error-interface */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
- interface WebTransportError : DOMException {
- constructor(optional WebTransportErrorInit init = {});
- readonly attribute WebTransportErrorSource source;
- readonly attribute octet? streamErrorCode;
- };
- dictionary WebTransportErrorInit {
- [Clamp] octet streamErrorCode;
- DOMString message;
- };
- enum WebTransportErrorSource {
- "stream",
- "session",
- };
-
- /* ---------------------- WebTransportSendReceiveStream ----------------------------- */
- /* ./webidl/WebTransportSendReceiveStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- /* https://w3c.github.io/webtransport/#send-stream */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
- interface WebTransportSendStream : WritableStream {
- attribute long long? sendOrder;
- Promise<WebTransportSendStreamStats> getStats();
- };
- /* https://w3c.github.io/webtransport/#send-stream-stats */
- dictionary WebTransportSendStreamStats {
- DOMHighResTimeStamp timestamp;
- unsigned long long bytesWritten;
- unsigned long long bytesSent;
- unsigned long long bytesAcknowledged;
- };
- /* https://w3c.github.io/webtransport/#receive-stream */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
- interface WebTransportReceiveStream : ReadableStream {
- Promise<WebTransportReceiveStreamStats> getStats();
- };
- /* https://w3c.github.io/webtransport/#receive-stream-stats */
- dictionary WebTransportReceiveStreamStats {
- DOMHighResTimeStamp timestamp;
- unsigned long long bytesReceived;
- unsigned long long bytesRead;
- };
- /* https://w3c.github.io/webtransport/#bidirectional-stream */
- [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
- interface WebTransportBidirectionalStream {
- readonly attribute WebTransportReceiveStream readable;
- readonly attribute WebTransportSendStream writable;
- };
-
- /* ---------------------- WebXR ----------------------------- */
- /* ./webidl/WebXR.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webxr/
- */
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRSystem : EventTarget {
- // Methods
- [NewObject]
- Promise<boolean> isSessionSupported(XRSessionMode mode);
- [NewObject, NeedsCallerType]
- Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit options = {});
- // Events
- attribute EventHandler ondevicechange;
- };
- enum XRSessionMode {
- "inline",
- "immersive-vr",
- "immersive-ar",
- };
- dictionary XRSessionInit {
- sequence<DOMString> requiredFeatures;
- sequence<DOMString> optionalFeatures;
- };
- enum XRVisibilityState {
- "visible",
- "visible-blurred",
- "hidden",
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRSession : EventTarget {
- // Attributes
- readonly attribute XRVisibilityState visibilityState;
- [SameObject] readonly attribute XRRenderState renderState;
- [SameObject] readonly attribute XRInputSourceArray inputSources;
- readonly attribute float? frameRate;
- readonly attribute Float32Array? supportedFrameRates;
- // Methods
- [Throws]
- undefined updateRenderState(optional XRRenderStateInit state = {});
- [NewObject]
- Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
- [NewObject]
- Promise<undefined> updateTargetFrameRate(float rate);
- [Throws]
- long requestAnimationFrame(XRFrameRequestCallback callback);
- [Throws]
- undefined cancelAnimationFrame(long handle);
- [NewObject]
- Promise<undefined> end();
- // Events
- attribute EventHandler onend;
- attribute EventHandler oninputsourceschange;
- attribute EventHandler onselect;
- attribute EventHandler onselectstart;
- attribute EventHandler onselectend;
- attribute EventHandler onsqueeze;
- attribute EventHandler onsqueezestart;
- attribute EventHandler onsqueezeend;
- attribute EventHandler onvisibilitychange;
- };
- dictionary XRRenderStateInit {
- double depthNear;
- double depthFar;
- double inlineVerticalFieldOfView;
- XRWebGLLayer? baseLayer;
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRRenderState {
- readonly attribute double depthNear;
- readonly attribute double depthFar;
- readonly attribute double? inlineVerticalFieldOfView;
- readonly attribute XRWebGLLayer? baseLayer;
- };
- callback XRFrameRequestCallback = undefined (DOMHighResTimeStamp time, XRFrame frame);
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRFrame {
- [SameObject] readonly attribute XRSession session;
- [Throws] XRViewerPose? getViewerPose(XRReferenceSpace referenceSpace);
- [Throws] XRPose? getPose(XRSpace space, XRSpace baseSpace);
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRSpace : EventTarget {
- };
- enum XRReferenceSpaceType {
- "viewer",
- "local",
- "local-floor",
- "bounded-floor",
- "unbounded"
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRReferenceSpace : XRSpace {
- [NewObject]
- XRReferenceSpace getOffsetReferenceSpace(XRRigidTransform originOffset);
- attribute EventHandler onreset;
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRBoundedReferenceSpace : XRReferenceSpace {
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Frozen, Cached, Pure]
- readonly attribute sequence<DOMPointReadOnly> boundsGeometry;
- };
- enum XREye {
- "none",
- "left",
- "right"
- };
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRView {
- readonly attribute XREye eye;
- [Throws]
- readonly attribute Float32Array projectionMatrix;
- [Throws, SameObject]
- readonly attribute XRRigidTransform transform;
- };
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRViewport {
- readonly attribute long x;
- readonly attribute long y;
- readonly attribute long width;
- readonly attribute long height;
- };
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRRigidTransform {
- [Throws]
- constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {});
- [SameObject] readonly attribute DOMPointReadOnly position;
- [SameObject] readonly attribute DOMPointReadOnly orientation;
- [Throws]
- readonly attribute Float32Array matrix;
- [SameObject] readonly attribute XRRigidTransform inverse;
- };
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRPose {
- [SameObject] readonly attribute XRRigidTransform transform;
- readonly attribute boolean emulatedPosition;
- };
- [ProbablyShortLivingWrapper, Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRViewerPose : XRPose {
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Constant, Cached, Frozen]
- readonly attribute sequence<XRView> views;
- };
- enum XRHandedness {
- "none",
- "left",
- "right"
- };
- enum XRTargetRayMode {
- "gaze",
- "tracked-pointer",
- "screen"
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRInputSource {
- readonly attribute XRHandedness handedness;
- readonly attribute XRTargetRayMode targetRayMode;
- [SameObject] readonly attribute XRSpace targetRaySpace;
- [SameObject] readonly attribute XRSpace? gripSpace;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Constant, Cached, Frozen]
- readonly attribute sequence<DOMString> profiles;
- // https://immersive-web.github.io/webxr-gamepads-module/
- [SameObject] readonly attribute Gamepad? gamepad;
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRInputSourceArray {
- iterable<XRInputSource>;
- readonly attribute unsigned long length;
- getter XRInputSource(unsigned long index);
- };
- typedef (WebGLRenderingContext or
- WebGL2RenderingContext) XRWebGLRenderingContext;
- dictionary XRWebGLLayerInit {
- boolean antialias = true;
- boolean depth = true;
- boolean stencil = false;
- boolean alpha = true;
- boolean ignoreDepthValues = false;
- double framebufferScaleFactor = 1.0;
- };
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRWebGLLayer {
- [Throws]
- constructor(XRSession session,
- XRWebGLRenderingContext context,
- optional XRWebGLLayerInit layerInit = {});
- // Attributes
- readonly attribute boolean antialias;
- readonly attribute boolean ignoreDepthValues;
- [SameObject] readonly attribute WebGLFramebuffer? framebuffer;
- readonly attribute unsigned long framebufferWidth;
- readonly attribute unsigned long framebufferHeight;
- // Methods
- XRViewport? getViewport(XRView view);
- // Static Methods
- static double getNativeFramebufferScaleFactor(XRSession session);
- };
-
- /* ---------------------- WheelEvent ----------------------------- */
- /* ./webidl/WheelEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * For more information on this interface please see
- * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=Window]
- interface WheelEvent : MouseEvent
- {
- constructor(DOMString type, optional WheelEventInit eventInitDict = {});
- const unsigned long DOM_DELTA_PIXEL = 0x00;
- const unsigned long DOM_DELTA_LINE = 0x01;
- const unsigned long DOM_DELTA_PAGE = 0x02;
- // Legacy MouseWheelEvent API replaced by standard WheelEvent API.
- [NeedsCallerType]
- readonly attribute long wheelDeltaX;
- [NeedsCallerType]
- readonly attribute long wheelDeltaY;
- [NeedsCallerType]
- readonly attribute long wheelDelta;
- [NeedsCallerType] readonly attribute double deltaX;
- [NeedsCallerType] readonly attribute double deltaY;
- [NeedsCallerType] readonly attribute double deltaZ;
- [NeedsCallerType] readonly attribute unsigned long deltaMode;
- };
- dictionary WheelEventInit : MouseEventInit
- {
- double deltaX = 0;
- double deltaY = 0;
- double deltaZ = 0;
- unsigned long deltaMode = 0;
- };
-
- /* ---------------------- Window ----------------------------- */
- /* ./webidl/Window.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * http://www.whatwg.org/specs/web-apps/current-work/
- * https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
- * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
- * http://dev.w3.org/csswg/cssom/
- * http://dev.w3.org/csswg/cssom-view/
- * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
- * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
- * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
- * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
- * https://w3c.github.io/requestidlecallback/
- * https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
- * https://wicg.github.io/visual-viewport/#the-visualviewport-interface
- */
- interface Principal;
- interface nsIBrowserDOMWindow;
- interface XULControllers;
- interface nsIDOMWindowUtils;
- interface nsIPrintSettings;
- // http://www.whatwg.org/specs/web-apps/current-work/
- [Global, LegacyUnenumerableNamedProperties, NeedResolve,
- Exposed=Window,
- InstrumentedProps=(AbsoluteOrientationSensor,
- Accelerometer,
- BackgroundFetchManager,
- BackgroundFetchRecord,
- BackgroundFetchRegistration,
- BeforeInstallPromptEvent,
- Bluetooth,
- BluetoothCharacteristicProperties,
- BluetoothDevice,
- BluetoothRemoteGATTCharacteristic,
- BluetoothRemoteGATTDescriptor,
- BluetoothRemoteGATTServer,
- BluetoothRemoteGATTService,
- BluetoothUUID,
- CanvasCaptureMediaStreamTrack,
- chrome,
- ClipboardItem,
- CSSImageValue,
- CSSKeywordValue,
- CSSMathClamp,
- CSSMathInvert,
- CSSMathMax,
- CSSMathMin,
- CSSMathNegate,
- CSSMathProduct,
- CSSMathSum,
- CSSMathValue,
- CSSMatrixComponent,
- CSSNumericArray,
- CSSNumericValue,
- CSSPerspective,
- CSSPositionValue,
- CSSPropertyRule,
- CSSRotate,
- CSSScale,
- CSSSkew,
- CSSSkewX,
- CSSSkewY,
- CSSStyleValue,
- CSSTransformComponent,
- CSSTransformValue,
- CSSTranslate,
- CSSUnitValue,
- CSSUnparsedValue,
- CSSVariableReferenceValue,
- defaultStatus,
- // Unfortunately, our telemetry histogram name generator
- // (the one that generates TelemetryHistogramEnums.h) can't
- // handle two DOM methods with names that only differ in
- // case, because it forces everything to uppercase.
- //defaultstatus,
- DeviceMotionEventAcceleration,
- DeviceMotionEventRotationRate,
- DOMError,
- EncodedVideoChunk,
- EnterPictureInPictureEvent,
- External,
- FederatedCredential,
- Gyroscope,
- HTMLContentElement,
- HTMLShadowElement,
- ImageCapture,
- InputDeviceCapabilities,
- InputDeviceInfo,
- Keyboard,
- KeyboardLayoutMap,
- LinearAccelerationSensor,
- MediaSettingsRange,
- MIDIAccess,
- MIDIConnectionEvent,
- MIDIInput,
- MIDIInputMap,
- MIDIMessageEvent,
- MIDIOutput,
- MIDIOutputMap,
- MIDIPort,
- NetworkInformation,
- offscreenBuffering,
- onbeforeinstallprompt,
- oncancel,
- onmousewheel,
- onorientationchange,
- onsearch,
- onselectionchange,
- openDatabase,
- orientation,
- OrientationSensor,
- OverconstrainedError,
- PasswordCredential,
- PaymentAddress,
- PaymentInstruments,
- PaymentManager,
- PaymentMethodChangeEvent,
- PaymentRequest,
- PaymentRequestUpdateEvent,
- PaymentResponse,
- PerformanceLongTaskTiming,
- PhotoCapabilities,
- PictureInPictureEvent,
- PictureInPictureWindow,
- Presentation,
- PresentationAvailability,
- PresentationConnection,
- PresentationConnectionAvailableEvent,
- PresentationConnectionCloseEvent,
- PresentationConnectionList,
- PresentationReceiver,
- PresentationRequest,
- RelativeOrientationSensor,
- RemotePlayback,
- Report,
- ReportBody,
- ReportingObserver,
- RTCError,
- RTCErrorEvent,
- RTCIceTransport,
- RTCPeerConnectionIceErrorEvent,
- Sensor,
- SensorErrorEvent,
- SpeechRecognitionAlternative,
- SpeechRecognitionResult,
- SpeechRecognitionResultList,
- styleMedia,
- StylePropertyMap,
- StylePropertyMapReadOnly,
- SVGDiscardElement,
- SyncManager,
- TaskAttributionTiming,
- TextEvent,
- Touch,
- TouchEvent,
- TouchList,
- USB,
- USBAlternateInterface,
- USBConfiguration,
- USBConnectionEvent,
- USBDevice,
- USBEndpoint,
- USBInterface,
- USBInTransferResult,
- USBIsochronousInTransferPacket,
- USBIsochronousInTransferResult,
- USBIsochronousOutTransferPacket,
- USBIsochronousOutTransferResult,
- USBOutTransferResult,
- UserActivation,
- VideoColorSpace,
- VideoDecoder,
- VideoEncoder,
- VideoFrame,
- WakeLock,
- WakeLockSentinel,
- webkitCancelAnimationFrame,
- webkitMediaStream,
- WebKitMutationObserver,
- webkitRequestAnimationFrame,
- webkitRequestFileSystem,
- webkitResolveLocalFileSystemURL,
- webkitRTCPeerConnection,
- webkitSpeechGrammar,
- webkitSpeechGrammarList,
- webkitSpeechRecognition,
- webkitSpeechRecognitionError,
- webkitSpeechRecognitionEvent,
- webkitStorageInfo)]
- /*sealed*/ interface Window : EventTarget {
- // the current browsing context
- [LegacyUnforgeable, Constant, StoreInSlot,
- CrossOriginReadable] readonly attribute WindowProxy window;
- [Replaceable, Constant, StoreInSlot,
- CrossOriginReadable] readonly attribute WindowProxy self;
- [LegacyUnforgeable, StoreInSlot, Pure] readonly attribute Document? document;
- [Throws] attribute DOMString name;
- [PutForwards=href, LegacyUnforgeable, CrossOriginReadable,
- CrossOriginWritable] readonly attribute Location location;
- [Throws] readonly attribute History history;
- readonly attribute CustomElementRegistry customElements;
- [Replaceable, Throws] readonly attribute BarProp locationbar;
- [Replaceable, Throws] readonly attribute BarProp menubar;
- [Replaceable, Throws] readonly attribute BarProp personalbar;
- [Replaceable, Throws] readonly attribute BarProp scrollbars;
- [Replaceable, Throws] readonly attribute BarProp statusbar;
- [Replaceable, Throws] readonly attribute BarProp toolbar;
- [Throws] attribute DOMString status;
- [Throws, CrossOriginCallable, NeedsCallerType] undefined close();
- [Throws, CrossOriginReadable] readonly attribute boolean closed;
- [Throws] undefined stop();
- [Throws, CrossOriginCallable, NeedsCallerType] undefined focus();
- [Throws, CrossOriginCallable, NeedsCallerType] undefined blur();
- [Replaceable, Pref="dom.window.event.enabled"] readonly attribute (Event or undefined) event;
- // other browsing contexts
- [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy frames;
- [Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
- //[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy top;
- [LegacyUnforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
- [Throws, CrossOriginReadable] attribute any opener;
- //[Throws] readonly attribute WindowProxy parent;
- [Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy? parent;
- [Throws, NeedsSubjectPrincipal] readonly attribute Element? frameElement;
- //[Throws] WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "");
- [Throws] WindowProxy? open(optional USVString url = "", optional DOMString target = "", optional [LegacyNullToEmptyString] DOMString features = "");
- getter object (DOMString name);
- // the user agent
- readonly attribute Navigator navigator;
- [Pref="dom.window.clientinformation.enabled", BinaryName="Navigator"]
- readonly attribute Navigator clientInformation;
- [Replaceable] readonly attribute External external;
- // user prompts
- [Throws, NeedsSubjectPrincipal] undefined alert();
- [Throws, NeedsSubjectPrincipal] undefined alert(DOMString message);
- [Throws, NeedsSubjectPrincipal] boolean confirm(optional DOMString message = "");
- [Throws, NeedsSubjectPrincipal] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
- [Throws]
- undefined print();
- // Returns a window that you can use for a print preview.
- //
- // This may reuse an existing window if this window is already a print
- // preview document, or if you pass a docshell explicitly.
- [Throws, Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled"]
- WindowProxy? printPreview(optional nsIPrintSettings? settings = null,
- optional nsIWebProgressListener? listener = null,
- optional nsIDocShell? docShellToPreviewInto = null);
- [Throws, CrossOriginCallable, NeedsSubjectPrincipal,
- BinaryName="postMessageMoz"]
- undefined postMessage(any message, DOMString targetOrigin, optional sequence<object> transfer = []);
- [Throws, CrossOriginCallable, NeedsSubjectPrincipal,
- BinaryName="postMessageMoz"]
- undefined postMessage(any message, optional WindowPostMessageOptions options = {});
- // also has obsolete members
- };
- Window includes GlobalEventHandlers;
- Window includes WindowEventHandlers;
- // http://www.whatwg.org/specs/web-apps/current-work/
- interface mixin WindowSessionStorage {
- //[Throws] readonly attribute Storage sessionStorage;
- [Throws] readonly attribute Storage? sessionStorage;
- };
- Window includes WindowSessionStorage;
- // http://www.whatwg.org/specs/web-apps/current-work/
- interface mixin WindowLocalStorage {
- [Throws] readonly attribute Storage? localStorage;
- };
- Window includes WindowLocalStorage;
- // http://www.whatwg.org/specs/web-apps/current-work/
- partial interface Window {
- undefined captureEvents();
- undefined releaseEvents();
- };
- // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
- partial interface Window {
- //[Throws] Selection getSelection();
- [Throws] Selection? getSelection();
- };
- // https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
- partial interface Window {
- //[NewObject, Throws] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt = "");
- [NewObject, Throws] CSSStyleDeclaration? getComputedStyle(Element elt, optional DOMString? pseudoElt = "");
- };
- // http://dev.w3.org/csswg/cssom-view/
- enum ScrollBehavior { "auto", "instant", "smooth" };
- dictionary ScrollOptions {
- ScrollBehavior behavior = "auto";
- };
- dictionary ScrollToOptions : ScrollOptions {
- unrestricted double left;
- unrestricted double top;
- };
- partial interface Window {
- //[Throws, NewObject, NeedsCallerType] MediaQueryList matchMedia(DOMString query);
- [Throws, NewObject, NeedsCallerType] MediaQueryList? matchMedia(UTF8String query);
- [SameObject, Replaceable] readonly attribute Screen screen;
- // browsing context
- //[Throws] undefined moveTo(double x, double y);
- //[Throws] undefined moveBy(double x, double y);
- //[Throws] undefined resizeTo(double x, double y);
- //[Throws] undefined resizeBy(double x, double y);
- [Throws, NeedsCallerType] undefined moveTo(long x, long y);
- [Throws, NeedsCallerType] undefined moveBy(long x, long y);
- [Throws, NeedsCallerType] undefined resizeTo(long x, long y);
- [Throws, NeedsCallerType] undefined resizeBy(long x, long y);
- // viewport
- [Replaceable, Throws] readonly attribute double innerWidth;
- [Replaceable, Throws] readonly attribute double innerHeight;
- // viewport scrolling
- undefined scroll(unrestricted double x, unrestricted double y);
- undefined scroll(optional ScrollToOptions options = {});
- undefined scrollTo(unrestricted double x, unrestricted double y);
- undefined scrollTo(optional ScrollToOptions options = {});
- undefined scrollBy(unrestricted double x, unrestricted double y);
- undefined scrollBy(optional ScrollToOptions options = {});
- // mozScrollSnap is used by chrome to perform scroll snapping after the
- // user performs actions that may affect scroll position
- // mozScrollSnap is deprecated, to be replaced by a web accessible API, such
- // as an extension to the ScrollOptions dictionary. See bug 1137937.
- [ChromeOnly] undefined mozScrollSnap();
- // The four properties below are double per spec at the moment, but whether
- // that will continue is unclear.
- [Replaceable, Throws] readonly attribute double scrollX;
- [Replaceable, Throws] readonly attribute double pageXOffset;
- [Replaceable, Throws] readonly attribute double scrollY;
- [Replaceable, Throws] readonly attribute double pageYOffset;
- // Aliases for screenX / screenY.
- [Replaceable, Throws, NeedsCallerType] readonly attribute double screenLeft;
- [Replaceable, Throws, NeedsCallerType] readonly attribute double screenTop;
- // client
- [Replaceable, Throws, NeedsCallerType] readonly attribute double screenX;
- [Replaceable, Throws, NeedsCallerType] readonly attribute double screenY;
- [Replaceable, Throws, NeedsCallerType] readonly attribute double outerWidth;
- [Replaceable, Throws, NeedsCallerType] readonly attribute double outerHeight;
- };
- // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
- Window includes AnimationFrameProvider;
- // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
- partial interface Window {
- [Replaceable, Pure, StoreInSlot] readonly attribute Performance? performance;
- };
- // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
- Window includes GlobalCrypto;
- dictionary SizeToContentConstraints {
- long maxWidth = 0;
- long maxHeight = 0;
- long prefWidth = 0;
- };
- #ifdef MOZ_WEBSPEECH
- // http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
- interface mixin SpeechSynthesisGetter {
- [Throws, Pref="media.webspeech.synth.enabled"] readonly attribute SpeechSynthesis speechSynthesis;
- };
- Window includes SpeechSynthesisGetter;
- #endif
- // Mozilla-specific stuff
- partial interface Window {
- //[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
- [NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
- // Mozilla extensions
- /**
- * Method for scrolling this window by a number of lines.
- */
- undefined scrollByLines(long numLines, optional ScrollOptions options = {});
- /**
- * Method for scrolling this window by a number of pages.
- */
- undefined scrollByPages(long numPages, optional ScrollOptions options = {});
- // Gecko specific API that allows a web page to resize the browser window.
- // Dropping support in bug 1600400.
- [Throws, NeedsCallerType,
- Deprecated="SizeToContent",
- Func="nsGlobalWindowInner::IsSizeToContentEnabled"]
- undefined sizeToContent();
- /**
- * Chrome-only method for sizing to content with a maximum-size constraint on
- * either (or both) directions.
- */
- [Throws, ChromeOnly] undefined sizeToContentConstrained(optional SizeToContentConstraints constraints = {});
- [ChromeOnly, Replaceable, Throws] readonly attribute XULControllers controllers;
- [ChromeOnly, Throws] readonly attribute Element? realFrameElement;
- [ChromeOnly] readonly attribute nsIDocShell? docShell;
- [ChromeOnly, Constant, CrossOriginReadable, BinaryName="getBrowsingContext"]
- readonly attribute BrowsingContext browsingContext;
- [Throws, NeedsCallerType]
- readonly attribute float mozInnerScreenX;
- [Throws, NeedsCallerType]
- readonly attribute float mozInnerScreenY;
- [Replaceable, Throws, NeedsCallerType]
- readonly attribute double devicePixelRatio;
- // Allows chrome code to convert desktop pixels to device pixels and vice
- // versa. Useful for interacting with the screen manager.
- [ChromeOnly, Throws]
- readonly attribute double desktopToDeviceScale;
- // Returns the amount of CSS pixels relative to this window we're allowed to
- // go out of the screen. This is needed so that SessionRestore is able to
- // position windows that use client-side decorations correctly, but still
- // pull mispositioned windows into the screen.
- [ChromeOnly]
- readonly attribute double screenEdgeSlopX;
- [ChromeOnly]
- readonly attribute double screenEdgeSlopY;
- /* The maximum offset that the window can be scrolled to
- (i.e., the document width/height minus the scrollport width/height) */
- [ChromeOnly, Throws] readonly attribute long scrollMinX;
- [ChromeOnly, Throws] readonly attribute long scrollMinY;
- [Replaceable, Throws] readonly attribute long scrollMaxX;
- [Replaceable, Throws] readonly attribute long scrollMaxY;
- [Throws] attribute boolean fullScreen;
- undefined updateCommands(DOMString action);
- /* Find in page.
- * @param str: the search pattern
- * @param caseSensitive: is the search caseSensitive
- * @param backwards: should we search backwards
- * @param wrapAround: should we wrap the search
- * @param wholeWord: should we search only for whole words
- * @param searchInFrames: should we search through all frames
- * @param showDialog: should we show the Find dialog
- */
- [Throws] boolean find(optional DOMString str = "",
- optional boolean caseSensitive = false,
- optional boolean backwards = false,
- optional boolean wrapAround = false,
- optional boolean wholeWord = false,
- optional boolean searchInFrames = false,
- optional boolean showDialog = false);
- attribute EventHandler ondevicemotion;
- attribute EventHandler ondeviceorientation;
- attribute EventHandler ondeviceorientationabsolute;
- [Pref="device.sensors.proximity.enabled"]
- attribute EventHandler onuserproximity;
- [Pref="device.sensors.ambientLight.enabled"]
- attribute EventHandler ondevicelight;
- undefined dump(DOMString str);
- /**
- * This method is here for backwards compatibility with 4.x only,
- * its implementation is a no-op
- */
- undefined setResizable(boolean resizable);
- /**
- * This is the scriptable version of
- * nsPIDOMWindow::OpenDialog() that takes 3 optional
- * arguments, plus any additional arguments are passed on as
- * arguments on the dialog's window object (window.arguments).
- */
- [Throws, ChromeOnly] WindowProxy? openDialog(optional DOMString url = "",
- optional DOMString name = "",
- optional DOMString options = "",
- any... extraArguments);
- [ChromeOnly,
- NonEnumerable, Replaceable, Throws, NeedsCallerType]
- readonly attribute object? content;
- [Throws, ChromeOnly] any getInterface(any iid);
- /**
- * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
- */
- [ChromeOnly, Throws]
- readonly attribute WindowRoot? windowRoot;
- /**
- * ChromeOnly method to determine if a particular window should see console
- * reports from service workers of the given scope.
- */
- [ChromeOnly]
- boolean shouldReportForServiceWorkerScope(USVString aScope);
- /**
- * InstallTrigger is used for extension installs. Ideally it would
- * be something like a WebIDL namespace, but we don't support
- * JS-implemented static things yet. See bug 863952.
- */
- [Replaceable, Deprecated="InstallTriggerDeprecated", Pref="extensions.InstallTrigger.enabled"]
- readonly attribute InstallTriggerImpl? InstallTrigger;
- /**
- * Get the nsIDOMWindowUtils for this window.
- */
- [Constant, Throws, ChromeOnly]
- readonly attribute nsIDOMWindowUtils windowUtils;
- [Pure, ChromeOnly]
- readonly attribute WindowGlobalChild? windowGlobalChild;
- /**
- * The principal of the client source of the window. This is supposed to be
- * used for the service worker.
- *
- * This is used for APIs like https://w3c.github.io/push-api/ that extend
- * ServiceWorkerRegistration and therefore need to operate consistently with
- * ServiceWorkers and its Clients API. The client principal is the appropriate
- * principal to pass to all nsIServiceWorkerManager APIs.
- *
- * Note that the client principal will be different from the node principal of
- * the window's document if the window is in a third-party context when dFPI
- * is enabled. In this case, the client principal will be the partitioned
- * principal to support the service worker partitioning.
- */
- [ChromeOnly]
- readonly attribute Principal? clientPrincipal;
- /**
- * Whether the chrome window is currently in a full screen transition. This
- * flag is updated from FullscreenTransitionTask.
- * Always set to false for non-chrome windows.
- */
- [ChromeOnly]
- readonly attribute boolean isInFullScreenTransition;
- };
- Window includes TouchEventHandlers;
- Window includes OnErrorEventHandlerForWindow;
- #if defined(MOZ_WIDGET_ANDROID)
- // https://compat.spec.whatwg.org/#windoworientation-interface
- partial interface Window {
- [NeedsCallerType]
- readonly attribute short orientation;
- attribute EventHandler onorientationchange;
- };
- #endif
- [MOZ_CAN_RUN_SCRIPT_BOUNDARY]
- callback PromiseDocumentFlushedCallback = any ();
- // Mozilla extensions for Chrome windows.
- partial interface Window {
- // The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp.
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- const unsigned short STATE_MAXIMIZED = 1;
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- const unsigned short STATE_MINIMIZED = 2;
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- const unsigned short STATE_NORMAL = 3;
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- const unsigned short STATE_FULLSCREEN = 4;
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- readonly attribute unsigned short windowState;
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- readonly attribute boolean isFullyOccluded;
- /**
- * browserDOMWindow provides access to yet another layer of
- * utility functions implemented by chrome script. It will be null
- * for DOMWindows not corresponding to browsers.
- */
- [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- attribute nsIBrowserDOMWindow? browserDOMWindow;
- [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined getAttention();
- [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined getAttentionWithCycleCount(long aCycleCount);
- [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined setCursor(UTF8String cursor);
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined maximize();
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined minimize();
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined restore();
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- DOMString getWorkspaceID();
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined moveToWorkspace(DOMString workspaceID);
- /**
- * Notify a default button is loaded on a dialog or a wizard.
- * defaultButton is the default button.
- */
- [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- undefined notifyDefaultButtonLoaded(Element defaultButton);
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- readonly attribute ChromeMessageBroadcaster messageManager;
- /**
- * Returns the message manager identified by the given group name that
- * manages all frame loaders belonging to that group.
- */
- [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- ChromeMessageBroadcaster getGroupMessageManager(DOMString aGroup);
- /**
- * Calls the given function as soon as a style or layout flush for the
- * top-level document is not necessary, and returns a Promise which
- * resolves to the callback's return value after it executes.
- *
- * In the event that the window goes away before a flush can occur, the
- * callback will still be called and the Promise resolved as the window
- * tears itself down.
- *
- * The callback _must not modify the DOM for any window in any way_. If it
- * does, after finishing executing, the Promise returned by
- * promiseDocumentFlushed will reject with
- * NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR.
- *
- * Note that the callback can be called either synchronously or asynchronously
- * depending on whether or not flushes are pending:
- *
- * The callback will be called synchronously when calling
- * promiseDocumentFlushed when NO flushes are already pending. This is
- * to ensure that no script has a chance to dirty the DOM before the callback
- * is called.
- *
- * The callback will be called asynchronously if a flush is pending.
- *
- * The expected execution order is that all pending callbacks will
- * be fired first (and in the order that they were queued) and then the
- * Promise resolution handlers will all be invoked later on during the
- * next microtask checkpoint.
- *
- * Using window.top.promiseDocumentFlushed in combination with a callback
- * that is querying items in a window that might be swapped out via
- * nsFrameLoader::SwapWithOtherLoader is highly discouraged. For example:
- *
- * let result = await window.top.promiseDocumentFlushed(() => {
- * return window.document.body.getBoundingClientRect();
- * });
- *
- * If "window" might get swapped out via nsFrameLoader::SwapWithOtherLoader
- * at any time, then the callback might get called when the new host window
- * will still incur layout flushes, since it's only the original host window
- * that's being monitored via window.top.promiseDocumentFlushed.
- *
- * See bug 1519407 for further details.
- *
- * promiseDocumentFlushed does not support re-entrancy - so calling it from
- * within a promiseDocumentFlushed callback will result in the inner call
- * throwing an NS_ERROR_FAILURE exception, and the outer Promise rejecting
- * with that exception.
- *
- * The callback function *must not make any changes which would require
- * a style or layout flush*.
- *
- * Also throws NS_ERROR_FAILURE if the window is not in a state where flushes
- * can be waited for (for example, the PresShell has not yet been created).
- *
- * @param {function} callback
- * @returns {Promise}
- */
- [NewObject, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"]
- Promise<any> promiseDocumentFlushed(PromiseDocumentFlushedCallback callback);
- [Func="IsChromeOrUAWidget"]
- readonly attribute boolean isChromeWindow;
- [Func="nsGlobalWindowInner::IsGleanNeeded"]
- readonly attribute GleanImpl Glean;
- [Func="nsGlobalWindowInner::IsGleanNeeded"]
- readonly attribute GleanPingsImpl GleanPings;
- };
- partial interface Window {
- [Pref="dom.vr.enabled"]
- attribute EventHandler onvrdisplayconnect;
- [Pref="dom.vr.enabled"]
- attribute EventHandler onvrdisplaydisconnect;
- [Pref="dom.vr.enabled"]
- attribute EventHandler onvrdisplayactivate;
- [Pref="dom.vr.enabled"]
- attribute EventHandler onvrdisplaydeactivate;
- [Pref="dom.vr.enabled"]
- attribute EventHandler onvrdisplaypresentchange;
- };
- #ifndef RELEASE_OR_BETA
- // https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
- partial interface Window {
- [Pref="dom.paintWorklet.enabled", Throws]
- readonly attribute Worklet paintWorklet;
- };
- #endif
- Window includes WindowOrWorkerGlobalScope;
- partial interface Window {
- [Throws]
- unsigned long requestIdleCallback(IdleRequestCallback callback,
- optional IdleRequestOptions options = {});
- undefined cancelIdleCallback(unsigned long handle);
- };
- dictionary IdleRequestOptions {
- unsigned long timeout;
- };
- callback IdleRequestCallback = undefined (IdleDeadline deadline);
- partial interface Window {
- /**
- * Returns a list of locales that the internationalization components
- * should be localized to.
- *
- * The function name refers to Regional Preferences which can be either
- * fetched from the internal internationalization database (CLDR), or
- * from the host environment.
- *
- * The result is a sorted list of valid locale IDs and it should be
- * used for all APIs that accept list of locales, like ECMA402 and L10n APIs.
- *
- * This API always returns at least one locale.
- *
- * Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"]
- */
- [Func="IsChromeOrUAWidget"]
- sequence<DOMString> getRegionalPrefsLocales();
- /**
- * Returns a list of locales that the web content would know from the user.
- *
- * One of the fingerprinting technique is to recognize users from their locales
- * exposed to web content. For those components that would be fingerprintable
- * from the locale should call this API instead of |getRegionalPrefsLocales()|.
- *
- * If the pref is set to spoof locale setting, this function will return the
- * spoofed locale, otherwise it returns what |getRegionalPrefsLocales()| returns.
- *
- * This API always returns at least one locale.
- *
- * Example: ["en-US"]
- */
- [Func="IsChromeOrUAWidget"]
- sequence<DOMString> getWebExposedLocales();
- /**
- * Getter funcion for IntlUtils, which provides helper functions for
- * localization.
- */
- [Throws, Func="IsChromeOrUAWidget"]
- readonly attribute IntlUtils intlUtils;
- };
- partial interface Window {
- [SameObject, Replaceable]
- readonly attribute VisualViewport visualViewport;
- };
- // Used to assign marks to appear on the scrollbar when
- // finding on a page.
- partial interface Window {
- // The marks are values between 0 and scrollMax{X,Y} - scrollMin{X,Y}.
- [ChromeOnly]
- undefined setScrollMarks(sequence<unsigned long> marks,
- optional boolean onHorizontalScrollbar = false);
- };
- dictionary WindowPostMessageOptions : StructuredSerializeOptions {
- USVString targetOrigin = "/";
- };
-
- /* ---------------------- WindowOrWorkerGlobalScope ----------------------------- */
- /* ./webidl/WindowOrWorkerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
- * https://fetch.spec.whatwg.org/#fetch-method
- * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
- * https://w3c.github.io/ServiceWorker/#self-caches
- */
- // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
- [Exposed=(Window,Worker)]
- interface mixin WindowOrWorkerGlobalScope {
- [Replaceable] readonly attribute USVString origin;
- readonly attribute boolean crossOriginIsolated;
- [Throws, NeedsCallerType]
- undefined reportError(any e);
- // base64 utility methods
- [Throws]
- DOMString btoa(DOMString btoa);
- [Throws]
- DOMString atob(DOMString atob);
- // timers
- // NOTE: We're using overloads where the spec uses a union. Should
- // be black-box the same.
- [Throws]
- long setTimeout(Function handler, optional long timeout = 0, any... arguments);
- [Throws]
- long setTimeout(DOMString handler, optional long timeout = 0, any... unused);
- undefined clearTimeout(optional long handle = 0);
- [Throws]
- long setInterval(Function handler, optional long timeout = 0, any... arguments);
- [Throws]
- long setInterval(DOMString handler, optional long timeout = 0, any... unused);
- undefined clearInterval(optional long handle = 0);
- // microtask queuing
- undefined queueMicrotask(VoidFunction callback);
- // ImageBitmap
- [Throws]
- Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage,
- optional ImageBitmapOptions aOptions = {});
- [Throws]
- Promise<ImageBitmap> createImageBitmap(ImageBitmapSource aImage,
- long aSx, long aSy, long aSw, long aSh,
- optional ImageBitmapOptions aOptions = {});
- // structured cloning
- [Throws]
- any structuredClone(any value, optional StructuredSerializeOptions options = {});
- };
- // https://fetch.spec.whatwg.org/#fetch-method
- partial interface mixin WindowOrWorkerGlobalScope {
- [NewObject, NeedsCallerType]
- Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
- };
- // https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
- partial interface mixin WindowOrWorkerGlobalScope {
- readonly attribute boolean isSecureContext;
- };
- // http://w3c.github.io/IndexedDB/#factory-interface
- partial interface mixin WindowOrWorkerGlobalScope {
- // readonly attribute IDBFactory indexedDB; // bug 1776789
- [Throws]
- readonly attribute IDBFactory? indexedDB;
- };
- // https://w3c.github.io/ServiceWorker/#self-caches
- partial interface mixin WindowOrWorkerGlobalScope {
- [Throws, Func="nsGlobalWindowInner::CachesEnabled", SameObject]
- readonly attribute CacheStorage caches;
- };
- // https://wicg.github.io/scheduling-apis/#ref-for-windoworworkerglobalscope-scheduler
- partial interface mixin WindowOrWorkerGlobalScope {
- [Replaceable, Pref="dom.enable_web_task_scheduling", SameObject]
- readonly attribute Scheduler scheduler;
- };
- // https://w3c.github.io/trusted-types/dist/spec/#extensions-to-the-windoworworkerglobalscope-interface
- partial interface mixin WindowOrWorkerGlobalScope {
- [Pref="dom.security.trusted_types.enabled"]
- readonly attribute TrustedTypePolicyFactory trustedTypes;
- };
-
- /* ---------------------- Worker ----------------------------- */
- /* ./webidl/Worker.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/workers.html
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
- * Software ASA.
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface Worker : EventTarget {
- [Throws]
- constructor(USVString scriptURL, optional WorkerOptions options = {});
- undefined terminate();
- [Throws]
- undefined postMessage(any message, sequence<object> transfer);
- [Throws]
- undefined postMessage(any message, optional StructuredSerializeOptions aOptions = {});
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- };
- Worker includes AbstractWorker;
- dictionary WorkerOptions {
- [Pref="dom.workers.modules.enabled"]
- WorkerType type = "classic";
- [Pref="dom.workers.modules.enabled"]
- RequestCredentials credentials = "same-origin"; // credentials is only used if type is "module"
- DOMString name = "";
- };
- enum WorkerType { "classic", "module" };
- [Func="mozilla::dom::ChromeWorker::WorkerAvailable",
- Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface ChromeWorker : Worker {
- [Throws]
- constructor(USVString scriptURL, optional WorkerOptions options = {});
- };
-
- /* ---------------------- WorkerDebuggerGlobalScope ----------------------------- */
- /* ./webidl/WorkerDebuggerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Global=(WorkerDebugger), Exposed=WorkerDebugger]
- interface WorkerDebuggerGlobalScope : EventTarget {
- [Throws]
- readonly attribute object global;
- [Throws]
- object createSandbox(DOMString name, object prototype);
- [Throws]
- undefined loadSubScript(DOMString url, optional object sandbox);
- undefined enterEventLoop();
- undefined leaveEventLoop();
- undefined postMessage(DOMString message);
- attribute EventHandler onmessage;
- attribute EventHandler onmessageerror;
- [Throws]
- undefined setImmediate(Function handler);
- undefined reportError(DOMString message);
- [Throws]
- sequence<any> retrieveConsoleEvents();
- [Throws]
- undefined setConsoleEventHandler(AnyCallback? handler);
- [Throws]
- undefined clearConsoleEvents();
- // base64 utility methods
- [Throws]
- DOMString btoa(DOMString btoa);
- [Throws]
- DOMString atob(DOMString atob);
- };
- // So you can debug while you debug
- partial interface WorkerDebuggerGlobalScope {
- undefined dump(optional DOMString string);
- };
-
- /* ---------------------- WorkerGlobalScope ----------------------------- */
- /* ./webidl/WorkerGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
- * Software ASA.
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Exposed=(Worker)]
- interface WorkerGlobalScope : EventTarget {
- [Constant, Cached]
- readonly attribute WorkerGlobalScope self;
- readonly attribute WorkerLocation location;
- readonly attribute WorkerNavigator navigator;
- [Throws]
- undefined importScripts(DOMString... urls);
- attribute OnErrorEventHandler onerror;
- attribute EventHandler onlanguagechange;
- attribute EventHandler onoffline;
- attribute EventHandler ononline;
- attribute EventHandler onrejectionhandled;
- attribute EventHandler onunhandledrejection;
- // also has additional members in a partial interface
- };
- WorkerGlobalScope includes GlobalCrypto;
- WorkerGlobalScope includes FontFaceSource;
- WorkerGlobalScope includes WindowOrWorkerGlobalScope;
- // Mozilla extensions
- partial interface WorkerGlobalScope {
- undefined dump(optional DOMString str);
- // https://w3c.github.io/hr-time/#the-performance-attribute
- [Constant, Cached, Replaceable, BinaryName="getPerformance"]
- readonly attribute Performance performance;
- [Func="WorkerGlobalScope::IsInAutomation", Throws]
- object getJSTestingFunctions();
- };
-
- /* ---------------------- WorkerLocation ----------------------------- */
- /* ./webidl/WorkerLocation.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://html.spec.whatwg.org/multipage/workers.html#worker-locations
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
- * Software ASA.
- * You are granted a license to use, reproduce and create derivative works of
- * this document.
- */
- [Exposed=Worker]
- interface WorkerLocation {
- stringifier readonly attribute USVString href;
- readonly attribute USVString origin;
- readonly attribute USVString protocol;
- readonly attribute USVString host;
- readonly attribute USVString hostname;
- readonly attribute USVString port;
- readonly attribute USVString pathname;
- readonly attribute USVString search;
- readonly attribute USVString hash;
- };
-
- /* ---------------------- WorkerNavigator ----------------------------- */
- /* ./webidl/WorkerNavigator.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Exposed=Worker,
- InstrumentedProps=(permissions)]
- interface WorkerNavigator {
- };
- WorkerNavigator includes NavigatorID;
- WorkerNavigator includes NavigatorLanguage;
- WorkerNavigator includes NavigatorOnLine;
- WorkerNavigator includes NavigatorConcurrentHardware;
- WorkerNavigator includes NavigatorStorage;
- WorkerNavigator includes GlobalPrivacyControl;
- // http://wicg.github.io/netinfo/#extensions-to-the-navigator-interface
- [Exposed=Worker]
- partial interface WorkerNavigator {
- [Pref="dom.netinfo.enabled", Throws]
- readonly attribute NetworkInformation connection;
- };
- // https://wicg.github.io/media-capabilities/#idl-index
- [Exposed=Worker]
- partial interface WorkerNavigator {
- [SameObject, Func="mozilla::dom::MediaCapabilities::Enabled"]
- readonly attribute MediaCapabilities mediaCapabilities;
- };
- // https://w3c.github.io/web-locks/#navigator-mixins
- WorkerNavigator includes NavigatorLocks;
- // https://gpuweb.github.io/gpuweb/#navigator-gpu
- WorkerNavigator includes NavigatorGPU;
-
- /* ---------------------- WorkerTestUtils ----------------------------- */
- /* ./webidl/WorkerTestUtils.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- [Exposed=Worker, Pref="dom.workers.testing.enabled"]
- namespace WorkerTestUtils {
- [Throws]
- unsigned long currentTimerNestingLevel();
- };
-
- /* ---------------------- Worklet ----------------------------- */
- /* ./webidl/Worklet.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.css-houdini.org/worklets/#idl-index
- */
- [SecureContext, Exposed=Window]
- interface Worklet {
- [NewObject, Throws, NeedsCallerType]
- Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {});
- };
- dictionary WorkletOptions {
- RequestCredentials credentials = "same-origin";
- };
-
- /* ---------------------- WorkletGlobalScope ----------------------------- */
- /* ./webidl/WorkletGlobalScope.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.css-houdini.org/worklets/#idl-index
- */
- [Exposed=Worklet]
- interface WorkletGlobalScope {
- };
- // Mozilla extensions
- partial interface WorkletGlobalScope {
- undefined dump(optional DOMString str);
- };
-
- /* ---------------------- WritableStream ----------------------------- */
- /* ./webidl/WritableStream.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#ws-class-definition
- */
- [Exposed=*] // [Transferable] - See Bug 1562065
- interface WritableStream {
- [Throws]
- constructor(optional object underlyingSink, optional QueuingStrategy strategy = {});
- readonly attribute boolean locked;
- [Throws]
- Promise<undefined> abort(optional any reason);
- [NewObject]
- Promise<undefined> close();
- [Throws]
- WritableStreamDefaultWriter getWriter();
- };
-
- /* ---------------------- WritableStreamDefaultController ----------------------------- */
- /* ./webidl/WritableStreamDefaultController.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#ws-default-controller-class-definition
- */
- [Exposed=*]
- interface WritableStreamDefaultController {
- readonly attribute AbortSignal signal;
- [Throws]
- undefined error(optional any e);
- };
-
- /* ---------------------- WritableStreamDefaultWriter ----------------------------- */
- /* ./webidl/WritableStreamDefaultWriter.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://streams.spec.whatwg.org/#default-writer-class-definition
- */
- [Exposed=*]
- interface WritableStreamDefaultWriter {
- [Throws]
- constructor(WritableStream stream);
- readonly attribute Promise<undefined> closed;
- [Throws] readonly attribute unrestricted double? desiredSize;
- readonly attribute Promise<undefined> ready;
- [Throws]
- Promise<undefined> abort(optional any reason);
- [NewObject]
- Promise<undefined> close();
- undefined releaseLock();
- [NewObject]
- Promise<undefined> write(optional any chunk);
- };
-
- /* ---------------------- XMLDocument ----------------------------- */
- /* ./webidl/XMLDocument.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is:
- * http://dom.spec.whatwg.org/#xmldocument
- */
- // http://dom.spec.whatwg.org/#xmldocument
- [Exposed=Window]
- interface XMLDocument : Document {};
-
- /* ---------------------- XMLHttpRequest ----------------------------- */
- /* ./webidl/XMLHttpRequest.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://xhr.spec.whatwg.org/#interface-xmlhttprequest
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- interface InputStream;
- interface MozChannel;
- enum XMLHttpRequestResponseType {
- "",
- "arraybuffer",
- "blob",
- "document",
- "json",
- "text",
- };
- /**
- * Parameters for instantiating an XMLHttpRequest. They are passed as an
- * optional argument to the constructor:
- *
- * new XMLHttpRequest({anon: true, system: true});
- */
- dictionary MozXMLHttpRequestParameters
- {
- /**
- * If true, the request will be sent without cookie and authentication
- * headers. Defaults to true for system/privileged/chrome requests,
- * and to false otherwise.
- * Note that even if set to true, for system/privileged/chrome requests,
- * manually-set 'Cookie' headers are not removed.
- */
- boolean mozAnon;
- /**
- * If true, the same origin policy will not be enforced on the request.
- */
- boolean mozSystem = false;
- };
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface XMLHttpRequest : XMLHttpRequestEventTarget {
- [Throws]
- constructor(optional MozXMLHttpRequestParameters params = {});
- // There are apparently callers, specifically CoffeeScript, who do
- // things like this:
- // c = new(window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP")
- // To handle that, we need a constructor that takes a string.
- [Throws]
- constructor(DOMString ignored);
- // event handler
- attribute EventHandler onreadystatechange;
- // states
- const unsigned short UNSENT = 0;
- const unsigned short OPENED = 1;
- const unsigned short HEADERS_RECEIVED = 2;
- const unsigned short LOADING = 3;
- const unsigned short DONE = 4;
- readonly attribute unsigned short readyState;
- // request
- [Throws]
- undefined open(ByteString method, USVString url);
- [Throws]
- undefined open(ByteString method, USVString url, boolean async,
- optional USVString? user=null, optional USVString? password=null);
- [Throws]
- undefined setRequestHeader(ByteString header, ByteString value);
- [SetterThrows]
- attribute unsigned long timeout;
- [SetterThrows]
- attribute boolean withCredentials;
- [Throws]
- readonly attribute XMLHttpRequestUpload upload;
- [Throws]
- undefined send(optional (Document or XMLHttpRequestBodyInit)? body = null);
- [Throws]
- undefined abort();
- // response
- readonly attribute USVString responseURL;
- [Throws]
- readonly attribute unsigned short status;
- [Throws]
- readonly attribute ByteString statusText;
- [Throws]
- ByteString? getResponseHeader(ByteString header);
- [Throws]
- ByteString getAllResponseHeaders();
- [Throws]
- undefined overrideMimeType(DOMString mime);
- [SetterThrows]
- attribute XMLHttpRequestResponseType responseType;
- [Throws]
- readonly attribute any response;
- [Cached, Pure, Throws]
- readonly attribute USVString? responseText;
- [Throws, Exposed=Window]
- readonly attribute Document? responseXML;
- // Mozilla-specific stuff
- [ChromeOnly, SetterThrows]
- attribute boolean mozBackgroundRequest;
- [ChromeOnly, Exposed=Window]
- readonly attribute MozChannel? channel;
- [Throws, ChromeOnly, Exposed=Window]
- any getInterface(any iid);
- [ChromeOnly, Exposed=Window]
- undefined setOriginAttributes(optional OriginAttributesDictionary originAttributes = {});
- [ChromeOnly, Throws]
- undefined sendInputStream(InputStream body);
- // Only works on MainThread.
- // Its permanence is to be evaluated in bug 1368540 for Firefox 60.
- [ChromeOnly]
- readonly attribute unsigned short errorCode;
- readonly attribute boolean mozAnon;
- readonly attribute boolean mozSystem;
- };
-
- /* ---------------------- XMLHttpRequestEventTarget ----------------------------- */
- /* ./webidl/XMLHttpRequestEventTarget.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface XMLHttpRequestEventTarget : EventTarget {
- // event handlers
- attribute EventHandler onloadstart;
- attribute EventHandler onprogress;
- attribute EventHandler onabort;
- attribute EventHandler onerror;
- attribute EventHandler onload;
- attribute EventHandler ontimeout;
- attribute EventHandler onloadend;
- };
-
- /* ---------------------- XMLHttpRequestUpload ----------------------------- */
- /* ./webidl/XMLHttpRequestUpload.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * www.w3.org/TR/2012/WD-XMLHttpRequest-20120117/
- *
- * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
- [Exposed=(Window,DedicatedWorker,SharedWorker)]
- interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
- };
-
- /* ---------------------- XMLSerializer ----------------------------- */
- /* ./webidl/XMLSerializer.webidl */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://domparsing.spec.whatwg.org/#the-xmlserializer-interface
- */
- interface OutputStream;
- [Exposed=Window]
- interface XMLSerializer {
- constructor();
- /**
- * The subtree rooted by the specified element is serialized to
- * a string.
- *
- * @param root The root of the subtree to be serialized. This could
- * be any node, including a Document.
- * @returns The serialized subtree in the form of a Unicode string
- */
- [Throws]
- DOMString serializeToString(Node root);
- // Mozilla-specific stuff
- /**
- * The subtree rooted by the specified element is serialized to
- * a byte stream using the character set specified.
- * @param root The root of the subtree to be serialized. This could
- * be any node, including a Document.
- * @param stream The byte stream to which the subtree is serialized.
- * @param charset The name of the character set to use for the encoding
- * to a byte stream. If this string is empty and root is
- * a document, the document's character set will be used.
- */
- [Throws, ChromeOnly]
- undefined serializeToStream(Node root, OutputStream stream, DOMString? charset);
- };
-
- /* ---------------------- XPathEvaluator ----------------------------- */
- /* ./webidl/XPathEvaluator.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface XPathEvaluator {
- constructor();
- };
- XPathEvaluator includes XPathEvaluatorMixin;
- interface mixin XPathEvaluatorMixin {
- [NewObject, Throws]
- XPathExpression createExpression(DOMString expression,
- optional XPathNSResolver? resolver = null);
- [Pure]
- Node createNSResolver(Node nodeResolver);
- [Throws]
- XPathResult evaluate(DOMString expression,
- Node contextNode,
- optional XPathNSResolver? resolver = null,
- optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
- optional object? result = null);
- };
-
- /* ---------------------- XPathExpression ----------------------------- */
- /* ./webidl/XPathExpression.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- interface XPathExpression {
- // The result specifies a specific result object which may be reused and
- // returned by this method. If this is specified as null or it's not an
- // XPathResult object, a new result object will be constructed and returned.
- [Throws]
- XPathResult evaluate(Node contextNode,
- optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
- optional object? result = null);
- // The result specifies a specific result object which may be reused and
- // returned by this method. If this is specified as null or it's not an
- // XPathResult object, a new result object will be constructed and returned.
- [Throws, ChromeOnly]
- XPathResult evaluateWithContext(Node contextNode,
- unsigned long contextPosition,
- unsigned long contextSize,
- optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
- optional object? result = null);
- };
-
- /* ---------------------- XPathNSResolver ----------------------------- */
- /* ./webidl/XPathNSResolver.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
- [Exposed=Window]
- callback interface XPathNSResolver
- {
- DOMString? lookupNamespaceURI(DOMString? prefix);
- };
-
- /* ---------------------- XPathResult ----------------------------- */
- /* ./webidl/XPathResult.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
- */
- [Exposed=Window]
- interface XPathResult {
- // XPathResultType
- const unsigned short ANY_TYPE = 0;
- const unsigned short NUMBER_TYPE = 1;
- const unsigned short STRING_TYPE = 2;
- const unsigned short BOOLEAN_TYPE = 3;
- const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
- const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
- const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
- const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
- const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
- const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
- readonly attribute unsigned short resultType;
- [Throws]
- readonly attribute double numberValue;
- [Throws]
- readonly attribute DOMString stringValue;
- [Throws]
- readonly attribute boolean booleanValue;
- [Throws]
- readonly attribute Node? singleNodeValue;
- readonly attribute boolean invalidIteratorState;
- [Throws]
- readonly attribute unsigned long snapshotLength;
- [Throws]
- Node? iterateNext();
- [Throws]
- Node? snapshotItem(unsigned long index);
- };
-
- /* ---------------------- XRInputSourceEvent ----------------------------- */
- /* ./webidl/XRInputSourceEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webxr/#xrinputsourceevent-interface
- */
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRInputSourceEvent : Event {
- constructor(DOMString type, XRInputSourceEventInit eventInitDict);
- [SameObject] readonly attribute XRFrame frame;
- [SameObject] readonly attribute XRInputSource inputSource;
- };
- dictionary XRInputSourceEventInit : EventInit {
- required XRFrame frame;
- required XRInputSource inputSource;
- };
-
- /* ---------------------- XRInputSourcesChangeEvent ----------------------------- */
- /* ./webidl/XRInputSourcesChangeEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webxr/#xrinputsourceschangeevent-interface
- */
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRInputSourcesChangeEvent : Event {
- constructor(DOMString type, XRInputSourcesChangeEventInit eventInitDict);
- [SameObject] readonly attribute XRSession session;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Constant, Cached, Frozen]
- readonly attribute sequence<XRInputSource> added;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Constant, Cached, Frozen]
- readonly attribute sequence<XRInputSource> removed;
- };
- dictionary XRInputSourcesChangeEventInit : EventInit {
- required XRSession session;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- required sequence<XRInputSource> added;
- // TODO: Use FrozenArray once available. (Bug 1236777)
- required sequence<XRInputSource> removed;
- };
-
- /* ---------------------- XRReferenceSpaceEvent ----------------------------- */
- /* ./webidl/XRReferenceSpaceEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webxr/#xrreferencespaceevent-interface
- */
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRReferenceSpaceEvent : Event {
- constructor(DOMString type, XRReferenceSpaceEventInit eventInitDict);
- [SameObject] readonly attribute XRReferenceSpace referenceSpace;
- [SameObject] readonly attribute XRRigidTransform? transform;
- };
- dictionary XRReferenceSpaceEventInit : EventInit {
- required XRReferenceSpace referenceSpace;
- /*
- * Changed from "XRRigidTransform transform;" in order to work with the
- * event code generation.
- */
- XRRigidTransform? transform = null;
- };
-
- /* ---------------------- XRSessionEvent ----------------------------- */
- /* ./webidl/XRSessionEvent.webidl */
-
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://immersive-web.github.io/webxr/#xrsessionevent-interface
- */
- [Pref="dom.vr.webxr.enabled", SecureContext, Exposed=Window]
- interface XRSessionEvent : Event {
- constructor(DOMString type, XRSessionEventInit eventInitDict);
- readonly attribute XRSession session;
- };
- dictionary XRSessionEventInit : EventInit {
- required XRSession session;
- };
-
- /* ---------------------- XSLTProcessor ----------------------------- */
- /* ./webidl/XSLTProcessor.webidl */
-
- /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- typedef (unrestricted double or boolean or DOMString or Node or sequence<Node> or XPathResult) XSLTParameterValue;
- [Exposed=Window]
- interface XSLTProcessor {
- [UseCounter]
- constructor();
- /**
- * Import the stylesheet into this XSLTProcessor for transformations.
- *
- * @param style The root-node of a XSLT stylesheet. This can be either
- * a document node or an element node. If a document node
- * then the document can contain either a XSLT stylesheet
- * or a LRE stylesheet.
- * If the argument is an element node it must be the
- * xsl:stylesheet (or xsl:transform) element of an XSLT
- * stylesheet.
- */
- [Throws]
- undefined importStylesheet(Node style);
- /**
- * Transforms the node source applying the stylesheet given by
- * the importStylesheet() function. The owner document of the output node
- * owns the returned document fragment.
- *
- * @param source The node to be transformed
- * @param output This document is used to generate the output
- * @return DocumentFragment The result of the transformation
- */
- [CEReactions, Throws]
- DocumentFragment transformToFragment(Node source,
- Document output);
- /**
- * Transforms the node source applying the stylesheet given by the
- * importStylesheet() function.
- *
- * @param source The node to be transformed
- * @return Document The result of the transformation
- */
- [CEReactions, Throws]
- Document transformToDocument(Node source);
- /**
- * Sets a parameter to be used in subsequent transformations with this
- * XSLTProcessor. If the parameter doesn't exist in the stylesheet the
- * parameter will be ignored.
- *
- * @param namespaceURI The namespaceURI of the XSLT parameter
- * @param localName The local name of the XSLT parameter
- * @param value The new value of the XSLT parameter
- */
- [Throws]
- undefined setParameter([LegacyNullToEmptyString] DOMString namespaceURI,
- DOMString localName,
- XSLTParameterValue value);
- /**
- * Gets a parameter if previously set by setParameter. Returns null
- * otherwise.
- *
- * @param namespaceURI The namespaceURI of the XSLT parameter
- * @param localName The local name of the XSLT parameter
- * @return ParameterValue The value of the XSLT parameter
- */
- [Throws]
- XSLTParameterValue? getParameter([LegacyNullToEmptyString] DOMString namespaceURI,
- DOMString localName);
- /**
- * Removes a parameter, if set. This will make the processor use the
- * default-value for the parameter as specified in the stylesheet.
- *
- * @param namespaceURI The namespaceURI of the XSLT parameter
- * @param localName The local name of the XSLT parameter
- */
- [Throws]
- undefined removeParameter([LegacyNullToEmptyString] DOMString namespaceURI,
- DOMString localName);
- /**
- * Removes all set parameters from this XSLTProcessor. This will make
- * the processor use the default-value for all parameters as specified in
- * the stylesheet.
- */
- undefined clearParameters();
- /**
- * Remove all parameters and stylesheets from this XSLTProcessor.
- */
- undefined reset();
- /**
- * Disables all loading of external documents, such as from
- * <xsl:import> and document()
- * Defaults to off and is *not* reset by calls to reset()
- */
- [ChromeOnly]
- const unsigned long DISABLE_ALL_LOADS = 1;
- /**
- * Flags for this processor. Defaults to 0. See individual flags above
- * for documentation for effect of reset()
- */
- [ChromeOnly, NeedsCallerType]
- attribute unsigned long flags;
- };
-
- /* ---------------------- EOF ----------------------------- */
|