Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Full page zoom (or just fullZoom) is a new feature in Firefox 3.

Example (XUL:browser)

The following example demonstrates the use for the current focused browser window. This is the typical usage for a Firefox extension.

var zoom = ZoomManager.getZoomForBrowser(gBrowser.selectedBrowser);
ZoomManager.enlarge();
ZoomManager.setZoomForBrowser(gBrowser.selectedBrowser, ZoomManager.MIN);

Example (XUL:iframe)

Note: This is probably out of date.

You may use the fullZoom feature for a XUL:iframe as well. However, because an iframe doesn't have a markupDocumentViewer property, we need to get that first:

var zoom = 1.5;
var iframe = document.getElementById("authorFrame");
var contViewer = iframe.docShell.contentViewer;
var docViewer = contViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
docViewer.fullZoom = zoom;

References

Document Tags and Contributors

 Last updated by: lydell,