I was trying to detect if a browser supports innerHeight...
Is there any tag to check browser support for a specific code of JavaScript like that of @supports in CSS?
InnerHeight has a 95.22% all-time browser support rating. Pretty sure you're safe using it. :)
You can use what you're trying to use in an "if" statement
if(window.innerHeight)
console.log("window.innerHeight supported");
else
console.log("window.innerHeight not supported");
div=document.getElementsByTagName("div")[0];
if(div.innerHeight)
console.log("div.innerHeight supported");
else
console.log("div.innerHeight not supported");