BrowserLoadingFailed
Client-Side Event
C# | JavaScript |
---|
This event is called everytime a CEF Browser loading fails.
C# Syntax
public delegate void OnBrowserLoadingFailedDelegate(HtmlWindow window);
Parameters
- window: The created browser handler, output expects RAGE.Ui.HtmlWindow type.
Example
The example below shows a message to player when a browser fails to load.
Events.OnBrowserLoadingFailed += OnBrowserLoadingFailed;
public void OnBrowserLoadingFailed(RAGE.Ui.HtmlWindow window)
{
RAGE.Chat.Output($"The browser window {window.Url} failed to load");
}
JavaScript Syntax
mp.events.add('browserLoadingFailed', (browser) => {});
Parameters
- browser: The browser handler, output expects any type.
Example
The example below shows up a message for a player when a CEF Browser loading fails.
mp.events.add('browserLoadingFailed', (browser) => {
mp.gui.chat.push('Oh boy, your browser failed to load :/');
});
See more
- Functions:
- Properies: