• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox
  1. MDN
  2. Mozilla
  3. Firefox
  4. Firefox developer release notes
  5. Firefox 3 for developers
  6. Site compatibility for Firefox 3

Site compatibility for Firefox 3

In This Article
  1. Events
    1. Capturing load event listeners
    2. preventBubble has been removed
    3. A few other old event APIs are no longer supported
  2. DOM
    1. WRONG_DOCUMENT_ERR
  3. Ranges
    1. intersectsNode has been removed
    2. compareNode has been removed
  4. HTML
    1. Many bugs in the <object> have been fixed

This page tries to give an overview of the changes between Gecko 1.8 and Gecko 1.9, that could possibly affect websites in their behavior or rendering.

See also Firefox 3 for developers.

Events

Capturing load event listeners

In Gecko 1.8, it was not possible to set capturing load event listeners on images. In Gecko 1.9, this has been fixed by bug 234455. But this can cause problems on websites that incorrectly have their event listeners set to capture the load event. See the discussion in bug 335251. To fix this problem, the problematic page in question should not set a capturing load event listener.

For example, this:

window.addEventListener('load', yourFunction, true);

should be changed into this:

window.addEventListener('load', yourFunction, false);

For an explanation of how event capture works, see DOM Level 2 Event capture

preventBubble has been removed

In Gecko 1.8, the preventBubble method existed on events to prevent events from bubbling upwards. In Gecko 1.9 this method has been removed. Instead, you should use the standard stopPropagation(), which also works fine in Gecko 1.8. The patch in bug 330494 made this happen. See also bug 105280.

A few other old event APIs are no longer supported

window.captureEvents, window.releaseEvents and window.routeEvent are now considered deprecated since Gecko 1.9.

DOM

WRONG_DOCUMENT_ERR

Nodes from external documents should be cloned using document.importNode() (or adopted using document.adoptNode()) before they can be inserted into the current document. For more on the Node.ownerDocument issues, see the W3C DOM FAQ.

Firefox doesn't currently enforce this rule (it did for a while during the development of Firefox 3, but too many sites break when this rule is enforced). We encourage Web developers to fix their code to follow this rule for improved future compatibility.

Ranges

intersectsNode has been removed

In Gecko 1.8 the function intersectsNode code be used to test if a node intersected a range. However the return values from this function were confusing and rarely useful and has therefore been removed in Gecko 1.9. Instead use the more precise and standard function compareBoundaryPoints. The patch in bug 358073 removed this function.

See the documentation for intersectsNode for how to use compareBoundaryPoints instead.

compareNode has been removed

In Gecko 1.8 the function compareNode code be used to test how a node intersected a range. However the return values from this function were confusing and rarely useful and has therefore been removed in Gecko 1.9. Instead use the more precise and standard function compareBoundaryPoints. The patch in bug 358073 removed this function.

See the documentation for compareNode for how to use compareBoundaryPoints instead.

HTML

Many bugs in the <object> have been fixed

object and embed elements no longer need a type attribute to render. Changing the src attribute (of <embed>) or the data attribute (of <object>) via JavaScript now works correctly. The Content-Type header sent by the server (if any) now takes precedence over the type attribute of an <object> element as per the HTML specification (this is not the case for embed).

 

Document Tags and Contributors

Tags: 
  • Compatibility
  • Gecko
  • Web Development
 Contributors to this page: teoli, kohei.yoshino, Sheppy, Leandro Mercês Xavier, Taken, Ptak82, UggSnz, Nickolay, Hwasung, cbiesinger, BenoitL, sicking, Mgjbot, Callek, Victory, Mw22
 Last updated by: teoli, Mar 20, 2014, 4:50:04 AM
  1. Add-ons
    1. Firefox developer release notes
    2. Add-ons
    3. Add-on guidelines
    4. Add-on Manager
    5. Extensions
    6. OpenSearch plug-ins
    7. Plugins
    8. Themes
  2. Firefox internals
    1. Firefox developer release notes
    2. Mozilla project
    3. Gecko
    4. JavaScript code modules
    5. JS-ctypes
    6. MathML project
    7. MFBT
    8. Mozilla projects
    9. Preference system
    10. WebIDL bindings
    11. XPCOM
    12. XUL
  3. Building and contributing
    1. Build instructions
    2. Configuring build options
    3. How the build system works
    4. Mozilla source code
    5. Localization
    6. Mercurial
    7. Quality assurance
    8. Using Mozilla code in other projects