Created
September 18, 2015 16:35
-
-
Save brendandahl/841a319d3194516288fc to your computer and use it in GitHub Desktop.
Print to the browser console, works in fennec and desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nsIConsoleService.h" | |
void someFunction() { | |
uint32_t loadType = 25; | |
nsCOMPtr<nsIConsoleService> consoleService = do_GetService(NS_CONSOLESERVICE_CONTRACTID); | |
if (consoleService) { | |
nsAutoCString message(nsPrintfCString("!!!!!!!!!!!!!!!!!!! LOAD TYPE %X", loadType)); | |
consoleService->LogStringMessage(NS_ConvertUTF8toUTF16(message).get()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment