Example #1
0
 private void OnConsoleMessage(object sender, ConsoleMessageEventArgs e)
 {
     if(e.Message.StartsWith("[JavaScript Warning"))
         return;
     Debug.WriteLine(e.Message);
 }
 private void OnBrowserConsoleMessage(object sender, ConsoleMessageEventArgs e)
 {
     //review: this won't do anything if we're not in command-line mode...
     //maybe a better design would be to rais an event that the consumer can
     //do something with, e.g. the command-line ConversionProgress form could
     //just turn around and write to the console
     Console.WriteLine(e.Message);
 }
			public void Observe(nsIConsoleMessage aMessage)
			{
				if (m_browser.IsDisposed) return;
				var e = new ConsoleMessageEventArgs(aMessage.GetMessageAttribute());
				m_browser.OnConsoleMessage(e);
			}
		protected virtual void OnConsoleMessage(ConsoleMessageEventArgs e)
		{
			if (_ConsoleMessage != null)
				_ConsoleMessage(this, e);
		}
 void _browser_ConsoleMessage(object sender, ConsoleMessageEventArgs e)
 {
     Console.WriteLine(e.Message);
 }