Skip to content

Commit e471a1e

Browse files
KoenJanDC
authored andcommitted
Add function to check if HTML snippets exist
1 parent 5038729 commit e471a1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Twig/Extension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public function addCssToExtract($rawHtml)
4444
return $rawHtml;
4545
}
4646

47+
public function hasCriticalHtml()
48+
{
49+
return count($this->pageSpecificCssService->getHtmlStore()->getSnippets()) > 0;
50+
}
51+
4752
public function getCriticalCss()
4853
{
4954
return $this->pageSpecificCssService->getCssStore()->compileStyles();

0 commit comments

Comments
 (0)