It turns out it isn't possible - SidebarApp isn't created until after onload, and the functional tests don't seem to like this in the constructor. This seems a safer initialisation time, once most things have finished loading & kicked off.