snabbdom icon indicating copy to clipboard operation
snabbdom copied to clipboard

TypeScript: Property 'autoplay' does not exist on type for <audio>

Open mrehayden1 opened this issue 7 years ago • 5 comments

If I specify the 'autoplay' attribute for an

Property 'autoplay' does not exist on type 'DetailedHTMLProps<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>'.

When I change the attribute to autoPlay the autoplay no longer works.

mrehayden1 avatar Aug 20 '18 11:08 mrehayden1

Yea what's the deal with this?

pbirsinger avatar Aug 19 '19 21:08 pbirsinger

Why is this a snabbdom issue, please?

mightyiam avatar Aug 20 '19 04:08 mightyiam

Because snabbdom is a TypeScript library and autoplay is an attribute on the audio element.

https://www.w3.org/TR/html50/embedded-content-0.html#the-audio-element

mrehayden1 avatar Aug 20 '19 07:08 mrehayden1

Snabbdom probably sources these properties from TypeScript's DOM types library itself. Doesn't it?

Here is the autoplay property: https://github.com/microsoft/TypeScript/blob/219a570a75f1c3df67ae0282e41848b87781fc51/src/lib/dom.generated.d.ts#L7615

I couldn't find where DetailedHTMLProps or AudioHTMLAttributes come from. Help?

mightyiam avatar Aug 21 '19 04:08 mightyiam

just came across this while searching for another answer. use autoPLay.

jpetitte avatar Apr 12 '20 19:04 jpetitte