http://trac.tiddlywiki.org/changeset/12238

FND
2010-06-26 03:55:59 -0700 (Sat, 26 Jun 2010)
136
bound global custom events to document

Without any such reference, no event handlers can be bound to these
custom events.

ticket #1228

---------------

U   Trunk/core/js/TiddlyWiki.js
U   Trunk/core/js/main.js

---------------

Modified: Trunk/core/js/TiddlyWiki.js
===================================================================
--- Trunk/core/js/TiddlyWiki.js 2010-06-26 06:31:55 UTC (rev 12237)
+++ Trunk/core/js/TiddlyWiki.js 2010-06-26 10:55:59 UTC (rev 12238)
@@ -381,7 +381,7 @@
                for(var i = 0;i<tiddlers.length; i++)
                        tiddlers[i].changed();
        }
-       jQuery().trigger("loadTiddlers");
+       jQuery(document).trigger("loadTiddlers");
 };
 
 // Load contents of a TiddlyWiki from a string

Modified: Trunk/core/js/main.js
===================================================================
--- Trunk/core/js/main.js       2010-06-26 06:31:55 UTC (rev 12237)
+++ Trunk/core/js/main.js       2010-06-26 10:55:59 UTC (rev 12238)
@@ -24,6 +24,7 @@
 {
        var t10,t9,t8,t7,t6,t5,t4,t3,t2,t1,t0 = new Date();
        startingUp = true;
+       var doc = jQuery(document);
        jQuery.noConflict();
        _ = jQuery.gt.gettext;
        n_ = jQuery.gt.ngettext;
@@ -41,16 +42,16 @@
                
store.addNotification(config.notifyTiddlers[s].name,config.notifyTiddlers[s].notify);
        t1 = new Date();
        loadShadowTiddlers();
-       jQuery().trigger("loadShadows");
+       doc.trigger("loadShadows");
        t2 = new Date();
        store.loadFromDiv("storeArea","store",true);
-       jQuery().trigger("loadTiddlers");
+       doc.trigger("loadTiddlers");
        t3 = new Date();
        invokeParamifier(params,"onload");
        t4 = new Date();
        readOnly = (window.location.protocol == "file:") ? false : 
config.options.chkHttpReadOnly;
        var pluginProblem = loadPlugins();
-       jQuery().trigger("loadPlugins");
+       doc.trigger("loadPlugins");
        t5 = new Date();
        formatter = new Formatter(config.formatters);
        invokeParamifier(params,"onconfig");
@@ -84,7 +85,7 @@
                displayMessage("Total: " + (t10-t0) + " ms");
        }
        startingUp = false;
-       jQuery().trigger("startup");
+       doc.trigger("startup");
 }
 
 // Called on unload. All functions called conditionally since they themselves 
may have been unloaded.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to