Hello, we were just trying to update to the latest version of EO and noticed a breaking change. It looks like it no longer has the JSArray type and I can't seem to find documentation to work around this.
This is the code we were using:
Code: C#
try
{
var scrollInfo = (JSObject)addin.ActiveBrowser.WebView.EvalScript(javaScript);
if (scrollInfo != null && scrollInfo.ToString() != "null" && scrollInfo["scrollers"] != null && scrollInfo["largest"] != null)
{
var index = Int32.Parse(scrollInfo["largest"].ToString());
var elements = new List<string>();
foreach (var eoElement in (scrollInfo["scrollers"] as JSArray))
{
var element = eoElement as JSObject;
elements.Add(element["tagName"].ToString());
}
return elements;
}
return Enumerable.Empty<string>().ToList();
}
catch
{
throw; //let it bubble up
}
I tried the following code to replace JSArray, but received the error "Object reference not set to an instance of an object."
Code: C#
scrollInfo["scrollers"] as JSRealObject).ToArray()
What would be the best way to replace JSArray?