原創(chuàng)|產(chǎn)品更新|編輯:王香|2017-11-28 13:32:36.000|閱讀 392 次
概述:Chromium引擎控件DotNetBrowser更新至1.13,實(shí)現(xiàn)新的自定義協(xié)議處理程序。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
public class HttpsHandler : IProtocolHandler { //This method should provide the response for the specified request public IUrlResponse Handle(IUrlRequest request) { string htmlContent = "Request Url: " + request.Url + "\n"; return new UrlResponse(Encoding.UTF8.GetBytes(htmlContent)); } }
然后可以為特定的BrowserContext安裝此自定義協(xié)議處理程序:
browser.Context.ProtocolService.Register("https", new HttpsHandler());
BrowserPreferences.CrashDumpDir是一個(gè)可讀寫的靜態(tài)屬性,可用于指定用于存儲(chǔ)生成的Chromium崩潰轉(zhuǎn)儲(chǔ)的目錄。 應(yīng)該在代碼中創(chuàng)建任何Browser或BrowserView實(shí)例之前指定此屬性。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@ke049m.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)