Author: mgrigorov
Date: Wed Apr 27 15:39:23 2011
New Revision: 1097152

URL: http://svn.apache.org/viewvc?rev=1097152&view=rev
Log:
WICKET-3605 Ajax header-contribution omits IE conditional comments


Modified:
    
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1097152&r1=1097151&r2=1097152&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
 (original)
+++ 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
 Wed Apr 27 15:39:23 2011
@@ -1573,6 +1573,8 @@ Wicket.Head.Contributor.prototype = {
                                } else if (name == "style") {
                                        this.processStyle(steps, node);
                                }
+                       } else if (node.nodeType === 8) { // comment type
+                               this.processComment(steps, node);
                        }
                }       
        },
@@ -1708,7 +1710,16 @@ Wicket.Head.Contributor.prototype = {
                                notify();
                        }
                });                                     
-       }       
+       },
+       
+       // process (conditional) comments
+       processComment: function(steps, node) {
+               steps.push(function(notify) {
+                       var comment = document.createComment(node.nodeValue);
+                       Wicket.Head.addElement(comment);
+                       notify();
+               });
+       }
 };
 
 /**


Reply via email to