Home > Net >  WPF MVVM, embedded browser WebKitBrowser
WPF MVVM, embedded browser WebKitBrowser

Time:10-07

WPF embedded WebKitBrowser web technologies, loading baidu map page and play window does not display,
Or how a situation, when I receive the front-end data, if there is no need to map the content of the map will not display,
Now my idea is to receive all front text, through the following method,
If (((WebKitBrowser) sender). DocumentText. The Contains (" ")) to the HTML code and then filtered through his data, assuming that the page is ok give me 1, page is not ok to give me 2, the 1 and 2 are referring to in the code, you can look up to, then I judge on page

Writing in the event the following
Private void WebKitBrowser_DocumentCompleted (object sender, System. Windows, Forms the WebBrowserDocumentCompletedEventArgs e)
The above methods I think complex

Is another method, and then send me an interface, a json data, and then load the page, the double judgment, I also feel complex

Want to say to have own WebKitBrowser method, it can be judged whether the page is loaded successfully

CodePudding user response:

Completed itself is difficult to judge, in addition to a page HTML and CSS, js, if these are finished loading, if local and ajax, are you to judge it is loaded or not completed?

CodePudding user response:

You directly under the front end treatment with JS not finished, baidu has a web page of the SDK

CodePudding user response:

I am now WebKitBrowser load baidu map, plays the window display is not, I want to determine the modal window, to decide whether I loaded successfully, now play window to load out

I used the two requests, the first request josn data, the results fail, don't load a map directly, the result ok, load maps the request again,

CodePudding user response:

refer to the second floor assky124 response:
you directly under the front end treatment with JS not finished, baidu have web SDK


Java development now the front end of the page is a popup window, but I'm the back-end call receiving this page, pop-up window

CodePudding user response:

You a Browser controls what the back-end, the best way is to change the website

CodePudding user response:

reference 5 floor assky124 reply:
you a Browser controls what the back-end ah, the best way is to change the website



Yes has let him change site, change the alert can display the
  •  Tags:  
  • C#
  • Related