Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImage constructor / inheritance not consistent #172
Labels
Comments
|
NB: there is an obvious workaround with HTMLImageElement img = document.createElement("img");
img.width = 200;
img.height = 200; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in Javascript, you can do
and in TypeScript
due to the declaration in lib.d.ts :
In JSweet, this is impossible, jsweet.dom.Image does not extend HTMLImageElement and jsweet.dom.Globals.Image is an instance of jsweet.dom.Image which is no use for this case.
Even worse:
produces: