Revision: 366
Author: ryandesign.com
Date: Mon Feb 6 19:44:07 2012
Log: hello_world example: use contentLoaded instead of prototype.js
observe dom:loaded
http://code.google.com/p/canviz/source/detail?r=366
Modified:
/canviz/trunk/examples/hello_world/new.html.in
/canviz/trunk/examples/hello_world/scripts_new.js
=======================================
--- /canviz/trunk/examples/hello_world/new.html.in Tue Jan 24 23:51:04 2012
+++ /canviz/trunk/examples/hello_world/new.html.in Mon Feb 6 19:44:07 2012
@@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="styles_inner.css" />
<!--[if IE]><script type="text/javascript"
src="../../excanvas/excanvas.js"></script><![endif]-->
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
+ <script type="text/javascript"
src="../contentloaded/contentloaded.js"></script>
<script type="text/javascript" src="../../build/canviz.min.js"></script>
<script type="text/javascript" src="scripts_common.js"></script>
<script type="text/javascript" src="scripts_new.js"></script>
=======================================
--- /canviz/trunk/examples/hello_world/scripts_new.js Thu Jan 8 03:14:07
2009
+++ /canviz/trunk/examples/hello_world/scripts_new.js Mon Feb 6 19:44:07
2012
@@ -3,6 +3,8 @@
* $Id$
*/
-document.observe('dom:loaded', function() {
- new Canviz('canviz', 'graph-xdot.gv');
+contentLoaded(window, function() {
+ setTimeout(function() {
+ new Canviz('canviz', 'graph-xdot.gv');
+ }, 0);
});