Is NaturalHeight and the naturalWidth property new or deprecated?

naturalHeight and naturalWidth property of the HTMLImageElement object HTMLImageElement not specified on the mozilla website Link

Although both properties work fine in Firefox, I don't see this in the documentation.

Is this an outdated property or new in HTML5?

Can someone give me a link where these properties are defined in the standard?

+6
source share
1 answer

Definitely not out of date. Checking the HTML5 specification for the img element, we can see:

The IDL attributes naturalWidth and naturalHeight must return the internal width and height of the image, in CSS pixels, if the image, or 0. [CSS]

+6
source

Source: https://habr.com/ru/post/912763/


All Articles