Permalink
Browse files

Added bit of test code for object marshalling

Signed-off-by: Peter Nelson <peter@peterdn.com>
  • Loading branch information...
1 parent 4e17147 commit 29592252f50168d5afcef90701f557f00181b66f @peterdn peterdn committed Sep 22, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 WebKitBrowserTest/MainForm.cs
@@ -286,6 +286,9 @@ private void jSTestPageToolStripMenuItem_Click(object sender, EventArgs e)
alert(txt);
document.getElementById(""dog"").innerHTML = txt;
}
+function testtest(dog) {
+ alert(dog.test.x);
+}
</script>
</head>
<body>
@@ -309,9 +312,15 @@ private void test3ToolStripMenuItem_Click(object sender, EventArgs e)
dog.SetProperty("name", "Holly");
MessageBox.Show("name = " + dog.GetProperty("name").ToString());
ctx.EvaluateScript("printDog(myDog)");
+ dog.SetProperty("test", new TestClass());
+ ctx.EvaluateScript("testtest(myDog)");
//ctx.GarbageCollect();
}
}
}
+
+ private class TestClass
+ {
+ }
}
}

0 comments on commit 2959225

Please sign in to comment.