SetBrowserProperty: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client_function}}
{{Client function}}
{{New feature/item|3.0150|1.5||
{{New feature/item|3.0150|1.5||
This function set a property to the web browser.
This function sets a given property of a specified browser.
}}
}}


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setBrowserProperty ( browser thebrowser, string key, string value )
bool setBrowserProperty ( browser theBrowser, string key, string value )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|browser]]:setProperty||setBrowserProperty}}
{{OOP||[[Element/Browser|browser]]:setProperty||setBrowserProperty}}


===Required arguments===
===Required arguments===
*'''theBrowser:''' The browser element you want to set a property on
*'''theBrowser:''' The browser element you want to set a property of
*'''key:''' The browser property key. It can be:
*'''key:''' The browser property key. It can be:
**'''mobile:''' Surfing the web as mobile
**'''mobile:''' Surfing the web as mobile
*'''value:''' A value indicate wheter enable("1") or not ("0") the property
*'''value:''' A value indicating whether to enable ("1") the property or not ("0")


===Returns===
===Returns===
Returns ''true'' if the property was successfully applied, ''false'' otherwise.
Returns ''true'' if the property was successfully set, ''false'' otherwise.


==Example==
==Example==

Revision as of 23:47, 13 September 2015

This function sets a given property of a specified browser.

Syntax

bool setBrowserProperty ( browser theBrowser, string key, string value )

OOP Syntax Help! I don't understand this!

Method: browser:setProperty(...)
Counterpart: setBrowserProperty


Required arguments

  • theBrowser: The browser element you want to set a property of
  • key: The browser property key. It can be:
    • mobile: Surfing the web as mobile
  • value: A value indicating whether to enable ("1") the property or not ("0")

Returns

Returns true if the property was successfully set, false otherwise.

Example

Todo

See also