refactor(dom) Loader: mv percent, count, msg to if