HTML
Description
The HTML control can be used to display web pages just like an internet browser.
DHTML has additional functionality for interfacing with the page, such as sending and receiving data.
Blocked URL Extentions
This means your url cannot end in any of these extensions, e.g.: (http://yourdomain.com/garry.exe)
- .exe
- .bat
- .dll
- .zip
- .mp3
- .swf
Parent
Derives methods, etc not listed on this page from Panel.
Events
Called when the page inside the HTML window runs the console.log javascript function.
On the x86-64 beta, it's called for all built-in console.* javascript functions.
Overwriting this function in any way will disable default behavior of printing the message to the in-game console.
HTML:OnBeginLoadingDocument( string url )
Called when this panel begins loading a page.
Called by the engine when a callback function is called.
HTML:OnChangeAddressBar( string url )
Called when this panel's address changes.
HTML:OnChangeTargetURL( string url )
Called by HTML panels when the target URL of the frame has changed, this happens when you hover over a link.
HTML:OnChangeTitle( string newTitle )
Called by HTML panels when the title of the loaded page has been changed.
Called by HTML panels when the page attempts to open a new child view (such as a popup or new tab).
HTML:OnDocumentReady( string url )
Called by HTML panels when the panel's DOM has been set up. You can run JavaScript in here.
HTML:OnFinishLoadingDocument( string url )
Called when this panel successfully loads a page.
Example
Creates an HTML control in the center of screen, and makes it display http://wiki.garrysmod.com/