WP RocketLazyLoadScripts breaks onload event
With rocketloader enabled, JS on this page will only run once you start scrolling, interacting or hovering over this page.
An expected outcome is that all two onload event listeners are executed:
onload inside rocketlazyloadscriptonload outside rocketlazyloadscript
However, as the result of RocketLazyLoadScripts behavior, the first one (or any onload events listeners inside <script type="rocketlazyloadscript">...<script>) is not executed when interaction happens after the actual window.load event.
To simulate, a custom delay can be filled in to push back the window.load event in an attempt to start trying to interact/hover before the window.load event. Only in those cases, onload inside rocketlazyloadscript is being logged.
The TTFB within the web-vitals library also becomes victim of the RocketLazyLoadScripts behavior and ends up not being reported when interaction happens after the window.load event.