purescript-deprecated/purescript-dom

Missing HTMLAudioElement definitions and types

Closed this issue · 3 comments

Right now I have a project where I could use purescript-dom-classy to convert my HTMLElement types to the proper ones, but I'm using currentTime and setCurrentTime from HTMLMediaElement on an audio element. This causes my unsafeCoerced code to work but of course, fails when using fromHTMLElement since it tries to parse to the media element and fails.

Should we add the audio element types and code to work with them?

garyb commented

Yes please, it's not missing intentionally!

Ah, sorry, I think I've just misunderstood. I should be using htmlAudioElementToHTMLMediaElement instead? Looks like the MDN docs are saying that this just inherits from HTMLMediaElement anyhow.

garyb commented

Ah right, yeah that looks like the case for this element then, since it has an empty interface :)