MCPcopy Index your code
hub / github.com/ampproject/amphtml / setIsRoot

Method setIsRoot

src/core/context/node.js:322–326  ·  view source on GitHub ↗

* Designates (or undesignates) the node as a root node. If the node is * designated as a root, it will no longer discover itself. * * @param {boolean} isRoot

(isRoot)

Source from the content-addressed store, hash-verified

320 * @param {boolean} isRoot
321 */
322 setIsRoot(isRoot) {
323 this.isRoot = isRoot;
324 const newRoot = isRoot ? this : (this.parent?.root ?? null);
325 this.updateRoot(newRoot);
326 }
327
328 /**
329 * @param {?ContextNode<?>} root

Callers 3

setIsRootFunction · 0.80

Calls 1

updateRootMethod · 0.95

Tested by

no test coverage detected