returns the query selector for a given dom node