HTML:FinishedURL does it work ? is there alternatives?

i have started working / testing out what i can or cant do with html and i was wondering if there is a way to get the html page url when you load a page ?
pulled from http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf83c.html
it seems that I cant get it to work.


pHTML = vgui.Create("HTML",Frame)
pHTML:SetSize(300,500)
pHTML:OpenURL("http://m.gmail.com")
function pHTML:FinishedURL(url)
    MsgN("Loaded "..url) 
end

This is what I used for Cinema: https://github.com/pixeltailgames/cinema/blob/master/cinema/gamemode/modules/scoreboard/controls/cl_html.lua

I added a Lua-JavaScript callback for when the page finishes loading to send the current page URL. It… kind of works. You may have to mess around with it.

ok … so this re adds support for html panels ? if so how do i go about adding this to a server ?
because this is quite cryptic as to how i do this ;…; (i don’t have any experience with modules)

sorry for the bump but if i’m correct i would i use AddCSLuaFile( “cl_html.lua” ) with this file in my game mode/game here/ gamemode ??? folder and this should function correctly ? i might of did something wrong any help ?

You can use:



timer.Create("IsLoaded", 0.1, 0, function() 
		if not html:IsLoading() then
			//page is loaded
			timer.Destroy("LoadJavaScript")
		end
	end)


or



html:SetAllowLua( true )
html:RunJavascript([[
		$( document ).ready(function() { 
			console.log( 'RUNLUA:print( \"This is called in Lua context\" )' );
		});
	]])


EDIT:
I know its late but this is not documented at all and i lost a lot of time looking for it…