How to clear Firefox console through javascript?

I have some functions that, when executed, display some information using console.log ().

No problem with that.

But several times the console looks strange ... Because they sent me to clear the console by pressing "l" (letter "L" in lower case).

I took this as a simple task, I just needed to use console.clear (), and everything would be fine.

But ... I just thought:

console.clear(); // doesn't work in firefox !!!

In chrome, it works great.

The spell is here.

Does anyone know of any technique for this in firefox?

Thank you for your time.

+2
source share
2 answers

, . Firefox , :

clear()

( , CTRL + L Chrome ALT + R Firefox).

. . Firebug.

+2

, clear console (Firebug 30+). clear(); Firebug.

0

Source: https://habr.com/ru/post/1016522/


All Articles