Author: reebalazs
Date: Mon Oct  1 16:05:27 2007
New Revision: 47074

Modified:
   kukit/kukit.js/trunk/kukit/commandprocessor.js
   kukit/kukit.js/trunk/kukit/dom.js
Log:
base2 followup: further simplify kukit payload
since there is no namespace any more, we just check for tags
in the global namespace (which is btw kukit)

Modified: kukit/kukit.js/trunk/kukit/commandprocessor.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/commandprocessor.js      (original)
+++ kukit/kukit.js/trunk/kukit/commandprocessor.js      Mon Oct  1 16:05:27 2007
@@ -64,15 +64,13 @@
         if (childNode.nodeType != 1) 
             continue;
         if (childNode.localName) {
-            // (here tolerate both cases)
-            if (childNode.localName.toLowerCase() != "param"
-                && childNode.nodeName.toLowerCase() != "kukit:param") {
+            if (childNode.localName.toLowerCase() != "param") {
                 throw new Error('Bad payload, expected param');
             }
         } else {
             //IE does not know DOM2
-            if (childNode.nodeName.toLowerCase() != "kukit:param") {
-                throw new Error('Bad payload, expected kukit:param');
+            if (childNode.nodeName.toLowerCase() != "param") {
+                throw new Error('Bad payload, expected param (IE)');
             }
         }        
         data = childNode.getAttribute('name');

Modified: kukit/kukit.js/trunk/kukit/dom.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/dom.js   (original)
+++ kukit/kukit.js/trunk/kukit/dom.js   Mon Oct  1 16:05:27 2007
@@ -400,14 +400,10 @@
     }
 };
 
-dom.getNsTags = function(dom, tagName) {
-    if (dom.getElementsByTagNameNS) { 
-        tags = dom.getElementsByTagNameNS('http://www.kukit.org/commands/1.0',
-            tagName);
-    } else {
-        //IE does not know DOM2
-        tags = dom.getElementsByTagName('kukit:' + tagName);
-    }
+dom.getNsTags = function(dom_obj, tagName) {
+    // Now, all the document is in the kukit namespace,
+    // so we just access them by tagname.
+    tags = dom_obj.getElementsByTagName(tagName);
     return tags;
 };
 
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to