Visit Mozilla.org

XUL:iframe

Aus MDC

« XUL Referenz Startseite    [ Beispiele | Attribute | Eigenschaften | Methoden | Verwandte Themen ]

Ein innerer Frame, der mehr oder weniger 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 werden ignoriert.

Mehr Information ist unter XUL tutorial verfügbar.

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

[bearbeiten] 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>

[bearbeiten] Attribute

XUL:Attribute:showcaret

src
Typ: URL
Der URL des im Element anzuzeigenden Inhalts.

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, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

[bearbeiten] Eigenschaften

Geerbt von XUL-Element
align, allowEvents, boxObject, builder, className, collapsed, contextMenu, controllers, currentItem, database, datasources, dir, flex, height, hidden, id, left, listBoxObject, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, ref, resource, statusText, style, tooltip, tooltipText, top, value, width

Geerbt von DOM-Element
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

XUL:Property:accessibleType XUL:Property:contentDocument XUL:Property:contentWindow XUL:Property:docShell XUL:Property:webNavigation

[bearbeiten] Methoden

Geerbt von XUL-Element
blur, click, doCommand, focus, getElementsByAttribute

Geerbt von DOM-Element
addEventListener, appendChild, dispatchEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeEventListener, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS

[bearbeiten] Verwandte Themen

Schnittstellen
nsIAccessibleProvider