Eventually, the pageLoad "magic" function will go away. Instead, you can already use the load event of the application object. In your xml-script section, add this to components:
<application load="yourFunction"/>
load is a full Atlas event, which means that you can also use declarative actions with it, for example to invoke a web service.