jods

Results 559 comments of jods

> HTMLInputElement chain is the "real" node Object outside of the sandbox Is it really? that's not what I see from a debugger: ``` > input HTMLInputElement {undefined: HTMLInputElementImpl} >...

In my debugger: ``` > obj.constructor === Object false ```

Everything looks consistent in my debugger. Simply the end of the proto chain of `HTMLInputElement` is not Node's global `Object`. In itself it's not bad, but apparently it's not the...

Hmmm.... maybe that's the problem actually, not the solution! Strangely: ``` >Object === window.Object true ``` So `window.Object` _is_ the Node `Object` indeed, but somehow `HtmlInputElement` is not rooted in...

I am very confused now, but if I set `window.Object = Object` in the `created` event. Can someone explain in more details what actually happens? Is this an acceptable fix?...

@Sebmaster I can't make sense of what I have observed in the debugger but anyway... You said the prototype chain of `HTMLInputElement` does go the global `Object` rather than `window.Object`,...

> It would require setting up a whole new prototype chain for every jsdom window Not necessarily. Instead of sharing the global `Object` you could share a singleton `window.Object`. That...

just thinking... or do you want non-shared `window.Object`? You can't have everything I guess. If you want to isolate `window.Object` and re-use `HTMLInputElement` & co for perf reason that's obviously...

> Walking the prototype chain would still not work for example. Agreed, but it would still be better than today. At least `instanceof` would work. Whereas today none of those...

+1 would be nice as General availability in browsers means more web apps use it and fail in JSDOM. Given that JSDOM implements `XMLHttpRequest`, it could be as simple as...