Hi,
The code with EO.WebBrowser is similar:
Code: C#
EO.WebBrowser.DOM.Element[] elems =
webControl1.WebView.GetDOMWindow().document.getElementsByTagName("a");
foreach (EO.WebBrowser.DOM.Element elem in elems)
{
....
}
However our Element class only exposes a few properties. If you need additional data, you can use the indexer property:
http://www.essentialobjects.com/doc/6/eo.webbrowser.jsobject.item1.aspxFor example, elem.id is actually shortcut for elem["id"].
The reason that we do not expose a lot of properties is because every time you access a property or method, the code needs to switch between .NET and JavaScript and this is a rather expensive operation. As such if you have complex logics related to your DOM objects, you should run the logic on JavaScript side and then:
1. Use EvalScript to trigger the code and pass arguments from .NET side to JavaScript side;
2. Use return value or JavaScript extension to pass value back to .NET side. See here for more information about JavaScript extension:
http://www.essentialobjects.com/doc/6/advanced/jsext.aspxThe key is to reduce such boundary crossing. Too many crossing can cause noticeable performance penalty.
Hope this helps. Please feel free to let us know if you have any more questions.
Thanks!