OnClientBrowserCreated: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client event}} {{New feature/item|3.0150|1.5|| This event is triggered when the CEF browser instance has been created. If you want to load a specific website right...") |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
{{New feature/item|3.0150|1.5|| | {{New feature/item|3.0150|1.5|| | ||
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. | 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. | ||
{{Note|Calling loadBrowserURL right after [[createBrowser]] will not work normally due to the nature of the asynchronous browser interface.}} | {{Note|Calling loadBrowserURL right after [[createBrowser]] will not work normally due to the nature of the asynchronous browser interface.}} | ||
}} | }} | ||
==Parameters== | ==Parameters== | ||
No parameters. | |||
==Source== | ==Source== | ||
The [[Element/Browser | The [[Element/Browser|browser]] element. | ||
==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}} |
Latest revision as of 11:01, 4 July 2020
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
No parameters.
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