最終更新:2022-04-21 (木) 17:57:08 (734d)  

window
Top / window

https://developer.mozilla.org/ja/docs/DOM/window

JavaScript/グローバル変数

主なプロパティ

一覧

プロパティ

  • window.applicationCache (New in Firefox 3) - ウィンドウのオフラインリソースへのアクセスを提供する nsIDOMOfflineResourceList? オブジェクト。(HTML5)
  • window.Component? - 多くの XPCOM 機能へのエントリポイントです。いくつかのプロパティ、例えば、classes などは、必要な特権が与えられたコードでのみ動作します。
  • window.content? 及び window._content? - 現在のウィンドウでのコンテンツ要素への参照を返します。アンダースコア付きの変数は非推奨です。
  • window.closed? - このプロパティは、現在のウィンドウが閉じているかどうかを示します。
  • window.controllers? - 現在の chrome ウィンドウの XUL controller オブジェクトを返します。
  • window.crypto? - ブラウザの crypto オブジェクトを返します。
  • window.defaultStatus? - 与えられたウィンドウのステータスバーのテキストを取得/設定します。
  • window.dialogArguments? (New in Firefox 3) - window.showModalDialog?() メソッドが呼び出されたときにウィンドウ(それがダイアログボックスである場合)に渡された引数を得ます。これは nsIArray インターフェースです。
  • window.directories? - 現在の chrome での ディレクトリツールバーへの参照を返します。
  • window.document - ウィンドウが含む文書への参照を返します。
  • window.frameElement? - ウィンドウが埋め込まれた要素、または、ウィンドウが埋め込まれていない場合は、null を返します。
  • window.frames? - 現在のウィンドウでのサブフレームの配列を返します。
  • window.fullScreen? (New in Firefox 3 - このプロパティは、ウィンドウがフルスクリーン表示状態であるかどうかを返します。
  • window.globalStorage? (New in Firefox 2 - 複数のページに渡るデータを保存するために用いられる複数のストレージオブジェクト。
  • window.history - history オブジェクトへの参照を返します。
  • window.innerHeight? - 水平スクロールバーを含む(表示されている場合)、ブラウザウィンドウのコンテンツ領域の高さを取得します。
  • window.innerWidth? - 垂直スクロールバーを含む(表示されている場合)、ブラウザウィンドウのコンテンツ領域の幅を取得します。
  • window.length? - ウィンドウのフレームの数を返します。
  • window.location - window オブジェクトのロケーション、または、現在の URL を取得/設定します。
  • window.locationbar? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる locationbar オブジェクトを返します。
  • window.menubar? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる menubar オブジェクトを返します。
  • window.name? - ウィンドウ名を取得/設定します。
  • window.navigator - navigator オブジェクトへの参照を返します。
  • window.opener? - 現在のウィンドウを開いたウィンドウへの参照を返します。
  • window.outerHeight? - ブラウザウィンドウの外側の高さを取得します。
  • window.outerWidth? - ブラウザウィンドウの外側の幅を取得します。
  • window.pageXOffset? - window.scrollX のエイリアスです。
  • window.pageYOffset? - window.scrollY のエイリアスです。
  • window.parent? - 現在のウィンドウ、または、サブフレームの親ウィンドウへの参照を返します。
  • window.personalbar? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる、personalbar オブジェクトを返します。
  • window.pkcs11? - pcks11 プロトコルに関連するドライバや他のソフトウェアをインストールするために用いられる pkcs11 オブジェクトを返します。
  • window.returnValue? (New in Firefox 3) - ウィンドウをモーダルダイアログとして表示する
  • window.showModalDialog?() メソッドを呼び出した関数へ返却される戻り値。
  • window.screen? - ウィンドウに関連付けられた screen オブジェクトへの参照を返します。
  • window.screen.availTop? - 固定、あるいは、半固定されているユーザインターフェース部分は含まない、最初のピクセルの y 座標を示します。
  • window.screen.availLeft? - 画面の左端から利用できる最初の有効ピクセルを返します。
  • window.screen.availHeight? - Windows でのタスクバーのような、オペレーティングシステムによって表示されている、固定、あるいは、半固定されているユーザインタフェース部分を引いた画面の高さをピクセル単位で示します。
  • window.screen.availWidth? - ウィンドウで利用可能である水平空間の大きさをピクセル単位で返します。
  • window.screen.colorDepth? - 画面の色深度を返します。
  • window.screen.height? - 画面の高さをピクセル単位で返します。
  • window.screen.left? - メイン画面の左端から現在の画面の左端までの距離をピクセル単位で返します。
  • window.screen.pixelDepth? - 画面のビット深度を取得します。
  • window.screen.top? - 現在の画面の上端からの距離をピクセル単位で返します。
  • window.screen.width? - 画面の幅を返します。
  • window.screenX? - 画面の左端からユーザのブラウザの左端までの水平距離を返します。
  • window.screenY? - 画面の上端からユーザのブラウザの上端までの垂直距離を返します。
  • window.scrollbars? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる、scrollbars オブジェクトを返します。
  • window.scrollMaxX? - ウィンドウが水平スクロールされ得る最大オフセット。(即ち、ビューポートの幅を引いた文書の幅)
  • window.scrollMaxY? - ウィンドウが垂直スクロールされ得る最大オフセット。(即ち、ビューポートの高さを引いた文書の幅)
  • window.scrollX? - 文章が水平にスクロールされたピクセル数を返します。
  • window.scrollY? - 文書が垂直スクロールされたピクセル数を返します。
  • window.self - window オブジェクトそれ自身へのオブジェクトリファレンスを返します。
  • window.sessionStorage (New in Firefox 2) - 単一のページセッション内のデータを保存するためのストレージオブジェクト。
  • window.sidebar? - サイドバーのウィンドウオブジェクトへの参照を返します。
  • window.status? - ブラウザ下部のステータスバーのテキストを取得/設定します。
  • window.statusbar? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる、statusbar オブジェクトを返します。
  • window.toolbar? - ウィンドウ内で表示/非表示を切り替える(トグル)ことができる、toolbar オブジェクトを返します。
  • window.top - ウィンドウ階層における最上位のウィンドウへの参照を返します。
  • window.window? - 現在のウィンドウへの参照を返します。

メソッド

  • window.alert? - 警告ダイアログを表示します。
  • window.addEventListener? - Register an event handler to a specific event type on the window.
  • window.atob? - Decodes a string of data which has been encoded using base-64 encoding.
  • window.back? - Moves back one in the window history.
  • window.blur? - Sets focus away from the window.
  • window.btoa - Creates a base-64 encoded ASCII string from a string of binary data.
  • window.captureEvents? (廃止) - Registers the window to capture all events of the specified type.
  • window.clearInterval? - setInterval で繰り返し実行されるよう設定された命令をキャンセルします。
  • window.clearTimeout? - Clears a delay that's been set for a specific function.
  • window.close? - Closes the current window.
  • window.confirm? - Displays a dialog with a message that the user needs to respond to.
  • window.dump? - コンソールにメッセージを出力します。
  • window.escape? - 文字列をエンコーディングします。
  • window.find? - Searches for a given string in a window.
  • window.focus? - 現在のウィンドウにフォーカスを設定します。
  • window.forward? - Moves the window one document forward in the history.
  • window.getAttention? - Flashes the application icon.
  • window.getComputedStyle? - Gets computed style for the specified element. Computed style indicates the computed values of all CSS properties of the element.
  • window.getSelection? - Returns the selection object representing the selected item(s).
  • window.home? - Returns the browser to the home page.
  • window.moveBy? - Moves the current window by a specified amount.
  • window.moveTo? - Moves the window to the specified coordinates.
  • window.open? - 新しいウィンドウを開きます。
  • window.openDialog? - 新しいダイアログウィンドウを開きます。
  • window.postMessage (New in Firefox 3) - Provides a secure means for one window to send a string of data to another window, which need not be within the same domain as the first, in a secure manner.
  • window.print? - Opens the Print Dialog to print the current document.
  • window.prompt? - Returns the text entered by the user in a prompt dialog.
  • window.releaseEvents? (廃止) - Releases the window from trapping events of a specific type.
  • window.removeEventListener? - Removes an event listener from the window.
  • window.resizeBy? - Resizes the current window by a certain amount.
  • window.resizeTo? - Dynamically resizes window.
  • window.scroll? - Scrolls the window to a particular place in the document.
  • window.scrollBy? - Scrolls the document in the window by the given amount.
  • window.scrollByLines? - Scrolls the document by the given number of lines.
  • window.scrollByPages? - Scrolls the current document by the specified number of pages.
  • window.scrollTo - Scrolls to a particular set of coordinates in the document.
  • window.setInterval - Execute a function each X milliseconds.
  • window.setTimeout - Sets a delay for executing a function.
  • window.showModalDialog? (New in Firefox 3) - モーダルダイアログを表示します。
  • window.sizeToContent? - Sizes the window according to its content.
  • window.stop? - このメソッドはウィンドウの読み込みを中止します。
  • window.unescape? - Unencodes a value that has been encoded in hexadecimal (e.g. a cookie).
  • window.updateCommands? - Updates the state of commands of the current chrome window (UI).

イベント

  • onabort? - An event handler property for abort events on the
  • onbeforeunload? - An event handler property for before-unload events on the
  • onblur? - An event handler property for blur events on the
  • onchange? - An event handler property for change events on the
  • onclick - An event handler property for click events on the
  • onclose? - An event handler property for handling the window close event.
  • oncontextmenu? - An event handler property for right-click events on the
  • ondragdrop? - An event handler property for drag and drop events on the
  • onerror - An event handler property for errors raised on the
  • onfocus? - An event handler property for focus events on the
  • onkeydown? - An event handler property for keydown events on the
  • onkeypress? - An event handler property for keypress events on the
  • onkeyup? - An event handler property for keyup events on the
  • onload - An event handler property for window loading.
  • onmousedown? - An event handler property for mousedown events on the
  • onmousemove? - An event handler property for mousemove events on the
  • onmouseout? - An event handler property for mouseout events on the
  • onmouseover? - An event handler property for mouseover events on the
  • onmouseup? - An event handler property for mouseup events on the
  • onpaint? - An event handler property for paint events on the
  • onreset? - An event handler property for reset events on the
  • onresize? - An event handler property for window resizing.
  • onscroll? - An event handler property for window scrolling.
  • onselect? - An event handler property for window selection.
  • onsubmit - An event handler property for submits on window forms.
  • onunload? - An event handler property for unload events on the