Skip to content

Commit 9251ed4

Browse files
author
Denys Rul
committed
MAGETWO-33946: Page Cache scripts to eliminate (1 script)
1 parent cd0ccc0 commit 9251ed4

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

app/code/Magento/PageCache/view/frontend/templates/javascript.phtml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
*/
66
?>
77
<?php /** @var \Magento\PageCache\Block\Javascript $block */ ?>
8-
<script>
9-
require([
10-
'jquery',
11-
'pageCache',
12-
'domReady!'
13-
], function($){
14-
'use strict';
15-
16-
$('body').pageCache(<?php echo $block->getScriptOptions(); ?>);
17-
});
18-
</script>
8+
<script type="text/x-magento-init">
9+
{
10+
"body": {
11+
"pageCache": <?php echo $block->getScriptOptions(); ?>
12+
}
13+
}
14+
</script>

0 commit comments

Comments
 (0)