Raynos / min-document

A minimal DOM implementation
MIT License
109 stars 27 forks source link

DOMElement.focus should assign document.activeElement #39

Open dotdat opened 8 years ago

dotdat commented 8 years ago

Regarding the line: https://github.com/Raynos/min-document/blob/master/dom-element.js#L157

It would be nice to be able to test that when an element is focused, it becomes the activeElement as that's how it would generally behave within a browser. This looks like it could be accomplished by assigning owner.activeElement = this; within the focus function.