var element = document.getElementsByTagName("div")[0];
var id = element.id;
element = document.querySelector("#id");
async function test (){
document.body.innerHTML = await "<foo id='successGetID'>Hello Wolrd</foo>";
var init = await document.getElementsByTagName("foo")[0].id;
alert( init );
}
test();