console.log() not outputting HTML of jQuery selection object

前端 未结 8 2007
我在风中等你
我在风中等你 2020-12-13 06:58

I got a problem when using console.log in Google Chrome. Suddenly when I was outputting a element like $(this) it was display like:



        
8条回答
  •  醉话见心
    2020-12-13 07:47

    console.log.apply(console, [].slice.call($('p'), 0))
    -> ►

    , ►

    ,

    viewed

    Update: Simpler solution.


    Rationale behind the console output change:

    What was the rationale behind the request to not include attributes/textContent?

    Response from pfeldman, DevTools developer:

    people that dump DOM lists appreciate the dense look.

    crbug.com/50316

提交回复
热议问题