(oldVNode: VNode, vNode: VNode)
| 97 | }, |
| 98 | |
| 99 | update(oldVNode: VNode, vNode: VNode) { |
| 100 | const {data: oldData = {}} = oldVNode; |
| 101 | const {elm, data = {}} = vNode; |
| 102 | const oldFullScope: string = (oldData as any).isolate || ''; |
| 103 | const fullScope: string = (data as any).isolate || ''; |
| 104 | |
| 105 | // Same element, but different scope, so update the data structures |
| 106 | if (fullScope && fullScope !== oldFullScope) { |
| 107 | if (oldFullScope) { self.elementsByFullScope.delete(oldFullScope); } |
| 108 | self.elementsByFullScope.set(fullScope, elm as Element); |
| 109 | const delegators = self.delegatorsByFullScope.get(oldFullScope); |
| 110 | if (delegators) { |
| 111 | self.delegatorsByFullScope.delete(oldFullScope); |
| 112 | self.delegatorsByFullScope.set(fullScope, delegators); |
| 113 | } |
| 114 | } |
| 115 | // Same element, but lost the scope, so update the data structures |
| 116 | if (oldFullScope && !fullScope) { |
| 117 | self.elementsByFullScope.delete(oldFullScope); |
| 118 | self.delegatorsByFullScope.delete(oldFullScope); |
| 119 | } |
| 120 | }, |
| 121 | |
| 122 | destroy(vNode: VNode) { |
| 123 | self.cleanupVNode(vNode); |
no outgoing calls
no test coverage detected