+ var iterNode = boundries.node1;
+ while(true) {
+ if(!iterNode.is({tagName: 'div', klass: 'p'})) {
+ if(iterNode.is({tagName: 'header'})) {
+ var newNode = iterNode.setTag('div');
+ newNode.setClass('p');
+ if(iterNode.sameNode(boundries.node1)) {
+ boundries.node1 = newNode;
+ }
+ if(iterNode.sameNode(boundries.node2)) {
+ boundries.node2 = newNode;
+ }
+ iterNode = newNode;
+ } else {
+ throw new Error('Invalid element');
+ }
+ }
+ if(iterNode.sameNode(boundries.node2))
+ break;
+ iterNode = iterNode.next();
+ }
+ listParams.node1 = boundries.node1;
+ listParams.node2 = boundries.node2;