Using JavaScript you can use the watch() method on the clientHeight property:
Document.body.watch("clientHeight", function(property, oldHeight, newHeight) {
// what you want to do when the height changes
});
Document.body.watch("clientHeight", function(property, oldHeight, newHeight) {
// what you want to do when the height changes
});