You can use Array.prototype.indexOf.call()
like this
let nodes = document.getElementsByTagName('*');
Array.prototype.indexOf.call(nodes, document.body);
You can use Array.prototype.indexOf.call()
like this
let nodes = document.getElementsByTagName('*');
Array.prototype.indexOf.call(nodes, document.body);