JSFiddle - React, Tailwind, and code Playground
HTML
<iframe style="width: 50px; height: 200px"></iframe>
JavaScript
var x = 0;
document.querySelector("iframe").offsetHeight;
var l = frames[0].matchMedia("(orientation: landscape)");
l.addListener(function(arg) {
++x;
});
document.querySelector("iframe").style.height = "25px";
document.querySelector("iframe").offsetHeight;
alert(x);