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

Full page zoom

フルページズーム (あるいは単にフルズーム) は Firefox 3 の新機能です。

例 (XUL:browser)

以下の例は、現在フォーカスがあたっているブラウザウィンドウでの利用をデモしています。これは Firefox 拡張機能での典型的な利用方法です。

var zoom = 1.5;
var docViewer = getBrowser().selectedBrowser.markupDocumentViewer;
docViewer.fullZoom = zoom;

例 (XUL:iframe)

フルズーム機能を XUL:iframe でも同様に使用することができます。しかし、iframe には markupDocumentViewer プロパティがないため、最初に以下のようにする必要があります:

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

参考資料

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: Marsf, Mgjbot, Taken
 最終更新者: Marsf,