Getting mismatching height values - same device but different iOS version

I just wondering why am getting different value for
Code Block
document.documentElement.clientHeight


For example:
when in landscape iPhone 11 - iOS < 14.2 gives 414 in css pixel
but,
when in landscape iPhone 11 - iOS > 14.2 gives 364 in css pixel

Is there anything changed with above iOS 14.2 versions?
Where exactly do you call:
document.documentElement.clientHeight

iPhone 11 physical height in landscape is 414.

The difference is likely to take into account the safe area (notch and bottom)

Probably, the library you use has been updated for 14.2
In addition, in Mozilla doc
https ://developer.mozilla .org/fr/docs/Web/API/Document/height
they advise not to use anymore:

Document.height 
Deprecated 
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. 
Note: Starting in Gecko 6.0, document.height is no longer supported. Instead, use document.body.clientHeight. See element.clientHeight.


Am not using document.height. Just trying to set up iframe height from HTML element height.

Am using mobile safari.

https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight.


Which browser do you use ?

Did you see here how height is computed ? Seems logical you don't get 414 (full screen height):
https ://developer.mozilla. org/en-US/docs/Web/API/Element/clientHeight

It is mobile safari - iPhone 11.

What is the logic behind that am not getting 414px on iPhone 11 - iOS 14.4?

Logic could be that now, clientHeight takes correctly into account the spec, leaving margins (notably for safe area).

Have you the opportunity to test on SE simulator (no notch), to see if you get full height (375) with iOS 14.4 ?
That would be some confirmation of the logic.
Getting mismatching height values - same device but different iOS version
 
 
Q