Items
meta are not special, you can request them and get your attributes in the usual way.
In this case, how do you get the value of the content attribute from the first meta[property="og:image"] element:
var element = document.querySelector('meta[property="og:image"]'); var content = element && element.getAttribute("content");
querySelector supported by all modern browsers, as well as IE8.
source share