Script Marshalling Problem

Jan 16, 2012 at 3:46 AM

For better or worse, I am trying to write my own HTML DOM and am using Jint as the scripting engine (you guys rock btw).  I am currently having issues trying to support the DOM's write() and writeln() methods.  From what I understand the methods accept a variable number of arguments.  My .NET method is something like:



        public void writeln(params string[] args)
            foreach (string str in args)
                DocumentBuilder.ParseFragment(str, this, WriteContext.Parent);



document.writeln('is', 'a', '<strong>test</strong>');


But when the script attempts to run I get a marshaller exception telling me 'Array is required' (Marshal.cs:line 235).  Is there some special workaround for this?  Or something I am doing wrong?