add support for having container other than body expand to window dimensions and return a promise to allow external calling code to know when finished