(scope, parentScope)
| 23981 | return this.update(scope, parentScope) |
| 23982 | }, |
| 23983 | update(scope, parentScope) { |
| 23984 | const { placeholder, nodes, childrenMap } = this; |
| 23985 | const collection = scope === UNMOUNT_SCOPE ? null : this.evaluate(scope); |
| 23986 | const items = collection ? Array.from(collection) : []; |
| 23987 | |
| 23988 | // prepare the diffing |
| 23989 | const { newChildrenMap, batches, futureNodes } = createPatch( |
| 23990 | items, |
| 23991 | scope, |
| 23992 | parentScope, |
| 23993 | this, |
| 23994 | ); |
| 23995 | |
| 23996 | // patch the DOM only if there are new nodes |
| 23997 | udomdiff( |
| 23998 | nodes, |
| 23999 | futureNodes, |
| 24000 | patch(Array.from(childrenMap.values()), parentScope), |
| 24001 | placeholder, |
| 24002 | ); |
| 24003 | |
| 24004 | // trigger the mounts and the updates |
| 24005 | batches.forEach((fn) => fn()); |
| 24006 | |
| 24007 | // update the children map |
| 24008 | this.childrenMap = newChildrenMap; |
| 24009 | this.nodes = futureNodes; |
| 24010 | |
| 24011 | return this |
| 24012 | }, |
| 24013 | unmount(scope, parentScope) { |
| 24014 | this.update(UNMOUNT_SCOPE, parentScope); |
| 24015 |
nothing calls this directly
no test coverage detected
searching dependent graphs…