1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646(* Js_of_ocaml library
* http://www.ocsigen.org/js_of_ocaml/
* Copyright (C) 2010 Jérôme Vouillon
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)openJsopen!Importexternalcaml_js_on_ie:unit->boolt="caml_js_on_ie"letonIE=Js.to_bool(caml_js_on_ie())externalhtml_escape:js_stringt->js_stringt="caml_js_html_escape"externaldecode_html_entities:js_stringt->js_stringt="caml_js_html_entities"classtypecssStyleDeclaration=objectmethodanimation:js_stringtpropmethodanimationDelay:js_stringtpropmethodanimationDirection:js_stringtpropmethodanimationDuration:js_stringtpropmethodanimationFillMode:js_stringtpropmethodanimationIterationCount:js_stringtpropmethodanimationName:js_stringtpropmethodanimationPlayState:js_stringtpropmethodanimationTimingFunction:js_stringtpropmethodbackground:js_stringtpropmethodbackgroundAttachment:js_stringtpropmethodbackgroundColor:js_stringtpropmethodbackgroundImage:js_stringtpropmethodbackgroundPosition:js_stringtpropmethodbackgroundRepeat:js_stringtpropmethodborder:js_stringtpropmethodborderBottom:js_stringtpropmethodborderBottomColor:js_stringtpropmethodborderBottomStyle:js_stringtpropmethodborderBottomWidth:js_stringtpropmethodborderCollapse:js_stringtpropmethodborderColor:js_stringtpropmethodborderLeft:js_stringtpropmethodborderLeftColor:js_stringtpropmethodborderLeftStyle:js_stringtpropmethodborderLeftWidth:js_stringtpropmethodborderRadius:js_stringtpropmethodborderRight:js_stringtpropmethodborderRightColor:js_stringtpropmethodborderRightStyle:js_stringtpropmethodborderRightWidth:js_stringtpropmethodborderSpacing:js_stringtpropmethodborderStyle:js_stringtpropmethodborderTop:js_stringtpropmethodborderTopColor:js_stringtpropmethodborderTopStyle:js_stringtpropmethodborderTopWidth:js_stringtpropmethodborderWidth:js_stringtpropmethodbottom:js_stringtpropmethodcaptionSide:js_stringtpropmethodclear:js_stringtpropmethodclip:js_stringtpropmethodcolor:js_stringtpropmethodcontent:js_stringtpropmethodcounterIncrement:js_stringtpropmethodcounterReset:js_stringtpropmethodcssFloat:js_stringtpropmethodcssText:js_stringtpropmethodcursor:js_stringtpropmethoddirection:js_stringtpropmethoddisplay:js_stringtpropmethodemptyCells:js_stringtpropmethodfill:js_stringtpropmethodfont:js_stringtpropmethodfontFamily:js_stringtpropmethodfontSize:js_stringtpropmethodfontStyle:js_stringtpropmethodfontVariant:js_stringtpropmethodfontWeight:js_stringtpropmethodheight:js_stringtpropmethodleft:js_stringtpropmethodletterSpacing:js_stringtpropmethodlineHeight:js_stringtpropmethodlistStyle:js_stringtpropmethodlistStyleImage:js_stringtpropmethodlistStylePosition:js_stringtpropmethodlistStyleType:js_stringtpropmethodmargin:js_stringtpropmethodmarginBottom:js_stringtpropmethodmarginLeft:js_stringtpropmethodmarginRight:js_stringtpropmethodmarginTop:js_stringtpropmethodmaxHeight:js_stringtpropmethodmaxWidth:js_stringtpropmethodminHeight:js_stringtpropmethodminWidth:js_stringtpropmethodopacity:js_stringtoptdefpropmethodoutline:js_stringtpropmethodoutlineColor:js_stringtpropmethodoutlineOffset:js_stringtpropmethodoutlineStyle:js_stringtpropmethodoutlineWidth:js_stringtpropmethodoverflow:js_stringtpropmethodoverflowX:js_stringtpropmethodoverflowY:js_stringtpropmethodpadding:js_stringtpropmethodpaddingBottom:js_stringtpropmethodpaddingLeft:js_stringtpropmethodpaddingRight:js_stringtpropmethodpaddingTop:js_stringtpropmethodpageBreakAfter:js_stringtpropmethodpageBreakBefore:js_stringtpropmethodpointerEvents:js_stringtpropmethodposition:js_stringtpropmethodright:js_stringtpropmethodstroke:js_stringtpropmethodstrokeWidth:js_stringtpropmethodtableLayout:js_stringtpropmethodtextAlign:js_stringtpropmethodtextAnchor:js_stringtpropmethodtextDecoration:js_stringtpropmethodtextIndent:js_stringtpropmethodtextTransform:js_stringtpropmethodtop:js_stringtpropmethodtransform:js_stringtpropmethodverticalAlign:js_stringtpropmethodvisibility:js_stringtpropmethodwhiteSpace:js_stringtpropmethodwidth:js_stringtpropmethodwordSpacing:js_stringtpropmethodzIndex:js_stringtpropendtype('a,'b)event_listener=('a,'b)Dom.event_listenertypemouse_button=|No_button|Left_button|Middle_button|Right_buttonclasstypeevent=objectinherit[element]Dom.eventendand['a]customEvent=objectinherit[element,'a]Dom.customEventendandfocusEvent=objectinheriteventmethodrelatedTarget:elementtoptoptdefreadonly_propendandmouseEvent=objectinheriteventmethodrelatedTarget:elementtoptoptdefreadonly_propmethodclientX:intreadonly_propmethodclientY:intreadonly_propmethodscreenX:intreadonly_propmethodscreenY:intreadonly_propmethodoffsetX:intreadonly_propmethodoffsetY:intreadonly_propmethodctrlKey:booltreadonly_propmethodshiftKey:booltreadonly_propmethodaltKey:booltreadonly_propmethodmetaKey:booltreadonly_propmethodbutton:intreadonly_propmethodwhich:mouse_buttonoptdefreadonly_propmethodfromElement:elementtoptoptdefreadonly_propmethodtoElement:elementtoptoptdefreadonly_propmethodpageX:intoptdefreadonly_propmethodpageY:intoptdefreadonly_propendandkeyboardEvent=objectinheriteventmethodaltKey:booltreadonly_propmethodshiftKey:booltreadonly_propmethodctrlKey:booltreadonly_propmethodmetaKey:booltreadonly_propmethodlocation:intreadonly_propmethodkey:js_stringtoptdefreadonly_propmethodcode:js_stringtoptdefreadonly_propmethodwhich:intoptdefreadonly_propmethodcharCode:intoptdefreadonly_propmethodkeyCode:intreadonly_propmethodkeyIdentifier:js_stringtoptdefreadonly_propendandmousewheelEvent=object(* All browsers but Firefox *)inheritmouseEventmethodwheelDelta:intreadonly_propmethodwheelDeltaX:intoptdefreadonly_propmethodwheelDeltaY:intoptdefreadonly_propendandmouseScrollEvent=object(* Firefox *)inheritmouseEventmethoddetail:intreadonly_propmethodaxis:intoptdefreadonly_propmethod_HORIZONTAL_AXIS:intoptdefreadonly_propmethod_VERTICAL_AXIS:intoptdefreadonly_propendandtouchEvent=objectinheriteventmethodtouches:touchListtreadonly_propmethodtargetTouches:touchListtreadonly_propmethodchangedTouches:touchListtreadonly_propmethodctrlKey:booltreadonly_propmethodshiftKey:booltreadonly_propmethodaltKey:booltreadonly_propmethodmetaKey:booltreadonly_propmethodrelatedTarget:elementtoptoptdefreadonly_propendandtouchList=objectmethodlength:intreadonly_propmethoditem:int->touchtoptdefmethendandtouch=objectmethodidentifier:intreadonly_propmethodtarget:elementtoptdefreadonly_propmethodscreenX:intreadonly_propmethodscreenY:intreadonly_propmethodclientX:intreadonly_propmethodclientY:intreadonly_propmethodpageX:intreadonly_propmethodpageY:intreadonly_propendandsubmitEvent=objectinheriteventmethodsubmitter:elementtoptdefreadonly_propendanddragEvent=objectinheritmouseEventmethoddataTransfer:dataTransfertreadonly_propendandclipboardEvent=objectinheriteventmethodclipboardData:dataTransfertreadonly_propendanddataTransfer=objectmethoddropEffect:js_stringtpropmethodeffectAllowed:js_stringtpropmethodfiles:File.fileListtreadonly_propmethodtypes:js_stringtjs_arraytreadonly_propmethodaddElement:elementt->unitmethmethodclearData:js_stringt->unitmethmethodclearData_all:unitmethmethodgetData:js_stringt->js_stringtmethmethodsetData:js_stringt->js_stringt->unitmethmethodsetDragImage:elementt->int->int->unitmethendandeventTarget=object('self)methodonclick:('selft,mouseEventt)event_listenerwriteonly_propmethodondblclick:('selft,mouseEventt)event_listenerwriteonly_propmethodonmousedown:('selft,mouseEventt)event_listenerwriteonly_propmethodonmouseup:('selft,mouseEventt)event_listenerwriteonly_propmethodonmouseover:('selft,mouseEventt)event_listenerwriteonly_propmethodonmousemove:('selft,mouseEventt)event_listenerwriteonly_propmethodonmouseout:('selft,mouseEventt)event_listenerwriteonly_propmethodonkeypress:('selft,keyboardEventt)event_listenerwriteonly_propmethodonkeydown:('selft,keyboardEventt)event_listenerwriteonly_propmethodonkeyup:('selft,keyboardEventt)event_listenerwriteonly_propmethodonscroll:('selft,eventt)event_listenerwriteonly_propmethodondragstart:('selft,dragEventt)event_listenerwriteonly_propmethodondragend:('selft,dragEventt)event_listenerwriteonly_propmethodondragenter:('selft,dragEventt)event_listenerwriteonly_propmethodondragover:('selft,dragEventt)event_listenerwriteonly_propmethodondragleave:('selft,dragEventt)event_listenerwriteonly_propmethodondrag:('selft,dragEventt)event_listenerwriteonly_propmethodondrop:('selft,dragEventt)event_listenerwriteonly_propmethodonanimationstart:('selft,animationEventt)event_listenerwriteonly_propmethodonanimationend:('selft,animationEventt)event_listenerwriteonly_propmethodonanimationiteration:('selft,animationEventt)event_listenerwriteonly_propmethodonanimationcancel:('selft,animationEventt)event_listenerwriteonly_propmethodongotpointercapture:('selft,pointerEventt)event_listenerwriteonly_propmethodonlostpointercapture:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerenter:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointercancel:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerdown:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerleave:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointermove:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerout:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerover:('selft,pointerEventt)event_listenerwriteonly_propmethodonpointerup:('selft,pointerEventt)event_listenerwriteonly_propmethoddispatchEvent:eventt->booltmethendandpopStateEvent=objectinheriteventmethodstate:Js.Unsafe.anyreadonly_propendandpointerEvent=objectinheritmouseEventmethodpointerId:intJs.readonly_propmethodwidth:floatJs.readonly_propmethodheight:floatJs.readonly_propmethodpressure:floatJs.readonly_propmethodtangentialPressure:floatJs.readonly_propmethodtiltX:intJs.readonly_propmethodtiltY:intJs.readonly_propmethodtwist:intJs.readonly_propmethodpointerType:Js.js_stringJs.tJs.readonly_propmethodisPrimary:boolJs.tJs.readonly_propendandstorageEvent=objectinheriteventmethodkey:js_stringtoptreadonly_propmethodoldValue:js_stringtoptreadonly_propmethodnewValue:js_stringtoptreadonly_propmethodurl:js_stringtreadonly_propmethodstorageArea:storagetoptreadonly_propendandstorage=objectmethodlength:intreadonly_propmethodkey:int->js_stringtoptmethmethodgetItem:js_stringt->js_stringtoptmethmethodsetItem:js_stringt->js_stringt->unitmethmethodremoveItem:js_stringt->unitmethmethodclear:unitmethendandhashChangeEvent=objectinheriteventmethodoldURL:js_stringtreadonly_propmethodnewURL:js_stringtreadonly_propendandanimationEvent=objectinheriteventmethodanimationName:js_stringtreadonly_propmethodelapsedTime:floatreadonly_propmethodpseudoElement:js_stringtreadonly_propendandmediaEvent=objectinheriteventendandnodeSelector=objectmethodquerySelector:js_stringt->elementtoptmethmethodquerySelectorAll:js_stringt->elementDom.nodeListtmethendandtokenList=objectmethodlength:intreadonly_propmethoditem:int->js_stringtoptdefmethmethodcontains:js_stringt->booltmethmethodadd:js_stringt->unitmethmethodremove:js_stringt->unitmethmethodtoggle:js_stringt->booltmethmethodstringifier:js_stringtpropendandelement=objectinheritDom.elementinheritnodeSelectormethodid:js_stringtpropmethodtitle:js_stringtpropmethodlang:js_stringtpropmethoddir:js_stringtpropmethodclassName:js_stringtpropmethodclassList:tokenListtreadonly_propmethodclosest:js_stringt->elementtoptmethmethodstyle:cssStyleDeclarationtpropmethodinnerHTML:js_stringtpropmethodouterHTML:js_stringtpropmethodtextContent:js_stringtoptpropmethodinnerText:js_stringtpropmethodclientLeft:intreadonly_propmethodclientTop:intreadonly_propmethodclientWidth:intreadonly_propmethodclientHeight:intreadonly_propmethodoffsetLeft:intreadonly_propmethodoffsetTop:intreadonly_propmethodoffsetParent:elementtoptreadonly_propmethodoffsetWidth:intreadonly_propmethodoffsetHeight:intreadonly_propmethodscrollLeft:intpropmethodscrollTop:intpropmethodscrollWidth:intpropmethodscrollHeight:intpropmethodgetClientRects:clientRectListtmethmethodgetBoundingClientRect:clientRecttmethmethodscrollIntoView:boolt->unitmethmethodclick:unitmethmethodfocus:unitmethmethodblur:unitmethinheriteventTargetendandclientRect=objectmethodtop:floatreadonly_propmethodright:floatreadonly_propmethodbottom:floatreadonly_propmethodleft:floatreadonly_propmethodwidth:floatoptdefreadonly_propmethodheight:floatoptdefreadonly_propendandclientRectList=objectmethodlength:intreadonly_propmethoditem:int->clientRecttoptmethendletno_handler:('a,'b)event_listener=Dom.no_handlerlethandler=Dom.handlerletfull_handler=Dom.full_handlerletinvoke_handler=Dom.invoke_handlermoduleEvent=structtype'atyp='aDom.Event.typletclick=Dom.Event.make"click"letcopy=Dom.Event.make"copy"letcut=Dom.Event.make"cut"letpaste=Dom.Event.make"paste"letdblclick=Dom.Event.make"dblclick"letmousedown=Dom.Event.make"mousedown"letmouseup=Dom.Event.make"mouseup"letmouseover=Dom.Event.make"mouseover"letmousemove=Dom.Event.make"mousemove"letmouseout=Dom.Event.make"mouseout"letkeypress=Dom.Event.make"keypress"letkeydown=Dom.Event.make"keydown"letkeyup=Dom.Event.make"keyup"letmousewheel=Dom.Event.make"mousewheel"let_DOMMouseScroll=Dom.Event.make"DOMMouseScroll"lettouchstart=Dom.Event.make"touchstart"lettouchmove=Dom.Event.make"touchmove"lettouchend=Dom.Event.make"touchend"lettouchcancel=Dom.Event.make"touchcancel"letdragstart=Dom.Event.make"dragstart"letdragend=Dom.Event.make"dragend"letdragenter=Dom.Event.make"dragenter"letdragover=Dom.Event.make"dragover"letdragleave=Dom.Event.make"dragleave"letdrag=Dom.Event.make"drag"letdrop=Dom.Event.make"drop"lethashchange=Dom.Event.make"hashchange"letchange=Dom.Event.make"change"letinput=Dom.Event.make"input"lettimeupdate=Dom.Event.make"timeupdate"letsubmit=Dom.Event.make"submit"letscroll=Dom.Event.make"scroll"letfocus=Dom.Event.make"focus"letblur=Dom.Event.make"blur"letload=Dom.Event.make"load"letunload=Dom.Event.make"unload"letbeforeunload=Dom.Event.make"beforeunload"letresize=Dom.Event.make"resize"letorientationchange=Dom.Event.make"orientationchange"letpopstate=Dom.Event.make"popstate"leterror=Dom.Event.make"error"letabort=Dom.Event.make"abort"letselect=Dom.Event.make"select"letonline=Dom.Event.make"online"letoffline=Dom.Event.make"offline"letchecking=Dom.Event.make"checking"letnoupdate=Dom.Event.make"noupdate"letdownloading=Dom.Event.make"downloading"letprogress=Dom.Event.make"progress"letupdateready=Dom.Event.make"updateready"letcached=Dom.Event.make"cached"letobsolete=Dom.Event.make"obsolete"letdomContentLoaded=Dom.Event.make"DOMContentLoaded"letanimationstart=Dom.Event.make"animationstart"letanimationend=Dom.Event.make"animationend"letanimationiteration=Dom.Event.make"animationiteration"letanimationcancel=Dom.Event.make"animationcancel"letcanplay=Dom.Event.make"canplay"letcanplaythrough=Dom.Event.make"canplaythrough"letdurationchange=Dom.Event.make"durationchange"letemptied=Dom.Event.make"emptied"letended=Dom.Event.make"ended"letgotpointercapture=Dom.Event.make"gotpointercapture"letloadeddata=Dom.Event.make"loadeddata"letloadedmetadata=Dom.Event.make"loadedmetadata"letloadstart=Dom.Event.make"loadstart"letlostpointercapture=Dom.Event.make"lostpointercapture"letpause=Dom.Event.make"pause"letplay=Dom.Event.make"play"letplaying=Dom.Event.make"playing"letpointerenter=Dom.Event.make"pointerenter"letpointercancel=Dom.Event.make"pointercancel"letpointerdown=Dom.Event.make"pointerdown"letpointerleave=Dom.Event.make"pointerleave"letpointermove=Dom.Event.make"pointermove"letpointerout=Dom.Event.make"pointerout"letpointerover=Dom.Event.make"pointerover"letpointerup=Dom.Event.make"pointerup"letratechange=Dom.Event.make"ratechange"letseeked=Dom.Event.make"seeked"letseeking=Dom.Event.make"seeking"letstalled=Dom.Event.make"stalled"letsuspend=Dom.Event.make"suspend"letvolumechange=Dom.Event.make"volumechange"letwaiting=Dom.Event.make"waiting"letmake=Dom.Event.makeendtypeevent_listener_id=Dom.event_listener_idletaddEventListener=Dom.addEventListenerletaddEventListenerWithOptions=Dom.addEventListenerWithOptionsletremoveEventListener=Dom.removeEventListenerletcreateCustomEvent=Dom.createCustomEventclasstype['node]collection=objectmethodlength:intreadonly_propmethoditem:int->'nodetoptmethmethodnamedItem:js_stringt->'nodetoptmethendclasstypehtmlElement=elementclasstypeheadElement=objectinheritelementmethodprofile:js_stringtpropendclasstypelinkElement=objectinheritelementmethoddisabled:booltpropmethodcharset:js_stringtpropmethodcrossorigin:js_stringtpropmethodhref:js_stringtpropmethodhreflang:js_stringtpropmethodmedia:js_stringtpropmethodrel:js_stringtpropmethodrev:js_stringtpropmethodtarget:js_stringtpropmethod_type:js_stringtpropendclasstypetitleElement=objectinheritelementmethodtext:js_stringtpropendclasstypemetaElement=objectinheritelementmethodcontent:js_stringtpropmethodhttpEquiv:js_stringtpropmethodname:js_stringtpropmethodscheme:js_stringtpropendclasstypebaseElement=objectinheritelementmethodhref:js_stringtpropmethodtarget:js_stringtpropendclasstypestyleElement=objectinheritelementmethoddisabled:booltpropmethodmedia:js_stringtpropmethod_type:js_stringtpropendclasstypebodyElement=elementclasstypeformElement=objectinheritelementmethodelements:elementcollectiontreadonly_propmethodlength:intreadonly_propmethodacceptCharset:js_stringtpropmethodaction:js_stringtpropmethodenctype:js_stringtpropmethod_method:js_stringtpropmethodtarget:js_stringtpropmethodsubmit:unitmethmethodreset:unitmethmethodonsubmit:('selft,submitEventt)event_listenerwriteonly_propendclasstypeoptGroupElement=objectinheritelementmethoddisabled:booltpropmethodlabel:js_stringtpropendclasstypeoptionElement=objectinheritoptGroupElementmethodform:formElementtoptreadonly_propmethoddefaultSelected:booltpropmethodtext:js_stringtreadonly_propmethodindex:intreadonly_propmethodselected:booltpropmethodvalue:js_stringtpropendclasstypeselectElement=object('self)inheritelementmethod_type:js_stringtreadonly_propmethodselectedIndex:intpropmethodvalue:js_stringtpropmethodlength:intpropmethodform:formElementtoptreadonly_propmethodoptions:optionElementcollectiontreadonly_propmethoddisabled:booltpropmethodmultiple:booltpropmethodname:js_stringtreadonly_propmethodsize:intpropmethodtabIndex:intpropmethodadd:#optGroupElementt->#optGroupElementtopt->unitmethmethodremove:int->unitmethmethodrequired:booltwriteonly_propmethodonchange:('selft,eventt)event_listenerpropmethodoninput:('selft,eventt)event_listenerpropendclasstypeinputElement=object('self)inheritelementmethoddefaultValue:js_stringtpropmethoddefaultChecked:js_stringtpropmethodform:formElementtoptreadonly_propmethodaccept:js_stringtpropmethodaccessKey:js_stringtpropmethodalign:js_stringtpropmethodalt:js_stringtpropmethodchecked:booltpropmethoddisabled:booltpropmethodmaxLength:intpropmethodname:js_stringtreadonly_propmethodreadOnly:booltpropmethodrequired:booltwriteonly_propmethodsize:intpropmethodsrc:js_stringtpropmethodtabIndex:intpropmethod_type:js_stringtreadonly_propmethoduseMap:js_stringtpropmethodvalue:js_stringtpropmethodselect:unitmethmethodfiles:File.fileListtoptdefreadonly_propmethodplaceholder:js_stringtwriteonly_propmethodselectionDirection:js_stringtpropmethodselectionStart:intpropmethodselectionEnd:intpropmethodonselect:('selft,eventt)event_listenerpropmethodonchange:('selft,eventt)event_listenerpropmethodoninput:('selft,eventt)event_listenerpropmethodonblur:('selft,focusEventt)event_listenerpropmethodonfocus:('selft,focusEventt)event_listenerpropendclasstypetextAreaElement=object('self)inheritelementmethoddefaultValue:js_stringtpropmethodform:formElementtoptreadonly_propmethodaccessKey:js_stringtpropmethodcols:intpropmethoddisabled:booltpropmethodname:js_stringtreadonly_propmethodreadOnly:booltpropmethodrows:intpropmethodselectionDirection:js_stringtpropmethodselectionEnd:intpropmethodselectionStart:intpropmethodtabIndex:intpropmethod_type:js_stringtreadonly_propmethodvalue:js_stringtpropmethodselect:unitmethmethodrequired:booltwriteonly_propmethodplaceholder:js_stringtwriteonly_propmethodonselect:('selft,eventt)event_listenerpropmethodonchange:('selft,eventt)event_listenerpropmethodoninput:('selft,eventt)event_listenerpropmethodonblur:('selft,focusEventt)event_listenerpropmethodonfocus:('selft,focusEventt)event_listenerpropendclasstypebuttonElement=objectinheritelementmethodform:formElementtoptreadonly_propmethodaccessKey:js_stringtpropmethoddisabled:booltpropmethodname:js_stringtreadonly_propmethodtabIndex:intpropmethod_type:js_stringtreadonly_propmethodvalue:js_stringtpropendclasstypelabelElement=objectinheritelementmethodform:formElementtoptreadonly_propmethodaccessKey:js_stringtpropmethodhtmlFor:js_stringtpropendclasstypefieldSetElement=objectinheritelementmethodform:formElementtoptreadonly_propendclasstypelegendElement=objectinheritelementmethodform:formElementtoptreadonly_propmethodaccessKey:js_stringtpropendclasstypeuListElement=elementclasstypeoListElement=elementclasstypedListElement=elementclasstypeliElement=elementclasstypedivElement=elementclasstypeparagraphElement=elementclasstypeheadingElement=elementclasstypequoteElement=objectinheritelementmethodcite:js_stringtpropendclasstypepreElement=elementclasstypebrElement=elementclasstypehrElement=elementclasstypemodElement=objectinheritelementmethodcite:js_stringtpropmethoddateTime:js_stringtpropendclasstypeanchorElement=objectinheritelementmethodaccessKey:js_stringtpropmethodcharset:js_stringtpropmethodcoords:js_stringtpropmethodhref:js_stringtpropmethodhreflang:js_stringtpropmethodname:js_stringtpropmethodrel:js_stringtpropmethodrev:js_stringtpropmethodshape:js_stringtpropmethodtabIndex:intpropmethodtarget:js_stringtpropmethod_type:js_stringtpropendclasstypeimageElement=object('self)inheritelementmethodalt:js_stringtpropmethodsrc:js_stringtpropmethoduseMap:js_stringtpropmethodisMap:booltpropmethodwidth:intpropmethodheight:intpropmethodnaturalWidth:intoptdefreadonly_propmethodnaturalHeight:intoptdefreadonly_propmethodcomplete:booltpropmethodonload:('selft,eventt)event_listenerpropmethodonerror:('selft,eventt)event_listenerpropmethodonabort:('selft,eventt)event_listenerpropendclasstypeobjectElement=objectinheritelementmethodform:formElementtoptreadonly_propmethodcode:js_stringtpropmethodarchive:js_stringtpropmethodcodeBase:js_stringtpropmethodcodeType:js_stringtpropmethoddata:js_stringtpropmethoddeclare:booltpropmethodheight:js_stringtpropmethodname:js_stringtpropmethodstandby:js_stringtpropmethodtabIndex:intpropmethod_type:js_stringtpropmethoduseMap:js_stringtpropmethodwidth:js_stringtpropmethoddocument:Dom.elementDom.documenttoptreadonly_propendclasstypeparamElement=objectinheritelementmethodname:js_stringtpropmethod_type:js_stringtpropmethodvalue:js_stringtpropmethodvalueType:js_stringtpropendclasstypeareaElement=objectinheritelementmethodaccessKey:js_stringtpropmethodalt:js_stringtpropmethodcoords:js_stringtpropmethodhref:js_stringtpropmethodnoHref:booltpropmethodshape:js_stringtpropmethodtabIndex:intpropmethodtarget:js_stringtpropendclasstypemapElement=objectinheritelementmethodareas:areaElementcollectiontreadonly_propmethodname:js_stringtpropendclasstypescriptElement=objectinheritelementmethodtext:js_stringtpropmethodcharset:js_stringtpropmethoddefer:booltpropmethodsrc:js_stringtpropmethod_type:js_stringtpropmethodasync:booltpropendclasstypeembedElement=objectinheritelementmethodsrc:js_stringtpropmethodheight:js_stringtpropmethodwidth:js_stringtpropmethod_type:js_stringtpropendclasstypetableCellElement=objectinheritelementmethodcellIndex:intreadonly_propmethodabbr:js_stringtpropmethodalign:js_stringtpropmethodaxis:js_stringtpropmethodch:js_stringtpropmethodchOff:js_stringtpropmethodcolSpan:intpropmethodheaders:js_stringtpropmethodrowSpan:intpropmethodscope:js_stringtpropmethodvAlign:js_stringtpropendclasstypetableRowElement=objectinheritelementmethodrowIndex:intreadonly_propmethodsectionRowIndex:intreadonly_propmethodcells:tableCellElementcollectiontreadonly_propmethodalign:js_stringtpropmethodch:js_stringtpropmethodchOff:js_stringtpropmethodvAlign:js_stringtpropmethodinsertCell:int->tableCellElementtmethmethoddeleteCell:int->unitmethendclasstypetableColElement=objectinheritelementmethodalign:js_stringtpropmethodch:js_stringtpropmethodchOff:js_stringtpropmethodspan:intpropmethodvAlign:js_stringtpropmethodwidth:js_stringtpropendclasstypetableSectionElement=objectinheritelementmethodalign:js_stringtpropmethodch:js_stringtpropmethodchOff:js_stringtpropmethodvAlign:js_stringtpropmethodrows:tableRowElementcollectiontreadonly_propmethodinsertRow:int->tableRowElementtmethmethoddeleteRow:int->unitmethendclasstypetableCaptionElement=elementclasstypetableElement=objectinheritelementmethodcaption:tableCaptionElementtpropmethodtHead:tableSectionElementtpropmethodtFoot:tableSectionElementtpropmethodrows:tableRowElementcollectiontreadonly_propmethodtBodies:tableSectionElementcollectiontreadonly_propmethodalign:js_stringtpropmethodborder:js_stringtpropmethodcellPadding:js_stringtpropmethodcellSpacing:js_stringtpropmethodframe:js_stringtpropmethodrules:js_stringtpropmethodsummary:js_stringtpropmethodwidth:js_stringtpropmethodcreateTHead:tableSectionElementtmethmethoddeleteTHead:unitmethmethodcreateTFoot:tableSectionElementtmethmethoddeleteTFoot:unitmethmethodcreateCaption:tableCaptionElementtmethmethoddeleteCaption:unitmethmethodinsertRow:int->tableRowElementtmethmethoddeleteRow:int->unitmethendclasstypetimeRanges=objectmethodlength:intreadonly_propmethodstart:int->floatmethmethodend_:int->floatmethendtypenetworkState=|NETWORK_EMPTY|NETWORK_IDLE|NETWORK_LOADING|NETWORK_NO_SOURCEtypereadyState=|HAVE_NOTHING|HAVE_METADATA|HAVE_CURRENT_DATA|HAVE_FUTURE_DATA|HAVE_ENOUGH_DATA(* http://www.w3schools.com/tags/ref_av_dom.asp *)(* only features supported by all browser. (IE9+) *)classtypemediaElement=objectinheritelementmethodcanPlayType:js_stringt->js_stringtmethmethodload:unitmethmethodplay:unitmethmethodpause:unitmethmethodautoplay:booltpropmethodbuffered:timeRangestreadonly_propmethodcontrols:booltpropmethodcurrentSrc:js_stringtreadonly_propmethodcurrentTime:floatpropmethodduration:floatreadonly_propmethodended:booltreadonly_propmethodloop:booltpropmethodmediagroup:js_stringtpropmethodmuted:booltpropmethodnetworkState_int:intreadonly_propmethodnetworkState:networkStatereadonly_propmethodpaused:booltreadonly_propmethodplaybackRate:floatpropmethodplayed:timeRangestreadonly_propmethodpreload:js_stringtpropmethodreadyState_int:intreadonly_propmethodreadyState:readyStatereadonly_propmethodseekable:timeRangestreadonly_propmethodseeking:booltreadonly_propmethodsrc:js_stringtpropmethodvolume:floatpropmethodoncanplay:('selft,mediaEventt)event_listenerwriteonly_propmethodoncanplaythrough:('selft,mediaEventt)event_listenerwriteonly_propmethodondurationchange:('selft,mediaEventt)event_listenerwriteonly_propmethodonemptied:('selft,mediaEventt)event_listenerwriteonly_propmethodonended:('selft,mediaEventt)event_listenerwriteonly_propmethodonloadeddata:('selft,mediaEventt)event_listenerwriteonly_propmethodonloadedmetadata:('selft,mediaEventt)event_listenerwriteonly_propmethodonloadstart:('selft,mediaEventt)event_listenerwriteonly_propmethodonpause:('selft,mediaEventt)event_listenerwriteonly_propmethodonplay:('selft,mediaEventt)event_listenerwriteonly_propmethodonplaying:('selft,mediaEventt)event_listenerwriteonly_propmethodonratechange:('selft,mediaEventt)event_listenerwriteonly_propmethodonseeked:('selft,mediaEventt)event_listenerwriteonly_propmethodonseeking:('selft,mediaEventt)event_listenerwriteonly_propmethodonstalled:('selft,mediaEventt)event_listenerwriteonly_propmethodonsuspend:('selft,mediaEventt)event_listenerwriteonly_propmethodonvolumechange:('selft,mediaEventt)event_listenerwriteonly_propmethodonwaiting:('selft,mediaEventt)event_listenerwriteonly_propendclasstypeaudioElement=objectinheritmediaElementendclasstypevideoElement=objectinheritmediaElementendtypecontext=js_stringtlet_2d_=Js.string"2d"typecanvasPatternclasstypecanvasElement=objectinheritelementmethodwidth:intpropmethodheight:intpropmethodtoDataURL:js_stringtmethmethodtoDataURL_type:js_stringt->js_stringtmethmethodtoDataURL_type_compression:js_stringt->float->js_stringtmethmethodgetContext:js_stringt->canvasRenderingContext2DtmethendandcanvasRenderingContext2D=objectmethodcanvas:canvasElementtreadonly_propmethodsave:unitmethmethodrestore:unitmethmethodscale:float->float->unitmethmethodrotate:float->unitmethmethodtranslate:float->float->unitmethmethodtransform:float->float->float->float->float->float->unitmethmethodsetTransform:float->float->float->float->float->float->unitmethmethodglobalAlpha:floatpropmethodglobalCompositeOperation:js_stringtpropmethodstrokeStyle:js_stringtwriteonly_propmethodstrokeStyle_gradient:canvasGradienttwriteonly_propmethodstrokeStyle_pattern:canvasPatterntwriteonly_propmethodfillStyle:js_stringtwriteonly_propmethodfillStyle_gradient:canvasGradienttwriteonly_propmethodfillStyle_pattern:canvasPatterntwriteonly_propmethodcreateLinearGradient:float->float->float->float->canvasGradienttmethmethodcreateRadialGradient:float->float->float->float->float->float->canvasGradienttmethmethodcreatePattern:imageElementt->js_stringt->canvasPatterntmethmethodcreatePattern_fromCanvas:canvasElementt->js_stringt->canvasPatterntmethmethodcreatePattern_fromVideo:videoElementt->js_stringt->canvasPatterntmethmethodlineWidth:floatpropmethodlineCap:js_stringtpropmethodlineJoin:js_stringtpropmethodmiterLimit:floatpropmethodshadowOffsetX:floatpropmethodshadowOffsetY:floatpropmethodshadowBlur:floatpropmethodshadowColor:js_stringtpropmethodclearRect:float->float->float->float->unitmethmethodfillRect:float->float->float->float->unitmethmethodstrokeRect:float->float->float->float->unitmethmethodbeginPath:unitmethmethodclosePath:unitmethmethodmoveTo:float->float->unitmethmethodlineTo:float->float->unitmethmethodquadraticCurveTo:float->float->float->float->unitmethmethodbezierCurveTo:float->float->float->float->float->float->unitmethmethodarcTo:float->float->float->float->float->unitmethmethodrect:float->float->float->float->unitmethmethodarc:float->float->float->float->float->boolt->unitmethmethodfill:unitmethmethodstroke:unitmethmethodclip:unitmethmethodisPointInPath:float->float->booltmethmethoddrawFocusRing:#elementt->float->float->boolt->booltmethmethodfont:js_stringtpropmethodtextAlign:js_stringtpropmethodtextBaseline:js_stringtpropmethodfillText:js_stringt->float->float->unitmethmethodfillText_withWidth:js_stringt->float->float->float->unitmethmethodstrokeText:js_stringt->float->float->unitmethmethodstrokeText_withWidth:js_stringt->float->float->float->unitmethmethodmeasureText:js_stringt->textMetricstmethmethoddrawImage:imageElementt->float->float->unitmethmethoddrawImage_withSize:imageElementt->float->float->float->float->unitmethmethoddrawImage_full:imageElementt->float->float->float->float->float->float->float->float->unitmethmethoddrawImage_fromCanvas:canvasElementt->float->float->unitmethmethoddrawImage_fromCanvasWithSize:canvasElementt->float->float->float->float->unitmethmethoddrawImage_fullFromCanvas:canvasElementt->float->float->float->float->float->float->float->float->unitmethmethoddrawImage_fromVideoWithVideo:videoElementt->float->float->unitmethmethoddrawImage_fromVideoWithSize:videoElementt->float->float->float->float->unitmethmethoddrawImage_fullFromVideo:videoElementt->float->float->float->float->float->float->float->float->unitmethmethodcreateImageData:int->int->imageDatatmethmethodgetImageData:float->float->float->float->imageDatatmethmethodputImageData:imageDatat->float->float->unitmethendandcanvasGradient=objectmethodaddColorStop:float->js_stringt->unitmethendandtextMetrics=objectmethodwidth:floatreadonly_propendandimageData=objectmethodwidth:intreadonly_propmethodheight:intreadonly_propmethoddata:canvasPixelArraytreadonly_propendandcanvasPixelArray=objectmethodlength:intreadonly_propendexternalpixel_get:canvasPixelArrayt->int->int="caml_js_get"externalpixel_set:canvasPixelArrayt->int->int->unit="caml_js_set"classtyperange=objectmethodcollapsed:booltreadonly_propmethodstartOffset:intreadonly_propmethodendOffset:intreadonly_propmethodstartContainer:Dom.nodetreadonly_propmethodendContainer:Dom.nodetreadonly_propmethodsetStart:Dom.nodet->int->unitmethmethodsetEnd:Dom.nodet->int->unitmethmethodsetStartBefore:Dom.nodet->unitmethmethodsetEndBefore:Dom.nodet->unitmethmethodsetStartAfter:Dom.nodet->unitmethmethodsetEndAfter:Dom.nodet->unitmethmethodselectNode:Dom.nodet->unitmethmethodselectNodeContents:Dom.nodet->unitmethmethodcollapse:boolt->unitmethmethodcloneContents:Dom.documentFragmenttmethmethodextractContents:Dom.documentFragmenttmethmethoddeleteContents:unitmethmethodinsertNode:Dom.nodet->unitmethmethodsurroundContents:Dom.nodet->unitmethmethodcloneRange:rangetmethmethodtoString:js_stringtmethend(** Information on current selection *)classtypeselection=objectmethodanchorNode:Dom.nodetreadonly_propmethodanchorOffset:intreadonly_propmethodfocusNode:Dom.nodetreadonly_propmethodfocusOffset:intreadonly_propmethodisCollapsed:booltreadonly_propmethodrangeCount:intreadonly_propmethodgetRangeAt:int->rangetmethmethodcollapse:boolt->unitmethmethodextend:Dom.nodet->int->unitmethmethodmodify:js_stringt->js_stringt->js_stringt->unitmethmethodcollapseToStart:unitmethmethodcollapseToEnd:unitmethmethodselectAllChildren:Dom.nodet->unitmethmethodaddRange:ranget->unitmethmethodremoveRange:ranget->unitmethmethodremoveAllRanges:unitmethmethoddeleteFromDocument:unitmethmethodcontainsNode:Dom.nodet->boolt->booltmethmethodtoString:js_stringtmethendclasstypedocument=objectinherit[element]Dom.documentinheritnodeSelectorinheriteventTargetmethodtitle:js_stringtpropmethodreferrer:js_stringtreadonly_propmethoddomain:js_stringtpropmethod_URL:js_stringtreadonly_propmethodhead:headElementtpropmethodbody:bodyElementtpropmethoddocumentElement:htmlElementtreadonly_propmethodimages:imageElementcollectiontreadonly_propmethodapplets:elementcollectiontreadonly_propmethodlinks:elementcollectiontreadonly_propmethodforms:formElementcollectiontreadonly_propmethodanchors:elementcollectiontreadonly_propmethodcookie:js_stringtpropmethoddesignMode:js_stringtpropmethodopen_:unitmethmethodclose:unitmethmethodwrite:js_stringt->unitmethmethodexecCommand:js_stringt->boolt->js_stringtopt->unitmethmethodcreateRange:rangetmethmethodreadyState:js_stringtreadonly_propmethodgetElementsByClassName:js_stringt->elementDom.nodeListtmethmethodgetElementsByName:js_stringt->elementDom.nodeListtmethmethodactiveElement:elementtoptreadonly_propinheriteventTargetendtypeinterval_idtypetimeout_idtypeanimation_frame_request_idclasstypelocation=objectmethodhref:js_stringtpropmethodprotocol:js_stringtpropmethodhost:js_stringtpropmethodhostname:js_stringtpropmethodorigin:js_stringtoptdefreadonly_propmethodport:js_stringtpropmethodpathname:js_stringtpropmethodsearch:js_stringtpropmethodhash:js_stringtpropmethodassign:js_stringt->unitmethmethodreplace:js_stringt->unitmethmethodreload:unitmethendletlocation_origin(loc:locationt)=Optdef.caseloc##.origin(fun()->letprotocol=loc##.protocolinlethostname=loc##.hostnameinletport=loc##.portinifprotocol##.length=0&&hostname##.length=0thenJs.string""elseletorigin=protocol##concat_2(Js.string"//")hostnameinifport##.length>0thenorigin##concat_2(Js.string":")loc##.portelseorigin)(funo->o)classtypehistory=objectmethodlength:intreadonly_propmethodstate:Js.Unsafe.anyreadonly_propmethodgo:intopt->unitmethmethodback:unitmethmethodforward:unitmethmethodpushState:'a.'a->js_stringt->js_stringtopt->unitmethmethodreplaceState:'a.'a->js_stringt->js_stringtopt->unitmethendclasstypeundoManager=objectendclasstypenavigator=objectmethodappCodeName:js_stringtreadonly_propmethodappName:js_stringtreadonly_propmethodappVersion:js_stringtreadonly_propmethodcookieEnabled:booltreadonly_propmethodonLine:booltreadonly_propmethodplatform:js_stringtreadonly_propmethodvendor:js_stringtreadonly_propmethoduserAgent:js_stringtreadonly_propmethodlanguage:js_stringtoptdefreadonly_propmethoduserLanguage:js_stringtoptdefreadonly_propmethodmaxTouchPoints:inttreadonly_propendclasstypescreen=objectmethodwidth:intreadonly_propmethodheight:intreadonly_propmethodavailWidth:intreadonly_propmethodavailHeight:intreadonly_propendclasstypeapplicationCache=objectmethodstatus:intreadonly_propmethodupdate:unitmethmethodabort:unitmethmethodswapCache:unitmethmethodonchecking:(applicationCachet,eventt)event_listenerpropmethodonerror:(applicationCachet,eventt)event_listenerpropmethodonnoupdate:(applicationCachet,eventt)event_listenerpropmethodondownloading:(applicationCachet,eventt)event_listenerpropmethodonprogress:(applicationCachet,eventt)event_listenerpropmethodonupdateready:(applicationCachet,eventt)event_listenerpropmethodoncached:(applicationCachet,eventt)event_listenerpropmethodonobsolete:(applicationCachet,eventt)event_listenerpropinheriteventTargetendclasstype_URL=objectmethodcreateObjectURL:#File.blobt->js_stringtmethmethodrevokeObjectURL:js_stringt->unitmethendclasstypewindow=objectinheriteventTargetmethoddocument:documenttreadonly_propmethodapplicationCache:applicationCachetreadonly_propmethodname:js_stringtpropmethodlocation:locationtreadonly_propmethodhistory:historytreadonly_propmethodundoManager:undoManagertreadonly_propmethodnavigator:navigatortreadonly_propmethodgetSelection:selectiontmethmethodclose:unitmethmethodclosed:booltreadonly_propmethodstop:unitmethmethodfocus:unitmethmethodblur:unitmethmethodscroll:int->int->unitmethmethodscrollBy:int->int->unitmethmethodsessionStorage:storagetoptdefreadonly_propmethodlocalStorage:storagetoptdefreadonly_propmethodtop:windowtreadonly_propmethodparent:windowtreadonly_propmethodframeElement:elementtoptreadonly_propmethodopen_:js_stringt->js_stringt->js_stringtopt->windowtoptmethmethodalert:js_stringt->unitmethmethodconfirm:js_stringt->booltmethmethodprompt:js_stringt->js_stringt->js_stringtoptmethmethodprint:unitmethmethodsetInterval:(unit->unit)Js.callback->float->interval_idmethmethodclearInterval:interval_id->unitmethmethodsetTimeout:(unit->unit)Js.callback->float->timeout_idmethmethodclearTimeout:timeout_id->unitmethmethodrequestAnimationFrame:(float->unit)Js.callback->animation_frame_request_idmethmethodcancelAnimationFrame:animation_frame_request_id->unitmethmethodscreen:screentreadonly_propmethodinnerWidth:intoptdefreadonly_propmethodinnerHeight:intoptdefreadonly_propmethodouterWidth:intoptdefreadonly_propmethodouterHeight:intoptdefreadonly_propmethodgetComputedStyle:#elementt->cssStyleDeclarationtmethmethodgetComputedStyle_pseudoElt:#elementt->js_stringt->cssStyleDeclarationtmethmethodatob:js_stringt->js_stringtmethmethodbtoa:js_stringt->js_stringtmethmethodonload:(windowt,eventt)event_listenerpropmethodonunload:(windowt,eventt)event_listenerpropmethodonbeforeunload:(windowt,eventt)event_listenerpropmethodonblur:(windowt,focusEventt)event_listenerpropmethodonfocus:(windowt,focusEventt)event_listenerpropmethodonresize:(windowt,eventt)event_listenerpropmethodonorientationchange:(windowt,eventt)event_listenerpropmethodonpopstate:(windowt,popStateEventt)event_listenerpropmethodonhashchange:(windowt,hashChangeEventt)event_listenerpropmethodononline:(windowt,eventt)event_listenerwriteonly_propmethodonoffline:(windowt,eventt)event_listenerwriteonly_propmethod_URL:_URLtreadonly_propmethoddevicePixelRatio:floatreadonly_propendletwindow:windowt=Js.Unsafe.global(* The toplevel object *)letdocument=window##.documentletgetElementByIdid=Js.Opt.case(document##getElementById(Js.stringid))(fun()->raiseNot_found)(funpnode->pnode)letgetElementById_exnid=Js.Opt.case(document##getElementById(Js.stringid))(fun()->failwith(Printf.sprintf"getElementById_exn: %S not found"id))(funpnode->pnode)letgetElementById_optid=Js.Opt.to_option(document##getElementById(Js.stringid))letgetElementById_coerceidcoerce=Js.Opt.case(document##getElementById(Js.stringid))(fun()->None)(fune->Js.Opt.to_option(coercee))(****)classtypeframeSetElement=objectinheritelementmethodcols:js_stringtpropmethodrows:js_stringtpropendclasstypeframeElement=objectinheritelementmethodframeBorder:js_stringtpropmethodlongDesc:js_stringtpropmethodmarginHeight:js_stringtpropmethodmarginWidth:js_stringtpropmethodname:js_stringtpropmethodnoResize:booltpropmethodscrolling:js_stringtpropmethodsrc:js_stringtpropmethodcontentDocument:documenttoptreadonly_propendclasstypeiFrameElement=objectinheritelementmethodframeBorder:js_stringtpropmethodheight:js_stringtpropmethodwidth:js_stringtpropmethodlongDesc:js_stringtpropmethodmarginHeight:js_stringtpropmethodmarginWidth:js_stringtpropmethodname:js_stringtpropmethodscrolling:js_stringtpropmethodsrc:js_stringtpropmethodcontentDocument:documenttoptreadonly_propmethodcontentWindow:windowtreadonly_propend(****)(*XXX Should provide creation functions a la lablgtk... *)letopt_iterxf=matchxwith|None->()|Somev->fvletcreateElement(doc:documentt)name=doc##createElement(Js.stringname)letunsafeCreateElementdocname=Js.Unsafe.coerce(createElementdocname)letcreateElementSyntax=ref`UnknownletrecunsafeCreateElementEx?_type?namedocelt=ifPoly.(_type=None)&&Poly.(name=None)thenJs.Unsafe.coerce(createElementdocelt)elsematch!createElementSyntaxwith|`Standard->letres=Js.Unsafe.coerce(createElementdocelt)inopt_iter_type(funt->res##._type:=t);opt_itername(funn->res##.name:=n);res|`Extended->leta=new%jsJs.array_emptyinignore(a##push_2(Js.string"<")(Js.stringelt));opt_iter_type(funt->ignore(a##push_3(Js.string" type=\"")(html_escapet)(Js.string"\"")));opt_itername(funn->ignore(a##push_3(Js.string" name=\"")(html_escapen)(Js.string"\"")));ignore(a##push(Js.string">"));Js.Unsafe.coerce(doc##createElement(a##join(Js.string"")))|`Unknown->createElementSyntax:=iftryletel:inputElementJs.t=Js.Unsafe.coerce(document##createElement(Js.string"<input name=\"x\">"))inel##.tagName##toLowerCase==Js.string"input"&&el##.name==Js.string"x"with_->falsethen`Extendedelse`Standard;unsafeCreateElementEx?_type?namedoceltletcreateHtmldoc:htmlElementt=unsafeCreateElementdoc"html"letcreateHeaddoc:headElementt=unsafeCreateElementdoc"head"letcreateLinkdoc:linkElementt=unsafeCreateElementdoc"link"letcreateTitledoc:titleElementt=unsafeCreateElementdoc"title"letcreateMetadoc:metaElementt=unsafeCreateElementdoc"meta"letcreateBasedoc:baseElementt=unsafeCreateElementdoc"base"letcreateStyledoc:styleElementt=unsafeCreateElementdoc"style"letcreateBodydoc:bodyElementt=unsafeCreateElementdoc"body"letcreateFormdoc:formElementt=unsafeCreateElementdoc"form"letcreateOptgroupdoc:optGroupElementt=unsafeCreateElementdoc"optgroup"letcreateOptiondoc:optionElementt=unsafeCreateElementdoc"option"letcreateSelect?_type?namedoc:selectElementt=unsafeCreateElementEx?_type?namedoc"select"letcreateInput?_type?namedoc:inputElementt=unsafeCreateElementEx?_type?namedoc"input"letcreateTextarea?_type?namedoc:textAreaElementt=unsafeCreateElementEx?_type?namedoc"textarea"letcreateButton?_type?namedoc:buttonElementt=unsafeCreateElementEx?_type?namedoc"button"letcreateLabeldoc:labelElementt=unsafeCreateElementdoc"label"letcreateFieldsetdoc:fieldSetElementt=unsafeCreateElementdoc"fieldset"letcreateLegenddoc:legendElementt=unsafeCreateElementdoc"legend"letcreateUldoc:uListElementt=unsafeCreateElementdoc"ul"letcreateOldoc:oListElementt=unsafeCreateElementdoc"ol"letcreateDldoc:dListElementt=unsafeCreateElementdoc"dl"letcreateLidoc:liElementt=unsafeCreateElementdoc"li"letcreateDivdoc:divElementt=unsafeCreateElementdoc"div"letcreateEmbeddoc:embedElementt=unsafeCreateElementdoc"embed"letcreatePdoc:paragraphElementt=unsafeCreateElementdoc"p"letcreateH1doc:headingElementt=unsafeCreateElementdoc"h1"letcreateH2doc:headingElementt=unsafeCreateElementdoc"h2"letcreateH3doc:headingElementt=unsafeCreateElementdoc"h3"letcreateH4doc:headingElementt=unsafeCreateElementdoc"h4"letcreateH5doc:headingElementt=unsafeCreateElementdoc"h5"letcreateH6doc:headingElementt=unsafeCreateElementdoc"h6"letcreateQdoc:quoteElementt=unsafeCreateElementdoc"q"letcreateBlockquotedoc:quoteElementt=unsafeCreateElementdoc"blockquote"letcreatePredoc:preElementt=unsafeCreateElementdoc"pre"letcreateBrdoc:brElementt=unsafeCreateElementdoc"br"letcreateHrdoc:hrElementt=unsafeCreateElementdoc"hr"letcreateInsdoc:modElementt=unsafeCreateElementdoc"ins"letcreateDeldoc:modElementt=unsafeCreateElementdoc"del"letcreateAdoc:anchorElementt=unsafeCreateElementdoc"a"letcreateImgdoc:imageElementt=unsafeCreateElementdoc"img"letcreateObjectdoc:objectElementt=unsafeCreateElementdoc"object"letcreateParamdoc:paramElementt=unsafeCreateElementdoc"param"letcreateMapdoc:mapElementt=unsafeCreateElementdoc"map"letcreateAreadoc:areaElementt=unsafeCreateElementdoc"area"letcreateScriptdoc:scriptElementt=unsafeCreateElementdoc"script"letcreateTabledoc:tableElementt=unsafeCreateElementdoc"table"letcreateCaptiondoc:tableCaptionElementt=unsafeCreateElementdoc"caption"letcreateColdoc:tableColElementt=unsafeCreateElementdoc"col"letcreateColgroupdoc:tableColElementt=unsafeCreateElementdoc"colgroup"letcreateTheaddoc:tableSectionElementt=unsafeCreateElementdoc"thead"letcreateTfootdoc:tableSectionElementt=unsafeCreateElementdoc"tfoot"letcreateTbodydoc:tableSectionElementt=unsafeCreateElementdoc"tbody"letcreateTrdoc:tableRowElementt=unsafeCreateElementdoc"tr"letcreateThdoc:tableCellElementt=unsafeCreateElementdoc"th"letcreateTddoc:tableCellElementt=unsafeCreateElementdoc"td"letcreateSubdoc=createElementdoc"sub"letcreateSupdoc=createElementdoc"sup"letcreateSpandoc=createElementdoc"span"letcreateTtdoc=createElementdoc"tt"letcreateIdoc=createElementdoc"i"letcreateBdoc=createElementdoc"b"letcreateBigdoc=createElementdoc"big"letcreateSmalldoc=createElementdoc"small"letcreateEmdoc=createElementdoc"em"letcreateStrongdoc=createElementdoc"strong"letcreateCitedoc=createElementdoc"cite"letcreateDfndoc=createElementdoc"dfn"letcreateCodedoc=createElementdoc"code"letcreateSampdoc=createElementdoc"samp"letcreateKbddoc=createElementdoc"kbd"letcreateVardoc=createElementdoc"var"letcreateAbbrdoc=createElementdoc"abbr"letcreateDddoc=createElementdoc"dd"letcreateDtdoc=createElementdoc"dt"letcreateNoscriptdoc=createElementdoc"noscript"letcreateAddressdoc=createElementdoc"address"letcreateFramesetdoc:frameSetElementt=unsafeCreateElementdoc"frameset"letcreateFramedoc:frameElementt=unsafeCreateElementdoc"frame"letcreateIframedoc:iFrameElementt=unsafeCreateElementdoc"iframe"letcreateAudiodoc:audioElementt=unsafeCreateElementdoc"audio"letcreateVideodoc:audioElementt=unsafeCreateElementdoc"video"exceptionCanvas_not_availableletcreateCanvasdoc:canvasElementt=letc=unsafeCreateElementdoc"canvas"inifnot(Opt.testc##.getContext)thenraiseCanvas_not_available;clethtml_element:htmlElementtconstr=Js.Unsafe.global##._HTMLElementmoduleCoerceTo=structletelement:#Dom.nodeJs.t->elementJs.tJs.opt=ifdefhtml_element==undefinedthen(* ie < 9 does not have HTMLElement: we have to cheat to check
that something is an html element *)fune->ifdef(Js.Unsafe.coercee)##.innerHTML==undefinedthenJs.nullelseJs.some(Js.Unsafe.coercee)elsefune->ifJs.instanceofehtml_elementthenJs.some(Js.Unsafe.coercee)elseJs.nullletunsafeCoercetag(e:#elementt)=ife##.tagName##toLowerCase==Js.stringtagthenJs.some(Js.Unsafe.coercee)elseJs.nullletae=unsafeCoerce"a"eletareae=unsafeCoerce"area"eletbasee=unsafeCoerce"base"eletblockquotee=unsafeCoerce"blockquote"eletbodye=unsafeCoerce"body"eletbre=unsafeCoerce"br"eletbuttone=unsafeCoerce"button"eletcanvase=unsafeCoerce"canvas"eletcaptione=unsafeCoerce"caption"eletcole=unsafeCoerce"col"eletcolgroupe=unsafeCoerce"colgroup"eletdele=unsafeCoerce"del"eletdive=unsafeCoerce"div"eletdle=unsafeCoerce"dl"eletfieldsete=unsafeCoerce"fieldset"eletembede=unsafeCoerce"embed"eletforme=unsafeCoerce"form"eletframesete=unsafeCoerce"frameset"eletframee=unsafeCoerce"frame"eleth1e=unsafeCoerce"h1"eleth2e=unsafeCoerce"h2"eleth3e=unsafeCoerce"h3"eleth4e=unsafeCoerce"h4"eleth5e=unsafeCoerce"h5"eleth6e=unsafeCoerce"h6"eletheade=unsafeCoerce"head"elethre=unsafeCoerce"hr"elethtmle=unsafeCoerce"html"eletiframee=unsafeCoerce"iframe"eletimge=unsafeCoerce"img"eletinpute=unsafeCoerce"input"eletinse=unsafeCoerce"ins"eletlabele=unsafeCoerce"label"eletlegende=unsafeCoerce"legend"eletlie=unsafeCoerce"li"eletlinke=unsafeCoerce"link"eletmape=unsafeCoerce"map"eletmetae=unsafeCoerce"meta"elet_objecte=unsafeCoerce"object"eletole=unsafeCoerce"ol"eletoptgroupe=unsafeCoerce"optgroup"eletoptione=unsafeCoerce"option"eletpe=unsafeCoerce"p"eletparame=unsafeCoerce"param"eletpree=unsafeCoerce"pre"eletqe=unsafeCoerce"q"eletscripte=unsafeCoerce"script"eletselecte=unsafeCoerce"select"eletstylee=unsafeCoerce"style"elettablee=unsafeCoerce"table"elettbodye=unsafeCoerce"tbody"elettde=unsafeCoerce"td"elettextareae=unsafeCoerce"textarea"elettfoote=unsafeCoerce"tfoot"eletthe=unsafeCoerce"th"elettheade=unsafeCoerce"thead"elettitlee=unsafeCoerce"title"elettre=unsafeCoerce"tr"eletule=unsafeCoerce"ul"eletaudioe=unsafeCoerce"audio"eletvideoe=unsafeCoerce"video"eletunsafeCoerceEventconstr(ev:#eventt)=ifdefconstr!=undefined&&Js.instanceofevconstrthenJs.some(Js.Unsafe.coerceev)elseJs.nullletmouseEventev=unsafeCoerceEventJs.Unsafe.global##._MouseEventevletkeyboardEventev=unsafeCoerceEventJs.Unsafe.global##._KeyboardEventevletwheelEventev=unsafeCoerceEventJs.Unsafe.global##._WheelEventevletmouseScrollEventev=unsafeCoerceEventJs.Unsafe.global##._MouseScrollEventevletpopStateEventev=unsafeCoerceEventJs.Unsafe.global##._PopStateEventevend(****)leteventTarget=Dom.eventTargetleteventRelatedTarget(e:#mouseEventt)=Optdef.gete##.relatedTarget(fun()->matchJs.to_stringe##._typewith|"mouseover"->Optdef.gete##.fromElement(fun()->assertfalse)|"mouseout"->Optdef.gete##.toElement(fun()->assertfalse)|_->Js.null)leteventAbsolutePosition'(e:#mouseEventt)=letbody=document##.bodyinlethtml=document##.documentElementin(e##.clientX+body##.scrollLeft+html##.scrollLeft,e##.clientY+body##.scrollTop+html##.scrollTop)leteventAbsolutePosition(e:#mouseEventt)=Optdef.casee##.pageX(fun()->eventAbsolutePosition'e)(funx->Optdef.casee##.pageY(fun()->eventAbsolutePosition'e)(funy->x,y))letelementClientPosition(e:#elementt)=letr=e##getBoundingClientRectinletbody=document##.bodyinlethtml=document##.documentElementin(truncater##.left-body##.clientLeft-html##.clientLeft,truncater##.top-body##.clientTop-html##.clientTop)letgetDocumentScroll()=letbody=document##.bodyinlethtml=document##.documentElementinbody##.scrollLeft+html##.scrollLeft,body##.scrollTop+html##.scrollTopletbuttonPressed(ev:#mouseEventJs.t)=Js.Optdef.caseev##.which(fun()->matchev##.buttonwith|1->Left_button|2->Right_button|4->Middle_button|_->No_button)(funx->x)lethasMousewheelEvents()=letd=createDivdocumentind##setAttribute(Js.string"onmousewheel")(Js.string"return;");Js.typeof(Js.Unsafe.getd(Js.string"onmousewheel"))==Js.string"function"letaddMousewheelEventListenerWithOptionse?capture?once?passiveh=ifhasMousewheelEvents()thenaddEventListenerWithOptions?capture?once?passiveeEvent.mousewheel(handler(fun(e:mousewheelEventt)->letdx=-Optdef.gete##.wheelDeltaX(fun()->0)/40inletdy=-Optdef.gete##.wheelDeltaY(fun()->e##.wheelDelta)/40inh(e:>mouseEventt)~dx~dy))elseaddEventListenerWithOptions?capture?once?passiveeEvent._DOMMouseScroll(handler(fun(e:mouseScrollEventt)->letd=e##.detailinife##.axis==e##._HORIZONTAL_AXISthenh(e:>mouseEventt)~dx:d~dy:0elseh(e:>mouseEventt)~dx:0~dy:d))letaddMousewheelEventListenerehcapt=addMousewheelEventListenerWithOptions~capture:capteh(*****)moduleKeyboard_code=structtypet=|Unidentified(* Alphabetic Characters *)|KeyA|KeyB|KeyC|KeyD|KeyE|KeyF|KeyG|KeyH|KeyI|KeyJ|KeyK|KeyL|KeyM|KeyN|KeyO|KeyP|KeyQ|KeyR|KeyS|KeyT|KeyU|KeyV|KeyW|KeyX|KeyY|KeyZ(* Digits *)|Digit0|Digit1|Digit2|Digit3|Digit4|Digit5|Digit6|Digit7|Digit8|Digit9|Minus|Equal(* Whitespace *)|Tab|Enter|Space(* Editing *)|Escape|Backspace|Insert|Delete|CapsLock(* Misc Printable *)|BracketLeft|BracketRight|Semicolon|Quote|Backquote|Backslash|Comma|Period|Slash(* Function keys *)|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12(* Numpad keys *)|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadMultiply|NumpadSubtract|NumpadAdd|NumpadDecimal|NumpadEqual|NumpadEnter|NumpadDivide|NumLock(* Modifier keys *)|ControlLeft|ControlRight|MetaLeft|MetaRight|ShiftLeft|ShiftRight|AltLeft|AltRight(* Arrow keys *)|ArrowLeft|ArrowRight|ArrowUp|ArrowDown(* Navigation *)|PageUp|PageDown|Home|End(* Sound *)|VolumeMute|VolumeDown|VolumeUp(* Media *)|MediaTrackPrevious|MediaTrackNext|MediaPlayPause|MediaStop(* Browser special *)|ContextMenu|BrowserSearch|BrowserHome|BrowserFavorites|BrowserRefresh|BrowserStop|BrowserForward|BrowserBack(* Misc *)|OSLeft|OSRight|ScrollLock|PrintScreen|IntlBackslash|IntlYen|Pauselettry_codev=matchJs.to_stringvwith(* Alphabetic Characters *)|"KeyA"->KeyA|"KeyB"->KeyB|"KeyC"->KeyC|"KeyD"->KeyD|"KeyE"->KeyE|"KeyF"->KeyF|"KeyG"->KeyG|"KeyH"->KeyH|"KeyI"->KeyI|"KeyJ"->KeyJ|"KeyK"->KeyK|"KeyL"->KeyL|"KeyM"->KeyM|"KeyN"->KeyN|"KeyO"->KeyO|"KeyP"->KeyP|"KeyQ"->KeyQ|"KeyR"->KeyR|"KeyS"->KeyS|"KeyT"->KeyT|"KeyU"->KeyU|"KeyV"->KeyV|"KeyW"->KeyW|"KeyX"->KeyX|"KeyY"->KeyY|"KeyZ"->KeyZ(* Digits *)|"Digit0"->Digit0|"Digit1"->Digit1|"Digit2"->Digit2|"Digit3"->Digit3|"Digit4"->Digit4|"Digit5"->Digit5|"Digit6"->Digit6|"Digit7"->Digit7|"Digit8"->Digit8|"Digit9"->Digit9|"Minus"->Minus|"Equal"->Equal(* Whitespace *)|"Tab"->Tab|"Enter"->Enter|"Space"->Space(* Editing *)|"Escape"->Escape|"Backspace"->Backspace|"Insert"->Insert|"Delete"->Delete|"CapsLock"->CapsLock(* Misc Printable *)|"BracketLeft"->BracketLeft|"BracketRight"->BracketRight|"Semicolon"->Semicolon|"Quote"->Quote|"Backquote"->Backquote|"Backslash"->Backslash|"Comma"->Comma|"Period"->Period|"Slash"->Slash(* Function keys *)|"F1"->F1|"F2"->F2|"F3"->F3|"F4"->F4|"F5"->F5|"F6"->F6|"F7"->F7|"F8"->F8|"F9"->F9|"F10"->F10|"F11"->F11|"F12"->F12(* Numpad keys *)|"Numpad0"->Numpad0|"Numpad1"->Numpad1|"Numpad2"->Numpad2|"Numpad3"->Numpad3|"Numpad4"->Numpad4|"Numpad5"->Numpad5|"Numpad6"->Numpad6|"Numpad7"->Numpad7|"Numpad8"->Numpad8|"Numpad9"->Numpad9|"NumpadMultiply"->NumpadMultiply|"NumpadSubtract"->NumpadSubtract|"NumpadAdd"->NumpadAdd|"NumpadDecimal"->NumpadDecimal|"NumpadEqual"->NumpadEqual|"NumpadEnter"->NumpadEnter|"NumpadDivide"->NumpadDivide|"NumLock"->NumLock(* Modifier keys *)|"ControlLeft"->ControlLeft|"ControlRight"->ControlRight|"MetaLeft"->MetaLeft|"MetaRight"->MetaRight|"ShiftLeft"->ShiftLeft|"ShiftRight"->ShiftRight|"AltLeft"->AltLeft|"AltRight"->AltRight(* Arrow keys *)|"ArrowLeft"->ArrowLeft|"ArrowRight"->ArrowRight|"ArrowUp"->ArrowUp|"ArrowDown"->ArrowDown(* Navigation *)|"PageUp"->PageUp|"PageDown"->PageDown|"Home"->Home|"End"->End(* Sound *)|"VolumeMute"->VolumeMute|"VolumeDown"->VolumeDown|"VolumeUp"->VolumeUp(* Media *)|"MediaTrackPrevious"->MediaTrackPrevious|"MediaTrackNext"->MediaTrackNext|"MediaPlayPause"->MediaPlayPause|"MediaStop"->MediaStop(* Browser special *)|"ContextMenu"->ContextMenu|"BrowserSearch"->BrowserSearch|"BrowserHome"->BrowserHome|"BrowserFavorites"->BrowserFavorites|"BrowserRefresh"->BrowserRefresh|"BrowserStop"->BrowserStop|"BrowserForward"->BrowserForward|"BrowserBack"->BrowserBack(* Misc *)|"OSLeft"->OSLeft|"OSRight"->OSRight|"ScrollLock"->ScrollLock|"PrintScreen"->PrintScreen|"IntlBackslash"->IntlBackslash|"IntlYen"->IntlYen|"Pause"->Pause|_->Unidentifiedlettry_key_code_left=function|16->ShiftLeft|17->ControlLeft|18->AltLeft|91->MetaLeft|_->Unidentifiedlettry_key_code_right=function|16->ShiftRight|17->ControlRight|18->AltRight|91->MetaRight|_->Unidentifiedlettry_key_code_numpad=function|46->NumpadDecimal|45->Numpad0|35->Numpad1|40->Numpad2|34->Numpad3|37->Numpad4|12->Numpad5|39->Numpad6|36->Numpad7|38->Numpad8|33->Numpad9|13->NumpadEnter|111->NumpadDivide|107->NumpadAdd|109->NumpadSubtract|106->NumpadMultiply|110->NumpadDecimal|96->Numpad0|97->Numpad1|98->Numpad2|99->Numpad3|100->Numpad4|101->Numpad5|102->Numpad6|103->Numpad7|104->Numpad8|105->Numpad9|_->Unidentifiedlettry_key_code_normal=function|27->Escape|112->F1|113->F2|114->F3|115->F4|116->F5|117->F6|118->F7|119->F8|120->F9|121->F10|122->F11|123->F12|42->PrintScreen|145->ScrollLock|19->Pause|192->Backquote|49->Digit1|50->Digit2|51->Digit3|52->Digit4|53->Digit5|54->Digit6|55->Digit7|56->Digit8|57->Digit9|48->Digit0|189->Minus|187->Equal|8->Backspace|9->Tab|81->KeyQ|87->KeyW|69->KeyE|82->KeyR|84->KeyT|89->KeyY|85->KeyU|73->KeyI|79->KeyO|80->KeyP|219->BracketLeft|221->BracketRight|220->Backslash|20->CapsLock|65->KeyA|83->KeyS|68->KeyD|70->KeyF|71->KeyG|72->KeyH|74->KeyJ|75->KeyK|76->KeyL|186->Semicolon|222->Quote|13->Enter|90->KeyZ|88->KeyX|67->KeyC|86->KeyV|66->KeyB|78->KeyN|77->KeyM|188->Comma|190->Period|191->Slash|32->Space|93->ContextMenu|45->Insert|36->Home|33->PageUp|46->Delete|35->End|34->PageDown|37->ArrowLeft|40->ArrowDown|39->ArrowRight|38->ArrowUp|_->Unidentifiedletmake_unidentified_=Unidentifiedlettry_nextvaluef=function|Unidentified->Optdef.casevaluemake_unidentifiedf|v->vletrun_nextvaluef=function|Unidentified->fvalue|v->vletget_key_codeevt=evt##.keyCodelettry_key_locationevt=matchevt##.locationwith|1->run_next(get_key_codeevt)try_key_code_left|2->run_next(get_key_codeevt)try_key_code_right|3->run_next(get_key_codeevt)try_key_code_numpad|_->make_unidentifiedlet(|>)xf=fxletof_eventevt=Unidentified|>try_nextevt##.codetry_code|>try_key_locationevt|>run_next(get_key_codeevt)try_key_code_normalletof_key_code=try_key_code_normalendmoduleKeyboard_key=structtypet=Uchar.toptionletchar_of_intvalue=if0<valuethentrySome(Uchar.of_intvalue)with_->NoneelseNoneletempty_string_=Js.string""letnone_=Noneletof_eventevt=letkey=Optdef.getevt##.keyempty_stringinmatchkey##.lengthwith|0->Optdef.caseevt##.charCodenonechar_of_int|1->char_of_int(int_of_float(key##charCodeAt0))|_->Noneend(*****)letelement:#Dom.elementt->elementt=Js.Unsafe.coercetypetaggedElement=|AofanchorElementt|AreaofareaElementt|AudioofaudioElementt|BaseofbaseElementt|BlockquoteofquoteElementt|BodyofbodyElementt|BrofbrElementt|ButtonofbuttonElementt|CanvasofcanvasElementt|CaptionoftableCaptionElementt|ColoftableColElementt|ColgroupoftableColElementt|DelofmodElementt|DivofdivElementt|DlofdListElementt|EmbedofembedElementt|FieldsetoffieldSetElementt|FormofformElementt|FramesetofframeSetElementt|FrameofframeElementt|H1ofheadingElementt|H2ofheadingElementt|H3ofheadingElementt|H4ofheadingElementt|H5ofheadingElementt|H6ofheadingElementt|HeadofheadElementt|HrofhrElementt|HtmlofhtmlElementt|IframeofiFrameElementt|ImgofimageElementt|InputofinputElementt|InsofmodElementt|LabeloflabelElementt|LegendoflegendElementt|LiofliElementt|LinkoflinkElementt|MapofmapElementt|MetaofmetaElementt|ObjectofobjectElementt|OlofoListElementt|OptgroupofoptGroupElementt|OptionofoptionElementt|PofparamElementt|ParamofparamElementt|PreofpreElementt|QofquoteElementt|ScriptofscriptElementt|SelectofselectElementt|StyleofstyleElementt|TableoftableElementt|TbodyoftableSectionElementt|TdoftableCellElementt|TextareaoftextAreaElementt|TfootoftableSectionElementt|ThoftableCellElementt|TheadoftableSectionElementt|TitleoftitleElementt|TroftableRowElementt|UlofuListElementt|VideoofvideoElementt|Otherofelementtletothere=Other(e:#elementt:>elementt)lettagged(e:#elementt)=lettag=Js.to_bytestringe##.tagName##toLowerCaseinifString.lengthtag=0thenothereelsematchString.unsafe_gettag0with|'a'->(matchtagwith|"a"->A(Js.Unsafe.coercee)|"area"->Area(Js.Unsafe.coercee)|"audio"->Audio(Js.Unsafe.coercee)|_->othere)|'b'->(matchtagwith|"base"->Base(Js.Unsafe.coercee)|"blockquote"->Blockquote(Js.Unsafe.coercee)|"body"->Body(Js.Unsafe.coercee)|"br"->Br(Js.Unsafe.coercee)|"button"->Button(Js.Unsafe.coercee)|_->othere)|'c'->(matchtagwith|"canvas"->Canvas(Js.Unsafe.coercee)|"caption"->Caption(Js.Unsafe.coercee)|"col"->Col(Js.Unsafe.coercee)|"colgroup"->Colgroup(Js.Unsafe.coercee)|_->othere)|'d'->(matchtagwith|"del"->Del(Js.Unsafe.coercee)|"div"->Div(Js.Unsafe.coercee)|"dl"->Dl(Js.Unsafe.coercee)|_->othere)|'e'->(matchtagwith|"embed"->Embed(Js.Unsafe.coercee)|_->othere)|'f'->(matchtagwith|"fieldset"->Fieldset(Js.Unsafe.coercee)|"form"->Form(Js.Unsafe.coercee)|"frameset"->Frameset(Js.Unsafe.coercee)|"frame"->Frame(Js.Unsafe.coercee)|_->othere)|'h'->(matchtagwith|"h1"->H1(Js.Unsafe.coercee)|"h2"->H2(Js.Unsafe.coercee)|"h3"->H3(Js.Unsafe.coercee)|"h4"->H4(Js.Unsafe.coercee)|"h5"->H5(Js.Unsafe.coercee)|"h6"->H6(Js.Unsafe.coercee)|"head"->Head(Js.Unsafe.coercee)|"hr"->Hr(Js.Unsafe.coercee)|"html"->Html(Js.Unsafe.coercee)|_->othere)|'i'->(matchtagwith|"iframe"->Iframe(Js.Unsafe.coercee)|"img"->Img(Js.Unsafe.coercee)|"input"->Input(Js.Unsafe.coercee)|"ins"->Ins(Js.Unsafe.coercee)|_->othere)|'l'->(matchtagwith|"label"->Label(Js.Unsafe.coercee)|"legend"->Legend(Js.Unsafe.coercee)|"li"->Li(Js.Unsafe.coercee)|"link"->Link(Js.Unsafe.coercee)|_->othere)|'m'->(matchtagwith|"map"->Map(Js.Unsafe.coercee)|"meta"->Meta(Js.Unsafe.coercee)|_->othere)|'o'->(matchtagwith|"object"->Object(Js.Unsafe.coercee)|"ol"->Ol(Js.Unsafe.coercee)|"optgroup"->Optgroup(Js.Unsafe.coercee)|"option"->Option(Js.Unsafe.coercee)|_->othere)|'p'->(matchtagwith|"p"->P(Js.Unsafe.coercee)|"param"->Param(Js.Unsafe.coercee)|"pre"->Pre(Js.Unsafe.coercee)|_->othere)|'q'->(matchtagwith|"q"->Q(Js.Unsafe.coercee)|_->othere)|'s'->(matchtagwith|"script"->Script(Js.Unsafe.coercee)|"select"->Select(Js.Unsafe.coercee)|"style"->Style(Js.Unsafe.coercee)|_->othere)|'t'->(matchtagwith|"table"->Table(Js.Unsafe.coercee)|"tbody"->Tbody(Js.Unsafe.coercee)|"td"->Td(Js.Unsafe.coercee)|"textarea"->Textarea(Js.Unsafe.coercee)|"tfoot"->Tfoot(Js.Unsafe.coercee)|"th"->Th(Js.Unsafe.coercee)|"thead"->Thead(Js.Unsafe.coercee)|"title"->Title(Js.Unsafe.coercee)|"tr"->Tr(Js.Unsafe.coercee)|_->othere)|'u'->(matchtagwith|"ul"->Ul(Js.Unsafe.coercee)|_->othere)|'v'->(matchtagwith|"video"->Video(Js.Unsafe.coercee)|_->othere)|_->othereletopt_taggede=Opt.casee(fun()->None)(fune->Some(taggede))typetaggedEvent=|MouseEventofmouseEventt|KeyboardEventofkeyboardEventt|MousewheelEventofmousewheelEventt|MouseScrollEventofmouseScrollEventt|PopStateEventofpopStateEventt|OtherEventofeventtlettaggedEvent(ev:#eventJs.t)=Js.Opt.case(CoerceTo.mouseEventev)(fun()->Js.Opt.case(CoerceTo.keyboardEventev)(fun()->Js.Opt.case(CoerceTo.wheelEventev)(fun()->Js.Opt.case(CoerceTo.mouseScrollEventev)(fun()->Js.Opt.case(CoerceTo.popStateEventev)(fun()->OtherEvent(ev:>eventt))(funev->PopStateEventev))(funev->MouseScrollEventev))(funev->MousewheelEventev))(funev->KeyboardEventev))(funev->MouseEventev)letopt_taggedEventev=Opt.caseev(fun()->None)(funev->Some(taggedEventev))letstopPropagationev=lete=Js.Unsafe.coerceevinOptdef.casee##.stopPropagation(fun()->e##.cancelBubble:=Js._true)(fun_->e##_stopPropagation)let_requestAnimationFrame:(unit->unit)Js.callback->unit=Js.Unsafe.pure_expr(fun_->letw=Js.Unsafe.coercewindowinletl=[w##.requestAnimationFrame;w##.mozRequestAnimationFrame;w##.webkitRequestAnimationFrame;w##.oRequestAnimationFrame;w##.msRequestAnimationFrame]intryletreq=List.find(func->Js.Optdef.testc)linfuncallback->Js.Unsafe.fun_callreq[|Js.Unsafe.injectcallback|]withNot_found->letnow()=(new%jsJs.date_now)##getTimeinletlast=ref(now())infuncallback->lett=now()inletdt=!last+.(1000./.60.)-.tinletdt=ifPoly.(dt<0.)then0.elsedtinlast:=t;ignore(window##setTimeoutcallbackdt))(****)lethasPushState()=Js.Optdef.test(Js.Unsafe.coercewindow##.history)##.pushStatelethasPlaceholder()=leti=createInputdocumentinJs.Optdef.test(Js.Unsafe.coercei)##.placeholderlethasRequired()=leti=createInputdocumentinJs.Optdef.test(Js.Unsafe.coercei)##.requiredletoverflow_limit=2147483_000.(* ms *)typetimeout_id_safe=timeout_idoptionrefletsetTimeoutcallbackd:timeout_id_safe=letid=refNoneinletrecloopd()=letstep,remain=ifPoly.(d>overflow_limit)thenoverflow_limit,d-.overflow_limitelsed,0.inletcb=ifPoly.(remain=0.)thencallbackelseloopremaininid:=Some(window##setTimeout(Js.wrap_callbackcb)step)inloopd();idletclearTimeout(id:timeout_id_safe)=match!idwith|None->()|Somex->id:=None;window##clearTimeoutxletjs_array_of_collection(c:#elementcollectionJs.t):#elementJs.tJs.js_arrayJs.t=Js.Unsafe.(meth_call(js_expr"[].slice")"call"[|injectc|])