Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25092
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Firefox Console hiding output |
| Date | 2014-06-27 20:52 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <3082329.Hk6WP1N1yv@PointedEars.de> (permalink) |
| References | <output-20140627183754@ram.dialup.fu-berlin.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.
Back to comp.lang.javascript | Previous | Next | Find similar | Unroll thread
Re: Firefox Console hiding output Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-27 20:52 +0200
csiph-web