use DOMContentLoaded instead of window.load to trigger importing.