BrowserDomReady

From RAGE Multiplayer Wiki
Jump to: navigation, search

Client-Side
|Event

C.png C# Js.png JavaScript


This event is called every time a CEF Browser dom is ready.

C# Syntax
C.png

public delegate void OnBrowserDomReadyDelegate(HtmlWindow window);

Parameters

  • window: The browser handler, output expects RAGE.Ui.HtmlWindow type.

Example

The example below shows up a message for a player when a CEF Browser DOM is ready.

Events.OnBrowserDomReady += OnBrowserDomReady;
public void OnBrowserDomReady(HtmlWindow window)
{
    RAGE.Chat.Output("EPICMEN, Your CEF Browser DOM is now ready!");
}


JavaScript Syntax
Jslogo.png

mp.events.add('browserDomReady', (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 DOM is ready.

mp.events.add('browserDomReady', (browser) => {
    mp.gui.chat.push('Hold on, get set, goooo! Your CEF Browser DOM is now ready.');
});