This section list new and revised properties for:
Core property. When the LANGUAGE attribute of the SCRIPT tag is "JavaScript1.2", this property indicates the number of arguments expected by a function.
functionName.arity
functionName is the name of a function.
Function object
arity is external to the function, and indicates how many arguments the function expects. The length property is internal to the function and indicates how many arguments were passed to the function. For more information on the length property, see the "JavaScript Guide."
The following example demonstrates the use of arity and length.
<SCRIPT LANGUAGE = "JavaScript1.2">
function addNumbers(x,y){ document.write("length = " + arguments.length + "<BR>") z = x + y } document.write("arity = " + addNumbers.arity + "<BR>") addNumbers(3,4,5)
</SCRIPT>
This writes:
arity = 2
length = 3
Client-side property. Indicates the translation of the Navigator being used.
navigator.language
navigator object
The language property has been added for use with the JAR Manager. For more information, see the "JAR Installation Manager Developer's Guide."
The value for language is usually a two-letter code, such as "en" and occasionally a five-character code to indicate a language sub-type, such as "zh_CN".
Webpage authors would use this property when they need to determine the language of the Navigator client software being used. For example the scripter could display translated text for the user.
language is a read-only property.
Client-side property. Indicates the machine type for which the Navigator was compiled.
navigator.platform
navigator object
The platform property has been added for use with the JAR Manager. For more information, see the "JAR Installation Manager Developer's Guide."
The machine type the Navigator was compiled for may differ from the actual machine type due to version differences, emulators, or other reasons.
Webpage authors would use this property to ensure that their triggers download the appropriate JAR files. The triggering page checks the Navigator version before checking the platform property.
JAR-install writers would use this property to double-check that their package is being installed on an appropriate machine, or for small JAR's to decide which of several machine-specific files to install.
Platform values are Win32, Win16, Mac68k, MacPPC and various Unix.
platform is a read-only property.
Client-side property. Specifies the vertical dimension, in pixels, of the window's content area.
[windowReference.]innerWidth
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
To create a window smaller than 100 x 100 pixels, set this property in a signed script.
Client-side property. Specifies the horizontal dimension, in pixels, of the window's content area.
[windowReference.]innerWidth
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
To create a window smaller than 100 x 100 pixels, set this property in a signed script.
Client-side object and a property of the window object. Represents the Navigator window's location bar.
[windowReference.]locationbar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The locationbar object has one property, visible, that allows you to hide or show the location bar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the location bar of myWindow.
myWindow.locationbar.visible=false
Client-side object and a property of the window object. Represents the Navigator window's menu bar.
[windowReference.]menubar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The menubar object has one property, visible, that allows you to hide or show the menu bar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the menu bar of myWindow.
myWindow.menubar.visible=false
Client-side property. Specifies the vertical dimension, in pixels, of the window's outside boundary.
[windowReference.]innerWidth
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
To create a window smaller than 100 x 100 pixels, set this property in a signed script.
Client-side property. Specifies the horizontal dimension, in pixels, of the window's outside boundary.
[windowReference.]innerWidth
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
To create a window smaller than 100 x 100 pixels, set this property in a signed script.
Client-side property. Provides the current x-position, in pixels, of a window's viewed page.
windowReference.pageXOffset
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The pageXOffset property provides the current x-position of a page as it relates to the upper-left corner of the window's content area. This property is useful when you need to find the current location of the scrolled page before using scrollTo or scrollBy.
This is a read-only property.
The following example returns the x-position of the viewed page.
x = myWindow.pageXOffset
Client-side property. Provides the current y-position, in pixels, of a window's viewed page.
windowReference.pageYOffset
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The pageYOffset property provides the current y-position of a page as it relates to the upper-left corner of the window's content area. This property is useful when you need to find the current location of the scrolled page before using scrollTo or scrollBy.
This is a read-only property.
The following example returns the y-position of the viewed page.
x = myWindow.pageYOffset
Client-side object and a property of the window object. Represents the Navigator window's personal bar (also called the directories bar).
[windowReference.]personalbar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The personalbar object has one property, visible, that allows you to hide or show the personal bar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the personal bar of myWindow.
myWindow.personalbar.visible=false
Client-side object and a property of the window object. Represents the Navigator window's scroll bars.
[windowReference.]scrollbar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The scrollbars object has one property, visible, that allows you to hide or show the scroll bar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the scroll bar of myWindow.
myWindow.scrollbars.visible=false
Client-side object and a property of the window object. Represents the Navigator window's status bar.
[windowReference.]statusbar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The statusbar object has one property, visible, that allows you to hide or show the status bar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the status bar of myWindow.
myWindow.statusbar.visible=false
Client-side object and a property of the window object. Represents the Navigator window's tool bar.
[windowReference.]toolbar.visible
windowReference is either the name of a window object or one of the synonyms top or parent.
window object
The toolbar object has one property, visible, that allows you to hide or show the toolbar of the specified window.
This property must be set in a signed script.
visible = [true, false] | [1, 0]
The following example hides the tool bar of myWindow.
myWindow.toolbar.visible=false