Ticket #5542: NodeList.patch

File NodeList.patch, 0.6 kB (added by dante, 11 months ago)

okay that wasn't so bad

  • NodeList.js

     
    422422                        }else{ 
    423423                                ta.appendChild(content); 
    424424                        } 
    425                         var ct = ((position == "first")||(position == "after")) ? "lastChild" : "firstChild"; 
     425                        var pos = (position ? position : "last"); 
     426                        var ct = ((pos == "first")||(pos == "after")) ? "lastChild" : "firstChild"; 
    426427                        this.forEach(function(item){ 
    427428                                var tn = ta.cloneNode(true); 
    428429                                while(tn[ct]){ 
    429                                         d.place(tn[ct], item, position); 
     430                                        d.place(tn[ct], item, pos); 
    430431                                } 
    431432                        }); 
    432433                        return this; // dojo.NodeList