GetBrowserTitle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client_function}} This function returns the title of the passed browser. ==Syntax== <syntaxhighlight lang="lua"> string getBrowserTitle ( browser webBrowser ) </syntaxhighlight> ===Requir...")
 
m (Link to the Romanian translation of this page added.)
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client_function}}
{{Client function}}
This function returns the title of the passed browser.
{{New feature/item|3.0150|1.5||
This function returns the title of the passed [[Element/Browser|browser]].
}}


==Syntax==
==Syntax==
Line 7: Line 9:
string getBrowserTitle ( browser webBrowser )
string getBrowserTitle ( browser webBrowser )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|browser]]:getTitle|title}}


===Required arguments===
===Required arguments===
Line 15: Line 18:


==Example==
==Example==
Todo
<syntaxhighlight lang="lua">
addCommandHandler("browsers",
function()
outputChatBox("List of browser titles:")
for k, v in pairs( getElementsByType("web-browser") ) do
outputChatBox(k .. ". " .. getBrowserTitle(v))
end
end
)
</syntaxhighlight>
 
==See Also==
{{CEF_functions}}


==See Also
[[hu:getBrowserTitle]]
[[RO:getBrowserTitle]]

Latest revision as of 12:05, 8 April 2020

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(...)
Variable: .title


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( getElementsByType("web-browser") ) do
			outputChatBox(k .. ". " .. getBrowserTitle(v))
		end
	end
)

See Also