Title: How to handle document.body.clientHeight change in js?
Tags: javascript;events;document-body
Question: I would like to listen to change on document.body.clientHeight it is possible and how?
For example when some node is appended into body, clientHeight is changed.
Comment: [Detect Document Height Change](https://stackoverflow.com/questions/14866775/detect-document-height-change)

Comment: And there, look at the *update 2020* answer.


Here is another answer: You can make use of the resize event.
window.addEventListener('resize', reportWindowSize);
https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:09/10/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<javascript><events><document-body>', 'Title': 'How to handle document.body.clientHeight change in js?', 'ViewCount': 159, 'id': 63830983, 'user_AboutMe': None, 'user_AccountId': 19476749.0, 'user_DisplayName': 'nirebam368', 'user_Reputation': 155.0, 'user_Views': 14.0, 'user_id': 14248016.0}}