magento2-theme-performance
magento2-theme-performance copied to clipboard
Uncaught TypeError: Cannot read property 'className' of null at HTMLLinkElement.onload
Hi,
After installing this theme in combination with Magento 2.2/PHP 7.1 and:
snowdog/frontools 1.5.8
snowdog/theme-blank-sass 0.10.1
The following occurs after loading:

This results in a missing 'loaded' class on the <body> tag. Somehow this doesn't work in my current setup:
<link href="<?= $this->assetRepo->getUrl('css/styles.css') ?>"
rel="preload"
as="style"
onload="this.rel='stylesheet';document.body.className+=' loaded'"
/>
Any idea why?