| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | /*global document */ |
||
| 3 | export function nextSibling(parent, ele) { |
||
| 4 | var next |
||
| 5 | var found = false |
||
| 6 | Array.prototype.forEach.call(parent.childNodes, (node) => { |
||
| 7 | if(node.nodeName.indexOf('text') === -1) { |
||
| 8 | if(found) { |
||
| 9 | next = node |
||
| 10 | found = false |
||
| 11 | } |
||
| 12 | if(node === ele) { |
||
| 13 | found = true |
||
| 14 | } |
||
| 15 | } |
||
| 16 | }) |
||
| 17 | |||
| 18 | return next |
||
| 19 | } |
||
| 20 | |||
| 64 | } |