<?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"
	>
<channel>
	<title>Comments on: Does setTimeout solve the DOMContentLoaded problem?</title>
	<atom:link href="http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/</link>
	<description>the personal blog of Stuart Colville covering modern web development techniques and best practices</description>
	<pubDate>Mon, 13 Oct 2008 13:44:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Diego Perini</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63992</link>
		<dc:creator>Diego Perini</dc:creator>
		<pubDate>Fri, 15 Feb 2008 21:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63992</guid>
		<description>If you are looking for an alternative method to attach functionality earlier to a page look here:

   http://javascript.nwbox.com/NWEvents/

The interesting part are the Delegates example. I know, no documentation yet but will do soon, since this is now well tested.

The code is published since mid 2007 under MIT license at:

   http://nwevents.googlecode.com/

My syntax for that delegation task is:

NW.appendDelegate( selector, event_type, function, [delegate] );

Where:

selector - a full CSS3 selector string
event_type - the event type you whish to listen to
function - the user function handler
delegate - the delegate object (optional)

If the optional delegate object is passed in at the time of registration that element is used as the delegate, elsewhere the default "document.documentElement" is used to listen for that event type to bubble; at that time if the element match the selector the user function handler is executed.

This method is the all new method to avoid using an "onload" notification or similar "DOMReady" techniques.

It is a bit hard to grasp at first, but then you will realize we have always had the solution in front of us but we never saw it.

Diego Perini</description>
		<content:encoded><![CDATA[<p>If you are looking for an alternative method to attach functionality earlier to a page look here:</p>
<p>   <a href="http://javascript.nwbox.com/NWEvents/" rel="nofollow">http://javascript.nwbox.com/NWEvents/</a></p>
<p>The interesting part are the Delegates example. I know, no documentation yet but will do soon, since this is now well tested.</p>
<p>The code is published since mid 2007 under MIT license at:</p>
<p>   <a href="http://nwevents.googlecode.com/" rel="nofollow">http://nwevents.googlecode.com/</a></p>
<p>My syntax for that delegation task is:</p>
<p>NW.appendDelegate( selector, event_type, function, [delegate] );</p>
<p>Where:</p>
<p>selector - a full CSS3 selector string<br />
event_type - the event type you whish to listen to<br />
function - the user function handler<br />
delegate - the delegate object (optional)</p>
<p>If the optional delegate object is passed in at the time of registration that element is used as the delegate, elsewhere the default &#8220;document.documentElement&#8221; is used to listen for that event type to bubble; at that time if the element match the selector the user function handler is executed.</p>
<p>This method is the all new method to avoid using an &#8220;onload&#8221; notification or similar &#8220;DOMReady&#8221; techniques.</p>
<p>It is a bit hard to grasp at first, but then you will realize we have always had the solution in front of us but we never saw it.</p>
<p>Diego Perini</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javascript News &#187; Blog Archive &#187; Using setTimeout to Solve DOMContentLoaded?</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63991</link>
		<dc:creator>Javascript News &#187; Blog Archive &#187; Using setTimeout to Solve DOMContentLoaded?</dc:creator>
		<pubDate>Fri, 15 Feb 2008 20:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63991</guid>
		<description>[...] He then thought, does setTimeout solve the DOMContentLoaded problem?. [...]</description>
		<content:encoded><![CDATA[<p>[...] He then thought, does setTimeout solve the DOMContentLoaded problem?. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63990</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Fri, 15 Feb 2008 17:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63990</guid>
		<description>Interesting approach; I've read of a few similar techniques (&lt;a href="http://hedgerwow.com/" rel="nofollow"&gt;Hedger Wang&lt;/a&gt; and &lt;a href="dean.edwards.name/" rel="nofollow"&gt;Dean Edwards&lt;/a&gt; of course, have spent time looking into the onload issue) - I suspect having a single timeout could be susceptible to timing issues, particularly over slower connections; my habit is to just throw a single script block at the very bottom of the document which calls an init() function. The key at that point is the whole DOM should have been parsed by the time that script block is executed. While less-than-ideal having an inline script block, it has been consistent across all browsers.</description>
		<content:encoded><![CDATA[<p>Interesting approach; I&#8217;ve read of a few similar techniques (<a href="http://hedgerwow.com/" rel="nofollow">Hedger Wang</a> and <a href="dean.edwards.name/" rel="nofollow">Dean Edwards</a> of course, have spent time looking into the onload issue) - I suspect having a single timeout could be susceptible to timing issues, particularly over slower connections; my habit is to just throw a single script block at the very bottom of the document which calls an init() function. The key at that point is the whole DOM should have been parsed by the time that script block is executed. While less-than-ideal having an inline script block, it has been consistent across all browsers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajax Girl &#187; Blog Archive &#187; Using setTimeout to Solve DOMContentLoaded?</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63989</link>
		<dc:creator>Ajax Girl &#187; Blog Archive &#187; Using setTimeout to Solve DOMContentLoaded?</dc:creator>
		<pubDate>Fri, 15 Feb 2008 15:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63989</guid>
		<description>[...] He then thought, does setTimeout solve the DOMContentLoaded problem?. [...]</description>
		<content:encoded><![CDATA[<p>[...] He then thought, does setTimeout solve the DOMContentLoaded problem?. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Colville</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63988</link>
		<dc:creator>Stuart Colville</dc:creator>
		<pubDate>Fri, 15 Feb 2008 10:44:20 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63988</guid>
		<description>@Jonathan: thanks for taking the time to put together your analysis. I think you've nailed it exactly and your thoughts around Gzipping certainly adds an interesting dimension to it cheers for taking it a step further.</description>
		<content:encoded><![CDATA[<p>@Jonathan: thanks for taking the time to put together your analysis. I think you&#8217;ve nailed it exactly and your thoughts around Gzipping certainly adds an interesting dimension to it cheers for taking it a step further.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bramus!</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63987</link>
		<dc:creator>Bramus!</dc:creator>
		<pubDate>Fri, 15 Feb 2008 08:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63987</guid>
		<description>(crossposted at Snook)

Heh, this is something &lt;a href="http://www.bram.us/2007/07/30/my-code-snippet-automatically-start-lightbox-on-page-load/" rel="nofollow"&gt;I've used before&lt;/a&gt;. Didn't know it was that big of an issue; thought it was my IE flipping out once more... :-D</description>
		<content:encoded><![CDATA[<p>(crossposted at Snook)</p>
<p>Heh, this is something <a href="http://www.bram.us/2007/07/30/my-code-snippet-automatically-start-lightbox-on-page-load/" rel="nofollow">I&#8217;ve used before</a>. Didn&#8217;t know it was that big of an issue; thought it was my IE flipping out once more&#8230; <img src='http://muffinresearch.co.uk/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Snook</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63986</link>
		<dc:creator>Jonathan Snook</dc:creator>
		<pubDate>Fri, 15 Feb 2008 03:19:33 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63986</guid>
		<description>I was originally going to respond to this as a comment but expanded on my thoughts in a &lt;a href="http://snook.ca/archives/javascript/settimeout_solve_domcontentloaded/" rel="nofollow"&gt;blog post&lt;/a&gt;. Conclusion: this *may* work depending on the ability to rely on Gzip compression.</description>
		<content:encoded><![CDATA[<p>I was originally going to respond to this as a comment but expanded on my thoughts in a <a href="http://snook.ca/archives/javascript/settimeout_solve_domcontentloaded/" rel="nofollow">blog post</a>. Conclusion: this *may* work depending on the ability to rely on Gzip compression.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Smith</title>
		<link>http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63985</link>
		<dc:creator>Nathan Smith</dc:creator>
		<pubDate>Fri, 15 Feb 2008 03:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/02/15/does-settimeout-solve-the-domcontentloaded-problem/#comment-63985</guid>
		<description>Nice implementation. I resorted to using setTimeout recently, to solve Safari inaccurately firing onload for iframes...

&lt;a href="http://sonspring.com/journal/jquery-iframe-sizing" rel="nofollow"&gt;http://sonspring.com/journal/jquery-iframe-sizing&lt;/a&gt;

I did feel a bit dirty, but it got the job done. Glad to hear I'm not the only one who has tried it, with some measure of success.</description>
		<content:encoded><![CDATA[<p>Nice implementation. I resorted to using setTimeout recently, to solve Safari inaccurately firing onload for iframes&#8230;</p>
<p><a href="http://sonspring.com/journal/jquery-iframe-sizing" rel="nofollow">http://sonspring.com/journal/jquery-iframe-sizing</a></p>
<p>I did feel a bit dirty, but it got the job done. Glad to hear I&#8217;m not the only one who has tried it, with some measure of success.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
