<?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: DOMContentLoaded and Safari</title>
	<atom:link href="http://schinckel.net/2005/10/14/domcontentloaded-and-safari/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Sat, 30 Aug 2008 00:29:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Tanny O'Haley</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-1187</link>
		<dc:creator>Tanny O'Haley</dc:creator>
		<pubDate>Wed, 10 May 2006 16:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-1187</guid>
		<description>You might want to try out my DOMContentLoaded event for browsers. I created a DOMContentLoaded event function array and a DOMContentLoadedInit function that processes the array. To run the DOMContentLoadedInit function I use the DOMContentLoaded event for Mozilla browsers, the defer script attribute that Dean Edwards found for IE and a scheduler function (with code from Brothercake and Simon Willison) in conjuction with onload for all other browsers. You can find this at &lt;a href="http://tanny.ica.com/ica/tko/tkoblog.nsf/dx/domcontentloaded-event-for-browsers" rel="nofollow"&gt;DOMContentLoaded Event for Browsers&lt;/a&gt;.
</description>
		<content:encoded><![CDATA[<p>You might want to try out my DOMContentLoaded event for browsers. I created a DOMContentLoaded event function array and a DOMContentLoadedInit function that processes the array. To run the DOMContentLoadedInit function I use the DOMContentLoaded event for Mozilla browsers, the defer script attribute that Dean Edwards found for IE and a scheduler function (with code from Brothercake and Simon Willison) in conjuction with onload for all other browsers. You can find this at <a href="http://tanny.ica.com/ica/tko/tkoblog.nsf/dx/domcontentloaded-event-for-browsers" rel="nofollow">DOMContentLoaded Event for Browsers</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-447</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Oct 2005 14:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-447</guid>
		<description>Oh, and you'll need to modify CheckDOM so it looks for tags with the correct name as your last tag on your page.</description>
		<content:encoded><![CDATA[<p>Oh, and you&#8217;ll need to modify CheckDOM so it looks for tags with the correct name as your last tag on your page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-446</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 18 Oct 2005 14:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-446</guid>
		<description>Hmm.  I did write a big comment to respond to this - it seems to have been eaten.  I hope it's not my Catchpa code breaking!

Anyway, include all of the startup code at the end of the document you want to autorun, and then have one function at the top (called Startup, unless you change the startup code), that calls all of the other functions/expressions you want to run.

You may also find some info here about how to include external files - I can't recall if I've posted that or not.</description>
		<content:encoded><![CDATA[<p>Hmm.  I did write a big comment to respond to this - it seems to have been eaten.  I hope it&#8217;s not my Catchpa code breaking!</p>
<p>Anyway, include all of the startup code at the end of the document you want to autorun, and then have one function at the top (called Startup, unless you change the startup code), that calls all of the other functions/expressions you want to run.</p>
<p>You may also find some info here about how to include external files - I can&#8217;t recall if I&#8217;ve posted that or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jo</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-445</link>
		<dc:creator>Jo</dc:creator>
		<pubDate>Tue, 18 Oct 2005 07:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-445</guid>
		<description>Maybe you could sort this out for me (since being a novice to scripting)

When having lots of images on a page, as I do, I rather would like to load first any scripts before these s load. 

My confusion is that I use different ways to load a Js script

first method -  inline script:

&lt;code&gt;onload = functionName;&lt;/code&gt;

second method - external script

&lt;code&gt;
// helper function to avoid overwriting any 
// window.onload events
function addLoadEvent(func){if(document.getElementById&#38;&#38;document.createTextNode){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}}

// my functions to be loaded
addLoadEvent(FirstFunction);
addLoadEvent(SecondFunction);
addLoadEvent(thirdFunction);&lt;/code&gt;


Have any idea how to link eg your method or Dean's method to my situation?













</description>
		<content:encoded><![CDATA[<p>Maybe you could sort this out for me (since being a novice to scripting)</p>
<p>When having lots of images on a page, as I do, I rather would like to load first any scripts before these s load. </p>
<p>My confusion is that I use different ways to load a Js script</p>
<p>first method -  inline script:</p>
<p><code>onload = functionName;</code></p>
<p>second method - external script</p>
<p><code><br />
// helper function to avoid overwriting any<br />
// window.onload events<br />
function addLoadEvent(func){if(document.getElementById&amp;&amp;document.createTextNode){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}}</p>
<p>// my functions to be loaded<br />
addLoadEvent(FirstFunction);<br />
addLoadEvent(SecondFunction);<br />
addLoadEvent(thirdFunction);</code></p>
<p>Have any idea how to link eg your method or Dean&#8217;s method to my situation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-436</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Sun, 16 Oct 2005 03:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-436</guid>
		<description>Thanks Jo, I did find this page: I found that this (general) solution was a bit overkill - and not working well.

The problem was with the &lt;code&gt;SetInterval()&lt;/code&gt; call not being able to be stopped, by &lt;code&gt;ClearInterval()&lt;/code&gt;, from a function called by the &lt;code&gt;SetInterval()&lt;/code&gt; call itself.

Thus my script was being run time and time again, and eating up a heap of CPU time.  A repeated call to &lt;code&gt;SetTimeout()&lt;/code&gt; rather than &lt;code&gt;SetInterval()&lt;/code&gt; was what I ended up using, as it will not do this.</description>
		<content:encoded><![CDATA[<p>Thanks Jo, I did find this page: I found that this (general) solution was a bit overkill - and not working well.</p>
<p>The problem was with the <code>SetInterval()</code> call not being able to be stopped, by <code>ClearInterval()</code>, from a function called by the <code>SetInterval()</code> call itself.</p>
<p>Thus my script was being run time and time again, and eating up a heap of CPU time.  A repeated call to <code>SetTimeout()</code> rather than <code>SetInterval()</code> was what I ended up using, as it will not do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jo</title>
		<link>http://schinckel.net/2005/10/14/domcontentloaded-and-safari/#comment-411</link>
		<dc:creator>Jo</dc:creator>
		<pubDate>Sat, 15 Oct 2005 19:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/14/domcontentloaded-and-safari/#comment-411</guid>
		<description>&lt;blockquote&gt;If this maybe a useful link to this article â€¦
On this page http://www.brothercake.com/site/resources/scripts/domready/ you have a script that use a time-out to check if any DOM script is ready for execution. I found that when using IE WIN (5 and up) and tested a DOM script locally it actually removed the error mesage (JS console) that the element retrieved with the method document.getElementById was undefined.&lt;/blockquote&gt;
</description>
		<content:encoded><![CDATA[<blockquote><p>If this maybe a useful link to this article â€¦<br />
On this page <a href="http://www.brothercake.com/site/resources/scripts/domready/" rel="nofollow">http://www.brothercake.com/site/resources/scripts/domready/</a> you have a script that use a time-out to check if any DOM script is ready for execution. I found that when using IE WIN (5 and up) and tested a DOM script locally it actually removed the error mesage (JS console) that the element retrieved with the method document.getElementById was undefined.</p></blockquote>
]]></content:encoded>
	</item>
</channel>
</rss>
