--- title: iframe slug: Archive/Mozilla/XUL/iframe tags: - XUL Elemente - XUL Referenz translation_of: Archive/Mozilla/XUL/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.
<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>
showcaret
false
.src
type
browser
. More precisely: The document 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 as making window.top == window (unless the browser
is added to a chrome document), 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.content
content-primary
content-targetable
browser
element in an application, which will use multiple browsers of equal privileges, and is unselected at the moment.chrome
transparent
iframe
as transparent.transparent
Geerbt von XUL-Element |