Name Description Size
ConsoleAPIListener.jsm The ConsoleAPIListener can be used to listen for messages coming from console API usage in a given windowGlobal, eg. console.log, console.error, ... Example: ``` const listener = new ConsoleAPIListener(innerWindowId); listener.on("message", onConsoleAPIMessage); listener.startListening(); const onConsoleAPIMessage = (eventName, data = {}) => { const { arguments: msgArguments, level, stacktrace, timeStamp } = data; ... }; ``` @emits message The ConsoleAPIListener emits "message" events, with the following object as payload: - {Array<Object>} arguments - Arguments as passed-in when the method was called. - {String} level - Importance, one of `info`, `warning`, `error`, `debug`, `trace`. - {Array<Object>} stacktrace - List of stack frames, starting from most recent. - {Number} timeStamp - Timestamp when the method was called. 3536
ConsoleListener.jsm The ConsoleListener can be used to listen for console messages related to Javascript errors, certain warnings which all happen within a specific windowGlobal. Consumers can listen for the message types "error", "warning" and "info". Example: ``` const onJavascriptError = (eventName, data = {}) => { const { level, message, stacktrace, timestamp } = data; ... }; const listener = new ConsoleListener(innerWindowId); listener.on("error", onJavascriptError); listener.startListening(); ... listener.stopListening(); ``` @emits message The ConsoleListener emits "error", "warning" and "info" events, with the following object as payload: - {String} level - Importance, one of `info`, `warning`, `error`, `debug`, `trace`. - {String} message - Actual message from the console entry. - {Array<StackFrame>} stacktrace - List of stack frames, starting from most recent. - {Number} timeStamp - Timestamp when the method was called. 4407
test 1