UNPKG
x-antd-vue
Version:
latest (1.0.1)
1.0.1
1.0.0
base on antd 1.7.2
www.antdv.com
xd-mike/x-antd
x-antd-vue
/
es
/
vc-util
/
Dom
/
contains.js
11 lines
(10 loc)
•
177 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
default
function
contains
(
root, n
) {
var
node = n;
while
(node) {
if
(node === root) {
return
true
; } node = node.
parentNode
; }
return
false
; }