|
|
@ -18,22 +18,20 @@ namespace 齐越慧眼.UserControls |
|
|
|
{ |
|
|
|
|
|
|
|
public static BrowerControl Main = null; |
|
|
|
static MyRequestHandler myRequest; |
|
|
|
public ChromiumWebBrowser web; |
|
|
|
public ExtChromiumBrowser web; |
|
|
|
public BrowerControl() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
myRequest = new MyRequestHandler() { brower=this}; |
|
|
|
web = new ChromiumWebBrowser("https://www.taobao.com") |
|
|
|
web = new ExtChromiumBrowser("https://www.taobao.com") |
|
|
|
{ |
|
|
|
BrowserSettings = |
|
|
|
{ |
|
|
|
DefaultEncoding = "UTF-8", |
|
|
|
Plugins = CefState.Enabled, |
|
|
|
// Plugins = CefState.Enabled,
|
|
|
|
//关于跨域限制
|
|
|
|
//WebSecurity = CefState.Disabled,
|
|
|
|
ApplicationCache = CefState.Enabled, |
|
|
|
LocalStorage = CefState.Enabled |
|
|
|
// ApplicationCache = CefState.Enabled,
|
|
|
|
// LocalStorage = CefState.Enabled
|
|
|
|
|
|
|
|
}, |
|
|
|
// RequestHandler = myRequest
|
|
|
@ -47,7 +45,7 @@ namespace 齐越慧眼.UserControls |
|
|
|
|
|
|
|
web.JavascriptObjectRepository.Register("hyCoreModel", new CefAsyncJS(), BindingOptions.DefaultBinder); |
|
|
|
Main = this; |
|
|
|
// web.StartNewWindow += Web_StartNewWindow;
|
|
|
|
web.StartNewWindow += Web_StartNewWindow; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -106,7 +104,7 @@ namespace 齐越慧眼.UserControls |
|
|
|
{ |
|
|
|
StartPage(); |
|
|
|
} |
|
|
|
web.ShowDevTools(); |
|
|
|
// web.ShowDevTools();
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|