HU/setBrowserProperty
Jump to navigation
Jump to search
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: getBrowserProperty
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
This example will add a command handler for 'mobile' that will toggle mobile browsing for all browsers.
addCommandHandler("mobile", function () for i, browser in pairs(getElementsByType("webbrowser")) do setBrowserProperty(browser, "mobile", getBrowserProperty(browser, "mobile") == "1" and "0" or "1") end end)
See also
- HU/canBrowserNavigateBack
- HU/canBrowserNavigateForward
- HU/createBrowser
- HU/executeBrowserJavascript
- HU/focusBrowser
- HU/getBrowserProperty
- HU/getBrowserSettings
- HU/getBrowserSource
- HU/getBrowserTitle
- HU/getBrowserURL
- HU/injectBrowserMouseDown
- HU/injectBrowserMouseMove
- HU/injectBrowserMouseUp
- HU/injectBrowserMouseWheel
- HU/isBrowserDomainBlocked
- HU/isBrowserFocused
- HU/isBrowserLoading
- HU/loadBrowserURL
- HU/navigateBrowserBack
- HU/navigateBrowserForward
- HU/reloadBrowserPage
- HU/requestBrowserDomains
- HU/resizeBrowser
- HU/setBrowserAjaxHandler
- HU/setBrowserProperty
- HU/setBrowserRenderingPaused
- HU/setBrowserVolume
- HU/toggleBrowserDevTools
GUI Függvények
Fordította
- WorthlessCynomys