(nodes: Node[])
| 793 | } |
| 794 | |
| 795 | private appendDeepSchemaChecks(nodes: Node[]): void { |
| 796 | for (const node of nodes) { |
| 797 | if (!(node instanceof Element || node instanceof Template)) { |
| 798 | continue; |
| 799 | } |
| 800 | |
| 801 | if (node instanceof Element) { |
| 802 | const claimedInputs = new Set<string>(); |
| 803 | const directives = this.tcb.boundTarget.getDirectivesOfNode(node); |
| 804 | |
| 805 | if (directives !== null && directives.length > 0) { |
| 806 | for (const dir of directives) { |
| 807 | for (const propertyName of dir.inputs.propertyNames) { |
| 808 | claimedInputs.add(propertyName); |
| 809 | } |
| 810 | } |
| 811 | } |
| 812 | const isForeign = this.tcb.boundTarget.getForeignComponent(node) !== null; |
| 813 | if (!isForeign) { |
| 814 | const checkElement = this.requiresUnknownElementCheck(node, directives); |
| 815 | this.opQueue.push(new TcbDomSchemaCheckerOp(this.tcb, node, checkElement, claimedInputs)); |
| 816 | } |
| 817 | } else if (isExplicitNgTemplate(node) && this.tcb.env.config.checkTypeOfNgTemplateBindings) { |
| 818 | const schemaClaimedInputs = new Set<string>(); |
| 819 | const directives = this.tcb.boundTarget.getDirectivesOfNode(node); |
| 820 | |
| 821 | if (directives !== null && directives.length > 0) { |
| 822 | for (const dir of directives) { |
| 823 | for (const propertyName of dir.inputs.propertyNames) { |
| 824 | schemaClaimedInputs.add(propertyName); |
| 825 | } |
| 826 | if (dir.matchSource === MatchSource.Selector && dir.selector !== null) { |
| 827 | const selectors = CssSelector.parse(dir.selector); |
| 828 | for (const selector of selectors) { |
| 829 | for (let i = 0; i < selector.attrs.length; i += 2) { |
| 830 | schemaClaimedInputs.add(selector.attrs[i]); |
| 831 | } |
| 832 | } |
| 833 | } |
| 834 | } |
| 835 | } |
| 836 | this.opQueue.push( |
| 837 | new TcbDomSchemaCheckerOp(this.tcb, node, /* checkElement */ false, schemaClaimedInputs), |
| 838 | ); |
| 839 | } |
| 840 | |
| 841 | this.appendDeepSchemaChecks(node.children); |
| 842 | } |
| 843 | } |
| 844 | |
| 845 | private appendIcuExpressions(node: Icu): void { |
| 846 | for (const variable of Object.values(node.vars)) { |
no test coverage detected