GetBrowserTitle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (fix oop)
Line 9: Line 9:
string getBrowserTitle ( browser webBrowser )
string getBrowserTitle ( browser webBrowser )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|browser]]:getTitle||getBrowserTitle}}
{{OOP||[[Element/Browser|browser]]:getTitle}}


===Required arguments===
===Required arguments===

Revision as of 20:22, 17 December 2015

This function returns the title of the passed browser.

Syntax

string getBrowserTitle ( browser webBrowser )

OOP Syntax Help! I don't understand this!

Method: browser:getTitle(...)


Required arguments

  • webBrowser: The browser

Returns

Returns the title as a string. Returns false if invalid arguments were passed.

Example

addCommandHandler("browsers",
	function()
		outputChatBox("List of browser titles:")
		for k, v in pairs( getElementByType("web-browser") ) do
			outputChatBox(k .. ". " .. getBrowserTitle(v))
		end
	end
)

See Also