use document.body.hidden to remove flicker
move Promise to L20n.Promise to clean the global namespace