Added support for getting element's location