Running Event/functions in Lua from HTML

Basically,

I’m looking for a way to call a lua function from an HTML Panel,

There’s nothing on the wiki about this, as far as I can tell. The only thing I can see on the valve wiki is



virtual void AddCustomURLHandler(const char *customProtocolName, vgui::Panel *target);

I’m not sure if Garry implemented that or not, if anyone has any more information that’d be great.

Another way I was thinking about doing this was just checking for URL changes, for example page.html#Event:1 or something, but there appears to be no way of checking what URL the HTML Panel is currently on.

Hopefully someone can help, thanks.

http://www.facepunch.com/showpost.php?p=23384985&postcount=1441

OpeningUrl should do the trick.

Cheers, if they work I’ll try adding examples to the Wiki

Edit: You ain’t on steam?

[editline]12:33AM[/editline]

I updated the wiki to include details of some of the functions listed in the link above and gave the P.HTML page a general clean up