(attrs: TAttributes | null)
| 509 | } |
| 510 | |
| 511 | function applyTAttributes(attrs: TAttributes | null) { |
| 512 | if (attrs === null) return; |
| 513 | const div: HTMLElement = getLView()[HEADER_OFFSET]; |
| 514 | let mode: AttributeMarker = AttributeMarker.ImplicitAttributes; |
| 515 | for (let i = 0; i < attrs.length; i++) { |
| 516 | const item = attrs[i]; |
| 517 | if (typeof item === 'number') { |
| 518 | mode = item; |
| 519 | } else if (typeof item === 'string') { |
| 520 | if (mode == AttributeMarker.ImplicitAttributes) { |
| 521 | div.setAttribute(item, attrs[++i] as string); |
| 522 | } else if (mode == AttributeMarker.Classes) { |
| 523 | div.classList.add(item); |
| 524 | } else if (mode == AttributeMarker.Styles) { |
| 525 | div.style.setProperty(item, attrs[++i] as string); |
| 526 | } |
| 527 | } |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | function activateHostBindings(directiveIndex: number) { |
| 532 | const bindingRootIndex = getBindingRootIndexFromDirectiveIndex(directiveIndex); |
no test coverage detected
searching dependent graphs…