<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Commentag plugin now compatible with Prototype.js lib running in parallel</title>
	<link>http://www.commentag.com/blog/2008/04/21/commentag-plugin-now-compatible-with-prototypejs-lib-running-in-parallel/</link>
	<description>Latest news from within CommenTag team</description>
	<pubDate>Fri, 29 Aug 2008 07:28:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Xavier</title>
		<link>http://www.commentag.com/blog/2008/04/21/commentag-plugin-now-compatible-with-prototypejs-lib-running-in-parallel/#comment-144</link>
		<dc:creator>Xavier</dc:creator>
		<pubDate>Tue, 22 Apr 2008 15:53:40 +0000</pubDate>
		<guid>http://www.commentag.com/blog/2008/04/21/commentag-plugin-now-compatible-with-prototypejs-lib-running-in-parallel/#comment-144</guid>
		<description>In fact prototypejs lib extends all arrays with properties which are not set to non-enumerable. That's the reason why all "for ... in" are broken.

From the Prototype website http://www.prototypejs.org/api/array 

By default, the prototype and the length properties are so marked, which prevents you from enumerating over array methods when using for…in. This comfort led developers to use for…in as a shortcut for indexing loops, when it is not its actual purpose.

However, Prototype has no way to mark the methods it adds to Array.prototype as non-enumerable. Therefore, using for…in on arrays when using Prototype will enumerate all extended methods as well, such as those coming from the Enumerable module, and those Prototype puts in the Array namespace (described in this section, and listed further below).</description>
		<content:encoded><![CDATA[<p>In fact prototypejs lib extends all arrays with properties which are not set to non-enumerable. That&#8217;s the reason why all &#8220;for &#8230; in&#8221; are broken.</p>
<p>From the Prototype website <a href="http://www.prototypejs.org/api/array" rel="nofollow">http://www.prototypejs.org/api/array</a> </p>
<p>By default, the prototype and the length properties are so marked, which prevents you from enumerating over array methods when using for…in. This comfort led developers to use for…in as a shortcut for indexing loops, when it is not its actual purpose.</p>
<p>However, Prototype has no way to mark the methods it adds to Array.prototype as non-enumerable. Therefore, using for…in on arrays when using Prototype will enumerate all extended methods as well, such as those coming from the Enumerable module, and those Prototype puts in the Array namespace (described in this section, and listed further below).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
