TypeScript Version: 3.8.0
Search Terms:
HTMLVideo, HTMLVideoElement, playsinline
Code
const el = document.createElement('video');
el.playsinline = true; // Property 'playsinline' does not exist on type 'HTMLVideoElement'.
Expected behavior:
There should not be a TS error. playsinline is a boolean attribute that exists on the <video> element per https://html.spec.whatwg.org/multipage/media.html#htmlvideoelement
Actual behavior:
There is a TS error: Property 'playsinline' does not exist on type 'HTMLVideoElement'.
Playground Link:
https://www.typescriptlang.org/play/?ssl=2&ssc=92&pln=1&pc=1#code/MYewdgzgLgBApgGxgXhgExMArgWzmKAOmACc4BDKOAUQTjwIAoByANwEs04RmBKAbgCwAKESEADgnIBPCOzAJ5cFDCgkscfjAD02mAAUSIcXBJRpMZpJlyFS5uhBwIMMCFhwAHu2gxwq6RNLAAkAFQBZABkANU5uWnp8KGZCIA
Related Issues:
None.
TypeScript Version: 3.8.0
Search Terms:
HTMLVideo, HTMLVideoElement, playsinline
Code
Expected behavior:
There should not be a TS error.
playsinlineis a boolean attribute that exists on the<video>element per https://html.spec.whatwg.org/multipage/media.html#htmlvideoelementActual behavior:
There is a TS error:
Property 'playsinline' does not exist on type 'HTMLVideoElement'.Playground Link:
https://www.typescriptlang.org/play/?ssl=2&ssc=92&pln=1&pc=1#code/MYewdgzgLgBApgGxgXhgExMArgWzmKAOmACc4BDKOAUQTjwIAoByANwEs04RmBKAbgCwAKESEADgnIBPCOzAJ5cFDCgkscfjAD02mAAUSIcXBJRpMZpJlyFS5uhBwIMMCFhwAHu2gxwq6RNLAAkAFQBZABkANU5uWnp8KGZCIA
Related Issues:
None.