[Project_owners] sizing a xul window to content in a browser element?
preetshihn at gmail.com
Mon Jun 11 15:42:45 PDT 2007
you can find the full size of the content in the window to be:
width = contentwindow.innerWidth + contentwindow.scrollMaxX
height = contentwindow.innerHeight + contentwindow.scrollMaxY
then you can resize your xul window to wdth/height.
If your browser flex is set to 1, the browser will adjust accordingly.
You might have to give some margin to the width and height to deal with any
On 6/10/07, Bill Orcutt <bill at lilyapp.org> wrote:
> I have a window that contains a browser element and an onload routine
> that would like to size the outer xul window to fit the content
> contained in the inner browser window. The browser element has an
> attribute of flex=1. Calling sizeToContent on the xul window
> collapses it to nothing. Also tried calling sizeToContent on the
> contentWindow of the browser, but that seems to have no effect. Has
> anyone found a way to do this?
> Project_owners mailing list
> Project_owners at mozdev.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Project_owners