MCPcopy Create free account
hub / github.com/angular/components / getStyleTagByString

Function getStyleTagByString

src/cdk/layout/media-matcher.spec.ts:38–43  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

36 }
37
38 function getStyleTagByString(str: string): HTMLStyleElement | undefined {
39 return Array.from(document.head!.querySelectorAll('style')).find(tag => {
40 const rules = tag.sheet ? Array.from((tag.sheet as CSSStyleSheet).cssRules) : [];
41 return !!rules.find(rule => rule.cssText.includes(str));
42 });
43 }
44 });
45});

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected