parent
e15602ba49
commit
b5857a7cd0
1 changed files with 8 additions and 3 deletions
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
var delayedRemoval = new WeakMap
|
||||
|
||||
function *domFor({dom, domSize}, {generation} = {}) {
|
||||
function *domFor(vnode, object = {}) {
|
||||
// To avoid unintended mangling of the internal bundler,
|
||||
// parameter destructuring is not used here.
|
||||
var dom = vnode.dom
|
||||
var domSize = vnode.domSize
|
||||
var generation = object.generation
|
||||
if (dom != null) do {
|
||||
const {nextSibling} = dom
|
||||
var nextSibling = dom.nextSibling
|
||||
|
||||
if (delayedRemoval.get(dom) === generation) {
|
||||
yield dom
|
||||
|
|
@ -19,4 +24,4 @@ function *domFor({dom, domSize}, {generation} = {}) {
|
|||
module.exports = {
|
||||
delayedRemoval: delayedRemoval,
|
||||
domFor: domFor,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue