added a window.schedule() for running 'either now or on DOMContentLoaded'