title: Receiving complex javascript values through external interface
body: <p>I'm trying to receive and potentially send complex values through TWebBrowser (using TEmbeddedWB) with the provided external object.
  For example; in javascript I would try to use the exposed method with an array as a parameter:</p>
  
  <pre><code>var test = [123, 'abc'];
  external.someFunction(test);
  
  //Or something more complex
  var complexObject = {
    someMethod : function(){ return 1; },
    someProperty : 123,
    someArray : ['xyz', 3.14]
  }
  external.someFunction(complexObject);
  </code></pre>
  
  <p>Checking the VarType of both of these examples tells me it's a IDispatch.</p>
  
  <pre><code>function TSomeClass.someFunction(var Param : OleVariant) : OleVariant;
  var
    vType : Integer;
  begin
    vType := (VarType(Param) and VarTypeMask); //Says 9 (varDispatch)
    Result := true;
  end;
  </code></pre>
  
  <p>I'm not completely familiar with COM and I'm not sure how to work with this.</p>
  
  <p>Any help would be appreciated.</p>