Update query.js

Added a matchesSelector method