<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to DOMContentLoaded</title><link>https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/</link><description>Recent changes to DOMContentLoaded</description><atom:link href="https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 09 Aug 2019 19:45:08 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/feed" rel="self" type="application/rss+xml"/><item><title>DOMContentLoaded modified by mmartz</title><link>https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,5 +1,5 @@
 [toTop]: #content_base "Top"
-[toBottom]: #site-footer "Bottom"
+[toBottom]: #notes "Bottom"
 ## Description

 The code in a Greasemonkey user script gets invoked when the `DOMContentLoaded` event fires. It is a [DOM event](https://developer.mozilla.org/docs/Web/API/Event) implemented by Mozilla, similar to [window.onload](https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers.onload). However, since it waits only for the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) to load, instead of the entire page *(including images, style sheets, and etc.)* it happens sooner. The `DOMContentLoaded` event does not fire for non-text content types such as images. 
@@ -19,3 +19,7 @@
 Using a combination of [userContent.css](http://kb.mozillazine.org/UserContent.css) and [@-moz-document()](https://developer.mozilla.org/docs/Web/CSS/@document) rules, the page can be hidden completely. The Greasemonkey script would then be crafted to undo this CSS rule, after altering it, thereby never showing the page in its pre-greased state. 

 [⬆][toTop] [⬇][toBottom]
+
+## Notes
+
+[⬆][toTop]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmartz</dc:creator><pubDate>Fri, 09 Aug 2019 19:45:08 -0000</pubDate><guid>https://sourceforge.net8212b566bf6e31998612ffd4bed9a314ca4544b0</guid></item><item><title>DOMContentLoaded modified by Martz</title><link>https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,39 +1,21 @@
+[toTop]: #content_base "Top"
+[toBottom]: #site-footer "Bottom"
 ## Description

-The code in a Greasemonkey user script gets invoked when the 
-    
-    DOMContentLoaded
+The code in a Greasemonkey user script gets invoked when the `DOMContentLoaded` event fires. It is a [DOM event](https://developer.mozilla.org/docs/Web/API/Event) implemented by Mozilla, similar to [window.onload](https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers.onload). However, since it waits only for the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) to load, instead of the entire page *(including images, style sheets, and etc.)* it happens sooner. The `DOMContentLoaded` event does not fire for non-text content types such as images. 

-event fires. It is a [DOM event](http://developer.mozilla.org/en/DOM:event) implemented by Mozilla, similar to [window.onload](http://developer.mozilla.org/en/DOM:window.onload). However, since it waits only for the [DOM](http://developer.mozilla.org/en/DOM) to load, instead of the entire page _(including images, style sheets, and etc.)_ it happens sooner. The 
-    
-    DOMContentLoaded
-
-event does not fire for non-text content types such as images. 
-
-[Workaround](#Workaround) 
+[Workaround](#workaround) 

 ## Flicker

-Although it happens sooner than the 
-    
-    Load
+Although it happens sooner than the `Load` event *(`onload`)*, there is still a delay between when the page starts loading and when this event fires. This delay is the amount of time that it takes for the HTML content of the page itself to load. Greasemonkey injects [user script](User_script)s at `DOMContentLoaded` time. Thus, there is a period of time when the page is loading, and may be showing on screen, before Greasemonkey has injected into the page. This delay is often known as **flicker**, where the page appears to load, then changes after a *(usually)* short delay. 

-event _(
-    
-    onload
-
-)_, there is still a delay between when the page starts loading and when this event fires. This delay is the amount of time that it takes for the HTML content of the page itself to load. Greasemonkey injects [user scripts](User-Script) at 
-    
-    DOMContentLoaded
-
-time. Thus, there is a period of time when the page is loading, and may be showing on screen, before Greasemonkey has injected into the page. This delay is often known as **flicker**, where the page appears to load, then changes after a _(usually)_ short delay. 
-
-[top](#top) 
+[⬆][toTop] [⬇][toBottom]

 ## Workaround

 Generally, flicker is a problem that should be ignored. If, however, a script author decides that it must be avoided there is at least one technique. 

-Using a combination of [userContent.css](http://kb.mozillazine.org/UserContent.css) and [@-moz-document()](http://developer.mozilla.org/en/CSS:%40-moz-document) rules, the page can be hidden completely. The Greasemonkey script would then be crafted to undo this CSS rule, after altering it, thereby never showing the page in its pre-greased state. 
+Using a combination of [userContent.css](http://kb.mozillazine.org/UserContent.css) and [@-moz-document()](https://developer.mozilla.org/docs/Web/CSS/@document) rules, the page can be hidden completely. The Greasemonkey script would then be crafted to undo this CSS rule, after altering it, thereby never showing the page in its pre-greased state. 

-[top](#top) 
+[⬆][toTop] [⬇][toBottom]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martz</dc:creator><pubDate>Sun, 10 Aug 2014 06:35:11 -0000</pubDate><guid>https://sourceforge.net0c222b3cceafd0cc6c14504f2f365e8c9a943fd6</guid></item><item><title>DOMContentLoaded modified by Martz</title><link>https://sourceforge.net/p/greasemonkey/wiki/DOMContentLoaded/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;The code in a Greasemonkey user script gets invoked when the &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;DOMContentLoaded&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;event fires. It is a &lt;a class="" href="http://developer.mozilla.org/en/DOM:event" rel="nofollow"&gt;DOM event&lt;/a&gt; implemented by Mozilla, similar to &lt;a class="" href="http://developer.mozilla.org/en/DOM:window.onload" rel="nofollow"&gt;window.onload&lt;/a&gt;. However, since it waits only for the &lt;a class="" href="http://developer.mozilla.org/en/DOM" rel="nofollow"&gt;DOM&lt;/a&gt; to load, instead of the entire page &lt;em&gt;(including images, style sheets, and etc.)&lt;/em&gt; it happens sooner. The &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;DOMContentLoaded&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;event does not fire for non-text content types such as images. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#Workaround"&gt;Workaround&lt;/a&gt; &lt;/p&gt;
&lt;h2 id="flicker"&gt;Flicker&lt;/h2&gt;
&lt;p&gt;Although it happens sooner than the &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;Load&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;event _(&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;onload&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;)_, there is still a delay between when the page starts loading and when this event fires. This delay is the amount of time that it takes for the HTML content of the page itself to load. Greasemonkey injects &lt;a class="" href="../User-Script"&gt;user scripts&lt;/a&gt; at &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;DOMContentLoaded&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;time. Thus, there is a period of time when the page is loading, and may be showing on screen, before Greasemonkey has injected into the page. This delay is often known as &lt;strong&gt;flicker&lt;/strong&gt;, where the page appears to load, then changes after a &lt;em&gt;(usually)&lt;/em&gt; short delay. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#top"&gt;top&lt;/a&gt; &lt;/p&gt;
&lt;h2 id="workaround"&gt;Workaround&lt;/h2&gt;
&lt;p&gt;Generally, flicker is a problem that should be ignored. If, however, a script author decides that it must be avoided there is at least one technique. &lt;/p&gt;
&lt;p&gt;Using a combination of &lt;a class="" href="http://kb.mozillazine.org/UserContent.css" rel="nofollow"&gt;userContent.css&lt;/a&gt; and &lt;a class="" href="http://developer.mozilla.org/en/CSS:%40-moz-document" rel="nofollow"&gt;@-moz-document()&lt;/a&gt; rules, the page can be hidden completely. The Greasemonkey script would then be crafted to undo this CSS rule, after altering it, thereby never showing the page in its pre-greased state. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#top"&gt;top&lt;/a&gt; &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martz</dc:creator><pubDate>Fri, 27 Jun 2014 23:42:47 -0000</pubDate><guid>https://sourceforge.nete0b47bccdec9e58a839ce6bccfe172637b6744bc</guid></item></channel></rss>