Re: [whatwg/dom] createElement() does not put things in the HTML namespace correctly (#643)

I'm not sure, but shouldn't the code be more like:

```javascript
const doc = new Document();
const a = doc.createElement("a");
console.log(a.constructor.name);
```

?

In this case we get correct `Element`, as it's created inside newly created document. Creating it in default window's document (`document`) does not make sense to me. Am I missing something and creating new document should replace the existing one?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/643#issuecomment-385400626

Received on Monday, 30 April 2018 13:39:35 UTC