<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=CR.ready</id>
		<title>CR.ready - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://help.marketruler.com/index.php?action=history&amp;feed=atom&amp;title=CR.ready"/>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.ready&amp;action=history"/>
		<updated>2026-04-28T16:52:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://help.marketruler.com/index.php?title=CR.ready&amp;diff=1434&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;code&gt;__CR.ready&lt;/code&gt; is a function which takes two parameters:  # a function with signature &lt;code&gt;function (context) { ... }&lt;/code&gt; # an optional &lt;code&gt;context&lt;/code&gt; param...&quot;</title>
		<link rel="alternate" type="text/html" href="https://help.marketruler.com/index.php?title=CR.ready&amp;diff=1434&amp;oldid=prev"/>
				<updated>2018-11-14T23:02:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;code&amp;gt;__CR.ready&amp;lt;/code&amp;gt; is a function which takes two parameters:  # a function with signature &amp;lt;code&amp;gt;function (context) { ... }&amp;lt;/code&amp;gt; # an optional &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; param...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;code&amp;gt;__CR.ready&amp;lt;/code&amp;gt; is a function which takes two parameters:&lt;br /&gt;
&lt;br /&gt;
# a function with signature &amp;lt;code&amp;gt;function (context) { ... }&amp;lt;/code&amp;gt;&lt;br /&gt;
# an optional &amp;lt;code&amp;gt;context&amp;lt;/code&amp;gt; parameter which is passed as the first parameter &lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script&amp;gt;&lt;br /&gt;
 __CR.ready(function (cr) {&lt;br /&gt;
   if (document.getElementById('message-sent')) {&lt;br /&gt;
     cr.track(&amp;quot;newsletter&amp;quot;, null, cr.data(&amp;quot;email&amp;quot;));&lt;br /&gt;
   }&lt;br /&gt;
 }, __CR);&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function passed in ''may'' be executed after the '''[https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded DOMContentLoaded]''' event in a browser, often called the '''[[DOM]] Ready''' event. If the '''[[DOM]] Ready''' has already occurred in the current browser window, the passed in function is called immediately (but asynchronously).&lt;br /&gt;
&lt;br /&gt;
The value for &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; in the passed-in function is typically set to the browser global object &amp;lt;code&amp;gt;window&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This function should be used when you wish to access aspects of the [[DOM|Document Object Model]] in the browser, but are not certain when your code is running and you wish to ensure it runs after the [[DOM]] is loaded. It is equivalent to the [https://api.jquery.com/ready/ jQuery Ready] function, but does not require [[jQuery]].&lt;br /&gt;
&lt;br /&gt;
Any function passed into &amp;lt;code&amp;gt;__CR.ready&amp;lt;/code&amp;gt; is guaranteed to be executed '''once and only once'''.&lt;br /&gt;
&lt;br /&gt;
This function is only available as of ''September 12, 2018''.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:ConversionRuler JavaScript Functions|JavaScript Functions]]&lt;br /&gt;
* [[__CR.jquery]]&lt;br /&gt;
* [[Tracking Queue]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ConversionRuler]]&lt;br /&gt;
[[Category:ConversionRuler JavaScript Functions]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>