<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>netcreates. blog &#187; Firefox</title>
	<atom:link href="http://www.netcreates.jp/blog/tag/firefox/feed" rel="self" type="application/rss+xml" />
	<link>http://www.netcreates.jp/blog</link>
	<description>ネットクリエイツ株式会社のサービス紹介、TIPS など</description>
	<lastBuildDate>Mon, 05 Dec 2011 01:25:50 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Firefox3 で *.each is not a function（Prototype.js）</title>
		<link>http://www.netcreates.jp/blog/2008/09/firefox3-each-is-not-a-functio.html</link>
		<comments>http://www.netcreates.jp/blog/2008/09/firefox3-each-is-not-a-functio.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 02:00:00 +0000</pubDate>
		<dc:creator>yusuke</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.netcreates.jp/blog2/2008/09/firefox3_each_is_not_a_functio.html</guid>
		<description><![CDATA[イトウです。 ウェブアプリケーションの開発の際は、ユーザビリティの向上のため、 JavaScript(PrototypeやjQuery) を使っています。依存するような操作は好ましくないと思うのですが、これらをうまく活用することで、少しでもユーザの負担が減れば、と思っています。 ところで、Firefox 3 にしてからしばらくしたのですが、Array.each を使おうとすると、「*.each is not a function」と出るようになりました。どうやら、Firefox3 になってから getElementsByClassName() がネイティブに実装され、その結果、返す型が変更になったのが原因のようです。 var elems = $A(elements.getElementsByClassName("hoge")); といった具合に、変換してやればいいと思います。せっかく実装されたネイティブな関数なので、オーバーヘッドのことなんかも考えたら、getElementsByClassName() を使ったほうが良いと思います。]]></description>
			<content:encoded><![CDATA[<p>イトウです。</p>
<p>ウェブアプリケーションの開発の際は、ユーザビリティの向上のため、 JavaScript(PrototypeやjQuery) を使っています。依存するような操作は好ましくないと思うのですが、これらをうまく活用することで、少しでもユーザの負担が減れば、と思っています。</p>
<p>ところで、Firefox 3 にしてからしばらくしたのですが、<a href="http://www.prototypejs.org/api/array/each">Array.each</a> を使おうとすると、「*.each is not a function」と出るようになりました。どうやら、Firefox3 になってから getElementsByClassName() がネイティブに実装され、その結果、返す型が変更になったのが原因のようです。 </p>
<pre><code>var elems = $A(elements.getElementsByClassName("hoge"));</code></pre>
<p>といった具合に、変換してやればいいと思います。せっかく実装されたネイティブな関数なので、オーバーヘッドのことなんかも考えたら、getElementsByClassName() を使ったほうが良いと思います。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcreates.jp/blog/2008/09/firefox3-each-is-not-a-functio.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

