(tagName: string)
| 286 | } |
| 287 | |
| 288 | function resolveElement(tagName: string): [namespace: string | null | undefined, tagName: string] { |
| 289 | tagName = tagName.toLowerCase(); |
| 290 | const splitResult = splitNsName(tagName, false); |
| 291 | if (splitResult[0]) { |
| 292 | return splitResult; |
| 293 | } |
| 294 | |
| 295 | const index = getSelectedIndex(); |
| 296 | const tNode = index === -1 ? null : getSelectedTNode(); |
| 297 | let namespace = tNode?.namespace; |
| 298 | |
| 299 | if (tagName === TNodeName.DynamicHost && tNode?.type === TNodeType.Element) { |
| 300 | const element = getNativeByTNode(tNode, getLView()) as RElement; |
| 301 | if (element.tagName) { |
| 302 | tagName = element.tagName.toLowerCase(); |
| 303 | } |
| 304 | |
| 305 | if (namespace == null) { |
| 306 | const namespaceURI = (element as RElement & {namespaceURI?: string | null}).namespaceURI; |
| 307 | namespace = namespaceURI && NAMESPACE_URIS[namespaceURI]; |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | return [namespace, tagName]; |
| 312 | } |
| 313 | |
| 314 | /** |
| 315 | * Set of attributes that are sensitive and should be sanitized. |
no test coverage detected