Changes to matchesSelector to make tests work

Last changes.
Now all `event-dom` tests pass with `npm test`