Index

Home | Projects | Docs | Jargon | LXR | Tree Status | Checkins Feedback | FAQ | Search

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z Index

Symbols

_content 1

A

addEventListener 1

alert() 1

align 1

alinkColor 1

anchors 1

appCodeName 1

appendChild 1

applets 1

appName 1

appVersion 1

attributes 1, 2

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (1 de 20) [09/06/2003 9:55:09] Index

availLeft 1

availTop 1

availWidth 1

B

back() 1

bgColor 1

blur 1

blur() 1

body 1

C

captureEvents() 1

characterSet 1

childNodes 1

clear 1

clearInterval() 1

clearTimeout() 1

click 1

cloneContents 1

cloneNode 1

cloneRange 1

close 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (2 de 20) [09/06/2003 9:55:09] Index close() 1

closed 1

collapse 1

collapsed 1

colorDepth 1

commonAncestorContainer 1

compareBoundaryPoints 1

Components 1

confirm() 1

contentDocument 1, 2

contentWindow 1, 2

controllers 1

cookie 1

cookieEnabled 1

createAttribute 1

createDocumentFragment 1

createElement 1

createRange 1

createTextNode 1

crypto 1

cssRule 1

cssRule Object 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (3 de 20) [09/06/2003 9:55:09] Index

cssRules 1

cssText 1

D

defaultStatus 1

deleteContents 1

deleteRule 1

detach 1

directories 1

disabled 1

dispatchEvent 1

doctype 1

document 1

documentElement 1

DOM 1, 2

DOM 2 Range Interface 1

DOM window Interface 1

domain 1

dump() 1

E

Elements Interface 1

embeds 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (4 de 20) [09/06/2003 9:55:09] Index

endContainer 1

endOffset 1

escape() 1

extractContents 1

F

fgColor 1

firstChild 1, 2

focus 1

focus() 1

forms 1

forward() 1

FRAME 1

frameBorder 1

FRAMESET 1

G

GetAttention() 1

getAttribute 1

getAttributeNode 1, 2

getElementById 1

getElementsByName 1

getElementsByTagName 1, 2, 3, 4, 5, 6

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (5 de 20) [09/06/2003 9:55:09] Index getSelection() 1

H

hasChildNodes 1, 2, 3, 4

height 1, 2

history 1

home() 1

href 1

I

id 1

IFRAME 1

images 1

innerHeight 1

innerHTML 1

innerWidth 1

insertBefore 1

insertNode 1

insertRule 1

item 1

J

javaEnabled() 1

L

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (6 de 20) [09/06/2003 9:55:09] Index lang 1

language 1

lastChild 1

lastModified 1

left 1

length 1, 2

linkColor 1

links 1

localName 1

location 1, 2

locationbar 1

longDesc 1, 2

M

marginHeight 1, 2

marginWidth 1, 2

media 1, 2

menubar 1

mimeTypes 1

moveBy() 1

moveTo() 1

N

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (7 de 20) [09/06/2003 9:55:09] Index name 1, 2, 3

namespaceURI 1, 2

navigator 1

navigator.appCodeName 1

navigator.appName 1

navigator.appVersion 1

navigator.cookieEnabled 1

navigator.javaEnabled() 1

navigator.language 1

navigator.mimeTypes 1

navigator.oscpu 1

navigator.platform 1

navigator.plugins 1

navigator.product 1

navigator.productSub 1

navigator.userAgent 1

navigator.vendor 1

navigator.vendorSub 1

nextSibling 1, 2, 3

nodeName 1, 2

nodeType 1, 2

nodeValue 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (8 de 20) [09/06/2003 9:55:09] Index

normalize 1

O

offsetHeight 1

offsetLeft 1

offsetParent 1

offsetTop 1

offsetWidth 1

onabort 1

onBlur 1, 2

onblur 1

onchange 1

onClick 1, 2

onclick 1

onclose 1

onDblClick 1, 2

onFocus 1, 2

onKeyDown 1, 2

onKeyPress 1, 2

onKeyUp 1, 2

onkeyup 1

onMouseDown 1, 2

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (9 de 20) [09/06/2003 9:55:09] Index onMouseMove 1, 2

onmousemove 1

onMouseOut 1, 2

onmouseout 1

onMouseOver 1, 2

onmouseover 1

onMouseUp 1, 2

onmouseup 1

onResize 1, 2

onscroll 1

onselect 1

onsubmit 1

open 1

opener 1

oscpu 1

outerHeight 1

ownerDocument 1, 2

ownerNode 1

ownerRule 1

P

pageXOffset 1

pageYOffset 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (10 de 20) [09/06/2003 9:55:09] Index

parentNode 1, 2

parentStyleSheet 1, 2

personalbar 1

pixelDepth 1

pkcs11 1

platform 1

plugins 1, 2

prefix 1

previousSibling 1, 2

product 1

productSub 1

prompter 1

R

referrer 1

releaseEvents() 1

removeAttribute 1

removeAttributeNode 1

removeChild 1

removeEventListener 1

replaceChild 1

resizeBy() 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (11 de 20) [09/06/2003 9:55:09] Index

resizeTo() 1

rows 1

S

screen 1

screen.availHeight 1

screen.availLeft 1

screen.availTop 1

screen.availWidth 1

screen.colorDepth 1

screen.height 1

screen.left 1

screen.pixelDepth 1

screen.top 1

screen.width 1

screenX 1

screenY 1

scroll() 1

scrollbars 1

scrollBy() 1

scrollByLines() 1

scrollByPages() 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (12 de 20) [09/06/2003 9:55:09] Index scrolling 1, 2

scrollTo() 1

scrollX 1

scrollY 1

selectNode 1

selectNodeContents 1

selectorText 1

self 1

setAttribute 1, 2

setAttributeNode 1, 2

setCursor() 1

setEndAfter 1

setEndBefore 1

setInterval() 1

setStart 1

setStartAfter 1

setTimeout() 1

sidebar 1

sizeToContent() 1

src 1, 2

startContainer 1

startOffset 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (13 de 20) [09/06/2003 9:55:09] Index

status 1

statusbar 1

stop() 1

STYLE 1

style 1, 2

styleSheet 1

styleSheet Object 1

styleSheets 1

supports 1

surroundContents 1

T

tabIndex 1

tagName 1

title 1, 2, 3

toolbar 1

top 1, 2

toString 1

type 1, 2

U

unescape() 1

updateCommands() 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (14 de 20) [09/06/2003 9:55:09] Index

URL 1

userAgent 1

V

vendor 1

vendorSub 1

vlinkColor 1

W

width 1, 2

window 1

window.alert() 1

window.clearInterval() 1

window.clearTimeout() 1

window.close() 1

window.closed 1

window.Components 1

window.confirm() 1

window.controllers 1

window.crypto 1

window.defaultStatus 1

window.directories 1

window.document 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (15 de 20) [09/06/2003 9:55:09] Index window.dump() 1

window.escape() 1

window.focus() 1

window.forward() 1

window.GetAttention() 1

window.getSelection() 1

window.history 1

window.home() 1

window.innerHeight 1

window.innerWidth 1

window.length 1

window.location 1

window.locationbar 1

window.menubar 1

window.moveBy() 1

window.moveTo() 1

window.name 1

window.navigator 1

window.navigator.appCodeName 1

window.navigator.appName 1

window.navigator.appVersion 1

window.navigator.cookieEnabled 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (16 de 20) [09/06/2003 9:55:09] Index

window.navigator.javaEnabled() 1

window.navigator.language 1

window.navigator.mimeTypes 1

window.navigator.oscpu 1

window.navigator.platform 1

window.navigator.plugins 1

window.navigator.product 1

window.navigator.productSub 1

window.navigator.userAgent 1

window.navigator.vendor 1

window.navigator.vendorSub 1

window.onabort 1

window.onblur 1

window.onchange 1

window.onclick 1

window.onclose 1

window.ondragdrop 1

window.onerror 1

window.onfocus 1

window.onkeydown 1

window.onkeypress 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (17 de 20) [09/06/2003 9:55:09] Index window.onkeyup 1

window.onload 1

window.onmousedown 1

window.onmousemove 1

window.onmouseover 1

window.onmouseup 1

window.onpaint 1

window.onreset 1

window.onresize 1

window.onscroll 1

window.onselect 1

window.onsubmit 1

window.onunload 1

window.open() 1

window.opener 1

window.outerHeight 1

window.outerWidth 1

window.pageXOffset 1

window.pageYOffset 1

window.parent 1

window.personalbar 1

window.pkcs11 1 http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (18 de 20) [09/06/2003 9:55:09] Index

window.prompt() 1

window.prompter 1

window.releaseEvents() 1

window.resizeBy() 1

window.resizeTo() 1

window.screen 1

window.screen.availHeight 1

window.screen.availLeft 1

window.screen.availTop 1

window.screen.width 1

window.screenX 1

window.screenY 1

window.scroll() 1

window.scrollbars 1

window.scrollBy() 1

window.scrollByLines() 1

window.scrollByPages() 1

window.scrollTo() 1

window.scrollX 1

window.scrollY 1

window.self 1

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (19 de 20) [09/06/2003 9:55:09] Index window.setCursor() 1

window.setInterval() 1

window.setTimeout() 1

window.sidebar 1

window.sizeToContent() 1

window.status 1

window.statusbar 1

window.stop() 1

window.toolbar 1

window.top 1

window.unescape() 1

window.updateCommands() 1

window.window 1

write 1

writeln 1

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_shortIX.html (20 de 20) [09/06/2003 9:55:09] window._content

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window._content

Returns a reference to the content element in the current window.

Syntax

cHolder = window._content

Parameters

cHolder is an object reference.

Example

// for HTML

// type="content-primary"

// src="blur.html" />

function cont() {

loc = window._content.location.href;

alert(loc);

}

Notes

If there is no particular element or subframe given as the content element, this method returns a reference to the window itself. Also note that this does not give you a very good way to refer to a number of different content elements. In this case, you may want to use the getElementById method to get references to the subframes you want.

http://www.mozilla.org/docs/dom/domref/dom_window_ref3.html (1 de 2) [09/06/2003 9:55:34] window._content This property is effectively the same as window.content. It's generally used to get the content from a browser window.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref3.html (2 de 2) [09/06/2003 9:55:34] addEventListener

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

addEventListener

addEventListener allows the registration of event listeners on the event target.

Syntax

element.addEventListener( type, listener, useCapture )

Parameters

The addEventListener() method takes the following parameters:

type A string representing the event type being registered.

The listener parameter takes an interface implemented by the user which listener contains the methods to be called when the event occurs.

If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets useCapture beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.

Example

http://www.mozilla.org/docs/dom/domref/dom_el_ref31.html (1 de 3) [09/06/2003 9:56:47] addEventListener

DOM Event Examples

one
two

Notes

If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.

If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the

http://www.mozilla.org/docs/dom/domref/dom_el_ref31.html (2 de 3) [09/06/2003 9:56:47] addEventListener EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.

Specification

addEventListener

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_el_ref31.html (3 de 3) [09/06/2003 9:56:47] window.alert()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.alert()

Display an alert dialog with the specified text.

Syntax

window.alert(text)

Parameters

text is a string of the text you want displayed in the alert dialog.

Example

window.alert("I'm a Scorpio!");

Notes

The alert dialog should be used for messages which do not require any response of the part of the user. See also window.confirm(), window.prompt().

Specification

http://www.mozilla.org/docs/dom/domref/dom_window_ref2.html (1 de 2) [09/06/2003 9:56:55] window.alert()

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref2.html (2 de 2) [09/06/2003 9:56:55] align

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

align

Specifies how the IFRAME is to be aligned in the containing element.

Syntax

sAlign = iFrameElement.align

iFrameElement.align = sAlign

Parameters

sAlign is a string with one of the values given in the Notes section below.

Example

i = document.getElementById("first-");

i.align = "top";

Notes

Possible values for align are "top", "middle", "bottom", "left" and "right." The latter two cause the IFRAME to float to the current right or left margin. The default value for align is bottom. The align attribute is deprecated in HTML 4.0

Specification

DOM Level 2 -- HTMLIFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref14.html (1 de 2) [09/06/2003 9:57:08] align

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref14.html (2 de 2) [09/06/2003 9:57:08] alinkColor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

alinkColor

Returns or sets the color of active links in the document body.

Syntax

color = HTMLBodyElement.aLinkColor

HTMLBodyElement.aLinkColor = color

Parameters

color is a string containing the name of the color (e.g., "blue", "darkblue", etc., or the octal value of the color (e.g., FFFFF)

Example

example here

Notes

extra information

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS) http://www.mozilla.org/docs/dom/domref/dom_doc_ref3.html (1 de 2) [09/06/2003 9:57:15] alinkColor

http://www.mozilla.org/docs/dom/domref/dom_doc_ref3.html (2 de 2) [09/06/2003 9:57:15] anchors

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

anchors

anchors returns a list of all of the anchors in the document.

Syntax

a_list = document.anchors

Parameters

a_list is a nodeList of all of the anchor elements within the document

Example

if ( document.anchors.length >= 5 ) {

dump("dump found too many anchors");

window.location = "http://www.getoutahere.com";

}

Notes

For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.

Specification

anchor

http://www.mozilla.org/docs/dom/domref/dom_doc_ref4.html (1 de 2) [09/06/2003 9:57:20] anchors

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref4.html (2 de 2) [09/06/2003 9:57:20] window.navigator.appCodeName

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.appCodeName

Returns the internal "code" name of the current browser.

Syntax

codeName = window.navigator.appCodeName

Parameters

codeName is the internal name of the browser as a string.

Example

dump(window.navigator.appCodeName);

Notes

Mozilla, , and IE5 all use the internal name "Mozilla."

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref37.html (1 de 2) [09/06/2003 9:57:30] window.navigator.appCodeName

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref37.html (2 de 2) [09/06/2003 9:57:30] mozilla.org

mozilla.org Mozilla News 04 June 2003 Status Update 6 June 2003 At A Glance Why Use Mozilla New Book - This status update contains news on Creating XPCOM , the removal of License Terms Components the MNG/JNG image decoder, Get Involved Creating XPCOM secure mail server authentication Newsgroups Components, a book and more. more... Feedback about and about creating Development XPCOM Download Mozilla Roadmap components for Gecko-based Projects applications, is now Mozilla is an open-source web Module Owners available online. browser and toolkit, designed for Hacking Hardcopies will be standards compliance, performance and portability. Mozilla.org provides Get the Source available in August. binaries for testing and feedback. Build It Mozilla 1.4 Release For more about mozilla.org, read Testing Candidate 1 Mozilla at a Glance. Releases Mozilla 1.4 RC 1 is out. We've added Mozilla 1.3.1 Nightly Builds lots of features and This is our latest stable release. New Report A Bug fixed lots of bugs to Mozilla? Get this. Tools since Mozilla 1.3. Help us shake it ● Download Bugzilla down in preparation ❍ Win (11 MB) Tinderbox for Mozilla 1.4 final. ❍ MacOS X (15 MB)

Bonsai More information is ❍ (14 MB) available in the LXR ● Release Notes release notes. FAQ Mozilla 1.4 Release Candidate 1 Search Mozilla Firebird 0.6 This is our first 1.4 release Mozilla Firebird 0.6 candidate. Get it and let us know if (formerly Phoenix) is you find problems. If the idea of available for filing a bug report doesn't appeal to download. This you, then you'll probably be happier release features a with 1.3.1. fresh new look, a redesigned ● Download preferences window, ❍ Win (13 MB) preliminary support for Mac OS X and ❍ MacOS X (14.9 MB) much more. ❍ Linux (14 MB) ● Release Notes Mozilla 1.3.1 Available Nightly Builds

http://www.mozilla.org/ (1 de 4) [09/06/2003 9:58:06] mozilla.org Mozilla 1.3.1 is Created most weekdays from the available for previous day's work, these will download. This probably work, but may not. Use follow-up to Mozilla them to verify that a bug you're 1.3 restores tracking has been fixed. MacOS X, XPInstall i386 Linux, Windows, Linux PPC, functionality for Mac Solaris (2.7/SPARC, 2.6/SPARC, OS X users. 2.6/x86), FreeBSD, Irix, BeOS, HPUX, OS/2, etc. Using Breakpoints in Venkman more... Netscape Devedge has just published a second Venkman article, all about breakpoints. In other Venkman news, as of 0.9.63, views can now be stacked in a tab container to save space. Check out the screenshots.

Mozilla Branding Strategy mozilla.org's Mozilla Branding Strategy document explains our long term product naming strategy.

New Mozilla Roadmap mozilla.org has published a new development roadmap, detailing the plans for the future development of the Mozilla codebase.

Camino 0.7 Released ™ (formerly http://www.mozilla.org/ (2 de 4) [09/06/2003 9:58:06] mozilla.org Chimera) 0.7 is available for download. Along with the new name, Camino has a new history sidebar, a new download manager and a new text encoding menu. To learn more about what's new in Camino 0.7, check out the release notes.

Browser Innovation Article has written an article about browser innovation and why open, standards- compliant, cross- platform technologies like Gecko matter for the future of the World Wide Web.

Gecko Embedding Guides Check out the newest documentation for Gecko, Mozilla's layout engine. Gecko Embedding Basics offers a high level description of how to embed Gecko in your application. Gecko Embedding API Reference is a first cut at documenting Gecko's frozen interfaces.

more... http://www.mozilla.org/ (3 de 4) [09/06/2003 9:58:06] mozilla.org

Copyright © 1998-2003 The Mozilla Organization Last modified June 8, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/ (4 de 4) [09/06/2003 9:58:06] the mozilla.org projects list

mozilla.org projects At A Glance Why Use Mozilla The primary mission of mozilla.org is to coordinate and integrate the work of License Terms others. Here are all of the ongoing projects. If you have a new project you'd like us Get Involved to host on our CVS server, consult the guidelines on hacking mozilla for info on obtaining a CVS account and interacting with our tree. Newsgroups Feedback Browser Components Development SeaMonkey Roadmap SeaMonkey is the codename for the current Mozilla browser. It includes the NGLayout/Gecko layout engine, is built atop the Projects XPCOM component architecture and generally follows the plan Module Owners described in the roadmap. Hacking User Interface Get the Source The user interface for Mozilla has a new look and feel. Check out Build It the list of available UI specifications for details. Editor Testing The editor project is focused on developing an HTML 4.0 compliant Releases WYSIWYG editor. Composer is designed to be easy to use, fast and Nightly Builds reliable; facilitating web page authors to make quick edits to their web pages. Composer is also the underlying editor within Report A Bug Mail/News. Tools Instant Messaging & Chat Bugzilla Our goal is to make it possible for Mozilla to support Instant Messaging and Chat with a variety of different protocols. As a proof Tinderbox of concept, Rob Ginda has written an IRC client he calls ChatZilla. Bonsai Help Viewer LXR The help viewer is a separate browser window in which user FAQ documentation (and other types of documentation?) can be navigated. The help viewer includes an index, an RDF-based table Search of contents, HTML content, a skinnable chrome, and context- sensitive loading. Java Integration Open JVM Integration The Open JVM Integration (OJI) project is extending the plug-in architecture to allow Java virtual machines to be plugged into Mozilla-based browser releases. Blackwood The goal of the Blackwood project is to provide a set of facilities to better integrate the Java platform with Mozilla. These include a bridge to XPCOM, a Java DOM API, the Open JVM Integration (OJI) facility, a Java WebClient API, and Plug-ins implemented in Java, called 'Pluglets'. JavaScript JavaScript is a Netscape-originated programming language designed http://www.mozilla.org/projects/ (1 de 7) [09/06/2003 9:58:09] the mozilla.org projects list for scripting object systems (HTML, Java, CORBA, your own) and embedding in a wide range of applications. It is the basis of the ECMA-262/ECMAScript specification (and subsequent ISO-16262 standard), and is the most widely-used client-side programming language on the Web by a large margin. Both C and Java implementations are available. Mail/News The Mail/News project is focused on developing a new application based on new mozilla technologies such as XPFE, XPCOM and RDF. We're bringing over most of our features for POP, SMTP, IMAP, NNTP, as well as making some key improvements. MathML An implementation of the W3C's Mathematical Markup Language. Netscape Portable Runtime (NSPR) NSPR provides platform independence for non-GUI operating system facilities, including threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. Platform for Privacy Preferences (P3P) An implementation of the W3C P3P specification. Plug-ins The implementation of Netscape's Plug-in Application Programming Interface (API) within Mozilla. Embedding The Embedding project is focused on allowing easy reuse of the Mozilla browser components and providing an SDK for an embeddable browser and HTML editor. Scalable Vector Graphics (SVG) An implementation of the W3C's Scalable Vector Graphics Language. Web Services Simple Object Access Protocol (SOAP) and Web Services Description Language (WSDL) support in Mozilla. XML Extras In XML Extras module we have implemented XML functionality that is not part of the mainline XML infrastructure, like the XMLHttpRequest object copied from Microsoft. XML-RPC XML-RPC module implements the XML-RPC specification as a JavaScript component. Xprint Very advanced print module for Unix/Linux which supports automatic printer and printer feature lookup, TrueType font support, support for international printing (including languages and scripts like Arabic, Chinese, Cyrillic, Greek, Hebrew, Indic (Devanagari, Tamil, etc.), Japanese, Korean, Polish, etc.) and MathML. XSL Transformations (XSLT) http://www.mozilla.org/projects/ (2 de 7) [09/06/2003 9:58:09] the mozilla.org projects list The TransforMiiX module implements both a XSLT component for Mozilla, and a standalone commandline tool. Search The search component provides support for aggregating search results (via RDF) from one or multiple search engines and is used by the sidebar's "Search" panel. SQL Integration: Native Database Support The Native Database Support project allows Mozilla to directly connect to and query SQL servers. Browser Infrastructure Netlib (Necko) The main function of the netlib kernel (AKA Necko) is to act as an efficient data pipe between multiple physical transports (ie. file system, network, etc.) and a standardized stream abstraction which protocol handlers consume. The three main design goals in the netlib kernel architecture are footprint, maintainability and performance. New Layout (Gecko) The goal of the New Layout project is to create a fast, small, standards-based layout engine designed for performance and portability. RDF RDF, or Resource Description Framework, is a W3C standard for representing meta-information. In Mozilla, we're using this to aggregate and display information about all kinds of Internet resources, including email, UseNet news, site maps, bookmarks, and browser history. XPCOM Our Cross-Platform scheme for turning objects into discrete components. XPConnect XPConnect is the binding between XPCOM and JavaScript. PyXPCOM Python Cross-Platform COM (PyXPCOM) is ActiveState's bindings between Python and XPCOM. XPToolkit The XPToolkit design documents live here. This cross-platform UI abstraction provides web browsing and scripting UI and application logic for the New Layout engine. XPInstall XPInstall is a technology for doing cross-platform installations, packaging, and software updates. XPNet XPNet is a cross-platform, lightweight download library used by the native installers. It has support for HTTP/1.1, FTP, pause/resume/cancel and HTTP proxies. Footprint http://www.mozilla.org/projects/ (3 de 7) [09/06/2003 9:58:09] the mozilla.org projects list

Information on work that's underway to reduce Mozilla's runtime footprint, both as a full-fledged browser suite and as an embeddable layout engine. Internationalization And Localization Internationalization (I18N) The Internationalization group is responsible for making it possible for Mozilla to deal with various writing systems. This page describes the current activities in this area. Localization (L10N) Many different people and groups are planning to localize the Mozilla user interface into their own languages. This page describes how to localize Mozilla Browser and Mail/News client. BiDi A project to enable bi-directional text. This feature will enable Mozilla to render Arabic, Persian and Hebrew. Security Projects Mozilla includes several security-related projects: Open Source PKI Projects Thanks to relaxed US export regulations, mozilla.org can now host security and cryptographic code. Open source PKI projects include: Network Security Services (NSS) NSS supports cross-platform development of security- enabled server applications. Applications built with NSS can support PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 and v3, X.509 v3 certificates, and other security standards. Network Security Services for Java (JSS) A Java interface to NSS that supports most of the security standards and encryption technologies supported by NSS. JSS also provides a pure Java interface for ASN.1 types and BER/DER encoding. Personal Security Manager (PSM) PSM supports cross-platform development of security- enabled client applications. PSM includes libraries (built on top of NSS) and a daemon that performs cryptographic operations on behalf of a client application--operations such as setting up an SSL connection, object signing and signature verification, certificate management, and other common PKI functions. PKCS #11 Conformance Testing Test suites designed to test PKCS #11 implementations. Component Security Component security supports the addition of Java and JavaScript security to Mozilla components, mainly in terms of mobile code and the browser interfaces available to programs from those languages. For cryptographic security projects, see Open Source PKI Projects.

http://www.mozilla.org/projects/ (4 de 7) [09/06/2003 9:58:09] the mozilla.org projects list Other Browser Projects Main Accessibility Page This is the official accessibility page. We talk about our work to support screen readers and other 3rd party accessibility software. This is also where Mozilla's keyboard FAQ and list of planned keystrokes lives. Access-Mozilla Integration Project The goal of Access-Mozilla is to provide built-in accessibility solutions (text-to-speech, magnification, high/low contrast themes, speech-input, braille display support), rather than require users with special needs to buy and learn 3rd party accessibility software. This would create the first truly seamless accessibility solution for the internet. Current accessible internet solutions require expert knowledge of both the application and the 3rd party accessibility tool. This makes the learning curve difficult for new users. It's also expensive, and a bit awkward for future internet appliances built from Mozilla technology. ColorSync The ColorSync project, sponsored by Apple Computer, attempts to manage color displayed from source html to destination browsers, compensating for various viewing conditions. It allows for pages to viewed as intended with the correct colors. Performance The Performance project is an umbrella for many small features and enhancements that are intended to make Mozilla the fastest browser around. Unix Unix Front End. GTK 1.1, Linux/glibc2 is the reference developer platform. Support for other OS's and toolkits also exists. Ports Many different groups are planning ports of Mozilla to new platforms and toolkits. The Ports page list all of the known, active porting projects. SilentDownload SilentDownload is a background transfer method that allows files to be downloaded to the users machine without interfering with their network performance. SilentDownload does this by only downloading while the network library is not busy. In this way, users can "silently download" large files over a period of time and be notified when the file transfer is complete. Non-Browser Projects Calendar The Calendar project is a standards-based calendar client effort. CCK Client Customization Kit provides tools that simplify customization and distribution of the client. Directory (LDAP)

http://www.mozilla.org/projects/ (5 de 7) [09/06/2003 9:58:09] the mozilla.org projects list The Directory pages include Java class library source, C SDK library source, and PerLDAP source. Each of these libraries provides access to Directory Services via LDAP (Lightweight Directory Access Protocol). This project covers only the LDAP library, and not LDAP access from the mailnews project. Mozilla Documentation Project The Mozilla Documentation Project is the central clearinghouse for documentation-related issues at Mozilla.org. Mstone The mstone test suite allows performance testing of many of the internet protocols used by Mozilla. This allows servers (and the services built on them) to be performance tested under a high load simulation before being publicly deployed. The current protocols tests are: SMTP, POP, IMAP, HTTP, and WMAP (Netscape Messenger Express). Rhino Rhino is the Java implementation of JavaScript that conforms to the ECMA standard and is written entirely in Java. Technology Evangelism Mozilla Technology Evangelism actively promotes Mozilla as the premier Internet client technology in the world. It accomplishes its mission through working within the mozilla.org community to develop working examples, author documentation, perform general education, and educate Web site authors through one-on-one contacts. JavaScript Debugging The JavaScript Debugging project includes a cross platform debugging support module for the Netscape JavaScript engine, a Java-based GUI debugger for JavaScript, a JavaScript logging tool, and a console debugger. Work is beginning on a new debugger, written in JavaScript, for the XPFE/NGLayout Mozilla. DOM Inspector DOM Inspector is a tool that allows you to debug, and edit HTML, XML, and XUL documents. ElectricalFire ElectricalFire is a Java Virtual Machine that uses JIT (Just In Time) compilation techniques to accelerate Java code execution. ElectricalFire was designed from the start to generate high- performance machine code and to be portable to many different processor architectures. Grendel In 1997, Netscape embarked on a project to rewrite Navigator/Communicator in Java. This project was cancelled before completion, but the mail/news component of it was nearly finished. Grendel is that mail/news client. Recently, work has been restarted on Grendel. Tools

http://www.mozilla.org/projects/ (6 de 7) [09/06/2003 9:58:09] the mozilla.org projects list Besides the browser, we've also released our home-grown development tools. Bonsai is for keeping track of the CVS repository, letting you view checkins, log messages and diffs. Tinderbox monitors the progress of our automated continuous-build machines, letting engineers know when a checkin breaks the build. Bugzilla is our online bug database. Its web interface allows entry of bugs, queries, reports and dependency graphs. Mozbot In addition to our web-based development tools, we have also developed mozbot, a modular IRC bot.

Browser Distributions Browsers based on the Gecko layout engine. Other This page lists links to other Mozilla-related projects of which we are aware, but which are not currently a part of Mozilla itself.

Copyright © 1998-2003 The Mozilla Organization Last modified May 13, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/projects/ (7 de 7) [09/06/2003 9:58:09] Mozilla Documentation

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search Mozilla Documentation

Introductory Material End User

FAQs, Videos... Customizing, Release Notes...

Core Architecture Core Modules & Libraries

NSPR, XPCOM, XUL... Mail/News, Editor, Image Library...

Development Events

Compiling, Guides, mozilla.org Website... CodeStock '99, Open Source Convention 2001...

Other Projects Web Development

Bonsai, Bugzilla, Tinderbox... Evangelism, HTML, Sidebar Tabs...

Old Documentation Layout

Copyright © 1998-2003 The Mozilla Organization Last modified October 4, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/catalog/ [09/06/2003 9:58:10] Mozilla Jargon File (Glossary)

mozilla.org Mozilla Jargon File At A Glance Why Use Mozilla Here is a list of some of the jargon used by mozilla hackers: License Terms Get Involved ASN.1 Abstract Syntax Notation One. A formal Newsgroups language for describing messages to be Feedback exchanged between distributed computer systems. Along with an encoding like Development BER/DER, ASN.1 can be used to generate Roadmap and process complex data structures in a Projects standardized and OS-independent manner. For an overview, see A Layman's Guide to a Module Owners Subset of ASN.1, BER, and DER. Hacking Get the Source BAM The Netscape internal code-name for our code modularization effort. It stands for Build It "Born Again Modularization." It hinges Testing upon XPCOM. Releases bidi Bi-di is short for bi-directional, which Nightly Builds means a combination of left-to-right (LTR) Report A Bug and right-to-left (RTL) writing in the same document. LTR writing systems include Tools Latin, Russian, and Greek alphabets, and Bugzilla Hindu/Arabic numerals. RTL includes Arabic and Hebrew alphabets in texts Tinderbox without Hindu/Arabic numerals. The Bonsai Unicode standard includes an algorithm for LXR bidi rendering, which is required for Unicode conformance. In informal use FAQ among habitual LTR users, the term bidi Search includes unmixed, unidirectional RTL writing. branch This is a branch off the trunk. It is a development area for big or customized changes so the trunk does not break. carpool Checking in code with the tree closed to make sure that major widespread changes compile cleanly. Checking into a closed tree ensures others don't check in changes that conflict with yours. Normally this isn't a problem but problems arise sometimes when checking in a large number of files. Schedule carpools with the build team.

http://www.mozilla.org/docs/jargon.html (1 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

CCP Cut, Copy and Paste (clipboard operations) certificate Digital data, formatted according to the X.509 standard, that specifies the name of an individual, company, or other entity (the subject name of the certificate) and certifies that a public key, which is also included in the certificate, belongs to that entity. A certificate is issued and digitally signed by a certificate authority (CA). A certificate's validity can be verified by checking the CA's digital signature using the techniques of public-key cryptography. To be trusted within a public-key infrastructure (PKI), a certificate must be issued and signed by a CA that is trusted by other entities enrolled in the PKI. Also called digital ID, digital passport, public-key certificate X.509 certificate, and security certificate. CA Certificate authority. A service that issues a certificate after verifying the identity of the person or entity the certificate is intended to identify. A CA also renews and revokes certificates and generates CRLs. The entity named in the issuer field of a certificate is always a CA. Certificate authorities can be independent third parties or a person or organization using certificate-issuing server software. ClassObject Same object as factory. component An implementation of a set of interfaces identified by a CLSID ComponentManager Central Object of XPCOM that provides API for object creation and management. content node A content node is a baseclass for all nodes in the document tree. For HTML pages this means that each content node represents a HTML tag in the HTML document. Content nodes can be manipulated by the DOM.

http://www.mozilla.org/docs/jargon.html (2 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

content sink The terms "sink" and "source" are commonly used to describe the flow of data. A data source, such as a netlib stream, provides data to a listener, whereas a datasink (such as an observer) is an object that absorbs data provided (often by a source). In Mozilla, the content sink is an interface that sits between the parsing engine and the code that actually builds the content model. It is useful to keep these systems separate so that they can vary independently, while the interface they use to communicate remains (fairly) constant. CMMF Certificate Management Message Formats. A PKIX format used to convey certificate requests and revocation requests from end entities to certificate authorities and to send a variety of information from certificate authorities to end entities. CMMF is subsumed by another proposed standard, Certificate Management Messages over CMS (CMC). For information about CMC and related standards, see the PKIX Charter. CRMF Certificate Request Message Format. A PKIX format used for messages related to life-cycle management of X.509 certificates. This format is a subset of CMMF. For details, see CMMF. CSS Cascading Style Sheets: A W3C standard for defining presentation in Web documents. NGLayout supports CSS1 and most of CSS2. CVS CVS is the version control system we use. Use CVS to keep your development tree in sync with the latest changes. D11N Documentation. DND Drag and Drop

http://www.mozilla.org/docs/jargon.html (3 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

dogfood Interim software used internally for testing. To eat one's own dogfood means to use the software one is developing, as part of one's everyday development environment. The idea is that developers who are using their own software will quickly learn what's missing or broken. Dogfood is typically not even of beta quality. (From Eric Raymond's Jargon File 4.1.4, June 1999) DOM The . A W3C standard for accessing and modifying the content tree. DTD Document Type Definition - specifies a set of elements, their relationships and the tag set to mark the document. A good introduction to SGML concepts can be found at pineapplesoft.com. In mozilla, DTD is also a class used by the parser inheriting from nsIDTD. encumbered code Code that cannot be released as open source for legal reasons. For example, patented encryption code licensed from RSA Security by Netscape cannot be released as part of the NSS project on Mozilla. ender A code name for Mozilla's editor module. factory An object whose sole purpose is creation of objects of a particular component. There exists only one factory for every Component (CLSID). The IID and definition has been carefully choosen so as to be binary compatible with COM. nsIFactory frame The lowest level object in the layout model. Each content node maps to one or more frames during reflow. The frame handles the rendering of the content. A frame is pretty closely tied to the box concept in CSS2. frame hierarchy The hierarchy of frames that represents a laid-out document. gfx The lowest cross platform layer for drawing. Contains support for fonts, colors, images and drawing graphical primitives. Implemented once for each platform and used by the rest of Mozilla.

http://www.mozilla.org/docs/jargon.html (4 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

horked Broken. He checked in without testing on the Mac and now the tree is horked. HTML Hypertext Markup Language - NGLayout implements HTML 4.0 IDL Interface Description Language. A language- independent way to describe a module interface. IDL is compiled by an IDL compiler to generate C++ header files which describe XPCOM interfaces. Mozilla uses both DOM IDL (compiled by idlc), for DOM and parts of layout, and XPIDL (compiled by xpidl), for everything else. In the future, DOM IDL will be replaced by XPIDL. IID Interface ID {xxxxx-xxx-xxx-xxxxxx}. A unique number that identifies a given interface. imglib Image library Interface Contract betwen the implementation and usage. A pure virtual abstract base class with no data members. eg. nsIZipReaderInterface internationalization Designing and developing a software product to function in multiple locales. This process involves identifying the locales that must be supported, designing features which support those locales, and writing code that functions equally well in any of the supported locales. i18n Acronym for "internationalization" ("i" + 18 letters + "n"; lower case i is used to distinguish it from the numeral 1 (one)). js JavaScript libfont Font library libpr0n Synonym for imglib

http://www.mozilla.org/docs/jargon.html (5 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

localization Modifying or adapting a software product to fit the requirements of a particular locale. This process includes (but may not be limited to) translating the user interface, documentation and packaging, changing dialog box geometries, customizing features (if necessary), and testing the translated product to ensure that it still works (at least as well as the original). localizability The degree to which a software product can be localized. Localizable products separate data from code, correctly display the target language and function properly after being localized. L10n Acronym for "localization" ("L" + 10 letters + "n"; upper case L is used to distinguish it from the numeral 1 (one)). L12y Acronym for "localizability" ("L" + 12 letters + "y"; upper case L is used to distinguish it from the numeral 1 (one)). Locale A set of conventions affected or determined by human language and customs, as defined within a particular geo-political region. These conventions include (but are not necessarily limited to) the written language, formats for dates, numbers and currency, sorting orders, etc. module A packaging of a set of Components (ie) a DLL. necko Mozilla's networking library. Responsible for parsing urls, handling connections to webservers, handling transfer protocols and delivering a data stream to the parser. netlib Networking Library. The current networking library is called necko. nglayout Next Generation Layout Engine.

http://www.mozilla.org/docs/jargon.html (6 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

nsCOMPtr nsCOMPtr is a `smart-pointer'. It is a template class that acts, syntactically, just like an ordinary pointer in C or C++, i.e., you can apply * or -> to it to `get to' what it points at. nsCOMPtr is smart in that, unlike a raw COM interface pointer, nsCOMPtr manages AddRef, Release, and QueryInterface for you. nsISupports The mother of all interfaces. All interfaces ultimately inherit from this. Provides refcounting. The IID and definition has been carefully choosen so as to be binary compatible with COM. object An instance of a Component OCSP Online Certificate Status Protocol. A PKIX protocol used for determining the current status of a digital certificate. For details, see OCSP. PDT The Product Delivery Team keeps track of bugs that most affect the usability of the browser. The idea is that after the PDT bugs are fixed, mozilla will have reached dogfood. That is, it will be usable enough for developers and testers to use every day as their main browser and mail client even if it isn't perfect yet. Bugs are marked [Dogfood] when someone believes that the bug keeps mozilla from being usable as dogfood. The PDT team marks the bug [PDT+] if they agree and [PDT-] if not. PKIX Public-Key Infrastructure (X.509). A working group of the Internet Engineering Task Force (IETF) that is developing Internet standards needed to support a PKI based on X.509 certificates. For more information, see PKIX Charter. PKCS #5 Public-Key Cryptography Standard #5. The standard developed by RSA Laboratories that governs password-based cryptography, for example to encrypt private keys for storage. For details published by RSA, see PKCS #5.

http://www.mozilla.org/docs/jargon.html (7 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

PKCS #7 Public-Key Cryptography Standard #7. The standard developed by RSA Laboratories that governs the application of cryptography to data, for example digital signatures. For details published by RSA, see PKCS #7. PKCS #11 Public-Key Cryptography Standard #11. The standard developed by RSA Laboratories that governs communication with cryptographic tokens (such as smart cards). For details published by RSA, see PKCS #11. PKCS #12 Public-Key Cryptography Standard #12. The PKCS standard developed by RSA Laboratories that governs the format used to store or transport private keys, certificates, and other secret material. For details published by RSA, see PKCS #12. porkjockey The porkjockeys are a group of people taking time to fix major architectural issues that are the source of bugs and usability problems throughout the codebase. The name was coined at an architecture meeting one dark day, when someone asked when the beta would ship. The answer? When pigs fly. Thus began a hopefully-not-quixotic quest to launch pork. presentation context An object that provide a context for a presentation shell. It is a means for the presentation shell to get at external settings and data. presentation shell Presentation shells are the controlling object during the presentation of a document. It owns the document, the frame hierarchy, stylesheets and the presentation context. It also controls and initiates the reflow of the document. private key One of a pair of keys used in public-key cryptography. The private key is kept secret and is used to decrypt data encrypted with the corresponding public key. ProgID A String name for a Component.

http://www.mozilla.org/docs/jargon.html (8 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

public key One of a pair of keys used in public-key cryptography. The public key is distributed freely and published as part of a certificate. It is typically used to encrypt data sent to the public key's owner, who then decrypts the data with the corresponding private key. public-key cryptography A set of well-established techniques and standards that allow an entity to verify its identity electronically or to sign and encrypt electronic data. Two keys are involved: a public key and a private key. A public key is published as part of a certificate, which associates that key with a particular identity. The corresponding private key is kept secret. Data encrypted with the public key can be decrypted only with the private key. public-key infrastructure (PKI) The standards and services that facilitate the use of public-key cryptography and X.509 v3 certificates in a networked environment. raptor Former code-name for NGLayout. We were asked to stop using it in public due to trademark problems. RDF Resource Description Framework reflow The act of laying out the content tree and creating/updating the corresponding frame hierarchy is called reflowing. reflow mapped Reflowing content that already has a frame. reflow unmapped Reflowing content that doesn't yet have a frame. registry A hierarchical attribute-value pair storage. RFE This was a keyword used to mark a bug as a "request for enhancement." It has been replaced with the "enhancement" severity setting in Bugzilla. service A component that is used as a singleton. That means there exist only one instantiation of the component, and all request for it returns the same object.

http://www.mozilla.org/docs/jargon.html (9 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

ServiceManager A singleton manager. Holds and manages singleton references to objects for application. Going to be merged with the ComponentManager. S/MIME Secure/Multipurpose Internet Mail Extensions. A message specification (based on the popular Internet MIME standard) that provides a consistent way to send and receive signed and encrypted MIME data. For complete specifications, see S/MIME version 2 and S/MIME version 3. SSL Secure Sockets Layer. A protocol that allows mutual authentication between a client and server and the establishment of an authenticated and encrypted connection. SSL runs above TCP/IP and below HTTP, LDAP, IMAP, NNTP, and other high-level network protocols. For complete SSL specifications, see SSL v3 and SSL v2. subject name A distinguished name (DN) that uniquely describes the subject of a certificate. talkback This is a crash data capturing program that Mozilla uses so that crashes can more efficiently be fixed. TLS Transport Layer Security. A protocol from the IETF based on SSL. It will eventually supersede SSL while remaining backward- compatible with SSL implementations. For more information, see The TLS Protocol. tracking A tracking bug many related bugs to be monitored from a single bug. They should have the meta keyword and/or be placed in the Tracking component. triage This term is derived from how doctors triage patients into different priorities. Mozilla applies it to the bug quality assurance process. QA volunteers triage bugs into appropriate priorities and severities. trunk This is where the primary Mozilla development occurs.

http://www.mozilla.org/docs/jargon.html (10 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

typelib Storage for type information about interfaces. Interfaces expressed in IDL have their type information maintained in Typelib automatically. UI User Interface Venkman Javascript Debugger webshell A container that knows how to load and render web pages. Frameset pages has a root webshell and one webshell per frame. widget Primitive user interface part (button, menu, radiobutton, etc). There are two kinds of widgets: Native and gfx. Native widgets are implemented differently for each platform, but gfx widgets are implemented using gfx and is thus the same for all platforms. X.509 A standard defined by the International Telecommunication Union (ITU) that governs the format of certificates used for authentication in public-key cryptography. XIF XML Interchange Format - used internally by NGLayout for all I/O to clipboard, etc. XML Extensible Markup Language - see the W3C's XML site for more info XP Cross-Platform XPCOM Cross Platform Component Object Model XPConnect Ability to call C++ implementations of interfaces expressed in IDL from and vice versa. XPFE The cross-platform front end. The part of Mozilla that implements the user interface of mozilla. Everything that makes a browser a browser except the rendering of pages is considered xpfe (bookmarks, toolbars, menus etc). XPIDL Cross Platform Interface Definition Language. A language for expressing interfaces.

http://www.mozilla.org/docs/jargon.html (11 de 12) [09/06/2003 9:58:12] Mozilla Jargon File (Glossary)

xpidl A compiler for XPIDL. xpidl generates C++ interfaces, .xpt files describing interfaces at runtime for XPConnect, and Java interface files. XUL XML-based User Interface Language. XUL (pronounced "zuul") is the user interface description language used for creating user interfaces with Mozilla's Cross Platform Front End.

Feel free to add new items to this file and make corrections. If you don't have access to the tree, send your suggestions to [email protected]. For the canonical list of hacker slang, see Eric Raymond's Jargon File. Copyright © 1998-2003 The Mozilla Organization Last modified April 18, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/jargon.html (12 de 12) [09/06/2003 9:58:12] mozilla.org Bugzilla -- the Mozilla bug database

Bugzilla Version 2.17.1 Bugzilla What's all this, then?

