So if you open up the inspector, you get this (if you're unlucky):
I'm building a tiny JS component which displays debugging information - is there any way to read the number of encountered errors and warnings so far?
A hacky solution I could come up with involves a bit of trickery by replacing the console.(error|log|warn)
functions with my own, but I'm yet to test if it works for all cases (e.g. outside of code I own).
Is there a better way to do this?