On Sun, 29 Jun 2014 10:59:33 +0200, Thomas 'PointedEars' Lahn wrote:
> JJ wrote:
>
>> On 29 Jun 2014 00:47:16 GMT, Stefan Ram wrote:
>>> JJ <jj4public@vfemail.net> writes:
>>>> Did that happen on all web pages, including blank HTML file?
>>>
>>> I only ever tried it in the debugger with no web page at all:
>>>
>>> JSON.stringify( document )
>>> "{"location":{}}"
>>>
>>> .
>>
>> There are log limits enforced.
>
> Yes, but that is not the reason for the above result.
You're right. That's just to show that there's no document loaded when he
tested the code.
> This is:
>
> Object.getOwnPropertyNames(document).filter(function (name) { return
> Object.getOwnPropertyDescriptor(document, name).enumerable; })
>| < Array [ "location" ]
>
> And in Chromium:
>
> JSON.stringify(document)
>| TypeError: Converting circular structure to JSON
>
> Object.getOwnPropertyNames(document).filter(function (name) { return
> Object.getOwnPropertyDescriptor(document, name).enumerable; })
>| Array[147]
>
> The structure is ?circular? in WebCore because at least ?document.body? and
> ?document.body.ownerDocument? (=== document) are own, enumerable properties.
>
> In general, it is a Bad Idea to subject host objects to JSON
> stringification.
I just noticed that. Why didn't JSON.stringify generate an exception?
>> So, only the last N number of lines are displayed.
>>
>> Type this in the about:config.
>>
>> devtools.hud.loglimit.
>
> (easier with ?loglimit?)
>
> Thanks; the default for devtools.hud.loglimit.console is 200 which explains
> the observations. Unfortunately, there appears to be no way to disable the
> limit (neither negative values nor 0 work).
Yes, disabling the log output completely doesn't seem possible. Zero or less
value settings are treated as 1. Disabling the limit on the other hand,
would mean having infinite lines, but the setting value itself is limited by
32-bit signed number.