* Whether the tag is an internal (service) AMP tag. * @param {Node|string} nodeOrTagName * @return {boolean}
(nodeOrTagName)
| 383 | * @return {boolean} |
| 384 | */ |
| 385 | function isInternalElement(nodeOrTagName) { |
| 386 | /** @type {undefined|string} */ |
| 387 | let tagName; |
| 388 | if (isString(nodeOrTagName)) { |
| 389 | tagName = nodeOrTagName; |
| 390 | } else if (isElement(nodeOrTagName)) { |
| 391 | tagName = nodeOrTagName.tagName; |
| 392 | } |
| 393 | |
| 394 | return !!tagName && tagName.toLowerCase().startsWith('i-'); |
| 395 | } |
| 396 | |
| 397 | /** |
| 398 | * Finds a matching node inside an HTML template slot's children |
no test coverage detected