support 'data-config' and 'data-main' attributes