• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox
  1. MDN
  2. Mozilla
  3. Firefox
  4. Firefox developer release notes
  5. Firefox 3 for developers
  6. Full page zoom

Full page zoom

In This Article
    1. Example (XUL:browser)
    2. Example (XUL:iframe)
    3. References

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

  • Page zoom extension by Ted Mielczarek fullpagezoom.xpi for latest Firefox 3.0 nightlies
  • Glazoom extension by Daniel Glazman for Firefox 3.0
  • The bugzilla bug about fullZoom.
  • nsIMarkupDocumentViewer Interface documentation.

Document Tags and Contributors

Tags: 
  • Extensions
  • Firefox 3
  • XUL
 Contributors to this page: lydell, teoli, Wladimir_Palant, Sheppy, Neil, Dao, Varmaa, Dglazman, Kohei, Mgjbot, MykMelez, Taken, Mvent2, Kirschkern
 Last updated by: lydell, Oct 3, 2015, 7:09:53 AM
  1. Add-ons
    1. Firefox developer release notes
    2. Add-ons
    3. Add-on guidelines
    4. Add-on Manager
    5. Extensions
    6. OpenSearch plug-ins
    7. Plugins
    8. Themes
  2. Firefox internals
    1. Firefox developer release notes
    2. Mozilla project
    3. Gecko
    4. JavaScript code modules
    5. JS-ctypes
    6. MathML project
    7. MFBT
    8. Mozilla projects
    9. Preference system
    10. WebIDL bindings
    11. XPCOM
    12. XUL
  3. Building and contributing
    1. Build instructions
    2. Configuring build options
    3. How the build system works
    4. Mozilla source code
    5. Localization
    6. Mercurial
    7. Quality assurance
    8. Using Mozilla code in other projects