This is mozilla.org's bug-tracking system, Report A Bug - Use the Bugzilla Helper. our database for recording bugs in Mozilla View Bugs Already Reported Today and other mozilla.org projects. For more information about Bugzilla, see our bug Enter a bug # or some search terms: page. [Help] This is not the place to report bugs about commercial Netscape products. For that, try Netscape's own bug reporting ● Query Page (Search existing bug reports) form instead. Netscape bugs reported here ● Summary reports and charts will be ignored. (Netscape browsers ● Enter a new bug report (Advanced) usually have a blue and black `N' logo in the top right of the window.) ● Log in to an existing account ● Open a new Bugzilla account When reporting a ● Add to Sidebar (Requires Mozilla or Netscape 6/7) bug

● Read the Bugzilla fact sheet so you know what you're doing. ● Open a Bugzilla account if you don't have one already. ● Make sure you can reproduce the bug, and explain to others how to reproduce it as well. If engineers can't reproduce your bug, they won't be able to fix it. ● Read the bug reporting guidelines to learn how to write bug reports that get bugs fixed. ● Make sure your bug hasn't already been reported. Consult the lists of most frequently reported bugs, most recently duplicated bugs, and search for bugs matching the one you've found. ● Use the Bugzilla Helper to report bugs. This form helps you write

http://bugzilla.mozilla.org/ (1 de 2) [09/06/2003 9:58:18] mozilla.org Bugzilla -- the Mozilla bug database well written bug reports.

Copyright © 1998-2003, The Mozilla Organization

Actions: New | Query | bug # | Reports | Requests New Account | Log In

http://bugzilla.mozilla.org/ (2 de 2) [09/06/2003 9:58:18] Mozilla Cross-Reference

Mozilla Cross-Reference

This is a cross referenced display of the Mozilla source code. The sources displayed are those that are currently checked in to the mainline of the Starting Points: mozilla.org CVS server; these pages are updated many times a day, so they should be pretty close SeaMonkey to the latest-and-greatest. This module is SeaMonkeyAll, the trunk of the Mozilla browser project. (updated hourly) It's possible to search through the entire Mozilla source text; or to search for files whose name Mozilla 1.0 matches a pattern; or to search for the definitions This is the Mozilla 1.0 branch. (updated every of particular functions, variables, etc. 6 hours) The individual files of the source code are NSPR formatted on the fly and presented with clickable This module is NSPR, a cross platform library identifiers. An identifier is a macro, typedef, for operating system facilities including struct, enum, union, function, function prototype threads, I/O, timing and memory management. or variable. Clicking on them shows you a (updated nightly) summary of how and where they are used.

Security The free-text search command is implemented This module contains code related to Open using Glimpse, so all the capabilities of Glimpse Source PKI including NSS. (updated three are available. Regular expression searches are times per day) especially useful.

Electrical Fire (Don't use use a web-crawler to try and This is /mozilla/ef, a multi-platform Just-In- download all of these pages; the CGIs will feed Time Java compiler. (updated nightly) you several gigabytes worth of generated HTML!) Mozilla This contains the entre current CVS repository. The pages here are generated by the LXR tool, (updated nightly) which was originally written to display the source code of the Linux kernel (LXR stands for Classic ``Linux Cross Reference.'') Check out the main This is Mozilla Classic. Its a snapshot of the LXR site for more information. MozillaSource module from Oct 26, 1998 just before the change was made to xpfe. This is Thanks to Arne Georg Gleditsch and Per here for reference. No work is done on this Kristian Gjermshus, the authors of the LXR tool, branch. for writing it and making it available to the

http://lxr.mozilla.org/ (1 de 2) [09/06/2003 9:58:20] Mozilla Cross-Reference world.

http://lxr.mozilla.org/ (2 de 2) [09/06/2003 9:58:20] tinderbox: SeaMonkey

tinderbox tree: SeaMonkey (01:02 PDT)

Checkin requirements Help

● DO NOT CHECK IN ON RED. ● Tips on working with Mozilla ● Please run the pre-checkin tests, and if you have time the smoketests. ● See Bonsai for checkin details ● Do not checkin until you have appropriate reviews, super-reviews, and approvals. ● mailto:hook, mailto:sheriffs ● Your checkin comment should include the reviewer, the super-reviewer, the approver, ● sheriff schedule a clear explanation of the fix, and the bug number. Reviewers and approvers are ● smoketest blockers considered to be 'on the hook'! ● Performance Regression Policy ● Add new files to Mac/Win/Unix packages! ● Txul/Ts/Tp perf, Lk/Bl Docs ● Please be mindful of the other tinderboxes: Testerbox, Ports, MozillaTest, Phoenix, Camino ● 1.0 Branch tinderbox ● 1.4 Branch tinderbox ● Netscape employees: In addition to these rules, you must watch the Commercial Tinderbox. ● Add this tinderbox to your sidebar ● Upcoming landings

● Smoketesting Schedule

● Install tbox status icon

● Roadmap

Sheriff for Thursday 6/5 is #mozilla Build Engineer for Friday 6/6 is leaf - AIM: leafn

We are branched for Mozilla 1.4 (Tinderbox here) and the tree is open for Mozilla 1.5a development. Trunk checkins require the normal r= and sr=. Branch checkins require approval from [email protected].

The tree is open Build Guilty Time MacOSX MacOSX Click Linux brad Clbr Linux btek Linux comet WINNT 5.0 WINNT 5.0 Click time to Linux luna Dep Darwin 6.3 Darwin 6.6 name to (info) Dep Dep beast Dep creature Clbr see changes silverstone Clbr monkey Dep see what since then they did 06/09 00:47 L/ L/ 00:37 L/ L L/ 00:23 L/ L/ Z:19.01MB 00:16 mZ:12.23MB L 00:13 Tp:1097ms Tp:623ms 00:09 L Txul:904ms Txul:505ms L Z:20.00MB Ts:3439ms L/ C 06/08 23:48 L C Ts:6069ms Z:14.44MB Lk:244B mZ:12.87MB mZ:8.139MB 23:36 Txul:459ms Bl:14.2MB L Txul:313ms 23:31 Ts:1437ms L Ts:1547ms Lk:297KB Tp:1020ms 23:22 MH:7.72MB L Z:19.01MB Z:20.00MB mZ:12.23MB L 23:15 A:246K Z:21.07MB mZ:12.87MB Tp:1096ms Tp:634ms 23:04 Txul:461ms Txul:900ms Txul:505ms L 06/08 22:50 Warn:44684 Ts:1440ms Ts:3436ms Ts:6088ms Z:14.44MB mZ:8.139MB 22:48 L L C Txul:312ms 22:39 Tp:1023ms Z:20.00MB L C Ts:1500ms 22:36 mZ:12.87MB Z:19.01MB

http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey (1 de 3) [09/06/2003 9:58:32] tinderbox: SeaMonkey

22:31 Txul:461ms mZ:12.23MB L L C Ts:1438ms Tp:1095ms Tp:559ms Tp:624ms 22:23 L C L Txul:897ms Txul:542ms Txul:504ms 22:05 Z:14.44MB Lk:244B Ts:3433ms Ts:3688ms Ts:6074ms 06/08 21:55 mZ:8.139MB Bl:14.1MB L L C Txul:313ms 21:45 Lk:299KB Tp:1020ms Z:20.00MB L Ts:1156ms 21:42 MH:7.72MB mZ:12.87MB Z:19.01MB 21:34 A:248K Txul:457ms mZ:12.23MB Ts:1438ms 21:20 scott Z:21.07MB Tp:1093ms L Tp:628ms 21:07 Txul:897ms L Warn:44681 L Txul:505ms Ts:3430ms Z:14.44MB 06/08 20:55 Z:20.00MB Ts:6054ms mZ:8.139MB 20:54 mZ:12.87MB L Txul:458ms Txul:313ms 20:46 Tp:1024ms Ts:1125ms Ts:1436ms L 20:45 Z:19.01MB L 20:39 L mZ:12.23MB Z:20.00MB Lk:244B Tp:1094ms L 20:38 mZ:12.87MB Bl:14.1MB Txul:901ms Txul:457ms Tp:634ms Ts:3435ms L L 20:03 Lk:299KB Txul:507ms Ts:1439ms Z:14.44MB MH:7.73MB L Tp:564ms Ts:6015ms 06/08 19:56 A:248K Tp:1024ms L Txul:542ms mZ:8.139MB 19:53 Z:21.07MB Z:20.00MB Ts:3719ms Txul:328ms Ts:860ms 19:49 mZ:12.87MB L Warn:44675 Z:19.01MB L/ C 19:44 Txul:463ms L Ts:1441ms mZ:12.23MB 19:22 Tp:1025ms Tp:1098ms L 19:10 Txul:897ms Tp:630ms L 19:07 L Ts:3429ms Txul:502ms Z:14.44MB mZ:8.139MB 06/08 18:57 Z:20.00MB Ts:6113ms 18:52 mZ:12.87MB Txul:328ms Ts:797ms 18:49 Txul:463ms L Ts:1437ms 18:45 L L Lk:244B Tp:1021ms 18:38 Z:19.01MB Bl:14.1MB L mZ:12.23MB Lk:299KB L 18:24 Z:20.00MB Tp:1099ms L MH:7.72MB Z:14.44MB mZ:12.87MB Txul:897ms Tp:642ms A:248K mZ:8.139MB Txul:458ms Ts:3433ms Txul:503ms 06/08 17:57 Z:21.07MB L Txul:328ms Ts:1435ms Ts:6086ms Tp:553ms Ts:1516ms L 17:53 Warn:44682 Txul:542ms Tp:1017ms L 17:47 Ts:3679ms Z:20.00MB 17:45 mZ:12.87MB L L 17:36 Txul:465ms Z:19.01MB Z:14.44MB 17:31 Ts:1436ms mZ:12.23MB mZ:8.139MB L 17:20 Tp:1097ms Txul:313ms L Txul:899ms Tp:634ms Ts:906ms 17:01 L Tp:1020ms Ts:3430ms Txul:503ms 06/08 16:52 Z:20.00MB Ts:6034ms L mZ:12.87MB 16:50 Z:14.44MB Txul:455ms 16:40 mZ:8.139MB Ts:1439ms 16:34 L Txul:312ms L- L L Z:19.01MB Ts:1703ms 16:16 Tp:1020ms Warn:44676 Z:20.00MB mZ:12.23MB L 16:07 mZ:12.87MB Tp:1095ms Tp:629ms Txul:459ms Txul:896ms L C Txul:506ms L 06/08 15:48 Ts:1440ms Ts:3431ms Tp:555ms Ts:6102ms Z:14.44MB Txul:541ms mZ:8.139MB

http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey (2 de 3) [09/06/2003 9:58:32] tinderbox: SeaMonkey

15:46 L Ts:3722ms Txul:313ms Tp:1026ms Ts:1422ms 15:43 L Z:20.00MB 15:37 mZ:12.87MB L 15:27 Txul:458ms Z:19.01MB L 15:19 mZ:12.23MB Tp:630ms L C Ts:1438ms Tp:1099ms Txul:501ms 15:05 Lk:244B Txul:898ms Ts:6072ms 06/08 14:54 Bl:14.1MB L Ts:3436ms 14:45 Lk:299KB L Z:14.44MB mZ:8.139MB 14:41 MH:7.73MB Tp:1024ms L A:278K Z:20.00MB Txul:328ms 14:32 Z:21.07MB mZ:12.87MB Ts:1235ms 14:31 Zdiff:-311 Txul:462ms L C L C (+794/- Ts:1437ms Z:19.01MB 14:28 1105) Zdiff:-347 Tp:628ms L! C Txul:504ms 14:20 (+726/- Warn:44675 1073) Ts:5997ms L C mZ:12.23MB 06/08 13:47 L C Z:14.44MB Z:20.00MB mZdiff:- Zdiff:-85 347 (+726/- 13:46 mZ:12.87MB (+433/- 1073) L Txul:457ms 518) Tp:1099ms Tp:555ms 13:45 Ts:1439ms mZ:8.139MB L L Txul:900ms Txul:542ms mZdiff:-85 Tp:275ms Lk:244B L C Ts:3433ms Ts:3711ms (+433/- Ts:1591ms 13:41 Bl:14.2MB Tp:1019ms L C 518) Lk:297KB Z:20.00MB Txul:313ms L C MH:7.72MB Zdiff:-208 L C Ts:797ms 13:35 Z:19.01MB A:247K (+816/- Tp:627ms 1024) Zdiff:+14 Z:21.07MB Txul:506ms mZ:12.87MB (+14/+0) 13:26 brendan Zdiff:+8 mZ:12.23MB Ts:6089ms L C (+8/+0) mZdiff:- 208 (+816/-mZdiff:+14 Z:14.44MB 13:13 sspitzer Warn:44680 1024) (+14/+0) mZ:8.139MB L C Txul:456ms Tp:1095ms Txul:313ms Tp:1019ms Ts:1439ms Txul:897ms Ts:1360ms 13:08 Ts:3434ms Show previous 12 hours Show previous 24 hours

Administrate Tinderbox Trees

http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey (3 de 3) [09/06/2003 9:58:32] mozilla.org Feedback

mozilla.org Feedback At A Glance Why Use Mozilla Listen, kid, we're all in it together! License Terms -- Harry Tuttle in Brazil. Get Involved Mozilla is an open-source , designed for standards compliance, Newsgroups performance and portability. This site is here for mozilla developers and testers. If Feedback it's not helping you, let us know how it can! Development Roadmap Projects This is not a help site for . For help with Netscape Module Owners products, visit their help site or post a question to to one of their Hacking newsgroups. Use the Netscape bug reporting form to report bugs with Get the Source products that use Netscape's blue N logo. Build It The Open Directory Project is also not connected with mozilla.org Testing (although they do display an affection for everyone's favorite green lizard). Releases Nightly Builds Report A Bug For most suggestions about our site, or future directions of the project, or whatever, use one of the public mozilla.org mailing lists or newsgroups. We all Tools read those lists, and we strongly recommend that you post your suggestions there. Bugzilla Tinderbox If you have a suggestion about some feature you'd like to see added to the client, Bonsai post to the appropriate newsgroup or to the wishlist group. LXR To report bugs with binaries downloaded from ftp.mozilla.org, use our bug FAQ reporting page. Search Notify [email protected] of technical problems with the web site itself.

To suggest something to the mozilla.org staff privately about the content of the site or the way we do things, use the address [email protected]. Note that messages sent to that address will reach those of us who coordinate mozilla.org, but it will not reach the developers who are actually writing code so don't submit feature requests to this list. Use the wishlist. Likewise, we can't help you with questions.

Copyright © 1998-2003 The Mozilla Organization Last modified September 3, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/feedback.html [09/06/2003 9:58:33] mozilla.org FAQs

mozilla.org mozilla.org FAQs (frequently At A Glance Why Use Mozilla asked questions) License Terms Get Involved Here are pointers to a few FAQs relevant to what we're up to here at mozilla.org. Newsgroups Mozilla 1.0 FAQ Feedback Development FAQ about Mozilla 1.0; good all-round coverage of important questions. Roadmap Unofficial Mozilla and Netscape 6 FAQ (Newzilla) Projects A little bit outdated, but most of its information is still relevant (also in Module Owners Japanese). Hacking Mozilla FAQ Get the Source Build It Pat Gunn has put together this FAQ of introductory materials, common build problems, etc. Testing Mozilla Build FAQ Releases Nightly Builds Answers specific questions concerning the Mozilla build proecess. Report A Bug Debugging Mozilla on Windows FAQ Tools Tips on debugging Mozilla. See also the Linux debugging FAQ. Bugzilla Gecko Embedding FAQ Tinderbox Bonsai Answers to commonly questions about embedding Gecko, Mozilla's layout LXR engine. NGLayout/Gecko FAQ FAQ Search Answers to questions about Mozilla's layout engine. FAQ

Answers to questions about the Netscape Public License, the license under which the Mozilla source code is shipped. Mozilla Relicensing FAQ

Information on relicensing the Mozilla source code, specifically on compatiblity issues with GNU General Public License (GPL). Code Review FAQ

Answers about mozilla.org's code review process. Sheriff FAQ

http://www.mozilla.org/faq.html (1 de 2) [09/06/2003 9:58:34] mozilla.org FAQs Information on sheriffs, people who watch over the tree. Mozilla Web Author FAQ

Mozilla FAQ for Web designers Wishlist FAQ

A list of commonly requested features from our wishlist newsgroup.

The following is a list of public documents pertaining to Netscape's announcement to release the Communicator source code and the creation of mozilla.org.

Free Navigator FAQ

Answers to general questions regarding Netscape's January 22, 1998 announcement that Netscape Communicator and Navigator are now free, as well as very general Q&A about the plans to release source code. Open Source FAQ

Answers to some specific questions from the developer community regarding Netscape's plan to release source code for its next major release of Netscape Communicator and Navigator. See also Netscape's own FAQ. The mozilla.org Press Release

Netscape's announcement of the creation of mozilla.org.

Can't find the information you are looking for? Try our documntation catalog or the search page

Copyright © 1998-2003 The Mozilla Organization Last modified May 21, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/faq.html (2 de 2) [09/06/2003 9:58:34] search mozilla.org

Search mozilla.org with Google mozilla.org At A Glance Why Use Mozilla License Terms Can't find the information you want? Try our search tips page. Get Involved Newsgroups Feedback Development Roadmap Projects Module Owners Hacking Get the Source Build It Testing Releases Nightly Builds Report A Bug Tools Bugzilla Tinderbox Bonsai LXR FAQ Search

Copyright © 1998-2003 The Mozilla Organization Last modified May 10, 2003 Document History Edit this Page (or via CVS)

http://mozilla.org/search.html [09/06/2003 9:58:35] Gecko DOM Reference

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

Gecko DOM Reference

Preface

About This Reference

Who Should Read This Guide

What is Gecko?

API Syntax

Using the Examples

Introduction to the DOM

What is the DOM?

DOM vs. JavaScript

How Do I Access the DOM?

Important Data Types

DOM Interfaces

Testing the DOM API

DOM Element Reference

DOM Elements Interface

http://www.mozilla.org/docs/dom/domref/dom_shortTOC.html (1 de 3) [09/06/2003 9:58:37] Gecko DOM Reference Properties

Methods

Event Handlers

DOM window Reference

DOM window Interface

DOM Document Reference

The document Interface

Properties

Methods

Event Handlers

DOM Event Reference

DOM Event Interface

Properties

Methods

DOM Event Handler List

DOM Style Reference

DOM Style Object

DOM styleSheet Object

DOM cssRule Object

DOM CSS Properties List

DOM HTML Elements Reference

http://www.mozilla.org/docs/dom/domref/dom_shortTOC.html (2 de 3) [09/06/2003 9:58:37] Gecko DOM Reference DOM Range Reference

DOM 2 Range Interface

Properties

Creation Methods

Editing Methods

Other Methods

Gecko Range Interface Extensions

Methods

DOM Examples

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified February 19, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_shortTOC.html (3 de 3) [09/06/2003 9:58:37] window.navigator

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator

Returns a reference to the navigator object.

Syntax

nav = window.navigator

Parameters

nav is a navigator object reference.

Example

nav = window.navigator;

if ( nav.language != en ) {

res = window.confirm(lang_warn);

}

Notes

The navigator object is used to examine the actual browser being used. It includes properties like appName, appCore, plugins (described below) for getting information about the browser itself.

All of the properties and methods available from window.navigator can also be referenced simple with navigator.

Specification

DOM Level 0. Not part of specification. http://www.mozilla.org/docs/dom/domref/dom_window_ref36.html (1 de 2) [09/06/2003 9:58:39] window.navigator

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref36.html (2 de 2) [09/06/2003 9:58:39] window.navigator.appName

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.appName

Returns the official name of the browser.

Syntax

appName = window.navigator.appName

Parameters

appName is the name of the browser as a string.

Example

dump(window.navigator.appName);

// prints "Navigator" to the console for NS6

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref38.html (1 de 2) [09/06/2003 9:58:40] window.navigator.appName

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref38.html (2 de 2) [09/06/2003 9:58:40] appendChild

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

appendChild

The appendChild method inserts the specified node into the list of nodes on the current document.

Syntax

element.appendChild(newChild)

Parameters

newChild is a node.

Example

// puts the new, empty paragraph at the end

// of the document

p = document.createElement("p");

element.appendChild(p);

Notes

appendChild is one of the fundamental methods of web programming using the DOM. The appendChild method inserts a new node into the DOM structure of the HTML document, and is the second part of the one-two, create-and-append process so central to building web pages programmatically. The example above illustrates this basic process.

Specification

appendChild

http://www.mozilla.org/docs/dom/domref/dom_el_ref32.html (1 de 2) [09/06/2003 10:00:17] appendChild

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_el_ref32.html (2 de 2) [09/06/2003 10:00:17] applets

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

applets

applets returns an ordered list of the applets within a document.

Syntax

app_list = document.applets

Parameters

app_list is a nodeList of the applets within the document.

Example

// ( When you know the second applet is the one

// you want )

my_java_app = document.applets[1];

Notes

None.

Specification

applets

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref5.html (1 de 2) [09/06/2003 10:00:32] applets

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref5.html (2 de 2) [09/06/2003 10:00:32] window.navigator.appVersion

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.appVersion

Returns the version of the browser as a string.

Syntax

ver = window.navigator.appVersion

Parameters

ver is the version number of the browser as a string.

Example

if ( navigator.appVersion.charAt(0) == "5" ) {

// browser is putatively a v5 browser

}

Notes

The window.navigator.userAgent property also contains the version number (example: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.

The window.navigator.appVersion and window.navigator.userAgent properties are quite often used in "browser sniffing" code: scripts that attempt to find out what kind of browser you are using and adjust pages accordingly.

Specification

http://www.mozilla.org/docs/dom/domref/dom_window_ref39.html (1 de 2) [09/06/2003 10:00:55] window.navigator.appVersion

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref39.html (2 de 2) [09/06/2003 10:00:55] window.navigator.cookieEnabled

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.cookieEnabled

Returns a boolean value indicating whether cookies are enabled or not.

Syntax

res = window.navigator.cookieEnabled

Parameters

res is a boolean True or False.

Example

if (window.navigator.cookieEnabled) {

// set a cookie

}

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref40.html (1 de 2) [09/06/2003 10:01:07] window.navigator.cookieEnabled

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref40.html (2 de 2) [09/06/2003 10:01:07] window.navigator.javaEnabled()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.javaEnabled()

This method indicates whether the current browser is Java-enabled or not.

Syntax

bool = window.navigator.javaEnabled

Parameters

bool is a boolean value.

Example

if ( window.navigator.javaEnabled() ) {

// browser has java

}

Notes

The return value for this method indicates whether the preference that controls Java is on or off-not whether the browser offers Java support in general.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref41.html (1 de 2) [09/06/2003 10:01:13] window.navigator.javaEnabled()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref41.html (2 de 2) [09/06/2003 10:01:13] window.navigator.language

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.language

Returns a string representing the language version of the browser.

Syntax

lang = window.navigator.language

Parameters

lang is a two character string (e.g., "en" or "ja") representing the language version.

Example

if ( window.navigator.language != "en" ) {

doLangSelect(window.navigator.language);

}

Notes

This property also shows up as part of the window.navigator.userAgent string.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref42.html (1 de 2) [09/06/2003 10:01:18] window.navigator.language

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref42.html (2 de 2) [09/06/2003 10:01:18] window.navigator.mimeTypes

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.mimeTypes

Returns a list of the MIME types supported by the browser.

Syntax

syntax code

Parameters

blah is a blah.

Example

// example code here

Notes

Addtional notes.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref43.html (1 de 2) [09/06/2003 10:01:22] window.navigator.mimeTypes

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref43.html (2 de 2) [09/06/2003 10:01:22] window.navigator.oscpu

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.oscpu

Returns a string that identifies the current operating system.

Syntax

oscpuInfo = window.navigator.oscpu

Parameters

oscpu is a string that takes the following form.

Example

function osInfo() {

alert(window.navigator.oscpu);

}

// returns: Win98

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref44.html (1 de 2) [09/06/2003 10:01:25] window.navigator.oscpu

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref44.html (2 de 2) [09/06/2003 10:01:25] window.navigator.platform

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.platform

Returns a string representing the platform of the browser.

Syntax

plat = window.navigator.platform

Parameters

plat is a string with one of the following values:

Win95 Windows 95

WinNT Windows NT

MacPPC Macintosh PowerPC

SunOS Solaris

....

Example

http://www.mozilla.org/docs/dom/domref/dom_window_ref45.html (1 de 2) [09/06/2003 10:01:27] window.navigator.platform

function osInfo() {

alert(window.navigator.platform);

}

// returns: win32

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref45.html (2 de 2) [09/06/2003 10:01:27] window.navigator.plugins

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.plugins

Returns an array of the plugins installed in the browser.

Syntax

plugins = window.navigator.plugins

Parameters

plugins is an array of plugin objects.

Example

function pluginInfo() {

alert(window.navigator.plugins.item(0).name);

}

// returns "Shockwave for Director"

Notes

The plugin objecct exposes a small interface for getting information about the various plugins installed in your browser.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref46.html (1 de 2) [09/06/2003 10:01:29] window.navigator.plugins

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref46.html (2 de 2) [09/06/2003 10:01:29] window.navigator.product

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.product

This property returns the product name of the current browser.

Syntax

productName = window.navigator.product

Parameters

productName is a string.

Example

 

// returns "Gecko"

Notes

product is that portion of the full user agent string that comes directly after the platform. In the user agent for Netscape 6.1, for example, the product is "Gecko" and the full agent string is the following:

http://www.mozilla.org/docs/dom/domref/dom_window_ref47.html (1 de 2) [09/06/2003 10:01:32] window.navigator.product

Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape6/6.1

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref47.html (2 de 2) [09/06/2003 10:01:32] window.navigator.productSub

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.productSub

productSub returns the build number of the current browser.

Syntax

prodSub = window.navigator.productSub

Parameters

prodSub is a string.

Example

// returns: 20010725

Notes

On IE, this property returns undefined.

http://www.mozilla.org/docs/dom/domref/dom_window_ref48.html (1 de 2) [09/06/2003 10:01:34] window.navigator.productSub Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref48.html (2 de 2) [09/06/2003 10:01:34] window.navigator.userAgent

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.userAgent

Returns the user agent string for the current browser.

Syntax

uaString = window.navigator.userAgent

Parameters

uaString is a string.

Example

window.navigator.userAgent

// returns Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape6/6.1

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref49.html (1 de 2) [09/06/2003 10:01:37] window.navigator.userAgent

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref49.html (2 de 2) [09/06/2003 10:01:37] window.navigator.vendor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.vendor

Returns the name of the browser vendor for the current browser.

Syntax

venString = window.navigator.vendor

Parameters

venString is a string.

Example

window.navigator.vendor

// returns "Netscape6"

Notes

vendor is another portion of the userAgent string. The product and the vendor can be different--as when Netscape 6.1 uses the Gecko product to do its rendering.

See also window.navigator.product, window.navigator.userAgent

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref50.html (1 de 2) [09/06/2003 10:01:39] window.navigator.vendor

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref50.html (2 de 2) [09/06/2003 10:01:39] window.navigator.vendorSub

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.navigator.vendorSub

vendorSub is the substring of the vendor having to do with the vendor version number.

Syntax

venSub = window.navigator.vendorSub

Parameters

venSub is a string.

Example

window.navigator.vendorSub

// returns "6.1" where the vendor part of userAgent is

// Netscape6/6.1

Notes

vendorSub is yet another component of the full user agent string. It refers to the version number that the vendor themselves have given the current browser (as opposed to the version of the product, which may be different). In Netscape 6.1, the productSub is given as "5.0" and the vendorSub is "6.1."

See also window.navigator.productSub, window.navigator.userAgent, window.navigator.vendor

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref51.html (1 de 2) [09/06/2003 10:01:42] window.navigator.vendorSub

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref51.html (2 de 2) [09/06/2003 10:01:42] window.onabort

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onabort

An event handler for abort events sent to the window.

Syntax

window.onabort = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onabort = resetThatServerThing

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref52.html (1 de 2) [09/06/2003 10:01:44] window.onabort

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref52.html (2 de 2) [09/06/2003 10:01:44] window.onblur

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onblur

The onblur property returns the onBlur event handler code, if any, that exists on the window.

Syntax

window.onblur = funcRef

Parameters

funcRef is a reference to the function to be executed.

Example

warnFunc = window.onblur;

Notes

The blur event is raised when a window loses focus.

Specification

Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref53.html [09/06/2003 10:01:47] window.onchange

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onchange

An event handler for change events sent to the window.

Syntax

window.onchange = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onchange = resetThatServerThing

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref54.html (1 de 2) [09/06/2003 10:01:51] window.onchange

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref54.html (2 de 2) [09/06/2003 10:01:51] window.onclick

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onclick

An event handler for click events sent to the window.

Syntax

window.onclick = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onclick = doPopup;

Notes

The click event is raised when the user clicks on the window.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref55.html (1 de 2) [09/06/2003 10:01:53] window.onclick

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref55.html (2 de 2) [09/06/2003 10:01:53] window.onclose

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onclose

An event handler for close events sent to the window.

Syntax

window.onclose = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onclose = resetThatServerThing

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref56.html (1 de 2) [09/06/2003 10:01:55] window.onclose

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref56.html (2 de 2) [09/06/2003 10:01:55] window.ondragdrop

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.ondragdrop

An event handler for drag & drop events sent to the window.

Syntax

window.ondragdrop = funcRef

Parameters

funcRef is a reference to a function.

Example

window.ondragdrop = examineItem;

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref57.html (1 de 2) [09/06/2003 10:01:58] window.ondragdrop

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref57.html (2 de 2) [09/06/2003 10:01:58] window.onerror

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onerror

An event handler for error events sent to the window.

Syntax

window.onerror = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onerror = null;

Notes

The error event is raised when an error occurs in the script. The example above prevents error dialogs from displaying-which is the window's normal behavior-by overriding the default event handler for error events that go to the window.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref58.html (1 de 2) [09/06/2003 10:02:01] window.onerror

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref58.html (2 de 2) [09/06/2003 10:02:01] window.onfocus

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onfocus

An event handler for focus events sent to the window.

Syntax

window.onfocus = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onfocus = startTimer;

Notes

The focus event is raised when the user sets focus on the current window.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref59.html (1 de 2) [09/06/2003 10:02:03] window.onfocus

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref59.html (2 de 2) [09/06/2003 10:02:03] window.onkeydown

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onkeydown

An event handler for the keydown event on the window.

Syntax

window.onkeydown = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onkeydown = doFunc;

Notes

The keydown event is raised when the user presses any key.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref60.html (1 de 2) [09/06/2003 10:02:04] window.onkeydown

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref60.html (2 de 2) [09/06/2003 10:02:04] window.onkeypress

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onkeypress

An event handler for the keypress event on the window.

Syntax

window.onkeypress = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onkeypress = doFunc;

Notes

The keypress event is raised when the user presses and releases any key on the keyboard.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref61.html (1 de 2) [09/06/2003 10:02:06] window.onkeypress

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref61.html (2 de 2) [09/06/2003 10:02:06] window.onkeyup

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onkeyup

An event handler for the keyup event on the window.

Syntax

window.onkeyup = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onkeyup = doFunc;

Notes

The keyup event is raised when a key that has been pressed is released.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref62.html (1 de 2) [09/06/2003 10:02:08] window.onkeyup

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref62.html (2 de 2) [09/06/2003 10:02:08] window.onload

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onload

An event handler for the load event on the window.

Syntax

window.onload = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onload = init;

Notes

The load event is fired at the end of the document loading process. At this point, all of the objects in the document are in the DOM.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref63.html (1 de 2) [09/06/2003 10:02:10] window.onload

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref63.html (2 de 2) [09/06/2003 10:02:10] window.onmousedown

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onmousedown

An event handler for the mousedown event on the window.

Syntax

window.onmousedown = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onmousedown = doFunc;

Notes

The mousedown event is raised when the user clicks the left mouse button anywhere in the document.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref64.html (1 de 2) [09/06/2003 10:02:13] window.onmousedown

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref64.html (2 de 2) [09/06/2003 10:02:13] window.onmousemove

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onmousemove

An event handler for the mousemove event on the window.

Syntax

window.onmousemove = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onmousemove = doFunc;

Notes

The mousemove event is raised when the user moves the mouse at all.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref65.html (1 de 2) [09/06/2003 10:02:15] window.onmousemove

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref65.html (2 de 2) [09/06/2003 10:02:15] window.onmouseout

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onmouseout

An event handler for the mousedown event on the window.

Syntax

window.onmouseout = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onmouseout = doFunc;

Notes

The mouseout event is raised when the mouse leaves the area of the specified element (in this case the window itself).

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref66.html (1 de 2) [09/06/2003 10:02:17] window.onmouseout

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref66.html (2 de 2) [09/06/2003 10:02:17] window.onmouseover

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onmouseover

An event handler for the mouseover event on the window.

Syntax

window.onmouseover = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onmouseover = doFunc;

Notes

The mouseover event is raised when the moves over the current element (in this case the window itself).

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref67.html (1 de 2) [09/06/2003 10:02:19] window.onmouseover

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref67.html (2 de 2) [09/06/2003 10:02:19] window.onmouseup

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onmouseup

An event handler for the mousedown event on the window.

Syntax

window.onmousedown = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onmousedown = doFunc;

Notes

The mousedown event is raised when the user clicks the left mouse button anywhere in the document.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref68.html (1 de 2) [09/06/2003 10:02:22] window.onmouseup

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref68.html (2 de 2) [09/06/2003 10:02:22] window.onpaint

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onpaint

An event handler for the paint event on the window.

Syntax

window.onpaint = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onpaint = doFunc;

Notes

The paint event is raised when the window is rendered. This event occurs after the load event for a window, and reoccurs each time the window needs to be rerendered, as when another window obscures it and is then cleared away.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref69.html (1 de 2) [09/06/2003 10:02:24] window.onpaint

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref69.html (2 de 2) [09/06/2003 10:02:24] window.onreset

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onreset

An event handler for the reset event on the window.

Syntax

window.onreset = funcRef

Parameters

funcRef is a reference to a function.

Example

http://www.mozilla.org/docs/dom/domref/dom_window_ref70.html (1 de 2) [09/06/2003 10:02:26] window.onreset

 

Notes

The reset event is raised when the user clicks a reset button in a form ().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref70.html (2 de 2) [09/06/2003 10:02:26] window.onresize

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onresize

An event handler for the resize event on the window.

Syntax

window.onresize = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onresize = doFunc;

Notes

The resize event is fired when the window is resized.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref71.html (1 de 2) [09/06/2003 10:02:27] window.onresize

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref71.html (2 de 2) [09/06/2003 10:02:27] window.onscroll

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onscroll

An event handler for the scroll event on the window.

Syntax

window.onscroll = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onscroll = doFunc;

Notes

The scroll event is raised when the window is scrolled.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref72.html (1 de 2) [09/06/2003 10:02:29] window.onscroll

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref72.html (2 de 2) [09/06/2003 10:02:29] window.onselect

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onselect

An event handler for the select event on the window.

Syntax

window.onselect = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onselect = textToCell;

Notes

The select event is raised when text in the window is selected.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref73.html (1 de 2) [09/06/2003 10:02:31] window.onselect

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref73.html (2 de 2) [09/06/2003 10:02:31] window.onsubmit

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onsubmit

An event handler for the submit event on the window.

Syntax

window.onsubmit = funcRef

Parameters

funcRef is a reference to a function.

Example

http://www.mozilla.org/docs/dom/domref/dom_window_ref74.html (1 de 2) [09/06/2003 10:02:33] window.onsubmit

 

Notes

The submit event is raised when the user clicks a submit button in a form ().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref74.html (2 de 2) [09/06/2003 10:02:33] window.onunload

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.onunload

An event handler for the unload event on the window.

Syntax

window.onunload = funcRef

Parameters

funcRef is a reference to a function.

Example

window.onunload = saveStuff;

Notes

The unload event is raised as one document is unloaded and another is about to be loaded into the browser.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref75.html (1 de 2) [09/06/2003 10:02:35] window.onunload

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref75.html (2 de 2) [09/06/2003 10:02:35] window.open()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.open()

Opens a new window.

Syntax

window.open("URL", "name" [, "windowfeatures"])

Parameters

URL is a string that points to the window you want to open.

name is a string that names the new window.

windowfeatures is one or more of the following in a comma-separated list:

toolbar Toolbar is present

location Locationbar is present

directories

status

menubar XXX have to update this whole list XXX

scrollbars

http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html (1 de 2) [09/06/2003 10:02:37] window.open()

resizable

copyhistory

width

height

Example

window.open("btest2.html", "bwin", "toolbar,status");

Notes

The name attribute is not a reference or the title of the window. It is used as a target to links and forms.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html (2 de 2) [09/06/2003 10:02:37] window.opener

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.opener

Returns a reference to the window that opened this current window.

Syntax

wObj = window.opener

Parameters

wObj is an object reference.

Example

if window.opener != indexWin {

referToTop(window.opener);

}

Notes

When a window is opened from another window, it maintains a reference to that first window as window.opener. If the current window has no opener, this method returns NULL.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref77.html (1 de 2) [09/06/2003 10:02:39] window.opener

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref77.html (2 de 2) [09/06/2003 10:02:39] window.outerHeight

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.outerHeight

Gets/sets the height of the outside of the browser window.

Syntax

window.outerHeight = iPx

iPx = window.outerHeight

Parameters

iPx is an integer representing the number of pixels.

Example

window.outerHeight = ( window.screen.availHeight );

Notes

As the snippet above demonstrates, the outerHeight property is very often used to size the browser to the available screen area. Contrast this with the innerHeight property, which controls the size of the content area of the browser.

See also window.screen, window.innerHeight, window.outerWidth

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref78.html (1 de 2) [09/06/2003 10:02:41] window.outerHeight

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref78.html (2 de 2) [09/06/2003 10:02:41] window.outerWidth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.outerWidth

Gets/sets the width of the outside of the browser window.

Syntax

window.outerWidth = iPx

iPx = window.outerWidth

Parameters

iPx is an integer representing the number of pixels.

Example

window.outerWidth = ( window.screen.availWidth );

Notes

As the snippet above demonstrates, the outerWidth property is very often used to size the browser to the available screen area. Contrast this with the innerWidth property, which controls the size of the content area of the browser.

See also window.screen, window.innerHeight, window.outerHeight

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref79.html (1 de 2) [09/06/2003 10:02:44] window.outerWidth

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref79.html (2 de 2) [09/06/2003 10:02:44] window.pageXOffset

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.pageXOffset

Gets the amount of content that has been hidden by scrolling to the right.

Syntax

hScroll = window.pageXOffset

Parameters

hScroll is the number of pixels scrolled as an integer.

Example

var hScroll = pageXOffset;

var vScroll = pageYOffset;

Notes

If the user has scrolled to the right and 200 pixels of the content is hidden by this, then the pageXOffset property returns 200.

window.pageYOffset

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref80.html (1 de 2) [09/06/2003 10:02:45] window.pageXOffset

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref80.html (2 de 2) [09/06/2003 10:02:45] window.pageYOffset

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.pageYOffset

Gets the amount of content that has been hidden by scrolling down.

Syntax

vScroll = window.pageYOffset

Parameters

vScroll is the number of pixels as an integer.

Example

var hScroll = pageXOffset;

var vScroll = pageYOffset;

Notes

If the user has scrolled down and 400 pixels of the content is hidden by this, then the pageYOffset property returns 400.

See also window.pageXOffset

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref81.html (1 de 2) [09/06/2003 10:02:47] window.pageYOffset

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref81.html (2 de 2) [09/06/2003 10:02:47] window.parent

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.parent

Returns a reference to the parent of the current window or subframe.

Syntax

pWin = window.parent

Parameters

pWin is an object reference to the parent window.

Example

if window.parent != window.top

// we're deeper than one down

Notes

When a window is loaded in a frameset, its parent is .

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref82.html (1 de 2) [09/06/2003 10:02:49] window.parent

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref82.html (2 de 2) [09/06/2003 10:02:49] window.personalbar

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.personalbar

Returns the personalbar object, whose visibility can be toggled in the window.

Syntax

pBarObj = window.menubar

Parameters

pBarObj is an object reference.

Example

The following complete HTML example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.

Various DOM Tests

Various DOM Tests

http://www.mozilla.org/docs/dom/domref/dom_window_ref83.html (1 de 2) [09/06/2003 10:02:51] window.personalbar

Notes

To toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. Also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.

See also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar, window.toolbar

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref83.html (2 de 2) [09/06/2003 10:02:51] window.pkcs11

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.pkcs11

Returns the pkcs11 object , which can be used to install drivers other software associated with the pkcs11 protocol.

Syntax

pkcsObj = window.pkcs11

Parameters

pkcsObj is an object reference.

Example

window.pkcs11.addModule(sMod, secPath, 0, 0);

Notes

See the nsIDOMPkcs11.idl in the mozilla source for more information about how to manipulate pkcs11 objects.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref84.html (1 de 2) [09/06/2003 10:02:54] window.pkcs11

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref84.html (2 de 2) [09/06/2003 10:02:54] window.print()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.print()

Prints the current document.

Syntax

window.print()

Parameters

None.

Example

window.print();

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref85.html (1 de 2) [09/06/2003 10:02:56] window.print()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref85.html (2 de 2) [09/06/2003 10:02:56] window.prompt()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.prompt()

Returns the text entered by the user in a prompt dialog.

Syntax

syntax code

Parameters

blah is a blah.

Example

function pr() {

sign = prompt("What's your sign?");

}

Notes

http://www.mozilla.org/docs/dom/domref/dom_window_ref86.html (1 de 2) [09/06/2003 10:02:59] window.prompt() See also window.alert(), window.confirm().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref86.html (2 de 2) [09/06/2003 10:02:59] window.prompter

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.prompter

Returns a reference to the prompt window, if any, currently displayed.

Syntax

prompt = window.prompter

Parameters

prompt is an object reference to the prompt window.

Example

prompt_window = window.prompter

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref87.html (1 de 2) [09/06/2003 10:03:01] window.prompter

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref87.html (2 de 2) [09/06/2003 10:03:01] window.releaseEvents()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.releaseEvents()

Releases the window from trapping events of a specific type.

Syntax

window.releaseEvents(Event.eventType)

Parameters

eventType is a string with one of the following values:

Abort Load

Blur MouseDown

Click MouseMove

Change MouseOut

DblClick MouseOver

DragDrop MouseUp

Error Move

http://www.mozilla.org/docs/dom/domref/dom_window_ref88.html (1 de 2) [09/06/2003 10:03:04] window.releaseEvents()

Focus Reset

KeyDown Resize

KeyPress Select

KeyUp Submit

Unload

Example

window.releaseEvents(Event.KEYPRESS)

Notes

Note that you can pass a list of events to this method using the following syntax: window.releaseEvents(Event.KEYPRESS | Event.KEYDOWN | Event.KEYUP). Also note that the eventType parameter is case-insensitive, so you can also say, for example, window.releaseEvents(Event.KeyPress).

See also window.captureEvents().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref88.html (2 de 2) [09/06/2003 10:03:04] window.resizeBy()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.resizeBy()

Resizes the current window by a certain amount.

Syntax

window.resizeBy(xDelta, yDelta)

Parameters

xDelta is the number of pixels to grow the window horizontally.

yDelta is the number of pixels to grow the window vertically.

Example

// shrink the window

window.resizeBy(-200, -200);

Notes

This method resizes the window relative to its current size. To resize the window in absolute terms, use window.resizeTo().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref89.html (1 de 2) [09/06/2003 10:03:06] window.resizeBy()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref89.html (2 de 2) [09/06/2003 10:03:06] window.resizeTo()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.resizeTo()

Dynamically resizes window.

Syntax

window.resizeTo(iWidth, iHeight)

Parameters

iWidth is an integer representing the new width in pixels.

iHeight is an integer value representing the new height in pixels.

Example

// function resizes the window to take up half

// of the available screen.

function halve() {

window.resizeTo(window.screen.availWidth/2, window.screen.availHeight/2);

}

Notes

See also window.resizeBy().

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref90.html (1 de 2) [09/06/2003 10:03:07] window.resizeTo()

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref90.html (2 de 2) [09/06/2003 10:03:07] window.screen

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen

Returns a reference to the screen object associated with the window.

Syntax

screenObj = window.screen

Parameters

screenObj is an object reference.

Example

s = window.screen;

if ( s.colorDepth < 8) {

// use low-color version of page

} else {

// use regular, colorful page

}

Notes

The screen object is a special JavaScript object for controlling aspects of the screen on which the current window is being rendered. screen object properties such as colorDepth, height, and availHeight can be accessed from the window object by using properties like window.screen.colorDepth and others described below.

Specification

http://www.mozilla.org/docs/dom/domref/dom_window_ref91.html (1 de 2) [09/06/2003 10:03:09] window.screen DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref91.html (2 de 2) [09/06/2003 10:03:09] window.screen.availHeight

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.availHeight

Returns the amount of vertical space available to the window on the screen.

Syntax

iAvail = window.screen.availHeight

Parameters

iAvail is an integer number representing the amount of space in pixels.

Example

if window.screen.availHeight != window.screen.height {

// something's in the way!

// use available to size window

}

Notes

Addtional notes.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref92.html (1 de 2) [09/06/2003 10:03:11] window.screen.availHeight

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref92.html (2 de 2) [09/06/2003 10:03:11] window.screen.availLeft

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.availLeft

Returns the first available pixel available from the left side of the screen.

Syntax

iAvail = window.screen.availLeft

Parameters

iAvail is an integer representing the amount of space in pixels.

Example

setY = window.screen.height - window.screen.availTop;

setX = window.screen.width - window.screen.availLeft;

window.moveTo(setX, setY);

Notes

In most cases, this property returns 0.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref93.html (1 de 2) [09/06/2003 10:03:13] window.screen.availLeft

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref93.html (2 de 2) [09/06/2003 10:03:13] window.screen.availTop

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.availTop

Specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.

Syntax

iAvail = window.screen.availTop

Parameters

iAvail is an integer representing the amount of space in pixels.

Example

setY = window.screen.height - window.screen.availTop;

setX = window.screen.width - window.screen.availLeft;

window.moveTo(setX, setY);

Notes

In most cases, this property returns 0.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_window_ref94.html (1 de 2) [09/06/2003 10:03:16] window.screen.availTop

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref94.html (2 de 2) [09/06/2003 10:03:16] window.screen.availWidth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.availWidth

Returns the amount of horizontal space in pixels available to the window.

Syntax

iAvail = window.screen.availWidth

Parameters

iAvail is an integer representing the amount of space in pixels.

Example

// example code here

Notes

Addtional notes.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref95.html (1 de 2) [09/06/2003 10:03:17] window.screen.availWidth

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref95.html (2 de 2) [09/06/2003 10:03:17] window.screen.colorDepth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.colorDepth

Returns the color depth of the screen.

Syntax

bitDepth = window.screen.colorDepth

Parameters

bitDepth is an integer representing the color depth in bits.

Example

// check the color depth of the screen

if ( window.screen.colorDepth < 8) {

// use low-color version of page

} else {

// use regular, colorful page

}

Notes

See also window.screen.pixelDepth.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref96.html (1 de 2) [09/06/2003 10:03:19] window.screen.colorDepth

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref96.html (2 de 2) [09/06/2003 10:03:19] window.screen.height

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.height

Returns the height of the screen in pixels.

Syntax

iHeight = window.screen.height

Parameters

iHeight is an integer representing the height in pixels.

Example

if (window.screen.availHeight != window.screen.height) {

// something is occupying some screen real estate!

}

Notes

Note that not all of the height given by this property may be available to the window itself. Widgets such as taskbars or other special application windows that integrate with the OS (e.g., the Spinner player minimized to act like an additional toolbar on windows) may reduce the amount of space available to browser windows and other applications.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref97.html (1 de 2) [09/06/2003 10:03:21] window.screen.height

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref97.html (2 de 2) [09/06/2003 10:03:21] window.screen.left

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.left

Gets/sets the current distance in pixels from the left side of the screen.

Syntax

lLeft = window.screen.left

window.screen.left = lLeft

Parameters

lLeft is the number of pixels from the left side of the screen.

Example

// move and resize the current window

window.resizeTo(window.screen.availWidth/2);

window.screen.left = 1;

Notes

See also window.screen.top.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref98.html (1 de 2) [09/06/2003 10:03:23] window.screen.left

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref98.html (2 de 2) [09/06/2003 10:03:23] window.screen.pixelDepth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.pixelDepth

Returns the bit depth of the screen.

Syntax

depth = window.screen.pixelDepth

Parameters

depth is the number of bits per pixel as an integer.

Example

// if there is not adequate bit depth

// choose a simpler color

if ( window.screen.pixelDepth > 8 ) {

document.style.color = "#FAEBD7";

} else {

document.style.color = "#FFFFFF";

}

Notes

See also window.screen.colorDepth.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref99.html (1 de 2) [09/06/2003 10:03:25] window.screen.pixelDepth

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref99.html (2 de 2) [09/06/2003 10:03:25] window.screen.top

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.top

Gets/sets the distance from the top of the screen.

Syntax

lTop = window.screen.top

window.screen.top = lTop

Parameters

lTop is the number of pixels from the top of the screen.

Example

// move and resize the current window,

// making it like a bar across the top

window.resizeTo( window.screen.availHeight/4 );

window.screen.top = 0;

Notes

See also window.screen.left.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref100.html (1 de 2) [09/06/2003 10:03:27] window.screen.top

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref100.html (2 de 2) [09/06/2003 10:03:27] window.screen.width

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screen.width

Returns the width of the screen.

Syntax

lWidth = window.screen.width

Parameters

lWidth is the width of the screen in pixels.

Example

// crude way to check that the screen is at 1024x768

if (window.screen.width > 1000) {

// resolution is below 10 x 7

}

Notes

Note that not all of the width given by this property may be available to the window itself. When other widgets occupy space that cannot be used by the window object, there is a difference in window.screen.width and window.screen.availWidth. See also window.screen.height.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref101.html (1 de 2) [09/06/2003 10:03:29] window.screen.width

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref101.html (2 de 2) [09/06/2003 10:03:29] window.screenX

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screenX

Returns the horizontal distance of the left border of the user's browser from the left side of the screen.

Syntax

lLoc = window.screenX

Parameters

lLoc is the number of pixels from the left side the screen.

Example

None.

Notes

See also window.screenY.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref102.html (1 de 2) [09/06/2003 10:03:31] window.screenX

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref102.html (2 de 2) [09/06/2003 10:03:31] window.screenY

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.screenY

Returns the vertical distance of the top border of the user's browser from the top side of the screen.

Syntax

lLoc = window.screenY

Parameters

lLoc is the number of pixels from the top of the screen.

Example

None.

Notes

See also window.screenX.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref103.html (1 de 2) [09/06/2003 10:03:34] window.screenY

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref103.html (2 de 2) [09/06/2003 10:03:34] window.scrollbars

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollbars

Returns the scrollbars object, whose visibility can be toggled in the window.

Syntax

sBarObj = window.scrollbars

Parameters

sBarObj is an object reference.

Example

The following complete HTML example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.

Various DOM Tests

Various DOM Tests

http://www.mozilla.org/docs/dom/domref/dom_window_ref104.html (1 de 2) [09/06/2003 10:03:36] window.scrollbars

Notes

Note that scrollbars is not an array of the scrollbars. The visibility of these objects can only be controlled as a group.

To toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. Also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.

See also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar, window.toolbar

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref104.html (2 de 2) [09/06/2003 10:03:36] window.scroll()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scroll()

Scrolls the window to a particular place in the document.

Syntax

window.scroll(x-coord, y-coord)

Parameters

x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.

y-coord is the pixel along the vertical axis of the document that you want displayed in the upper left.

Example

// put the 1000th vertical pixel at

// the top of the window

onClick="scroll(0, 1000);"/>

Notes

window.scrollTo() is effectively the same as this method.

For scrolling a particular distance repeatedly, use the window.scrollBy(). Also see window.scrollByLines(), window.scrollByPages().

Specification http://www.mozilla.org/docs/dom/domref/dom_window_ref105.html (1 de 2) [09/06/2003 10:03:38] window.scroll()

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref105.html (2 de 2) [09/06/2003 10:03:38] window.scrollBy()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollBy()

Scrolls the document in the window by the given amount.

Syntax

window.scrollBy(xDelta, yDelta)

Parameters

xDelta is the amount of pixels to scroll horizontally.

yDelta is the amount of pixels to scroll vertically.

Example

// scroll one page

window.scrollBy(0, window.innerHeight);

Notes

window.scrollBy() scrolls by a particular amount where window.scroll() scrolls to an absolute position in the document.

See also window.scrollByLines(), window.scrollByPages()

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref106.html (1 de 2) [09/06/2003 10:03:39] window.scrollBy()

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref106.html (2 de 2) [09/06/2003 10:03:39] http://www.mozilla.org/docs/dom/domref/dom_window_ref107.html

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollByLines()

Scrolls the document by the given number of lines.

Syntax

window.scrollByLines(lines)

Parameters

lines is the number of lines.

Example

Notes

See also window.scrollBy(), window.scrollByPages().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref107.html (1 de 2) [09/06/2003 10:03:41] http://www.mozilla.org/docs/dom/domref/dom_window_ref107.html

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref107.html (2 de 2) [09/06/2003 10:03:41] window.scrollByPages()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollByPages()

Scrolls the current document by the specified number of pages.

Syntax

window.scrollByPages(pages)

Parameters

pages is the number of pages to scroll.

Example

// scroll one page

window.scrollByPages(1);

Notes

See also window.scrollBy(), window.scrollByLines(), window.scroll(), window.scrollTo().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref108.html (1 de 2) [09/06/2003 10:03:43] window.scrollByPages()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref108.html (2 de 2) [09/06/2003 10:03:43] window.scrollTo()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollTo()

Scrolls to a particular set of coordinates in the document.

Syntax

window.scrollTo(x-coord, y-coord)

Parameters

x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.

y-coord is the pixel along the vertical axis of the document that you want displayed in the upper left.

Example

window.scrollTo(0, 1000);

Notes

This function is effectively the same as window.scroll(). For relative scrolling, window.scrollBy(), window.scrollByLines(), and window.scrollByPages().

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref109.html (1 de 2) [09/06/2003 10:03:45] window.scrollTo()

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref109.html (2 de 2) [09/06/2003 10:03:45] window.scrollX

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollX

Returns the number of pixels that the document has already been scrolled horizontally.

Syntax

xpix = window.scrollX

Parameters

xpix is the number of pixels.

Example

// make sure and go over to the second horizontal page

if (window.scrollX) {

scroll(0,0);

}

scrollBy(400, 0);

Notes

Use this property to check that the document hasn't already been scrolled some if you are using relative scroll functions such as window.scrollBy(), window.scrollByLines(), or window.scrollByPages().

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref110.html (1 de 2) [09/06/2003 10:03:47] window.scrollX

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref110.html (2 de 2) [09/06/2003 10:03:47] window.scrollY

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.scrollY

Returns the number of pixels that the document has already been scrolled vertically.

Syntax

ypix = window.scrollY

Parameters

ypix is the number of pixels.

Example

// make sure and go down to the second page

if (window.scrollY) {

scroll(0,0);

}

scrollByPages(1);

Notes

Use this property to check that the document hasn't already been scrolled some if you are using relative scroll functions such as window.scrollBy(), window.scrollByLines(), or window.scrollByPages()

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref111.html (1 de 2) [09/06/2003 10:03:49] window.scrollY

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref111.html (2 de 2) [09/06/2003 10:03:49] window.self

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.self

Returns an object reference to the window object.

Syntax

selfObj = window.self

Parameters

selfObj is an object reference.

Example

if (window.parent.frames[0] != window.self) {

// this window is not the first frame in the list

}

Notes

window.self is almost always used in comparisons like in the example above, which finds out if the current window is the first subframe in the parent frameset.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref112.html (1 de 2) [09/06/2003 10:03:51] window.self

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref112.html (2 de 2) [09/06/2003 10:03:51] window.setCursor()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.setCursor()

Changes the cursor for the current window.

Syntax

syntax code

Parameters

blah is a blah.

Example

function SetBusyCursor(window, enable)

{

if(enable)

window.setCursor("wait");

else

window.setCursor("auto");

var numFrames = window.frames.length;

for(var i = 0; i < numFrames; i++)

SetBusyCursor(window.frames[i], enable);

}

Notes

http://www.mozilla.org/docs/dom/domref/dom_window_ref113.html (1 de 2) [09/06/2003 10:03:53] window.setCursor()

The cursor is locked until it's set back to auto.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref113.html (2 de 2) [09/06/2003 10:03:53] window.setInterval()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.setInterval()

Set a delay for a specific function.

Syntax

ID = window.setInterval("funcName", delay)

Parameters

funcName is the name of the function for which you want to set a delay.

delay is the number of milliseconds (thousandths of a second) that the function should be delayed.

ID is the interval ID.

Example

intervalID = window.setInterval("animalate()", 500);

Notes

The interval ID is used to refer to the specific interval when it needs to be cleared. The setInterval() function is commonly used to set a delay for functions that are executed again and again, such as animations.

See also window.clearInterval().

Specification http://www.mozilla.org/docs/dom/domref/dom_window_ref114.html (1 de 2) [09/06/2003 10:03:55] window.setInterval()

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref114.html (2 de 2) [09/06/2003 10:03:55] window.setTimeout()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.setTimeout()

Sets a delay for executing a function.

Syntax

ID = window.setTimeout("funcName", delay)

Parameters

funcName is the name of the function for which you want to set a delay.

delay is the number of milliseconds (thousandths of a second) that the function should be delayed.

ID is the interval ID.

Example

setTimeout('parent.generateOutput("Cancel")',0);

Notes

The setTimeout() method is often used to establish a time limit on certain applications, as when a user is logged out or certain information is reset if there has not been any interaction within the given time.

See also window.clearTimeout()

Specification http://www.mozilla.org/docs/dom/domref/dom_window_ref115.html (1 de 2) [09/06/2003 10:03:57] window.setTimeout()

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref115.html (2 de 2) [09/06/2003 10:03:57] window.sidebar

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.sidebar

Returns a reference to the window object of the sidebar.

Syntax

sidebar = window.sidebar

Parameters

sidebar is a window object.

Example

sbar = window.sidebar;

if (sbar) {

sbar_content = sbar._content;

}

Notes

The sidebar is a subframe in the DOM of the application window. Its content can be accessed with sidebar._content, as in the foregoing example, and it is a sibling of the window's main content frame.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref116.html (1 de 2) [09/06/2003 10:03:59] window.sidebar

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref116.html (2 de 2) [09/06/2003 10:03:59] window.sizeToContent()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.sizeToContent()

Sizes the window according to its content.

Syntax

window.sizeToContent()

Parameters

None.

Example

window.sizeToContent();

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref117.html (1 de 2) [09/06/2003 10:04:01] window.sizeToContent()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref117.html (2 de 2) [09/06/2003 10:04:01] window.status

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.status

Gets/sets the text in the statusbar at the bottom of the browser.

Syntax

msg = window.status

window.status = msg

Parameters

msg is a string containing the text to appear in the statusbar.

Example

while ( bigLoad ) {

window.status = "Loading...";

}

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref118.html (1 de 2) [09/06/2003 10:04:02] window.status

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref118.html (2 de 2) [09/06/2003 10:04:02] window.statusbar

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.statusbar

Returns the statusbar object, whose visibility can be toggled in the window.

Syntax

sBarObj = window.menubar

Parameters

sBarObj is an object reference.

Example

The following complete HTML example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.

Various DOM Tests

Various DOM Tests

http://www.mozilla.org/docs/dom/domref/dom_window_ref119.html (1 de 2) [09/06/2003 10:04:04] window.statusbar

Notes

When you load the example page above, the browser displays the following dialog:

To toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. Also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.

See also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar, window.toolbar

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref119.html (2 de 2) [09/06/2003 10:04:04] window.stop()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.stop()

This method stops window loading.

Syntax

window.stop()

Parameters

None.

Example

window.stop();

Notes

The stop() method is exactly equivalent to clicking the stop button in the browser. Because of the order in which scripts are loaded, the stop() method cannot stop the document in which it is contained from loading, but it will stop the loading of large images, new windows, and other objects whose loading is deferred.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref120.html (1 de 2) [09/06/2003 10:04:07] window.stop()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref120.html (2 de 2) [09/06/2003 10:04:07] window.toolbar

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.toolbar

Returns the toolbar object, whose visibility can be toggled in the window.

Syntax

tBarObj = window.menubar

Parameters

tBarObj is an object reference.

Example

The following complete HTML example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.

Various DOM Tests

Various DOM Tests

http://www.mozilla.org/docs/dom/domref/dom_window_ref121.html (1 de 2) [09/06/2003 10:04:09] window.toolbar

Notes

To toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. Also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.

See also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar, window.toolbar

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref121.html (2 de 2) [09/06/2003 10:04:09] window.top

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.top

Returns a reference to the topmost window in the window hierarchy.

Syntax

windowObj = window.top

Parameters

windowObj is an object reference.

Example

None.

Notes

Where the window.parent property returns the immediate parent of the current window, window.top returns the topmost window in the hierarchy of window objects. This property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref122.html (1 de 2) [09/06/2003 10:04:11] window.top

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref122.html (2 de 2) [09/06/2003 10:04:11] window.unescape()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.unescape()

Unencodes a value that has been encoded in hexadecimal (e.g., a cookie).

Syntax

window.escape(sValue)

Parameters

sValue is an encoded string.

Example

cookieValuePlain = unescape( cookieValue );

Notes

See also window.escape().

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref123.html (1 de 2) [09/06/2003 10:04:14] window.unescape()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref123.html (2 de 2) [09/06/2003 10:04:14] window.updateCommands()

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.updateCommands()

Brief description.

Syntax

syntax code

Parameters

blah is a blah.

Example

// example code here

Notes

Addtional notes.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_window_ref124.html (1 de 2) [09/06/2003 10:04:15] window.updateCommands()

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref124.html (2 de 2) [09/06/2003 10:04:15] window.window

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

window.window

Returns a reference to this window.

Syntax

windowObj = window.window

Parameters

windowObj is an object reference to the current window.

Example

if ( window.top ) != ( window.window ) {

...

}

Notes

This property is redundant. window is itself an object reference that can be used in all cases where window.window can. If for no other reason, it may exist so that comparisons like the example above are more readable.

Specification

DOM Level 0. Not part of specification.

http://www.mozilla.org/docs/dom/domref/dom_window_ref125.html (1 de 2) [09/06/2003 10:04:17] window.window

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_window_ref125.html (2 de 2) [09/06/2003 10:04:17] The document Interface

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

DOM Document Reference

The document Interface

In the DOM, the document object provides a general way to represent HTML, XHTML1, and XML documents. In addition to the generalized document interface, the APIs listed here include HTMLDocument, which is a more specialized interface for dealing with HTML documents (e.g., cookie, alinkColor). Interfaces that are part of this more specialized HTML document have asterisks next to them in the table below2.

The document is contained by the window object (see DOM window Reference) and may contain any number of elements (see DOM Element Reference.)

As you can see from the lists below, the interfaces on document deal with such things as the document type, features of the document such as its color and formatting, the plugins and applets that are exposed to the user in the document, as well as methods for creating all of the document's child nodes, or elements that typically live in the structural representation of the whole document, such as the element, a

and so forth.

Properties

attributes Returns an array of attributes on the given element.

alinkColor* Returns or sets the color of active links in the document body.

anchors* anchors returns a list of all of the anchors in the document.

applets* applets returns an ordered list of the applets within a document.

bgColor* bgColor gets/sets the background color of the current document.

body* body returns the BODY node of the current document.

characterSet Returns the character set being used by the document.

http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html (1 de 4) [09/06/2003 10:04:20] The document Interface

childNodes Returns an array of child nodes on the given element node.

compatMode* Indicates whether the document is rendered in Quirks or Strict mode.

cookie* Returns a semicolon-separated list of the cookies for that document or sets a single cookie.

contentWindow* Returns the window object for the containing window.

doctype Returns the Document Type Definition (DTD) of the current document.

documentElement Returns the Element that is a direct child of document, which in most cases is the HTML element.

domain* domain returns the domain of the current document.

embeds* embeds returns a list of the embedded OBJECTS within the current document.

fgColor* fgColor gets/sets the foreground color, or text color, of the current document.

firstChild firstChild returns the first node in the list of direct children of the document.

forms* forms returns a list of the FORM elements within the current document.

height* height gets/sets the height of the current document.

images* images returns a list of the images in the current document.

implementation* Returns the DOM implementation associated with the current document.

lastModified* Returns the date on which the document was last modified.

linkColor* Gets/sets the color of hyperlinks in the document.

links* Returns an array of all the hyperlinks in the document.

location* Returns the URI of the current document.

namespaceURI Returns the XML namespace of the current document.

nextSibling Returns the node immediately following the current one in the tree.

nodeName Returns the name of the current node as a string.

nodeType Returns the node type of the current document.

nodeValue Returns the value of particular types of nodes.

ownerDocument Returns an object reference to the document that owns the current element.

parentNode Returns an object reference to the parent node.

plugins* Returns an array of the available plugins.

previousSibling Returns the node immediately previous to the current one in the tree.

referrer* Returns the URI of the page that linked to this page.

styleSheets* The stylesheets property returns a list of the stylesheet objects on the current document.

title* Returns the title of the current document.

URL Returns a string containing the URL of the current document.

vlinkColor* Gets/sets the color of visited hyperlinks.

http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html (2 de 4) [09/06/2003 10:04:20] The document Interface

width* Returns the width of the current document.

Methods

clear Clears a document.

close Closes a document stream for writing.

createAttribute Create a new attribute on the current element.

createDocumentFragment Creates a new document fragment.

createElement Creates a new element.

createTextNode Creates a text node.

getElementById Returns an object reference to the identified element.

getElementsByName Returns a list of elements with the given name.

getElementsByTagName Returns a list of elements with the given tag name.

open Opens a document stream for writing.

write Writes text to a document.

writeln Write a line of text to a document.

Event Handlers

Returns the onBlur event handler code, if any, that exists on the current element. onblur

Returns the onClick event handler code on the current element. onclick

Returns the onDblClick event handler code on the current element. ondblclick

Returns the onFocus event handler code on the current element. onfocus

Returns the onKeyDown event handler code on the current element. onkeydown

Returns the onKeyPress event handler code for the current element. onkeypress

Returns the onKeyUp event handler code for the current element. onkeyup

Returns the onMouseDown event handler code for the current element. onmousedown

http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html (3 de 4) [09/06/2003 10:04:20] The document Interface

Returns the onMouseMove event handler code for the current element. onmousemove

Returns the onMouseOut event handler code for the current element. onmouseout

Returns the onMouseOver event handler code for the current element. onmouseover

Returns the onMouseUp event handler code for the current element. onmouseup

Returns the onResize event handler code for the current element. onresize

1

In Gecko, XHTML documents are supported as XML documents, and do not currently support the HTMLDocument interface listed here.

2

The Document interface that document implements is more general than HTMLDocument, which derives from it. Document is the interface that provides such basic hierarchy- manipulating methods and properties as childNodes, firstChild, nodeType, and others.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified February 20, 2003 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html (4 de 4) [09/06/2003 10:04:20] attributes

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

attributes

Returns an array of attributes on the given element.

Syntax

attributes = elementNode.attributes

Parameters

attributes is a namedNodeMap of attributes on the current element.

Example

// get the first

element in the document

para = document.getElementsByTag("p")[0];

atts = para.attributes;

Notes

The array returned by this property is a namedNodeMap, a list of objects rather than strings. The name and value of the attribute objects are accessible as separate properties, as in the following complete example, which retrieves the name/value pair of the first attribute of the "p1" paragraph in the document:

http://www.mozilla.org/docs/dom/domref/dom_doc_ref2.html (1 de 2) [09/06/2003 10:04:37] attributes

Sample Paragraph

Specification

attribute

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref2.html (2 de 2) [09/06/2003 10:04:37] bgColor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

bgColor

bgColor gets/sets the background color of the current document.

Syntax

color = document.bgColor

document.bgColor = color

Parameters

color is a string representing the color as a word (e.g., "red') or as an octal value, as in HTML (e.g., "#eee")

Example

document.bgColor = "darkblue";

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS) http://www.mozilla.org/docs/dom/domref/dom_doc_ref6.html (1 de 2) [09/06/2003 10:04:48] bgColor

http://www.mozilla.org/docs/dom/domref/dom_doc_ref6.html (2 de 2) [09/06/2003 10:04:48] body

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

body

body returns the BODY node of the current document.

Syntax

bodyObj = document.body

document.body = aNewBodyElement

Parameters

bodyObj is a node representing the BODY or FRAMESET element in the current document.

aNewBodyElement is a BODY or FRAMESET element that will replace the current BODY or FRAMESET element

Example

// in HTML:

alert(document.body.id); // "oldBodyElement"

var aNewBodyElement = document.createElement("body");

aNewBodyElement.id = "newBodyElement";

document.body = aNewBodyElement;

alert(document.body.id); // "newBodyElement"

Notes

body is the element that contains the content for the document. In documents with BODY contents, returns the BODY element, and in frameset documents, this returns the outermost FRAMESET element. http://www.mozilla.org/docs/dom/domref/dom_doc_ref7.html (1 de 2) [09/06/2003 10:04:50] body

Though body is settable, setting a new body on a document will effectively remove all the current children of the existing BODY element.

Specification

body

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref7.html (2 de 2) [09/06/2003 10:04:50] characterSet

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

characterSet

Returns the character set of the current document.

Syntax

charSet = document.characterSet

Parameters

charSet is a string.

Example

value="char"

type="button" onclick="alert(document.characterSet);" />

// returns "ISO-8859-1"

Notes

For a complete list of character sets, see: http://www.iana.org/assignments/character-sets.

Specification

DOM Level "0". Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref8.html (1 de 2) [09/06/2003 10:04:52] characterSet

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref8.html (2 de 2) [09/06/2003 10:04:52] childNodes

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

childNodes

Returns an array of child nodes on the given element node.

Syntax

children = elementNode.childNodes

Parameters

children is a nodeList of children of the document.

Example

// table is an object reference to a table element

kids = table.childNodes;

for (var i = 0; i < kids.length; i++) {

// do something with each kid as kids[i]

}

Notes

The document object itself has only a single child, and that is the HTML element. Note again that the items in the array are objects and not strings. To get data from those objects you must use their properties (e.g. childNode[2].nodeName to get the name, etc.)

Specification

childNodes

http://www.mozilla.org/docs/dom/domref/dom_doc_ref9.html (1 de 2) [09/06/2003 10:04:54] childNodes

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref9.html (2 de 2) [09/06/2003 10:04:54] cookie

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

cookie

Gets/sets a list of the cookies associated with the current document.

Syntax

cookie_list = document.cookie

document.cookie = cookie_list

Parameters

cookie_list is a string containing a semicolon-separated list of cookies

Example

// this function sets two cookies and then

// displays them in an alert

function sgCookie() {

document.cookie = "name=oeschger";

document.cookie = "favorite_food=tripe";

alert(document.cookie);

}

// returns: name=oeschger;favorite_food=tripe

Notes

If there are no cookies associated with a document, this function returns an empty string. Note also that you cannot use this property to set more than one cookie at a time.

http://www.mozilla.org/docs/dom/domref/dom_doc_ref10.html (1 de 2) [09/06/2003 10:04:56] cookie Specification

cookie

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref10.html (2 de 2) [09/06/2003 10:04:56] compatMode

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

compatMode

Indicates whether the document is rendered in or Strict mode.

Syntax

mode = document.compatMode

Parameters

mode is a string containing "BackCompat" for Quirks mode or "CSS1Compat" for Strict mode.

Example

if ( document.compatMode == "BackCompat" ){

// use some quirky stuff

}

Notes

None.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS) http://www.mozilla.org/docs/dom/domref/dom_doc_ref11.html [09/06/2003 10:04:58] contentWindow

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

contentWindow

Returns the containing window of the current document.

Syntax

window = document.contentWindow

Parameters

window is a window object for the window that contains the current document.

Example

// get to the browser

// then load new content

browserWindow = document.contentWindow;

browserWindow.home();

Notes

None.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref12.html (1 de 2) [09/06/2003 10:05:00] contentWindow

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref12.html (2 de 2) [09/06/2003 10:05:00] doctype

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

doctype

Returns the Document Type Definition (DTD) of the current document.

Syntax

docType = document.DocumentType

Parameters

docType is a string representing the DTD, if any, of the current document.

Example

None.

Notes

DocumentType attribute is a read-only property. It returns NULL if there is no DTD for the current document.

Specification

docType

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref13.html [09/06/2003 10:05:02] documentElement

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

documentElement

Returns the Element that is a direct child of document, which in most cases is the HTML element.

Syntax

doc = document.documentElement

Parameters

doc is a node representing the direct child of document.

Example

actual_doc = document.documentElement;

first_tier = actual_doc.childNodes;

// first_tier are the direct children of HTML

for (var i = 0; i < first_tier.length; i++) {

// do something with each kid of HTML

// as first_tier[i]

}

Notes

This property is a read-only convenience for getting the HTML element associated with all valid HTML documents. The example above is quite typical: you actually want the HTML element so you can access all of its children, and so you use this document property to get a hold of it.

http://www.mozilla.org/docs/dom/domref/dom_doc_ref14.html (1 de 2) [09/06/2003 10:05:04] documentElement Note that document itself typically contains a single child node, HTML, which itself contains all of the elements in the actual HTML document as a nodeList of children.

Specification

documentElement

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref14.html (2 de 2) [09/06/2003 10:05:04] domain

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

domain

domain gets/sets the domain of the current document.

Syntax

domain_name = document.domain

document.domain = domain_name

Parameters

domain_name is a string referring to the domain of the current document.

Example

bad_domain = "www.love.com";

if ( document.domain == bad_domain ) {

window.close();

}

// for document www.love.com/good.html,

// this script closes the window

Notes

This property returns NULL if the server of the document cannot be identified. In the DOM spec, this property is listed as being read-only, but Mozilla lets you set it.

Specification

http://www.mozilla.org/docs/dom/domref/dom_doc_ref15.html (1 de 2) [09/06/2003 10:05:06] domain domain

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref15.html (2 de 2) [09/06/2003 10:05:06] embeds

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

embeds

embeds returns a list of the embedded OBJECTS within the current document.

Syntax

embedded_objects = document.embeds

Parameters

embedded_objects is a nodeList of embedded objects.

Example

None.

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref16.html [09/06/2003 10:05:08] fgColor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

fgColor

fgColor gets/sets the foreground color, or text color, of the current document.

Syntax

color = document.fgColor

document.fgColor = color

Parameters

color is a string representing the color as a word (e.g., "red") or as an octal value, as in HTML (e.g., "#eee").

Example

document.fgColor = "white";

document.bgColor = "darkblue";

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref17.html (1 de 2) [09/06/2003 10:05:10] fgColor

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref17.html (2 de 2) [09/06/2003 10:05:10] firstChild

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

firstChild

firstChild returns the first node in the list of direct children of the document.

Syntax

child = document.firstChild

Parameters

child is a node of the type element.

Example

function fChild() {

f = document.firstChild;

alert(f.tagName);

} // returns: HTML

Notes

Note that you may have to recurse into the DOM tree with this property to get the the child nodes you expect, since HTML is almost always given as the first child of the document itself.

Specification

firstChild

http://www.mozilla.org/docs/dom/domref/dom_doc_ref18.html (1 de 2) [09/06/2003 10:05:12] firstChild

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref18.html (2 de 2) [09/06/2003 10:05:12] forms

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

forms

forms returns a list of the FORM elements within the current document.

Syntax

form_list = document.forms

Parameters

form_list is a nodeList of FORM elements.

Example

Notes

None.

Specification

forms

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref19.html (1 de 2) [09/06/2003 10:05:14] forms

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref19.html (2 de 2) [09/06/2003 10:05:14] height

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

height

height gets/sets the height of the current document.

Syntax

height_value = document.height

document.height = height_value

Parameters

height_value is a string representing the height of the document in pixels, inches, or ems. If no type is specified (e.g., "px" in 200px), the value is assumed to be the number of pixels.

Example

// make the window small on load

function onLoad() {

document.height = "200";

document.width = "200";

}

Notes

None.

Specification

http://www.mozilla.org/docs/dom/domref/dom_doc_ref20.html (1 de 2) [09/06/2003 10:05:17] height height

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref20.html (2 de 2) [09/06/2003 10:05:17] images

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

images

images returns a list of the images in the current document.

Syntax

image_list = document.images

Parameters

image_list is a nodeList of all the IMG elements in the document.

Example

ilist = document.images;

for ( var i = 0; i < ilist.length; i++ ) {

if ( ilist[i] == "banner.gif" ) {

// found the banner

}

}

Notes

None.

Specification

images

http://www.mozilla.org/docs/dom/domref/dom_doc_ref21.html (1 de 2) [09/06/2003 10:05:20] images

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref21.html (2 de 2) [09/06/2003 10:05:20] implementation

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

implementation

Returns the DOM implementation associated with the current document.

Syntax

implemetation = document.DOMImplentation

Parameters

implementation is a DOMImplementation object

Example

None.

Notes

If available, the DOMImplementation is a special object that provides services for controlling things outside of a single document. For example, the DOMImplementation interface includes a createDocumentType method with which DTDs can be created for one or more documents managed by the implementation.

Specification

implementation

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref22.html (1 de 2) [09/06/2003 10:05:22] implementation

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref22.html (2 de 2) [09/06/2003 10:05:22] lastModified

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

lastModified

Returns the date on which the current document was last modified.

Syntax

date = document.lastModified

Parameters

date is a string containing the date and time of last modification.

Example

dump(document.lastModified);

// returns: Tuesday, July 10, 2001 10:19:42

Notes

Note that as a string, lastModified cannot easily be used for comparisions between the modified dates of documents.

Specification

link to DOM spec here

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref23.html (1 de 2) [09/06/2003 10:05:26] lastModified

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref23.html (2 de 2) [09/06/2003 10:05:26] linkColor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

linkColor

linkcolor gets/sets the color of links within the document.

Syntax

color = document.linkColor

document.linkColor = color

Parameters

color is a string representing the color as a word (e.g., "red') or as an octal value, as in HTML (e.g., "#eee")

Example

document.linkColor = "blue";

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref24.html (1 de 2) [09/06/2003 10:05:28] linkColor

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref24.html (2 de 2) [09/06/2003 10:05:28] links

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

links

The links property returns a collection of all AREA elements and anchor elements in a document with a value for the href attribute.

Syntax

linkArray = document.links

Parameters

linkArray is an array of the links in the document

Example

var links = document.links;

for(var i = 0; i < links.length; i++) {

var linkHref = document.createTextNode(links[i].href);

var lineBreak = document.createElement("br");

document.body.appendChild(linkHref);

document.body.appendChild(lineBreak);

}

Notes

None.

Specification

http://www.mozilla.org/docs/dom/domref/dom_doc_ref25.html (1 de 2) [09/06/2003 10:05:31] links links

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref25.html (2 de 2) [09/06/2003 10:05:31] location

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

location

Gets the URL of the current document.

Syntax

loc = document.location

Parameters

loc is the URL as a string.

Example

dump(document.location);

// returns a string like

// http://www.peoplemagazine.com/juicybits.html

Notes

document.location works the same as document.URL. Both are read-only properties unlike window.location, which can be set. Since the document object represents a single document or URL, its location cannot be changed.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref26.html (1 de 2) [09/06/2003 10:05:34] location

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref26.html (2 de 2) [09/06/2003 10:05:34] namespaceURI

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

namespaceURI

namespaceURI returns the XML namespace for the current document.

Syntax

NSURI = document.namespaceURI

Parameters

NSURI is a string containing the namespace.

Example

None.

Notes

The DOM does not handle or enforce namespace validation per se. It is up to the DOM application to do any validation necessary. Note too that the namespace prefix, once it is associated with a particular node, cannot be changed.

Specification

namespaceURI

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref27.html (1 de 2) [09/06/2003 10:05:36] namespaceURI

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref27.html (2 de 2) [09/06/2003 10:05:36] nextSibling

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

nextSibling

Returns the node immediately following the current one in the tree.

Syntax

node = elementNode.nextSibling

Parameters

node is a node object.

Example

// in a table, the cells are siblings

cell1 = document.getElementById("td1");

cell2 = cell1.nextSibling;

Notes

Returns NULL if there are no more nodes.

Specification

nextSibling

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref28.html (1 de 2) [09/06/2003 10:05:38] nextSibling

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref28.html (2 de 2) [09/06/2003 10:05:38] nodeName

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

nodeName

Returns the name of the current node as a string.

Syntax

name = nodeElement.nodeName

Parameters

name is a string that contains the name of the node.

Example

div1 = document.getElementById("d1");

text_field = document.getElementById("t");

text_field.setAttribute("value", div1.nodeName);

// textfield reads "div" now

Notes

None.

Specification

nodeName

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_doc_ref29.html (1 de 2) [09/06/2003 10:05:40] nodeName

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref29.html (2 de 2) [09/06/2003 10:05:40] nodeType

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

nodeType

Returns a code representing the type of the underlying node

Syntax

code = document.nodeType

Parameters

code is an unsigned short with one of the following values:

ELEMENT_NODE = 1;

ATTRIBUTE_NODE = 2;

TEXT_NODE = 3;

CDATA_SECTION_NODE = 4;

ENTITY_REFERENCE_NODE = 5;

ENTITY_NODE = 6;

PROCESSING_INSTRUCTION_NODE = 7;

COMMENT_NODE = 8;

DOCUMENT_NODE = 9;

DOCUMENT_TYPE_NODE = 10;

DOCUMENT_FRAGMENT_NODE = 11;

NOTATION_NODE = 12;

Example

http://www.mozilla.org/docs/dom/domref/dom_doc_ref30.html (1 de 2) [09/06/2003 10:05:42] nodeType

if document.nodeType != 9

document.close()

else

document.write("

I'm a doc!

");

Notes

None.

Specification

nodeType

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref30.html (2 de 2) [09/06/2003 10:05:42] nodeValue

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

nodeValue

Returns the value of the current node.

Syntax

value = document.nodeValue

Parameters

value is a string containing the value of the current node.

Example

None.

Notes

For the document itself, the nodeValue is null. For text, comment, and CDATA nodes, nodeValue returns the content of the node. For attribute nodes, the value of the attribute is returned.

Specification

nodeValue

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref31.html (1 de 2) [09/06/2003 10:05:44] nodeValue

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref31.html (2 de 2) [09/06/2003 10:05:44] ownerDocument

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

ownerDocument

ownerDocument returns the document object associated with this node.

Syntax

ownerDoc = document.ownerDocument

Parameters

ownerdoc is a document object.

Example

None.

Notes

This property returns NULL for a document object.

Specification

ownerDocument

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref32.html [09/06/2003 10:05:46] parentNode

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

parentNode

Returns the parent of the current node.

Syntax

node = element.parentNode

Parameters

node is a node object.

Example

As you can see from the following not very interesting example, even simple HTML documents can contain a complex hierarchy of parents and children. In this case, the document object is a parent of the HTML object, which is a parent of the BODY object, which in turn is a parent of the H1 object being examined.

// alerts: 9 for Document object

Notes

Note that this property returns NULL for the document itself, but can be used on the children of the document to refer back to the document or other intermediate parents (see example above).

Specification

parentNode

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref33.html (2 de 2) [09/06/2003 10:05:48] plugins

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

plugins

Returns a list of the plugins currently installed.

Syntax

pluginCollection = document.plugins

Parameters

pluginCollection is an object of the type PluginArray

Example

The following example prints out information about the installed plug-ins for the high-level document. Note that properties available on the plugin object: length (on the array of plug- ins), name, filename, and description.

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref34.html (2 de 2) [09/06/2003 10:05:50] previousSibling

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

previousSibling

Returns the node immediately previous to the current one in the tree.

Syntax

node = elementNode.previousSibling

Parameters

node is a node object.

Example

n1 = n2.previousSibling;

Notes

Returns NULL if there are no more nodes.

Specification

previousSibling

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref35.html [09/06/2003 10:05:52] referrer

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

referrer

Returns the URI of the page that linked to this page.

Syntax

referring_page = document.referrer

Parameters

referring_page is a string containing the URI of the referring page.

Example

None.

Notes

The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

Note that since this property returns only a string it does not give you DOM access to the referring page.

Specification

referrer

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref36.html (1 de 2) [09/06/2003 10:05:54] referrer

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref36.html (2 de 2) [09/06/2003 10:05:54] styleSheets

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

styleSheets

The stylesheets property returns a list of the stylesheet objects on the current document.

Syntax

style_sheets = document.stylesheets

Parameters

style_sheets is a nodeList of stylesheet objects.

Example

None.

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref37.html [09/06/2003 10:05:55] title

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

title

Gets/sets the title of the current document.

Syntax

document.title = t

t = document.title

Parameters

t is a string containing the document title.

Example

This example checks to see if the document has a title that can be set and, if so, changes it to the value of the input parameter:

function setTitle(str){

if(document.title){

document.title=str;

}

You can call a function like this in the HTML with the following elements:

http://www.mozilla.org/docs/dom/domref/dom_doc_ref38.html (1 de 2) [09/06/2003 10:05:57] title

name="t"

value="HTMLTitleElement"

size=30>

value="set the HTMLDocument:title"

onClick="setTitle(form.t.value);">

Where the button takes the value in the text element "t" and passes it to the function.

Notes

None.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref38.html (2 de 2) [09/06/2003 10:05:57] URL

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

URL

Returns the URL of the current document.

Syntax

url = document.URL

Parameters

url is a string representing the URL of the current document.

Example

var currentURL = document.URL;

alert(currentURL);

Notes

URL is a replacement for the DOM Level 0 document.location.href property. However document.URL is not settable, unlike document.location.href.

Specification

URL

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref39.html (1 de 2) [09/06/2003 10:05:59] URL

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref39.html (2 de 2) [09/06/2003 10:05:59] vlinkColor

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

vlinkColor

Returns the color of links that the user has visited in the document.

Syntax

color = document.vlinkColor

document.vlinkColor = color

Parameters

color is a string representing the color as a word (e.g., "red') or as an octal value, as in HTML (e.g., "#eee")

Example

None.

Notes

The default for this property is purple.

Specification

DOM Level 0. Not part of specification.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref40.html (1 de 2) [09/06/2003 10:06:01] vlinkColor

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref40.html (2 de 2) [09/06/2003 10:06:01] width

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

width

Returns the width of the current document in pixels.

Syntax

wdth = document.width

Parameters

wdth is the width in pixels.

Example

function init() {

alert(document.width - 100);

}

Notes

extra information

Specification

width

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_doc_ref41.html (1 de 2) [09/06/2003 10:06:03] width

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_doc_ref41.html (2 de 2) [09/06/2003 10:06:03] clear

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

clear

The clear method clears the current document of all its content.

Syntax

document.clear()

Parameters

None.

Example

returns the string "background- color:lightblue," though there may be other styles on the element from a stylesheet). Also, when you set this property on an element, you override and erase any styles that have set elsewhere.

Instead, the getComputedStyle() method on the document.defaultView object returns all styles that have actually been computerd for an element. See Example 6: getComputedStyle in the examples chapter for more information on how to use this method. DOM Style Object

The style object represents an individual style statement. Unlike the individual rules available from the document.styleSheets array, the style object is accessed from the document or from the elements to which that style is applied. It represents the in-line styles on a particular element.

More important than the two properties surfaced here is the use of the style object in the following sorts of manipulations, where the style object can be used to set individual style properties on an element:

Thunder

http://www.mozilla.org/docs/dom/domref/dom_style_ref.html (2 de 3) [09/06/2003 10:08:24] DOM Style Object

The media and type of the style may or may not be given. Note that you can also change styles on an element by getting a reference to that element and then using the setAttribute() DOM method to specify both the CSS property and its value.

el = document.getElementById("some-element");

el.setAttribute("style", "background-color:darkblue;");

Be aware, however, that when you set the style attribute in this way, you are overwriting whatever style properties may already have been defined in the style attribute. If the document referenced in the snippet above by the id "some-element" has a style attribute in which the font size is set to 18px, for example, that information is erased when the style attribute is manipulated in this crude way.

Properties

media Specifies the intended destination medium for style information.

type Returns the type of style being applied by this statement.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref.html (3 de 3) [09/06/2003 10:08:24] media

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

media

media specifies the intended destination medium for style information.

Syntax

medium = style.media

style.media = medium

Parameters

medium is a string describing a single medium or a comma-separated list.

Example

example here

Notes

The default value for media is "screen."

Specification

DOM Level 2 Styles - STYLE

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref2.html (1 de 2) [09/06/2003 10:08:26] media

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref2.html (2 de 2) [09/06/2003 10:08:26] DOM styleSheet Object

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

type

Returns the type of the current style.

Syntax

type = style.type

Parameters

type is a sting containing the type.

Example

if ( newStyle.type != "text/" ){

// not supported!

warnCSS();

}

Notes

For Gecko, the type is most often given as "text/css."

From the W3C spec on CSS: "The expectation is that binding-specific casting methods can be used to cast down from an instance of the CSSRule interface to the specific derived interface implied by the type."

Specification

link to DOM spec here

http://www.mozilla.org/docs/dom/domref/dom_style_ref3.html (1 de 2) [09/06/2003 10:08:28] DOM styleSheet Object DOM styleSheet Object

The stylesheet object represents the stylesheet itself. A stylesheet contains any number of separate rules, which can be manipulated with the cssRule (see DOM cssRule Object below).

Using the stylesheet object, you can add and delete style rules. You can also travel the hierarchy of stylesheets that can be associated with a particular document using the parentStyleSheet property.

Properties

cssRules Returns all of the CSS rules in the stylesheet as an array.

disabled This property indicates whether the current stylesheet has been applied or not.

href Returns the location of the stylesheet.

media Specifies the intended destination medium for style information.

ownerNode Returns the node that associates this style sheet with the document.

If this style sheet comes from an @import rule, the ownerRule property will contain the ownerRule CSSImportRule.

parentStyleSheet Returns the stylesheet that is including this one, if any.

title Returns the advisory title of the current style sheet.

type Specifies the style sheet language for this style sheet.

Methods

deleteRule Deletes a rule from the stylesheet.

insertRule Inserts a new style rule into the current style sheet.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref3.html (2 de 2) [09/06/2003 10:08:28] cssRules

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

cssRules

Returns all of the CSS rules in the stylesheet as an array.

Syntax

rules = stylesheet.cssRules

Parameters

rules is an array of individual cssRule objects.

Example

// get to the first rule

first_rule = document.styleSheets[0].cssRules[0];

Notes

See DOM cssRule Object.

Specification

cssRule

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref4.html (1 de 2) [09/06/2003 10:08:30] cssRules

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref4.html (2 de 2) [09/06/2003 10:08:30] disabled

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

disabled

This property indicates whether the current stylesheet is applied or not.

Syntax

res = stylesheet.disabled

Parameters

res is a boolean True or False

Example

// if the stylesheet is applied...

if (stylesheet.disabled) {

// apply style in-line

}

Notes

None.

Specification

disabled

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref5.html (1 de 2) [09/06/2003 10:08:32] disabled

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref5.html (2 de 2) [09/06/2003 10:08:32] href

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

href

Returns the location of the stylesheet.

Syntax

href = stylesheet.href

Parameters

href is a string containing the URI of the stylesheet.

Example

// on a local machine:

Thunder

http://www.mozilla.org/docs/dom/domref/dom_style_ref6.html (1 de 2) [09/06/2003 10:08:34] href

// returns "file:////C:/Windows/Desktop/example.css

Notes

If the style sheet is a linked style sheet, the value of its attribute is its location. For inline style sheets, the value of this attribute is NULL.

Specification

href

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref6.html (2 de 2) [09/06/2003 10:08:34] media

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

media

media specifies the intended destination medium for style information.

Syntax

medium = stylesheet.media

stylesheet.media = medium

Parameters

medium is a string describing a single medium or a comma-separated list.

Example

href="document.css"

type="text/css"

media="screen" />

Notes

The default value for media is "screen."

Specification

DOM Level 2 Styles - STYLESHEET http://www.mozilla.org/docs/dom/domref/dom_style_ref7.html (1 de 2) [09/06/2003 10:08:36] media

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref7.html (2 de 2) [09/06/2003 10:08:36] ownerNode

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

ownerNode

ownerNode returns the node that associates this style sheet with the document.

Syntax

node = stylesheet.ownerNode

Parameters

node is an object reference to the element that brings in the stylesheet.

Example

Thunder

// displays "object HTMLLinkElement" http://www.mozilla.org/docs/dom/domref/dom_style_ref8.html (1 de 2) [09/06/2003 10:08:38] ownerNode

Notes

For HTML, ownerNode may be the corresponding LINK or STYLE element. For XML, it may be the linking processing instruction. For style sheets that are included by other style sheets, the value of this attribute is null.

Specification

DOM Level 2 Styles - STYLESHEET

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref8.html (2 de 2) [09/06/2003 10:08:38] ownerRule

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

ownerRule

If this style sheet comes from an @import rule, the ownerRule property will contain the CSSImportRule.

Syntax

rule = stylesheet.ownerRule

Parameters

rule is a string containing the importing rule in the HTML or XML document

Example

// example here

Notes

Note that if the value of the ownerNode property on the current STYLE element is NULL, then then ownerRule returns the rule that blah. And vice versa.

Specification

ownerRule

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref9.html (1 de 2) [09/06/2003 10:08:40] ownerRule

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref9.html (2 de 2) [09/06/2003 10:08:40] parentStyleSheet

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

parentStyleSheet

Returns the stylesheet that is including this one, if any.

Syntax

parent = stylesheet.parentStyleSheet

Parameters

parent is an object reference

Example

// find the top level stylesheet

if (stylesheet.parentStyleSheet) {

sheet = stylesheet.parentStyleSheet;

} else { sheet = stylesheet; }

Notes

This property returns NULL is the current stylesheet is a top-level stylesheet or if stylesheeet inclusion is not supported.

Specification

parentStyleSheet

http://www.mozilla.org/docs/dom/domref/dom_style_ref10.html (1 de 2) [09/06/2003 10:08:42] parentStyleSheet

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref10.html (2 de 2) [09/06/2003 10:08:42] title

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

title

title returns the advisory title of the current style sheet.

Syntax

line of code

Example

// example here

Notes

The title is often specified in the ownerNode.

Specification

title

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref11.html [09/06/2003 10:08:44] type

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

type

type specifies the style sheet language for this style sheet.

Syntax

type = stylesheet.type

Parameters

type is a string.

Example

ss.type = "text/css";

Notes

None.

Specification

type

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref12.html (1 de 2) [09/06/2003 10:08:46] type

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref12.html (2 de 2) [09/06/2003 10:08:46] deleteRule

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

deleteRule

The deleteRule method removes a style rule from the current style sheet object.

Syntax

stylesheet.deleteRule(index)

Parameters

index is a long number representing the position of the rule

Example

myStyles.deleteRule(0);

Notes

None.

Specification

deleteRule

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref13.html (1 de 2) [09/06/2003 10:08:47] deleteRule

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref13.html (2 de 2) [09/06/2003 10:08:47] DOM cssRule Object

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

insertRule

The insertRule method inserts a new style rule into the current style sheet.

Syntax

stylesheet.insertRule(rule, index)

Parameters

rule is a string containing the rule to be inserted (selector and declaration)

index is a number representing the position to be inserted

Example

// push a new rule onto the top of my stylesheet

myStyle.insertRule("#blanc { color: white }", 0);

Notes

For rule sets this contains both the selector and the style declaration. For at-rules, this specifies both the at-identifier and the rule content.

Specification

insertRule

DOM cssRule Object

http://www.mozilla.org/docs/dom/domref/dom_style_ref14.html (1 de 2) [09/06/2003 10:08:49] DOM cssRule Object

The cssRule object represents a single CSS style rule. These rules may be a part of a stylesheet or they may be placed in-line with the individual nodes in the HTML or XML document. Each stylesheet object exposes an array of the cssRules that make it up, and you can also get to the rules on individual elements by using the element.style property.

Properties

cssText cssText returns the actual text of the style rule.

parentStyleSheet parentStyleSheet returns the stylesheet object in which the current rule is defined.

selectorText selectorText gets/sets the textual representation of the selector for the rule set.

style style returns the declaration block for the current style.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref14.html (2 de 2) [09/06/2003 10:08:49] cssText

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

cssText

cssText returns the actual text of the style rule.

Syntax

text = cssRule.cssText

Parameters

text is a string containing the style rule text.

Example

if ( myRule.cssText.indexOf("background-color") != -1 ) {

bgRule = myRule;

}

...

Notes

None.

Specification

DOM Level 2 Style - cssRule

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref15.html (1 de 2) [09/06/2003 10:08:51] cssText

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref15.html (2 de 2) [09/06/2003 10:08:51] parentStyleSheet

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

parentStyleSheet

parentStyleSheet returns the stylesheet object in which the current rule is defined.

Syntax

stylesheet = cssRule.parentStyleSheet

Parameters

stylesheet is a stylesheet object

Example

if ( bgRule.parentStyleSheet != mySheet ) {

// alien style rule!

}

Notes

See DOM styleSheet Object for more information about the stylesheet object interface.

Specification

DOM Level 2 Style - cssRule

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref16.html (1 de 2) [09/06/2003 10:08:53] parentStyleSheet

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref16.html (2 de 2) [09/06/2003 10:08:53] selectorText

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

selectorText

selectorText gets/sets the textual representation of the selector for the rule set.

Syntax

text = cssRule.selectorText

cssRule.selectorText = text

Parameters

text is a string containing the text of the selector.

Example

// for cssrule: body { background-color: darkblue; }

cssrule = document.styleSheets[1] XXX.

selector = cssrule.selectorText;

// selector is now "body"

Notes

The implementation may have stripped out insignificant whitespace while parsing the selector.

Specification

DOM Level 2 Style - cssRule

http://www.mozilla.org/docs/dom/domref/dom_style_ref17.html (1 de 2) [09/06/2003 10:08:55] selectorText

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref17.html (2 de 2) [09/06/2003 10:08:55] DOM CSS Properties List

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

style

style returns the declaration block for the current style.

Syntax

styleObj = cssRule.style

Parameters

styleObj is an object reference to the style declaration

Example

function stilo() {

alert(document.styleSheets[0]. cssRules[0].style.cssText);

}

// displays "background-color: gray;"

Notes

The declaration block is that part of the style rule that appears within the braces and that actually provides the style definitions (for the selector, the part that comes before the braces).

Specification

DOM Level 2 Style - cssRule DOM CSS Properties List

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (1 de 7) [09/06/2003 10:08:58] DOM CSS Properties List

The following is a list of the CSS properties that are supported in the Netscape 6 DOM and accessible by means of the style property on elements.

The following complete document examples shows the typical use of the element.style property to get and set the CSS properties listed here:

Example Cell

Styles can be returned or set with the style property and these attributes but that you cannot set values directly using constructions such as style="background- color: blue" from the DOM, where the value is a string that contains both the attribute and the value you wish to set. By itself, the style property should only be used as a "getter" and not a "setter." In other words, the first of the following two constructions is bad, and the latter is better practice in the DOM:

bad: element.style = "background-color: blue";

good: element.style.backgroundColor = "blue";

Note that the bad example above may actually set the background color of the given element, http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (2 de 7) [09/06/2003 10:08:58] DOM CSS Properties List but this assignment overwrites any style information that already existed on that element, and then cannot be added to or updated without other overwrites. The special style attributes available off of the element's style property allow you to "manage" the style of your elements in a safer and more organized way.

See also: the Element style property.

You can check the syntax for the values of these attributes by consulting the DOM CSS specification.

accelerator font pause

azimuth fontFamily pauseAfter

background fontSize pauseBefore

backgroundAttachment fontSizeAdjust pitch

backgroundColor fontStretch pitchRange

backgroundImage fontStyle playDuring

backgroundPosition fontVariant position

backgroundRepeat fontWeight quotes

border height richness

borderBottom left right

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (3 de 7) [09/06/2003 10:08:58] DOM CSS Properties List

borderBottomColor length size

borderBottomStyle letterSpacing speak

borderBottomWidth lineHeight speakHeader

borderCollapse listStyle speakNumeral

borderColor listStyleImage speakPunctuation

borderLeft listStylePosition speechRate

borderLeftColor listStyleType stress

borderLeftStyle margin tableLayout

borderLeftWidth marginBottom textAlign

borderRight marginLeft textDecoration

borderRightColor marginRight textIndent

borderRightStyle marginTop textShadow

borderRightWidth markerOffset textTransform

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (4 de 7) [09/06/2003 10:08:58] DOM CSS Properties List

borderSpacing marks top

borderStyle maxHeight unicodeBidi

borderTop maxWidth verticalAlign

borderTopColor minHeight visibility

borderTopStyle minWidth voiceFamily

borderTopWidth MozBinding volume

borderWidth MozOpacity whiteSpace

bottom orphans widows

captionSide outline width

clear outlineColor wordSpacing

clip outlineStyle zIndex

color outlineWidth

content overflow

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (5 de 7) [09/06/2003 10:08:58] DOM CSS Properties List

counterIncrement padding

counterReset paddingBottom

cssFloat paddingLeft

cssText paddingRight

cue paddingTop

cueAfter page

cueBefore pageBreakAfter

cursor pageBreakBefore

direction pageBreakInside

display parentRule

elevation

emptyCells

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (6 de 7) [09/06/2003 10:08:58] DOM CSS Properties List

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_style_ref18.html (7 de 7) [09/06/2003 10:08:58] FRAMESET

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

DOM Frame Reference

This document contains reference information for the following DOM objects:

● FRAMESET

● FRAME

● IFRAME FRAMESET

The FRAMESET element is a structure for containing subframes in HTML. It manages FRAME elements but not IFRAMES, which are inserted "in-line" into the document. In HTML, a frameset takes the following basic structure:

The DOM frameset object provides minimal programmatic access to the FRAMESET HTML element. Its interface-the two optional properties cols and rows-are a way to indicate the dimensions of the frame set, how many subframes it manages. Note that the frameset object does not provide interfaces for getting to the subframes it manages.

To get the frames in a document, you must ask the document itself, using the document.getElementById() method and the id of the frame(s) you want, or the document.getElementsByTagName("FRAME"), which returns a NamedNodeList array:

http://www.mozilla.org/docs/dom/domref/dom_frame_ref.html (1 de 2) [09/06/2003 10:09:00] FRAMESET

f1 = document.getElementById("frame1");

alert(f1.src); // print the src of the first frame

frames = document.getElementsByTagName("FRAME");

for (var i = 0; i < frames.length; i++) {

// do something with each frame as frames[i]

}

Properties

cols This property sets or returns the size of the columns of frames in the frameset..

rows This property sets or returns the number of rows of frames in the frameset.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref.html (2 de 2) [09/06/2003 10:09:00] cols

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

cols

This property sets or returns the size of the columns of frames in the frameset.

Syntax

cols = frameSetElement.cols

frameSetElement.cols = cols

Parameters

cols is the size of columns in the frameset as a comma-separated list.

Example

// element in HTML:

fs = document.getElementById("fset");

fs.cols = "200, *"; // two columns of frames, first 200px

Notes

The cols and rows properties are often used together to lay out the dimensions of a frameset in HTML. If these are not specified, then the frameset simply counts the number of frames it manages. The number of values in the cols attribute determines how many frames there are; the "*" specifies that the column take up all of the remaining space.

Specification

DOM Level 2 -- HTMLFrameSetElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref2.html (1 de 2) [09/06/2003 10:09:03] cols

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref2.html (2 de 2) [09/06/2003 10:09:03] FRAME

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

rows

This property sets or returns the number of rows of frames in the frameset.

Syntax

rows = frameSetElement.rows

frameSetElement.rows = rows

Parameters

rows is the number of rows in the frameset.

Example

// element in HTML:

fs = document.getElementById("fset");

fs.rows = 8; // eight rows of frames

Notes

The cols and rows properties are often used together to lay out the dimensions of a frameset in HTML. If these are not specified, then the frameset simply counts the number of frames it manages. For example, if you have a frameset like the one below, then blah blah...

Specification

DOM Level 2 -- HTMLFrameSetElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref3.html (1 de 2) [09/06/2003 10:09:06] FRAME FRAME

The frame object provides methods and properties for manipulating the HTML FRAME element. While many of the properties (e.g., frameBorder, marginWidth) handle the FRAME itself, the contentDocument property allows you to get the actual document contained in the subframe, which can then be futher manipulated.

Properties

contentDocument The contentDocument property returns the document the frame contains, if any.

contentWindow The contentWindow property returns the window object for the frame.

frameBorder gets/sets the border around the current frame. frameBorder

longDesc The longDesc property specifies a url for a longer description of the contents of the current frame.

marginHeight Gets/sets the height of the frame's margin in pixels.

marginWidth Gets/sets the width of the frame's margin in pixels.

name The name of the frame element.

noResize Gets/sets whether the user can resize the current frame.

scrolling The scrolling property specifies whether the current frame should provide scrollbars or not.

src The src property provides a url to load as content into the current frame.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref3.html (2 de 2) [09/06/2003 10:09:06] contentDocument

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

contentDocument

The contentDocument property returns the document the frame contains, if any.

Syntax

document = frameElement.contentDocument

Parameters

document is an object reference to the document contained in the given frame.

Example

f = document.getElementById("frame");

if ( f.contentDocument ) {

src_doc = f.contentDocument;

working_title = src_doc.title;

}

Notes

This property returns NULL if there is no current document

Specification

DOM Level 2 -- HTMLFrameElement

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html (1 de 2) [09/06/2003 10:09:08] contentDocument

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html (2 de 2) [09/06/2003 10:09:08] contentWindow

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

contentWindow

The contentWindow property returns the window object for the frame.

Syntax

frameWindow = frameElement.contentWindow

Parameters

frameWindow is an object reference to the window object for this frame.

Example

f = document.getElementById("frame");

f.contentWindow.location = "http://mozilla.org";

f.contentWindow.history.back();

Notes

You can also get to the window object through a named frame. For example, a frame with the name="myFrame" can refer back to the window object as window.frames["myFrame"].

Specification

DOM Level 2 -- HTMLFrameElement

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_frame_ref5.html (1 de 2) [09/06/2003 10:09:09] contentWindow

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref5.html (2 de 2) [09/06/2003 10:09:09] frameBorder

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

frameBorder

frameBorder gets/sets the border around the current frame.

Syntax

border = frameElement.frameBorder

frameElement.frameBorder = border

Parameters

border gives the border width in number of pixels as string.

Example

// create a border around the current frame

f = document.getElementById("frame-1");

f.frameBorder = 2;

Notes

Note that the data type for the value of the frameBorder is a string. This is because the value may be specified as either a number of pixels (e.g., "2") or a percentage, in which case the percent sign is included. A value of "0" means no border at all.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref6.html (1 de 2) [09/06/2003 10:09:13] frameBorder

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref6.html (2 de 2) [09/06/2003 10:09:13] longDesc

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

longDesc

The longDesc property specifies a url for a longer description of the contents of the current frame.

Syntax

url = frameElement.longDesc

frameElement.longDesc = url

Parameters

The url string provides a url where a longer description of the current frame can be found.

Example

f = document.getElementById("main-frame");

f.longDesc = "http://www.netcape.com/supplements/more.html";

Notes

In the case of FRAME elements, the longDesc property is a way to point to a longer description than the title of the FRAME provides

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref7.html (1 de 2) [09/06/2003 10:09:15] longDesc

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref7.html (2 de 2) [09/06/2003 10:09:15] marginHeight

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

marginHeight

Gets/sets the height of the frame's margin in pixels.

Syntax

sHeight = frameElement.marginHeight

frameElement.marginHeight = sHeight

Parameters

The sHeight string gives the height of the frame's margin in pixels.

Example

f = document.getElementById("frame1");

f.marginHeight = 3;

Notes

None.

Specification

DOM Level 2 -- HTMLFrameElement

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_frame_ref8.html (1 de 2) [09/06/2003 10:09:17] marginHeight

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref8.html (2 de 2) [09/06/2003 10:09:17] marginWidth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

marginWidth

Gets/sets the width of the frame's margin in pixels.

Syntax

sWidth = frameElement.marginWidth

frameElement.marginWidth = sWidth

Parameters

The sWidth string gives the width of the frame's margin in pixels.

Example

f = document.getElementById("frame1");

f.marginWidth = 3;

Notes

None.

Specification

DOM Level 2 -- HTMLFrameElement

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_frame_ref9.html (1 de 2) [09/06/2003 10:09:19] marginWidth

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref9.html (2 de 2) [09/06/2003 10:09:19] name

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

name

The name of the current frame.

Syntax

framename = frameElement.name

Parameters

frameName is a string.

Example

f = document.getElementById("main-frame");

if (f.name != "main") {

//

}

Notes

In the HTML, you can set the FRAME name attribute directly: and then refer to that frame in the DOM with window.frames["f1"].

Specification http://www.mozilla.org/docs/dom/domref/dom_frame_ref10.html (1 de 2) [09/06/2003 10:09:24] name

DOM Level 2 -- HTMLFrameElement

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref10.html (2 de 2) [09/06/2003 10:09:24] noResize

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

noResize

Gets/sets whether the user can resize the current frame.

Syntax

bool = frameElement.noResize

frameElement.noResize = bool

Parameters

bool is a boolean value indicating whether the current frame is resizable or not.

Example

f = document.getElementById("main-frame");

if ( user_level == "barney" ) {

f.noResize = true;

}

Notes

None.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref11.html (1 de 2) [09/06/2003 10:09:29] noResize

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref11.html (2 de 2) [09/06/2003 10:09:29] scrolling

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

scrolling

The scrolling property specifies whether the current frame should provide scrollbars or not.

Syntax

sBars = frameElement.scrolling

frameElement.scrolling = sBars

Parameters

sBars is a string with the value "auto", "no," or "yes."

Example

f = document.getElementById("main-frame");

f.scrolling = yes;

Notes

The default value for this property is "auto," which specifies that scrollbars be added whenever necessary. "yes" means that they are always present, and "no" means that they are never present.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref12.html (1 de 2) [09/06/2003 10:09:32] scrolling

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref12.html (2 de 2) [09/06/2003 10:09:32] IFRAME

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

src

The src property provides a url to load as content into the current frame.

Syntax

frameElement.src = sURL

Parameters

sURL is a string containing a URL.

Example

f = document.getElementById("content-frame");

f.src = "www.netscape.com";

Notes

None.

Specification

DOM Level 2 -- HTMLFrameElement IFRAME

http://www.mozilla.org/docs/dom/domref/dom_frame_ref13.html (1 de 2) [09/06/2003 10:09:37] IFRAME

The IFRAME element is very much like a FRAME. The difference is that an IFRAME can be inserted in-line, hence the name IFRAME. Regular FRAME elements take up as much space as they can (given the dimensions of the FRAMESET, the presence of other frames, and the confines of the document itself). But iframes can be aligned in their containing elements, given a specific height and width, etc.

Properties

align Specifies how the IFRAME is to be aligned in the containing element.

The contentDocument property returns the document the frame contains, if any. contentDocument

The contentWindow property returns the window parent of the iframe. contentWindow

frameBorder frameBorder gets/sets the border around the current IFRAME.

longDesc The longDesc property points to a long description of the current iframe.

marginHeight Gets/sets the height of the frame's margin in pixels.

marginWidth Gets/sets the width of the frame's margin in pixels.

name The name of the IFRAME element.

The scrolling property specifies whether the current frame should provide scrollbars or not. scrolling

src The src property provides a url to load as content into the current frame.

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref13.html (2 de 2) [09/06/2003 10:09:37] contentDocument

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

contentDocument

The contentDocument property returns the document the frame contains, if any.

Syntax

document = iFrameElement.contentDocument

Parameters

document is an object reference to the document contained in the given frame.

Example

i= document.getElementById("my-iframe");

if (i.contentDocument ) {

src_doc = i.contentDocument;

working_title = src_doc.title;

}

Notes

This property returns NULL if there is no current document.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref15.html (1 de 2) [09/06/2003 10:09:42] contentDocument

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref15.html (2 de 2) [09/06/2003 10:09:42] contentWindow

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

contentWindow

The contentWindow property returns the window object for the iframe.

Syntax

iframeWindow = iframeElement.contentWindow

Parameters

iframeWindow is an object reference to the window object for this iframe.

Example

i = document.getElementById("iframe");

i.contentWindow.location = "http://mozilla.org";

i.contentWindow.history.back();

Notes

You can also get to the window object through a named iframe. For example, an iframe with the name="myFrame" can refer back to the window object as window.frames["myFrame"].

Specification

None.

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_frame_ref16.html (1 de 2) [09/06/2003 10:09:45] contentWindow

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref16.html (2 de 2) [09/06/2003 10:09:45] frameBorder

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

frameBorder

frameBorder gets/sets the border around the current IFRAME.

Syntax

sBorder = iFrameElement.frameBorder

iFrameElement.frameBorder = sBorder

Parameters

sBorder gives the border width in number of pixels as string.

Example

// create a border around the current iframe

i= document.getElementById("iframe-1");

i.frameBorder = 2;

Notes

Note that the data type for the value of the frameBorder is a string. This is because the value may be specified as either a number of pixels (e.g., "2") or a percentage, in which case the percent sign is included. A value of "0" means no border at all.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref17.html (1 de 2) [09/06/2003 10:09:48] frameBorder

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref17.html (2 de 2) [09/06/2003 10:09:48] longDesc

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

longDesc

The longDesc property points to a long description of the current iframe.

Syntax

url = IFrameElement.longDesc

Parameters

The url string provides a url where a longer description of the current frame can be found.

Example

f = document.getElementById("main-frame");

f.longDesc = "http://www.netcape.com/suppl/more.html";

Notes

The "long description" is meant to provide more information about the contents of a frame element. In the case of an element, which also uses the longDesc property, it is meant to accompany alt descriptions.

Specification

DOM Level 2 -- HTMLIFrameElement

Netscape Communications http://developer.netscape.com http://www.mozilla.org/docs/dom/domref/dom_frame_ref18.html (1 de 2) [09/06/2003 10:09:50] longDesc

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref18.html (2 de 2) [09/06/2003 10:09:50] marginHeight

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

marginHeight

Gets/sets the height of the frame's margin in pixels.

Syntax

sHeight = iFrameElement.marginHeight

iFrameElement.marginHeight = sHeight

Parameters

The sHeight string gives the height of the frame's margin in pixels.

Example

i= document.getElementById("iframe1");

i.marginHeight = 3;

Notes

Note that the data type for the value of the marginHeight is a string. This is because the value may be specified as either a number of pixels (e.g., "2") or a percentage, in which case the percent sign is included. A value of "0" means no margin at all.

Specification

DOM Level 2 -- HTMLIFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref19.html (1 de 2) [09/06/2003 10:09:53] marginHeight

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref19.html (2 de 2) [09/06/2003 10:09:53] marginWidth

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

marginWidth

Gets/sets the width of the frame's margin in pixels.

Syntax

sWidth = iFrameElement.marginWidth

iFrameElement.marginWidth = sWidth

Parameters

The sWidth string gives the width of the frame's margin in pixels.

Example

i = document.getElementById("iframe1");

i.marginWidth = 3;

Notes

Note that the data type for the value of the marginWidth is a string. This is because the value may be specified as either a number of pixels (e.g., "2") or a percentage, in which case the percent sign is included. A value of "0" means no margin at all.

Specification

DOM Level 2 -- HTMLIFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref20.html (1 de 2) [09/06/2003 10:09:55] marginWidth

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref20.html (2 de 2) [09/06/2003 10:09:55] name

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

name

The name of the current iframe.

Syntax

iframename = iframeElement.name

Parameters

iframeName is a string.

Example

i = document.getElementById("main-frame");

if (i.name != "main") {

//

}

Notes

In the HTML, you can set the IFRAME name attribute directly: and then refer to that frame in the DOM with window.frames["f1"].

Specification

DOM Level 2 -- HTMLIFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref21.html (1 de 2) [09/06/2003 10:09:57] name

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref21.html (2 de 2) [09/06/2003 10:09:57] scrolling

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

scrolling

The scrolling property specifies whether the current frame should provide scrollbars or not.

Syntax

sBars = iFrameElement.scrolling

iFrameElement.scrolling = sBars

Parameters

sBars is a string with the value "auto", "no," or "yes."

Example

i= document.getElementById("iframe");

i.scrolling = yes;

Notes

The default value for this property is "auto," which specifies that scrollbars be added whenever necessary. "yes" means that they are always present, and "no" means that htey are never present.

Specification

DOM Level 2 -- HTMLFrameElement

http://www.mozilla.org/docs/dom/domref/dom_frame_ref22.html (1 de 2) [09/06/2003 10:10:00] scrolling

Netscape Communications http://developer.netscape.com

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref22.html (2 de 2) [09/06/2003 10:10:00] src

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

src

The src property provides a url to load as content into the current frame.

Syntax

iFrameElement.src = sURL

sURL= iFrameElement.src

Parameters

sURL is a string containing a URL.

Example

i = document.getElementById("content-frame");

i.src = "www.netscape.com";

Notes

None.

Specification

DOM Level 2 -- HTMLIFrameElement

Netscape Communications http://developer.netscape.com

http://www.mozilla.org/docs/dom/domref/dom_frame_ref23.html (1 de 2) [09/06/2003 10:10:03] src

Copyright © 1998-2003 The Mozilla Organization Last modified December 11, 2002 Document History Edit this Page (or via CVS)

http://www.mozilla.org/docs/dom/domref/dom_frame_ref23.html (2 de 2) [09/06/2003 10:10:03] HTMLFormElement Interface

Home | Projects | Docs | Jargon Bugzilla | LXR | Tree Status | Checkins Feedback | FAQ | Search

DOM HTML Elements Reference

This chapter provides reference information for several specific HTMLElement interfaces.

● HTMLFormElement Interface

● HTMLTableElement Interface

● [under construction...] HTMLFormElement Interface

As HTML elements, FORM elements expose all of the properties and methods described in the DOM Elements Reference chapter. They also expose the specialized interface described here.

The APIs for manipulating FORM elements described here allow you to create and fully configure FORM elements using the DOM. The following snippet gives you some idea of how you might create a new form element and equip it with some of the attributes that the form submission process requires.

f = document.createElement("form");

body.appendChild(f);

f.action = "\cgi-bin\some.cgi";

f.method = "POST"

...

f.submit(); // submit the newly-created form!

In addition, the following complete HTML document shows how to extract info from an existing form element and how to set some of the read/write properties on that FORM.

http://www.mozilla.org/docs/dom/domref/dom_html_ref.html (1 de 3) [09/06/2003 10:10:06] HTMLFormElement Interface

form tests

form tests

http://www.mozilla.org/docs/dom/domref/dom_html_ref.html (2 de 3) [09/06/2003 10:10:06] HTMLFormElement Interface