How to access .log .info. warn functions from Services.console

半世苍凉 提交于 2019-12-12 05:26:20

问题


From my addon scope I am trying to log messages to the Browser Console with functions like console.log and console.info etc as seen here MDN - Web API Interfaces - Console

However Services.jsm gives me nsIConsoleService. So how to access the functions above (web api console) from the nsIConsoleService (docs on nsiconsoleservice: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIConsoleService)


回答1:


Figured it out answer was Console.jsm



来源:https://stackoverflow.com/questions/22276970/how-to-access-log-info-warn-functions-from-services-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!