SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Zdarzenia klienta
  3. onClientBrowserConsoleMessage

Zdarzenie

onClientBrowserConsoleMessage

Strona wypisała coś w konsoli JavaScript (console.log). Przydaje się do szukania błędów strony.

Obsługa

addEventHandler("onClientBrowserConsoleMessage", root, function(message, level, line, source) ... end)

Parametry

messagestring
Treść.
levelint
Poziom.W MTA:SA inny typ: string source
lineint
Linia.
sourcestring
Plik źródłowy.W MTA:SA inny typ: int level

Różnice względem MTA:SA

  • Parametry zaznaczone innym kolorem różnią się od MTA:SA.

W MTA:SA

function(string message, string source, int line, int level)

Źródło

source to przeglądarka.

Przykład

addEventHandler("onClientBrowserConsoleMessage", root, function(message, level, line, file)
    outputConsole(("[strona] %s (%s:%d)"):format(message, file, line))
end)

Zobacz też