BrowserCreated: Difference between revisions
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
{{CSharp}} | {{CSharp}} | ||
<syntaxhighlight lang="C#"> | <syntaxhighlight lang="C#"> | ||
public void OnBrowserCreated(window){} | public void OnBrowserCreated(HtmlWindow window){} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 16: | Line 16: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
public void OnBrowserCreated(window) | public void OnBrowserCreated(HtmlWindow window) | ||
{ | { | ||
RAGE.Chat.Output("BEASSST, a CEF Browser has been created!"); | RAGE.Chat.Output("BEASSST, a CEF Browser has been created!"); | ||
Revision as of 20:22, 26 November 2018
Client-Side
This event is called everytime a browser is created.
C# Syntax
C#
{{{1}}}
public void OnBrowserCreated(HtmlWindow window){}
Parameters
- window: The created browser handler, output expects RAGE.Ui.HtmlWindow type.
Examples
The example below shows up a message for a player when a browser is created.
public void OnBrowserCreated(HtmlWindow window)
{
RAGE.Chat.Output("BEASSST, a CEF Browser has been created!");
}
JavaScript Syntax
JavaScript
mp.events.add('browserCreated', (browser) => {});
Parameters
- browser: The created browser handler, output expects any type.
Examples
The example below shows up a message for a player when a browser is created.
mp.events.add('browserCreated', (browser) => {
mp.gui.chat.push('WOOOOOOAH, a CEF Browser has been created!');
});