Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25092 > unrolled thread

Re: Firefox Console hiding output

Started byThomas 'PointedEars' Lahn <PointedEars@web.de>
First post2014-06-27 20:52 +0200
Last post2014-06-27 20:52 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Firefox Console hiding output Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-27 20:52 +0200

#25092 — Re: Firefox Console hiding output

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2014-06-27 20:52 +0200
SubjectRe: Firefox Console hiding output
Message-ID<3082329.Hk6WP1N1yv@PointedEars.de>
Stefan Ram wrote:

>   What global objects are there? Well, ... it should be easy
>   to see! But the Console of Firefox shows me the output
>   only from line 316 on, it seems to hide the first 315 lines.
>   (I pasted the code into the Firefox Console prompt.)
> 
> { let l = Object.getOwnPropertyNames( this );
>   let n = l.length; for( let i = 0; i < n; ++i )
>   console.log( i + ' ' + l[ i ]); }

I found it interesting that this cannot be written more naturally as

  for (let l = Object.getOwnPropertyNames(this),
           n = l.length,
           i = 0;
       i < n; ++i)
  {
    console.log(i, l[i]);
  }

because that throws

| ReferenceError: l is not defined

in line 2 (at n = l.length), as a “try { … } catch (e) { e.lineNumber }” 
shows.

I think that either the Mozilla JavaScript implementation of the ES 6 draft 
or the ES 6 draft are borken with regard to “let”.  IMHO, “let” should work 
exactly like “var” except that variables so declared should be scoped to the 
statement and, in the case of the “for”, “if” and “while” statements, the 
statement that follows (here: a Block statement).

> undefined
> "316 MediaStreamAudioDestinationNode"
> "317 DynamicsCompressorNode"
> "318 DeviceProximityEvent"
> ...
> […]

I cannot reproduce that.  It is worse here (Iceweasel 30.0):

var a = Object.getOwnPropertyNames(this); console.log(a.length); for (var 
i = 0, len = a.length; i < len; ++i) console.log(i);
| > Object {  }

But:

Object.getOwnPropertyNames(this);
| > Array [ "Object", "Function", "eval", "window", "location", "top",
| "Components", "XPCNativeWrapper", "TextDecoder", "TextEncoder", 601 more… 
| ]

I have Firebug 2.0.1 installed, apparently this has something do with it as 
disabling Firebug gets me the elements starting from index 411.  Regardless, 
something is very wrong there.  Sometimes, for a moment I can see there 601, 
0, 1, 2, 3, 4 before it is replaced with 411, 412 and so on.  There appears 
to be a very limited non-scrollable output buffer.

BTW, disabling Firebug 2.0.1 killed the Web console input display until 
Return.  Sometimes it the input line disappears for no reason at all until I 
resize the window.

Scrolling appears to be borken sometimes as well.

I think the Firefox Web Console is a poor substitute both for the Firebug 
Console and the Chrome Dev Tools console at the moment.  What bothers me in 
particular is that code has to be input into a small line at the bottom of 
the window (at the bottom of the screen if you have a full-screen window), 
and the output appears *above* it, first *duplicating the input* (instead of 
just displaying the output/result *below*).  There is the Scratchpad, but it 
is comparably clumsy, as I have to switch between windows.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web