<?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: Avoid Javascript&#8217;s &#8216;with&#8217; keyword</title>
	<atom:link href="http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/</link>
	<description>Music, Programming, Design</description>
	<lastBuildDate>Fri, 11 Jun 2010 21:08:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Barry van Oudtshoorn</title>
		<link>http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/comment-page-1/#comment-899</link>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
		<pubDate>Wed, 26 Aug 2009 09:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.barryvan.com.au/?p=162#comment-899</guid>
		<description>Yes, you&#039;re right that &lt;em&gt;with&lt;/em&gt; can be very useful -- but to my mind, the danger of not knowing exactly what you&#039;re changing outweighs the potential benefit. Personally, I would use the MooTools method of setting lots of properties...

&lt;code&gt;var oMyElement = new Element(&#039;div&#039;, {
  id: &#039;Fred&#039;,
  styles: {
    width: &#039;100px&#039;,
    height: &#039;100px&#039;,
    display: &#039;inline&#039;
  }
});&lt;/code&gt;

...which means that I can get away without using &lt;em&gt;with&lt;/em&gt;. :)</description>
		<content:encoded><![CDATA[<p>Yes, you&#8217;re right that <em>with</em> can be very useful &#8212; but to my mind, the danger of not knowing exactly what you&#8217;re changing outweighs the potential benefit. Personally, I would use the MooTools method of setting lots of properties&#8230;</p>
<p><code>var oMyElement = new Element('div', {<br />
  id: 'Fred',<br />
  styles: {<br />
    width: '100px',<br />
    height: '100px',<br />
    display: 'inline'<br />
  }<br />
});</code></p>
<p>&#8230;which means that I can get away without using <em>with</em>. <img src='http://www.barryvan.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/comment-page-1/#comment-898</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Wed, 26 Aug 2009 08:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.barryvan.com.au/?p=162#comment-898</guid>
		<description>Think you might not have grasped the main benefit of with ... it&#039;s for setting lots of properties, e.g.

&lt;code&gt;var oMyElement = document.createElement( &#039;DIV&#039; );
with ( oMyElement )
{
    id = &#039;Fred&#039;;
    with ( style )
    {
        width = &#039;100px&#039;;
        height = &#039;100px&#039;;
        display = &#039;inline&#039;;
    }
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Think you might not have grasped the main benefit of with &#8230; it&#8217;s for setting lots of properties, e.g.</p>
<p><code>var oMyElement = document.createElement( 'DIV' );<br />
with ( oMyElement )<br />
{<br />
    id = 'Fred';<br />
    with ( style )<br />
    {<br />
        width = '100px';<br />
        height = '100px';<br />
        display = 'inline';<br />
    }<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry van Oudtshoorn</title>
		<link>http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/comment-page-1/#comment-880</link>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
		<pubDate>Tue, 21 Jul 2009 10:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.barryvan.com.au/?p=162#comment-880</guid>
		<description>I actually use MooTools by preference — it provides many of the same benefits as jQuery, and the syntax is similar.</description>
		<content:encoded><![CDATA[<p>I actually use MooTools by preference — it provides many of the same benefits as jQuery, and the syntax is similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Louigi Verona</title>
		<link>http://www.barryvan.com.au/2009/05/avoid-javascripts-with-keyword/comment-page-1/#comment-875</link>
		<dc:creator>Louigi Verona</dc:creator>
		<pubDate>Tue, 21 Jul 2009 09:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.barryvan.com.au/?p=162#comment-875</guid>
		<description>Are you using jQuery? I found it to be very fast and much easier syntax than JavaScript.</description>
		<content:encoded><![CDATA[<p>Are you using jQuery? I found it to be very fast and much easier syntax than JavaScript.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
