BrowserLoadingFailed

From RAGE Multiplayer Wiki
Jump to: navigation, search

Client-Side
|Event

C.png C# Js.png JavaScript


This event is called everytime a CEF Browser loading fails.

C# Syntax
C.png

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
Jslogo.png

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 :/');
});