Added functionality for delegated events, updated tests accordingly. Included Element.matches polyfill by github user elijahmanor