(el, index, tag, ns)
| 123208 | } // retrieve child element at given index |
| 123209 | // create & insert if doesn't exist or if tags do not match |
| 123210 | function domChild(el, index, tag, ns) { |
| 123211 | var a = el.childNodes[index], b17; |
| 123212 | if (!a || a.tagName.toLowerCase() !== tag.toLowerCase()) { |
| 123213 | b17 = a || null; |
| 123214 | a = domCreate(el.ownerDocument, tag, ns); |
| 123215 | el.insertBefore(a, b17); |
| 123216 | } |
| 123217 | return a; |
| 123218 | } // remove all child elements at or above the given index |
| 123219 | function domClear(el, index) { |
| 123220 | var nodes = el.childNodes, curr = nodes.length; |
| 123221 | while(curr > index)el.removeChild(nodes[--curr]); |
no test coverage detected