MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / inDoc

Function inDoc

06.Router/basic/js/vue.js:1147–1152  ·  view source on GitHub ↗

* Check if a node is in the document. * Note: document.documentElement.contains should work here * but always returns false for comment nodes in phantomjs, * making unit tests difficult. This is fixed by doing the * contains() check on the node's parentNode instead of * the node itsel

(node)

Source from the content-addressed store, hash-verified

1145 */
1146
1147 function inDoc(node) {
1148 if (!node) return false;
1149 var doc = node.ownerDocument.documentElement;
1150 var parent = node.parentNode;
1151 return doc === node || doc === parent || !!(parent && parent.nodeType === 1 && doc.contains(parent));
1152 }
1153
1154 /**
1155 * Get and remove an attribute from a node.

Callers 12

singleBeforeFunction · 0.70
singleRemoveFunction · 0.70
multiBeforeFunction · 0.70
multiRemoveFunction · 0.70
attachFunction · 0.70
detachFunction · 0.70
vue.jsFile · 0.70
callAttachFunction · 0.70
callDetachFunction · 0.70
domAPIFunction · 0.70
insertFunction · 0.70
lifecycleAPIFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected