internal override void OnWebHostLoadFinished(object sender, Mono.WebBrowser.LoadFinishedEventArgs e) { url = null; documentReady = true; readyState = WebBrowserReadyState.Complete; if (isStreamSet) { byte[] buffer = new byte [data.Length]; long len = data.Length; int count = 0; data.Position = 0; do { count = data.Read(buffer, (int)data.Position, (int)(len - data.Position)); } while (count > 0); WebHost.Render(buffer); data = null; isStreamSet = false; } SetScrollbars(); WebBrowserDocumentCompletedEventArgs n = new WebBrowserDocumentCompletedEventArgs(new Uri(e.Uri)); OnDocumentCompleted(n); }