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

Function getRootElement_

src/error-reporting.js:708–711  ·  view source on GitHub ↗

* @param {!Window} win * @return {!Element} * @private

(win)

Source from the content-addressed store, hash-verified

706 * @private
707 */
708function getRootElement_(win) {
709 const root = Services.ampdocServiceFor(win).getSingleDoc().getRootNode();
710 return dev().assertElement(root.documentElement || root.body || root);
711}

Callers 1

reportErrorToAnalyticsFunction · 0.85

Calls 4

devFunction · 0.90
getSingleDocMethod · 0.80
assertElementMethod · 0.80
getRootNodeMethod · 0.45

Tested by

no test coverage detected