<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A static variation on JavaScript&#039;s getElementsByTagName</title>
	<atom:link href="http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/</link>
	<description>Rob Larsen writes on entertainment, sports and culture.</description>
	<lastBuildDate>Thu, 26 Jan 2012 05:39:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: rob</title>
		<link>http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/#comment-15481</link>
		<dc:creator>rob</dc:creator>
		<pubDate>Tue, 08 Jan 2008 17:49:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/#comment-15481</guid>
		<description>I think the problem is that most people (like 99% of people) just think of the result of using getElementsByTagName as being an array. It acts like an array in the way most people use it so that idea works most of the time. Thing is, it&#039;s not an array, but a NodeList, which is defined to work that way:

&lt;blockquote&gt;The DOM also specifies a NodeList interface to handle ordered lists of Nodes, such as the children of a Node, or the elements returned by the Element.getElementsByTagName method... NodeLists and NamedNodeMaps in the DOM are &quot;live&quot;, that is, changes to the underlying document structure are reflected in all relevant NodeLists and NamedNodeMaps. For example, if a DOM user gets a NodeList object containing the children of an Element, then subsequently adds more children to that element (or removes children, or modifies them), those changes are automatically reflected in the NodeList without further action on the user&#039;s part.&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>I think the problem is that most people (like 99% of people) just think of the result of using getElementsByTagName as being an array. It acts like an array in the way most people use it so that idea works most of the time. Thing is, it's not an array, but a NodeList, which is defined to work that way:</p>
<blockquote><p>The DOM also specifies a NodeList interface to handle ordered lists of Nodes, such as the children of a Node, or the elements returned by the Element.getElementsByTagName method&#8230; NodeLists and NamedNodeMaps in the DOM are "live", that is, changes to the underlying document structure are reflected in all relevant NodeLists and NamedNodeMaps. For example, if a DOM user gets a NodeList object containing the children of an Element, then subsequently adds more children to that element (or removes children, or modifies them), those changes are automatically reflected in the NodeList without further action on the user's part.</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/#comment-15479</link>
		<dc:creator>James</dc:creator>
		<pubDate>Mon, 07 Jan 2008 23:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.drunkenfist.com/304/2007/06/27/a-static-variation-on-getelementsbytagname/#comment-15479</guid>
		<description>Thanks for this. I ran into the exact same issue. It&#039;s baffling that all_links would be the reference to the function. Totally unintuitive.</description>
		<content:encoded><![CDATA[<p>Thanks for this. I ran into the exact same issue. It's baffling that all_links would be the reference to the function. Totally unintuitive.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

