(attrs: TAttributes | null)
| 554 | } |
| 555 | |
| 556 | function applyTAttributes(attrs: TAttributes | null) { |
| 557 | if (attrs === null) return; |
| 558 | const div: HTMLElement = getLView()[HEADER_OFFSET]; |
| 559 | let mode: AttributeMarker = AttributeMarker.ImplicitAttributes; |
| 560 | for (let i = 0; i < attrs.length; i++) { |
| 561 | const item = attrs[i]; |
| 562 | if (typeof item === 'number') { |
| 563 | mode = item; |
| 564 | } else if (typeof item === 'string') { |
| 565 | if (mode == AttributeMarker.ImplicitAttributes) { |
| 566 | div.setAttribute(item, attrs[++i] as string); |
| 567 | } else if (mode == AttributeMarker.Classes) { |
| 568 | div.classList.add(item); |
| 569 | } else if (mode == AttributeMarker.Styles) { |
| 570 | div.style.setProperty(item, attrs[++i] as string); |
| 571 | } |
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | function activateHostBindings(directiveIndex: number) { |
| 577 | const bindingRootIndex = getBindingRootIndexFromDirectiveIndex(directiveIndex); |
no test coverage detected