Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 40 additions & 19 deletions src/DOM/HTML/Indexed.purs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,49 @@ type ClipboardEvents r =
| r
)

type MediaEvents r =
( onLoadStart :: Event
, onProgress :: Event
, onSuspend :: Event
, onAbort :: Event
, onError :: Event
, onEmptied :: Event
, onStalled :: Event
, onLoadedMetadata :: Event
, onLoadedData :: Event
, onCanPlay :: Event
, onCanPlayThrough :: Event
, onPlaying :: Event
, onWaiting :: Event
, onSeeking :: Event
, onSeeked :: Event
, onEnded :: Event
, onDurationChange :: Event
, onTimeUpdate :: Event
, onPlay :: Event
, onPause :: Event
, onRateChange :: Event
, onResize :: Event
, onVolumeChange :: Event
| r
)

type InteractiveEvents r = ClipboardEvents (FocusEvents (TransitionEvents (KeyEvents (PointerEvents (TouchEvents (DragEvents (MouseEvents (onWheel :: WheelEvent | r))))))))

type GlobalProperties r = GlobalAttributes (GlobalEvents r)

type Interactive r = InteractiveEvents (GlobalProperties r)

type Media r = Interactive (MediaEvents
( autoplay :: Boolean
, controls :: Boolean
, loop :: Boolean
, muted :: Boolean
, preload :: PreloadValue
, src :: String
| r
))

type Noninteractive r = GlobalProperties r

type HTMLa = Interactive
Expand Down Expand Up @@ -166,15 +203,7 @@ type HTMLarticle = Interactive ()

type HTMLaside = Interactive ()

type HTMLaudio = Interactive
( autoplay :: Boolean
, controls :: Boolean
, loop :: Boolean
, muted :: Boolean
, preload :: PreloadValue
, src :: String
, onError :: Event
)
type HTMLaudio = Media ()

type HTMLb = Interactive ()

Expand Down Expand Up @@ -630,19 +659,11 @@ type HTMLul = Interactive (onScroll :: Event)

type HTMLvar = Interactive ()

type HTMLvideo = Interactive
( autoplay :: Boolean
, controls :: Boolean
, height :: CSSPixel
, loop :: Boolean
, muted :: Boolean
type HTMLvideo = Media
( height :: CSSPixel
, poster :: String
, preload :: PreloadValue
, src :: String
, width :: CSSPixel
, type :: MediaType
, onError :: Event
, onTimeUpdate :: Event
)

type HTMLwbr = Interactive ()