I'm not a fan of using a secondary system (onenter/onexit) for dealing with selector matching. I'd prefer to just use a regular event emitter at each node and then do The Right Thing (tm). Your current approach still requires doing selector matching on every node, which I think is wasteful given that most matches will fail.