Doctor Unclear's
window properties, methods, events page for

Opera 6pera 6

Coordinated lines

Browser window and screen data

Entire screen's height (screen.height)

Entire screen's width (screen.width)

Screen's available height without Windows' taskbar (screen.availHeight)

Screen's available width (screen.availWidth)

Available browser's window height including (if present) horizontal scroll bar (window.innerHeight)

Available browser's window width including (if present) vertical scroll bar (window.innerWidth)

Entire browser's window height; in O6, in MDI, the "Entire browser's window height" includes the title bar and the address bar (window.outerHeight)

Entire browser's window width (window.outerWidth)

document.body.offsetHeight

document.body.offsetWidth

window.screenX

window.screenY

Mouse events coordinates

X mouse coordinate within the browser's rendering area (clientX)

Y mouse coordinate within the browser's rendering area (clientY)

X coordinate of the mouse within the element's target (offsetX)

Current target's tagname For testing offset values: this green lime box is a 220px wide and 70px high <TD> which has a 0px border and a 0px padding.

Y coordinate of the mouse within the element's target (offsetY)

X mouse coordinate inside the user's screen (screenX)

Y mouse coordinate inside the user's screen (screenY)

X mouse coordinate relative to the document (pageX)

Y mouse coordinate relative to the document (pageY)

Pixel distance between the left edge of the document and the leftmost portion visible in the content area (window.pageXOffset)

Pixel distance between the top edge of the document and the topmost portion visible in the content area (window.pageYOffset)

Bugs in Opera 6.0

  1. In O6, screen.height = screen.availHeight. The screen.availHeight property means something different in both IE4+ and NS4+. The height of semi-permanent GUI component such as Windows' task bar should be computed in the value of screen.availHeight.
  2. In O6, window.innerHeight/Width does not include scrolling bars. When you do a document.documentElement.offsetHeight/Width within IE6 (in CSS1Compat mode) or NS6.x, the calculation will include the scrolls bars because scrollbars are parts of the rendering area and not part of the chrome. O6 differs here from the IE and NS.
  3. event.clientX/Y in O6 is not defined as relative to the client/rendering area. ClientX/Y in NS6.x and IE4+ comply with W3C specifications. W3C defines clientX/Y as "the horizontal/vertical coordinates at which the event occurred relative to the DOM implementation's client area." http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent
  4. When you zoom the page, the window.innerHeight/Width values (and with it, all the event properties relative values!) change. The window.outerHeight/Width remains the same; so, this is a wrong effect of the zoom feature.

Incompatibilities or non-supported features in Opera 6.0

  1. http://www.opera.com/docs/specs/#javascript says: "(...) the event variable passed to event handlers does not match the javascript standard". O6 does not support the offsetX and offsetY properties. Nevertheless, these property values can be computed dynamically during a mousemove event or during any other mouse event.
  2. PageX/Y does not refer to the same measure as pageX/Y in NS4+.
  3. In O6, window.onresize and window.onscroll are not supported. Onresize is supported in IE4+ and NS4+. Onscroll is supported in IE4+ and in Mozilla 1.1. W3C says: "The resize event occurs when a document view is resized. (...) The scroll event occurs when a document view is scrolled." http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents
  4. In O6 in MDI mode, window.screenX/Y refer to the X and Y coordinates of the rendering area relative to the top-left coordinate of the display area of the browser's window in MDI mode. In NS6.x, window.screenX/Y refer to the X and Y coordinates of the outer boundary of the browser window relative to the top-left coordinates of the video monitor; these values are more useful for scripting and easier to script. E.g. when you use the window.moveTo(x,y) or window.moveBy(x,y), the x and y parameters do not refer to the x and y coordinates of the content area but to the top-left corner of the entire browser window.

    Show the differences between screenX/Y and screenLeft/Top
    (will open a popup window)

References used:

Window object properties and manipulations via methods
grid for MSIE 4 and 5 (for Windows and MacIntosh), Netscape 4 and 6
http://www.quirksmode.org/viewport/compatibility.html

Grand Unified Table: Events and Supported Properties of the Event Object
for Netscape 4 and MSIE 4 and 5
http://www.wdvl.com/Authoring/JavaScript/Events/table4.html

© Gérard Talbot