Microsoft Universal App WebView getElement
Microsoft Universal App WebView getElement
在classic window中,有一个组件名称WebBrowser,它支持GetElementById和GetElementByTagName,这些功能return我HTMlElement或HTMLElementCollection,我可以得到元素的名称,class, id, value, status... 这些天,当移动到 Window Universal App 时,WebView 可以导航到一个站点,但微软似乎不会将这些 GetElemment 函数放在它上面.
如果有办法获取 Webview 的元素,请帮助我。
使用 WebView control, you can access document elements by invoking javascript code using the InvokeScriptAsync method. You can interact with the invoked code from the app by adding a Windows Runtime Object with the AddWebAllowedObject method. An example can be found in the JSBrowser 应用程序。
在classic window中,有一个组件名称WebBrowser,它支持GetElementById和GetElementByTagName,这些功能return我HTMlElement或HTMLElementCollection,我可以得到元素的名称,class, id, value, status... 这些天,当移动到 Window Universal App 时,WebView 可以导航到一个站点,但微软似乎不会将这些 GetElemment 函数放在它上面.
如果有办法获取 Webview 的元素,请帮助我。
使用 WebView control, you can access document elements by invoking javascript code using the InvokeScriptAsync method. You can interact with the invoked code from the app by adding a Windows Runtime Object with the AddWebAllowedObject method. An example can be found in the JSBrowser 应用程序。