[KSS-checkins] r35986 - kukit/kukit.js/trunk/kukit

reebalazs at codespeak.net reebalazs at codespeak.net
Tue Dec 26 13:14:41 CET 2006


Author: reebalazs
Date: Tue Dec 26 13:14:39 2006
New Revision: 35986

Modified:
   kukit/kukit.js/trunk/kukit/plugin.js
   kukit/kukit.js/trunk/kukit/utils.js
Log:
Fix kss logging to the FireFox console working with FF 2 too.

Modified: kukit/kukit.js/trunk/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/plugin.js	(original)
+++ kukit/kukit.js/trunk/kukit/plugin.js	Tue Dec 26 13:14:39 2006
@@ -84,11 +84,6 @@
     this.__bind__(name, func_to_bind, oper);
 };
 
-// Sigh. We need this.
-try {
-    kukit.pl.have_Safari = navigator.vendor && navigator.vendor.indexOf('Apple') != -1;
-} catch (e) {}
-
 kukit.pl.NativeEventBinder.prototype.__bind__ = function(name, func_to_bind, oper) {
     oper.completeParms([], {'preventdefault': '', 'allowbubbling': ''}, 'native event binding');
     oper.evalBool('preventdefault', 'native event binding');
@@ -123,7 +118,7 @@
     // necessary since Safari does not prevent the <a href...> following
     // (in case of allowbubbling we have to apply it to all clicks, as there
     // might be a link inside that we cannot detect on the current node)
-    if (preventdefault && kukit.pl.have_Safari 
+    if (preventdefault && kukit.HAVE_SAFARI 
             && (allowbubbling || name == 'click' && node.tagName.toLowerCase() == 'a')) {
         function cancelClickSafari() {
             return false;

Modified: kukit/kukit.js/trunk/kukit/utils.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/utils.js	(original)
+++ kukit/kukit.js/trunk/kukit/utils.js	Tue Dec 26 13:14:39 2006
@@ -26,11 +26,21 @@
     var kukit = {};
 }
 
+// Browser identification. We need this one only atm.
+try {
+    kukit.HAVE_SAFARI = navigator.vendor && navigator.vendor.indexOf('Apple') != -1;
+} catch (e) {}
+
 /* check whether the logging stuff of Firebug is available */
 try {
     console.log('Initializing kukit');
     /* following call is needed to generate exception in Safari */
-    console.assertEquals('kukit', 'kukit');
+    // XXX this fails now on FF 2 too. Can some Safari user please
+    // check the current logging solution and adjust accordingly?
+    //console.assertEquals('kukit', 'kukit');
+    if (kukit.HAVE_SAFARI) {
+        throw "Let's get out.";
+    }
     kukit.hasFirebug = true;
 } catch(e) {
     kukit.hasFirebug = false;


More information about the Kukit-checkins mailing list