It will probably not work for about:blank
because of the cross-domain security policy. You can not access the DOM of a new window if that window isn't displaying a page from the same domain.
Secondly, even if the window is same origin, you can not access its DOM as soon as you open it. You need to wait for it to load. The easy way is to have the child window call a function in the parent window when it's done loading (after DOMContentLoad or Window.onload). Or you can repeatedly check if the DOM is available in a setTimeout
loop (do not use a while loop because it hangs the browser till the child window is ready). Once the DOM is ready, you can do what you want to do with it.