Closed emahuni closed 5 years ago
Thanks for your advice! https://github.com/tinymins/vue-transfer-dom.js/commit/fafeb7e9dc22af4cc062fce5ee29b05f8e2e6d54
Your implementation of the replace
modifier behaviour is ok, however, when I suggested this I was of the impression that it would clear the contents of the target then become its only child instead of destroying the target. I think we can call this new feature i just mentioned here clear
so that it is different in a sense and leave replace doing what you just made it do.
It could do it this way; in fact I had implemented virtually all of this functionality. Just having a few bugs here and there (in the remove function)
so it could just do this:
let child;
while((child = parentNode.firstChild)) {
child.remove()
}
before it becomes the only child.
so opening a new feature request
I think package is wonderful, simpler than portal-vue. Question is can't it replace the content of target also much like the prepend modifier?
something like the following: