Is it possible to detect the DOM elements under a spot the user taps on a website using the WP7 WebBrowser control? I would like to let the user identify certain sections of the rendered page.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. This code works pretty well for me:
It goes along Justin’s answer (who beat me while coding). It first defines a click handler which then is attached to the page’s body (all via
InvokeScript). Every time you tap an elementScriptNotifyshould be called on theWebBrowserreporting the tapped element’s tag name.Make sure you have set
IsScriptEnabledtrue for your browser control.