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

Function scope

test/unit/test-shadow-embed.js:256–258  ·  view source on GitHub ↗
(css)

Source from the content-addressed store, hash-verified

254 });
255
256 function scope(css) {
257 return scopeShadowCss(shadowRoot, css).replace(/[\n\t\n]/g, '');
258 }
259
260 it('should replace root selectors', () => {
261 expect(scope('html {}')).to.equal('.h amp-html {}');

Callers 1

Calls 2

scopeShadowCssFunction · 0.90
replaceMethod · 0.45

Tested by

no test coverage detected