A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/zh-CN/docs/Web/API/HTMLIFrameElement below:

HTMLIFrameElement - Web API | MDN

为支持浏览器<iframe>的需求,HTMLIFrameElement已经扩展了一些新的方法来让<iframe>有更多的能力。他们并未成为规范(参见 Browser compatibility)。

导航方法

以下导航方法允许通过<iframe>的浏览历史进行导航。他们对于后退、前进、停止和重新加载按钮的实现而言是非常必须的。

HTMLIFrameElement.reload()

重新加载<iframe>元素内容。

HTMLIFrameElement.stop()

停止加载<iframe>元素内容。

HTMLIFrameElement.getCanGoBack()

指示是否可以后退。

HTMLIFrameElement.goBack()

改变<iframe>位置到上一个浏览历史记录的位置。

HTMLIFrameElement.getCanGoForward()

指示是否可以前进。

HTMLIFrameElement.goForward()

改变<iframe>位置到下一个浏览历史记录的位置。

管理方法

这个方法集管理浏览器<iframe>所用的资源。它们对于实现分页浏览程序非常有用。

HTMLIFrameElement.executeScript()

在浏览器<iframe>页面加载完成后执行指定的脚本。

HTMLIFrameElement.purgeHistory()

清理所有与浏览器<iframe>有关的资源(不包括 cookie)。

HTMLIFrameElement.setVisible()

修改浏览器<iframe>的可见性。这会影响资源分配和一些函数的资源占用率,如requestAnimationFrame。

HTMLIFrameElement.getVisible()

指示当前浏览器<iframe>的可见性。

HTMLIFrameElement.setActive()

设置当前<iframe>为活动 frame,对进程管理器如何划分优先级有影响。

HTMLIFrameElement.getActive()

指示当前浏览器<iframe>是否为当前活动的 frame。

HTMLIFrameElement.setInputMethodActive()

设置当前浏览器<iframe>是活动的输入法编辑器窗口而其他不是。当一个顶层应用希望激活一个窗口作为输入法编辑器(如键盘)时有用。

HTMLIFrameElement.setNfcFocus()

Firefox 操作系统 NFC API 的一部分,扩展了Browser API,这个集合设置浏览器<iframe>是否可以接收一个NFC事件。

音频相关方法

以下方法允许直接控制浏览器元素的声音。

HTMLIFrameElement.getVolume()

获取浏览器<iframe>当前音量。

HTMLIFrameElement.setVolume()

设置浏览器<iframe>当前音量。

HTMLIFrameElement.mute()

浏览器<iframe>播放的所有音频静音。

HTMLIFrameElement.unmute()

取消浏览器<iframe>播放所有音频的静音。

HTMLIFrameElement.getMuted()

指示当前浏览器<iframe>当前是否被静音。

Search methods

New methods are provided to allow programmatic searches of browser <iframe>s to be carried out.

HTMLIFrameElement.findAll()

Searches for a string in a browser <iframe>'s content; if found, the first instance of the string relative to the caret position will be highlighted.

HTMLIFrameElement.findNext()

Highlights the next or previous instance of a search result after a findAll() search has been carried out.

HTMLIFrameElement.clearMatch()

Clears any content highlighted by findAll() or findNext().

In order to manage the browser <iframe>'s content, many new events were added (see below). The following methods are used to deal with those events:

The <iframe> gains support for the methods of the EventTarget interface

addEventListener(), removeEventListener(), and dispatchEvent().

HTMLIFrameElement.sendMouseEvent()

Sends a MouseEvent to the <iframe>'s content.

HTMLIFrameElement.sendTouchEvent()

Sends a TouchEvent to the <iframe>'s content. Note that this method is available for touch enabled devices only.

HTMLIFrameElement.addNextPaintListener()

Defines a handler to listen for the next MozAfterPaint event in the browser <iframe>.

HTMLIFrameElement.removeNextPaintListener()

Removes a handler previously set with addNextPaintListener().

Utility methods

Last, there are some utility methods, useful for apps that host a browser <iframe>.

HTMLIFrameElement.download()

Downloads a specified URL, storing it at the specified filename/path.

HTMLIFrameElement.getContentDimensions()

Retrieves the X and Y dimensions of the content window.

HTMLIFrameElement.getManifest()

Retrieves the manifest of an app loaded in the browser <iframe> and returns it as JSON.

HTMLIFrameElement.getScreenshot()

Takes a screenshot of the browser <iframe>'s content. This is particularly useful to get thumbnails of tabs in a tabbed browser app.

HTMLIFrameElement.getStructuredData()

Retrieves any structured microdata (and hCard and hCalendar microformat data) contained in the HTML loaded in the browser <iframe> and returns it as JSON.

HTMLIFrameElement.zoom()

Changes the zoom factor of the browser <iframe>'s content. This is particularly useful for zooming in/out on non-touch-enabled devices.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4