(parent, tagName)
| 191 | } |
| 192 | |
| 193 | function getChildByTagName(parent, tagName) { |
| 194 | let node = parent.firstChild; |
| 195 | |
| 196 | while (node) { |
| 197 | if ( |
| 198 | node.nodeType !== 1 |
| 199 | || node.nodeName.toLowerCase() !== tagName.toLowerCase() |
| 200 | ) { |
| 201 | node = node.nextSibling; |
| 202 | } |
| 203 | else { |
| 204 | return node; |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | return null; |
| 209 | } |
| 210 | |
| 211 | function getChildrenByTagName(parent, tagName) { |
| 212 | let node = parent.firstChild; |
no outgoing calls
no test coverage detected
searching dependent graphs…