(oldVNode: VNode, vNode: VNode)
| 71 | const self = this; |
| 72 | return { |
| 73 | create(oldVNode: VNode, vNode: VNode) { |
| 74 | const {data: oldData = {}} = oldVNode; |
| 75 | const {elm, data = {}} = vNode; |
| 76 | const oldFullScope: string = (oldData as any).isolate || ''; |
| 77 | const fullScope: string = (data as any).isolate || ''; |
| 78 | |
| 79 | // Update data structures with the newly-created element |
| 80 | if (fullScope) { |
| 81 | self.fullScopesBeingUpdated.push(fullScope); |
| 82 | if (oldFullScope) { self.elementsByFullScope.delete(oldFullScope); } |
| 83 | self.elementsByFullScope.set(fullScope, elm as Element); |
| 84 | |
| 85 | // Update delegators for this scope |
| 86 | const delegators = self.delegatorsByFullScope.get(fullScope); |
| 87 | if (delegators) { |
| 88 | const len = delegators.length; |
| 89 | for (let i = 0; i < len; ++i) { |
| 90 | delegators[i].updateOrigin(elm as Element); |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | if (oldFullScope && !fullScope) { |
| 95 | self.elementsByFullScope.delete(fullScope); |
| 96 | } |
| 97 | }, |
| 98 | |
| 99 | update(oldVNode: VNode, vNode: VNode) { |
| 100 | const {data: oldData = {}} = oldVNode; |
no test coverage detected