FocusBrowser: Difference between revisions
Jump to navigation
Jump to search
m (fix oop) |
ThePiotrek (talk | contribs) m (added example) |
||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example creates browser and focus it | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false) | |||
addEventHandler("onClientBrowserCreated", browser, | |||
function () | |||
focusBrowser(source) | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{CEF_functions}} | {{CEF_functions}} |
Revision as of 11:51, 29 July 2016
Script Example Missing Function FocusBrowser needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
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 = guiCreateBrowser(0, 0, 800, 600, false, false, 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