FocusBrowser: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Client function}} | ||
{{New feature/item|3.0150|1.5|| | {{New feature/item|3.0150|1.5|| | ||
This function will attempt to focus the [[Element/Browser|browser]] or unfocus all browsers. | This function will attempt to focus the [[Element/Browser|browser]] or unfocus all browsers. The browser that is focused will retrieve keyboard input. | ||
}} | }} | ||
Line 10: | Line 9: | ||
bool focusBrowser ( browser webBrowser ) | bool focusBrowser ( browser webBrowser ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Element/Browser|browser]]:focus | {{OOP||[[Element/Browser|browser]]:focus}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 19: | Line 18: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example creates browser and focus it | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local browser = createBrowser(860, 680, false) | |||
addEventHandler("onClientBrowserCreated", browser, | |||
function () | |||
focusBrowser(source) | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{CEF_functions}} | {{CEF_functions}} | ||
[[hu:focusBrowser]] |
Revision as of 11:37, 30 July 2018
This function will attempt to focus the browser or unfocus all browsers. The browser that is focused will retrieve keyboard input.
Syntax
bool focusBrowser ( browser webBrowser )
OOP Syntax Help! I don't understand this!
- Method: browser:focus(...)
Required Arguments
- webBrowser: The web browser to be focused - if this is nil, it will unfocus all browsers.
Returns
Returns true if the browser was focused or if nil was passed, false if it failed to focus or the browser does not exist.
Example
Click to collapse [-]
ClientThis example creates browser and focus it
local browser = createBrowser(860, 680, false) addEventHandler("onClientBrowserCreated", browser, function () focusBrowser(source) end )
See Also
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- isBrowserRenderingPaused
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools