Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created March 22, 2018 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diego3g/26344d0798b5c22bfabc154dafe03ed3 to your computer and use it in GitHub Desktop.
Save diego3g/26344d0798b5c22bfabc154dafe03ed3 to your computer and use it in GitHub Desktop.
function onResize(event) {
var node = document.createElement("p");
var textnode = document.createTextNode(event.target.outerWidth + "x" + event.target.outerHeight);
node.appendChild(textnode);
document.getElementById('content').appendChild(node);
}
window.onresize = onResize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment