support data-main attribute