P.HTML:PageTitleChanged

From GMod Wiki

Jump to: navigation, search
Function
Syntax P.html"indexa1c8.html" title="String">String Title )
Description:
Called when the title changes.
Returns: nil
In Object: HTML
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=P.HTML:PageTitleChanged]P.HTML:PageTitleChanged [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints the page title in console once it changes
Used onNewerClient.png
Code
local HTMLPanel = vgui.Create("HTML")
 
HTMLPanel.PageTitleChanged = function( panel, title )
 
	MsgN("Oi, the page title changed to '"..title.."'!")
 
end
OutputWhen the page title is changed (for example, using 'document.title = <new title>' in Javascript), a message is printed in console
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox