You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In trying to reproduce this, I made the following:
constmyElement=document.createElement("div")console.log(myElement.id)// returns an empty string, ""// const myApp = document.querySelector("notMyApp");// ^^ will return null before you can access it
Can check it out here: https://jsfiddle.net/e5h0zx6v/
So I believe in practical usecases returning undefined will almost never happen, and that's maybe why the spec doesn't really mention it?
Activity
zetashift commentedon Jan 22, 2023
In trying to reproduce this, I made the following:
Can check it out here: https://jsfiddle.net/e5h0zx6v/
So I believe in practical usecases returning undefined will almost never happen, and that's maybe why the spec doesn't really mention it?
armanbilge commentedon Jan 22, 2023
Yeah, I wonder if actually you discovered a browser bug.