Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1983193.7UhRnYkZ6n@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 28 Oct 2012 18:07:06 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <67583587.7BbXikoxoM@PointedEars.de> <3102322.j8kCu7WbkW@PointedEars.de> <8635315.16DEVHx3j1@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 57 NNTP-Posting-Date: 28 Oct 2012 18:07:06 CET NNTP-Posting-Host: efc9f0fb.newsspool3.arcor-online.net X-Trace: DXC=@LOH\\K`@mTFm0Y?OE@2^XMcF=Q^Z^V3X4Fo<]lROoRQ8kFKPMlUDQE;hSbTB?jLCEADjQ[ X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16926 Cezary Tomczyk wrote: > W dniu 2012-10-28 17:12, Thomas 'PointedEars' Lahn pisze: >> Cezary Tomczyk wrote: >>> W dniu 2012-10-25 00:03, Thomas 'PointedEars' Lahn pisze: >>> [...] >>>> if (String.prototype.propertyIsEnumerable("trim")) >>> Quick results from Google Chrome 22.0.1229.94 console. >> Unreadable. What is your input, what V8's output? Which OS and >> platform? > > OS: Windows 7 > Platform: Win32 I would consider "Windows 7 32-bit" the OS then and "Intel x86 or compatibles" the (hardware) platform, but I know what you mean. > Let me do in that way: > > ID - Input data in Google Chrome console > R - result in console > > ID: String.prototype.propertyIsEnumerable("trim") > R: false > > ID: String(String.prototype.trim); > R: "function trim() { [native code] }" > > ID: String.prototype.trim = function(){ alert('test'); return false; }; > R: function (){ alert('test'); return false; } > > ID: String.prototype.trim > R: function (){ alert('test'); return false; } > > ID: String(String.prototype.trim); > R: "function (){ alert('test'); return false; }" JFYI: In the Chromium/Chrome console a type conversion to String so far is implicit for Function instances. > ID: String.prototype.propertyIsEnumerable("trim") > R: false > > Better? Yes; the same applies to Object.prototype.toString, and probably other built-in methods with V8. Actually, retaining the property attributes is required for a conforming implementation per ES 5.1, ยง8.12.5. I should set up a test case as part of the ES Matrix. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from (404-comp.)