iframe

Ein innerer Frame, der in etwa wie das iframe-Element von HTML funktioniert. Das Attribut src gibt den Inhalt des Frames an. Dieser Inhalt befindet sich in einem separaten Dokument. Jegliche Kindelemente des iframe Elements werden ignoriert.

Weitere Informationen sind im XUL Tutorial verfügbar.

Attribute
showcaret, src, type, transparent
Eigenschaften
accessibleType, contentDocument, contentWindow, docShell, webNavigation

Beispiele

<iframe src="table.php" flex="2" id="browserTable" name="table_frame"/>

Einen URL aus einem Menü auswählen

<menulist oncommand="doNav(this);">
  <menupopup>
    <menuitem label="Mozilla" value="http://mozilla.org" />
    <menuitem label="Slashdot" value="http://slashdot.org"/>
    <menuitem label="Sourceforge" value="http://sf.net" />
    <menuitem label="Freshmeat" value="http://freshmeat.net"/>
  </menupopup>
</menulist>


<iframe id="myFrame" flex="1"/>

<script>
function doNav(obj){
  var url = obj.selectedItem.value;
  // note the firstChild is the menupopup element
  document.getElementById('myFrame').setAttribute('src', url);
}
</script>

Attribute

showcaret
Type: boolean
Whether or not to cause a typing caret to be visible in the content area. Default is false.
src
Typ: URL
Die URL des im Element anzuzeigenden Inhalts.
type
Type: one of the values below
The type of browser, which can be used to set the access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The documented loaded into a chrome window is always of chrome type. Subdocuments of chrome documents are of chrome type unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type. This boundary has a number of special effects such has making window.top == window and preventing documents from inheriting the principal of the parent document. The type attribute on all frames in content documents is ignored; subdocuments of content documents are always content documents.
Warning: The type attribute must be set before the element is inserted into the document.
content
A browser for content. The content that is loaded inside the browser is not allowed to access the chrome above it.
content-primary
The primary browser for content. The content that is loaded inside the browser is not allowed to access the chrome above it. For instance, in a web browser, this would be the element that displays the web page. The window for the primary content can be retrieved more conveniently using window.content.
content-targetable
One browser among many for content. The content that is loaded inside the browser is not allowed to access the chrome above it. This is the preferred value for any browser element in an application that will use multiple browsers of equal privileges and is unselected at the moment.
chrome
(default behaviour): A browser, intended to be used for loading privileged content using a chrome:// URI. Don't use for content from web, as this may cause serious security problems!
transparent
Type: one of the values below
Set the background of an iframe as transparent.
transparent
This results in the iframe's background being transparent. This can be used to workaround things like bug 540911

Geerbt von XUL-Element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

Eigenschaften

Methoden

Geerbte Methoden
element.addEventListener(), node.appendChild(), blur, click, node.cloneNode(), node.compareDocumentPosition(), element.dispatchEvent(), doCommand, focus, element.getAttribute(), element.getAttributeNode(), element.getAttributeNodeNS(), element.getAttributeNS(), element.getBoundingClientRect(), element.getClientRects(), getElementsByAttribute, getElementsByAttributeNS, element.getElementsByClassName(), element.getElementsByTagName(), element.getElementsByTagNameNS(), node.getFeature(), node.getUserData(), element.hasAttribute(), element.hasAttributeNS(), nodes.hasAttributes(), nodes.hasChildNodes(), node.insertBefore(), node.isDefaultNamespace(), node.isEqualNode(), node.isSameNode(), node.isSupported(), node.lookupNamespaceURI(), node.lookupPrefix(), node.normalize(), element.querySelector(), element.querySelectorAll(), element.removeAttribute(), element.removeAttributeNode(), element.removeAttributeNS(), node.removeChild(), element.removeEventListener(), node.replaceChild(), element.setAttribute(), element.setAttributeNode(), element.setAttributeNodeNS(), element.setAttributeNS(), node.setUserData()

Verwandte Themen

Schnittstellen
nsIAccessibleProvider

Schlagwörter des Dokuments und Mitwirkende

Schlagwörter:
Mitwirkende an dieser Seite: Mrolappe, fscholz
Zuletzt aktualisiert von: fscholz,