All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.directives.x-teleport.js Maven / Gradle / Ivy

There is a newer version: 3.14.1
Show newest version
import { skipDuringClone } from "../clone"
import { directive } from "../directives"
import { initTree } from "../lifecycle"
import { mutateDom } from "../mutation"
import { addScopeToNode } from "../scope"
import { warn } from "../utils/warn"

directive('teleport', (el, { modifiers, expression }, { cleanup }) => {
    if (el.tagName.toLowerCase() !== 'template') warn('x-teleport can only be used on a