Added new function to get active dom element.

Change api of dom function to take the webview as parameter.