Ejemplo n.º 1
0
        public void EventAsPropertyTest()
        {
            object o;

            HtmlPage.RegisterCreateableType("eventAsPropertyTestCalculator", typeof(EventCalculator));
            o = window.Eval("scriptable = " + strplugin + ".content.services.createObject ('eventAsPropertyTestCalculator');");

            o = window.Eval("event_as_property_test_event_raised = 0;");
            o = window.Eval("scriptable.DoneEvent = function () { event_as_property_test_event_raised = true; };");
            o = window.Eval("scriptable.Add (1, 2);");

            o = window.GetProperty("event_as_property_test_event_raised");
            Assert.IsInstanceOfType(o, typeof(bool), "#1 return type");
            Assert.IsTrue((bool)o, "#1 event raised");
        }
 public static HtmlDocument document(this HtmlWindow window)
 {
     return(window.GetProperty("document") as HtmlDocument);
 }
Ejemplo n.º 3
0
 internal BrowserInformation(HtmlWindow window)
 {
     navigator = window.GetProperty("navigator") as ScriptObject;
 }
Ejemplo n.º 4
0
		internal BrowserInformation (HtmlWindow window)
		{
			navigator = window.GetProperty ("navigator") as ScriptObject;
		}