MCPcopy Create free account
hub / github.com/ampproject/amphtml / transformRootSelectors

Function transformRootSelectors

src/shadow-embed.js:249–251  ·  view source on GitHub ↗

* Replaces top-level selectors such as `html` and `body` with their polyfill * counterparts: `amp-html` and `amp-body`. * @param {string} selector * @return {string}

(selector)

Source from the content-addressed store, hash-verified

247 * @return {string}
248 */
249function transformRootSelectors(selector) {
250 return selector.replace(/(html|body)/g, rootSelectorPrefixer);
251}
252
253/**
254 * See `transformRootSelectors`.

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected