Is this expected behavior that is documented some where or is this an error / glitch? Here is the code:
console.log(typeof myURL); // is type object
console.log(myURL); // does not have a property of type name
console.log(myURL.name); // verified name exists on the object
I found this bizarre. Here is the preceding code for above:
let myURL = new URL(url);
myURL.name = myURL.hostname.replace(/\./g, '_');
I have documented the behavior but want to know if this is expected or a "glitch".