* @param {NodeList} nodeList * @return {boolean}
(nodeList)
| 941 | * @return {boolean} |
| 942 | */ |
| 943 | function shouldMutationForNodeListBeRerendered(nodeList) { |
| 944 | for (let i = 0; i < nodeList.length; i++) { |
| 945 | const node = nodeList[i]; |
| 946 | if (isElement(node)) { |
| 947 | // Ignore service elements, e.g. `<i-amphtml-svc>` or |
| 948 | // `<x slot="i-amphtml-svc">`. |
| 949 | if ( |
| 950 | node[RENDERED_PROP] || |
| 951 | node.tagName.startsWith('I-') || |
| 952 | node.getAttribute('slot') == 'i-amphtml-svc' |
| 953 | ) { |
| 954 | continue; |
| 955 | } |
| 956 | return true; |
| 957 | } |
| 958 | if (node.nodeType == /* TEXT */ 3) { |
| 959 | return true; |
| 960 | } |
| 961 | } |
| 962 | return false; |
| 963 | } |
| 964 | |
| 965 | /** |
| 966 | * @param {typeof PreactBaseElement} Ctor |
no test coverage detected