Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Firefox Console hiding output Date: Fri, 27 Jun 2014 20:52:28 +0200 Organization: PointedEars Software (PES) Lines: 79 Message-ID: <3082329.Hk6WP1N1yv@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1403895159 11504 eJwNwoENwDAIA7CX6IAgzhkh/f+ETXY6DliBROT9ZdyZ7IbcqobmYkIr0ZZ42K+dVdsqos4HJxkRkw== (27 Jun 2014 18:52:39 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 27 Jun 2014 18:52:39 +0000 (UTC) User-Agent: KNode/4.12.4 X-User-ID: eJwNx8kBwCAIBMCWQFlWy5Gr/xKS+Q22qyfN4YbB1NwmzCWlOGNXW7P3O300QJOoP1UQiRwGafl09YLGsPQDaWMWHA== Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. 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: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not Cc: me. / Bitte keine Kopien per E-Mail.