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

Method discover_

src/core/context/node.js:441–450  ·  view source on GitHub ↗

* Discovers the parent and the root. Runs asynchronously via scheduler. * @private

()

Source from the content-addressed store, hash-verified

439 * @private
440 */
441 discover_() {
442 if (!this.isDiscoverable()) {
443 // The discoverability might have changed while this task was in the
444 // queue.
445 return;
446 }
447 const closestNode = ContextNode.closest(this.node, /* includeSelf */ false);
448 const parent = closestNode?.findGroup(this.node) || closestNode;
449 this.updateTree_(parent, /* parentOverridden */ false);
450 }
451
452 /**
453 * @param {?ContextNode<?>} parent

Callers

nothing calls this directly

Calls 4

isDiscoverableMethod · 0.95
updateTree_Method · 0.95
closestMethod · 0.80
findGroupMethod · 0.80

Tested by

no test coverage detected