OnClientBrowserCreated: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
ThePiotrek (talk | contribs) (added example) |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler("onClientBrowserCreated", resourceRoot, | |||
function () | |||
-- when the browser is loaded | |||
loadBrowserURL(source, "http://mtasa.com") -- load MTA:SA site | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[pl:onClientBrowserCreated]] | |||
==See Also== | ==See Also== | ||
{{CEF_events}} | {{CEF_events}} |
Revision as of 18:18, 21 July 2016
This event is triggered when the CEF browser instance has been created. If you want to load a specific website right after creating the browser (using createBrowser or guiCreateBrowser), this event will be the convenient place.
Parameters
None
Source
The browser element
Example
addEventHandler("onClientBrowserCreated", resourceRoot, function () -- when the browser is loaded loadBrowserURL(source, "http://mtasa.com") -- load MTA:SA site end )
See Also
- onClientBrowserCreated
- onClientBrowserCursorChange
- onClientBrowserDocumentReady
- onClientBrowserInputFocusChanged
- onClientBrowserLoadingFailed
- onClientBrowserLoadingStart
- onClientBrowserNavigate
- onClientBrowserPopup
- onClientBrowserResourceBlocked
- onClientBrowserTooltip
- onClientBrowserWhitelistChange