Hi everyone!
I've landed a patch enabling nsIConsoleService::logMessage to log script
errors from parent to content process.
For example, this enables JavaScript logging from the parent process to the
website console. Simply initialize the script error with a window ID:
let consoleMsg =
Cc["@mozilla.org/scripterror;1"].createInstance(Ci.nsIScriptError);let
windowId = gBrowser.selectedBrowser.innerWindowID;let message =
"Hello, World!";
consoleMsg.initWithWindowID(message, gBrowser.currentURI.spec, null, 0, 0,
Ci.nsIScriptError.warningFlag, "MyCategory",
windowId);
Services.console.logMessage(consoleMsg);
The bug tracking this: https://bugzilla.mozilla.org/show_bug.cgi?id=1559167
Best Regards,
Paul
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform