We have created a custom node in C#, this node has a button that opens a URL in an instance of CEFSharp web-kit , and gets the cookies that get generated by the URL.
The issue we are facing is that the output gets recalculated (refreshed) only after disconnecting and reconnecting the Input to this custom node.
Does anyone know how can we recalculate Output upon closure of the CEFSharp ?
Here is the code of the main class:
namespace WebExample.WebExample
{
[NodeName(“Get Cookies From Web”)]
[NodeDescription(“Get Cookies From Web Browser”)][InPortNames(“Input”)]
[InPortTypes(“string”)]
[OutPortNames(“Output”)]
[OutPortTypes(“List”)]
[IsDesignScriptCompatible]
public class GetData:NodeModel
{
public static List list = new List();
public GetData()
{
RegisterAllPorts();
}public override IEnumerable<AssociativeNode> BuildOutputAst(List<AssociativeNode> inputAstNodes) { var sliderValue = AstFactory.BuildExprList(GetData.list); var functionCall = AstFactory.BuildFunctionCall( new Func< string,List<string>>(GetCookie.Class1.getcookies), new List<AssociativeNode> { inputAstNodes[0] }); return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionCall) }; }
}
}