<?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: Agent YUI: Mission 2 &#8211; Magic Of The DOM</title>
	<atom:link href="http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 10 Mar 2010 06:54:55 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt</title>
		<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/comment-page-1/#comment-8729</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sun, 27 Jul 2008 23:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/#comment-8729</guid>
		<description>Oh cool, thanks, that makes a lot more sense now :)</description>
		<content:encoded><![CDATA[<p>Oh cool, thanks, that makes a lot more sense now <img src='http://www.klauskomenda.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Klaus</title>
		<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/comment-page-1/#comment-8707</link>
		<dc:creator>Klaus</dc:creator>
		<pubDate>Sun, 27 Jul 2008 12:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/#comment-8707</guid>
		<description>@Matt:
ad 1.: 
The code you mention, YAHOO.AgentYUI.Mission2 = function () {}(); is only meant to be the skeleton for the module. All the functions I mention after that are placed inside that anonymous function. I will update that example to make it more clear that the code that follows will be put inside that skeleton. If you take a look at the &lt;a href=&quot;/wp-content/uploads/2007/10/ayui_m2/ayui_m2_final.html&quot; rel=&quot;nofollow&quot;&gt;final result&lt;/a&gt;, do a view source and scroll to the bottom, you will notice that all the functions needed are placed inside that anonymous function. 

By having a return statement at the end, YAHOO.AgentYUI.Mission2 gets turned into an object with one publicly accessible property, init, which holds the init function of the module. This conforms to the &lt;a href=&quot;http://yuiblog.com/blog/2007/06/12/module-pattern/&quot; rel=&quot;nofollow&quot;&gt;JavaScript Module Pattern advocated by Douglas Crockford&lt;/a&gt;.

ad 2.:
Yes, I agree, that should be something like &quot;external&quot; or &quot;non-local&quot;.</description>
		<content:encoded><![CDATA[<p>@Matt:<br />
ad 1.:<br />
The code you mention, YAHOO.AgentYUI.Mission2 = function () {}(); is only meant to be the skeleton for the module. All the functions I mention after that are placed inside that anonymous function. I will update that example to make it more clear that the code that follows will be put inside that skeleton. If you take a look at the <a href="/wp-content/uploads/2007/10/ayui_m2/ayui_m2_final.html" rel="nofollow">final result</a>, do a view source and scroll to the bottom, you will notice that all the functions needed are placed inside that anonymous function. </p>
<p>By having a return statement at the end, YAHOO.AgentYUI.Mission2 gets turned into an object with one publicly accessible property, init, which holds the init function of the module. This conforms to the <a href="http://yuiblog.com/blog/2007/06/12/module-pattern/" rel="nofollow">JavaScript Module Pattern advocated by Douglas Crockford</a>.</p>
<p>ad 2.:<br />
Yes, I agree, that should be something like &#8220;external&#8221; or &#8220;non-local&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/comment-page-1/#comment-8705</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sun, 27 Jul 2008 11:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/#comment-8705</guid>
		<description>Awesome. Two questions (well, one question and an observation):

1. Could you explain the &quot;Javascript module&quot; thing a bit more? As far as I can see, you do YAHOO.AgentYUI.Mission2 = function () {}(); but then what? Do you mean that every statement you write after that is somehow magically placed inside? I&#039;m confused! It looks like you&#039;re just making an empty anonymous function and then running it, and then not doing anything with it. 

2. It&#039;s a little odd that you add the class &quot;local link&quot; to all the links that are external (as in, non-local) :)</description>
		<content:encoded><![CDATA[<p>Awesome. Two questions (well, one question and an observation):</p>
<p>1. Could you explain the &#8220;Javascript module&#8221; thing a bit more? As far as I can see, you do YAHOO.AgentYUI.Mission2 = function () {}(); but then what? Do you mean that every statement you write after that is somehow magically placed inside? I&#8217;m confused! It looks like you&#8217;re just making an empty anonymous function and then running it, and then not doing anything with it. </p>
<p>2. It&#8217;s a little odd that you add the class &#8220;local link&#8221; to all the links that are external (as in, non-local) <img src='http://www.klauskomenda.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Digital Notepad &#187; Bookmarks for June 24th through July 1st</title>
		<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/comment-page-1/#comment-7793</link>
		<dc:creator>A Digital Notepad &#187; Bookmarks for June 24th through July 1st</dc:creator>
		<pubDate>Tue, 01 Jul 2008 15:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/#comment-7793</guid>
		<description>[...] Agent YUI: Mission 2 - Magic Of The DOM - Great walk through of the YUI Dom util. [...]</description>
		<content:encoded><![CDATA[<p>[...] Agent YUI: Mission 2 &#8211; Magic Of The DOM &#8211; Great walk through of the YUI Dom util. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chickenBeak &#187; YUI - getElementsBy TagName / design tutorials for the greater good</title>
		<link>http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/comment-page-1/#comment-7579</link>
		<dc:creator>chickenBeak &#187; YUI - getElementsBy TagName / design tutorials for the greater good</dc:creator>
		<pubDate>Fri, 20 Jun 2008 13:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/archives/2007/10/27/agent-yui-mission-2-magic-of-the-dom/#comment-7579</guid>
		<description>[...] A good resource for more YUI Dom fun can be found at klauskomenda.com [...]</description>
		<content:encoded><![CDATA[<p>[...] A good resource for more YUI Dom fun can be found at klauskomenda.com [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
