Run custom JavaScript when ADF page loads

Ran into a neat way to load and run custom javascript when an ADF page loads:         <af:resource type=”javascript”>           //Script block           if (window.addEventL…