Howdy everyone,
> <iframe id='__pygwt_historyFrame'
> style='width:0;height:0;border:0; display: none;'>use display: none;
> to hide this frame or you get a blank white space on top of your
> page.</iframe>
>
> We probably should add "display:none;" to the APP_HTML_TEMPLATE in
> pyjs/src/pyjs/browser.py, any objections? (Don't some browsers remove
> the iframe from the DOM with display:none? Unfortunately,
> visibility:hidden doesn't help.)
I will replace
<iframe id="__pygwt_historyFrame" style="width:0;height:0;border:0"></iframe>
by
<iframe id="__pygwt_historyFrame" style="display:none"></iframe>
in ./pyjs/browser.py:55
Any objections to this? ***
> Actually, with the pyjs_site the display:none doesn't help, because
> there is another iframe that caused the blank line on top: <iframe
> src="website.nocache.html" ...>, an iframe without id. I'm still
> trying to figure out where it comes from...
The "<top_module>.nocache.html" iframe does come from browser.py:301:
def _create_nocache_html(self):
# nocache
template = self.read_boilerplate('home.nocache.html')
out_path = os.path.join(self.output, self.top_module + ".nocache.html")
...
out_file = file(out_path, 'w')
out_file.write(template % dict(
...
I'm not sure what this code does, really. Some HTML is obviously
written into our iframe victim. The iframe itself is created in
./builder/boilerplate/pygwt.js:144:
function __pygwt_injectWebModeFrame(name) {
...
var iframe = document.createElement("iframe");
var selectorURL = parts[0] + parts[1] + ".nocache.html";
iframe.src = selectorURL;
iframe.style.border = '0px';
iframe.style.width = '0px';
iframe.style.height = '0px';
I will replace the 3 style assignments here by "iframe.style.display =
'none'", too.
Shouldn't we also give the iframe an id? I'd suggest the selectorURL
value for that. I'll add that too.
Any objections for these changes? ***
Peter