JavaScript console log in Magento

后端 未结 9 1506
长发绾君心
长发绾君心 2020-12-09 11:46

I have a custom phtml pages in Magento. As far I know Magento uses jQuery and prototype libraries.

For example, if I need external jQuery/jQueryUI, I need t

9条回答
  •  醉梦人生
    2020-12-09 11:50

    Why not check if the Console object is defined first?

    Instead of:

    if (!("console" in window) || !("firebug" in console))
    

    You could write:

    if( typeof console === 'undefined' )
    

提交回复
热议问题