简体   繁体   中英

JS how to replace elements before load the page (awesomium c#)

I'm using Awesomium on c# to load html page. Once Awesomium loads, then I execute the javascript to remove any other elements except the article that I needed.

The only problem is that it first shows the whole page and then remove less than 1 sec. There is a blink of change.

How can I not showing the page unless JS is completed? Currently I overlay a rectangle on top of the browser once OnLoadingFrameComplete then remove the overlay and display browser...

Thanks

You pass your URL to Awesomium to load your view (html) . I am sure you have an access to your view (html) in your project directory, so you can add style of display:none to that section of the page in html part and then in your JS once your JS is completed show that section that is hidden.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM