(tagName: string)
| 299 | } |
| 300 | |
| 301 | function resolveElement(tagName: string): [namespace: string | null | undefined, tagName: string] { |
| 302 | tagName = tagName.toLowerCase(); |
| 303 | const splitResult = splitNsName(tagName, false); |
| 304 | if (splitResult[0]) { |
| 305 | return splitResult; |
| 306 | } |
| 307 | |
| 308 | const index = getSelectedIndex(); |
| 309 | const tNode = index === -1 ? null : getSelectedTNode(); |
| 310 | let namespace = tNode?.namespace; |
| 311 | |
| 312 | if (tagName === TNodeName.DynamicHost && tNode?.type === TNodeType.Element) { |
| 313 | const element = getNativeByTNode(tNode, getLView()) as RElement; |
| 314 | if (element.tagName) { |
| 315 | tagName = element.tagName.toLowerCase(); |
| 316 | } |
| 317 | |
| 318 | if (namespace == null) { |
| 319 | const namespaceURI = (element as RElement & {namespaceURI?: string | null}).namespaceURI; |
| 320 | namespace = namespaceURI && NAMESPACE_URIS[namespaceURI]; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | return [namespace, tagName]; |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * Set of attributes that are sensitive and should be sanitized. |
no test coverage detected