[Mono-bugs] [Bug 509337] System.Windows.Forms.HtmlDocument.InvokeScript bugs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 2 21:15:58 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=509337

User ctype at mail.ru added comment
http://bugzilla.novell.com/show_bug.cgi?id=509337#c1


Alex Prudkiy <ctype at mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mono-bugs at lists.ximian.com  |avidigal at novell.com




--- Comment #1 from Alex Prudkiy <ctype at mail.ru>  2009-06-02 19:15:56 MDT ---
To fix support of string\boolean arguments need next change in 
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlDocument.cs?view=markup

function InvokeScript should look like next:
        public Object InvokeScript (string scriptName, object[] args) 
        {
            string[] strArgs = new string[args.Length];
            for (int i = 0; i < args.Length; i++) {
                if (args[i] is string)
                    strArgs[i] = "\"" + args[i].ToString().Replace("\"",
"\\\\\\\"").Replace("'", "\\\\\\'") + "\"";
                else if(args[i] is Boolean)
                    strArgs[i] = (Boolean)args[i]? "true" : "false"; 
                else
                    strArgs[i] = args[i].ToString();
            }
            return document.InvokeScript ("eval ('" + scriptName + "(" +
String.Join (",", strArgs) + ")');");
        }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list