Create facade for `Image`
armanbilge opened this issue · 2 comments
armanbilge commented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image
ScalablyTyped thought we had this, so we may as well add it :)
zetashift commented
So far I've got this:
/** Image creates a new HTMLImageElement instance. It is functionally equivalent to document.createElement('img').
*
* @param width
* The width of the image (i.e., the value for the width attribute).
* @param height
* The height of the image (i.e., the value for the height attribute).
*/
class Image(width: Int, height: Int) extends HTMLImageElement
However in my exploration I see that the HTMLImageElement
is missing some properties, for example:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset
Want me to add these as well in the same PR?
armanbilge commented
Sure, if you're up for it! :)