Implement ElementQuery API (#13146, #13148)

Change-Id: I52603535d80ce0e3aee61e2da2ab3c867824fd32