• A way to show animation when URL is loading
    6 replies, posted
Hello, I'm testing a few things with CEF and i have a problem,when a page is loading the DHTML hide and show the derma panel : http://prntscr.com/idkjcy (i excepted it to be like a blank page) My code is : [code] concommand.Add("showUrl", function() local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW(),ScrH() ) frame:SetTitle( "My new Derma frame" ) frame:SetVisible( true ) frame:SetDraggable( true ) frame:Center() local html = vgui.Create( "DHTML" , frame ) html:OpenURL("https://ozrp-nhtqsauce.c9users.io/creaperso") html:SetSize( ScrW(),ScrH() ) frame:MakePopup() end ) [/code] My question is : is there a hook called when the page start to load & another one when the loading is finished ? I tried OnBeginLoadingDocument with no success I also tried to use http.Fetch to save my website body in a variable when the client connect,and use setHTML so i don't have a first loading and so i can handle this problem in JS but i still have a moment when it display the derma even if it's saved in a variable and doesn't have to load an URL
Not sure if they work with CEF, but PANEL/OnChangeTargetURL and PANEL/OnDocumentReady
Thanks u
I’m pretty sure you need to be using. DHTML/AddFunction
Have you tried using Panel/IsLoading ?
The hook maybe disappers when the function is finished if im right. Probably not just throwing random guesses.
It's fine,it worked it just that i didn't noticied the box,thanks btw
Sorry, you need to Log In to post a reply to this thread.