Visit Mozilla.org

DOM:document.loadOverlay

From MDC

(Redirected from document.loadOverlay)

This article covers features introduced in Firefox 1.5


« Gecko DOM Reference

Contents

[edit] Summary

Loads a XUL overlay and merges it with the current document, notifying an observer when the merge is complete.

[edit] Usage

document.loadOverlay(url, observer);
url 
A string containing the absolute URL of the overlay to load.
observer 
An object implementing nsIObserver that will be notified with a message of topic "xul-overlay-merged" when the merge is complete, or null if no observer is needed. The subject parameter of observe will implement nsIURI and will contain the URI of the merged overlay.

[edit] Notes

This API is not frozen and may change later.

Subsequent document.loadOverlay calls do not work bug 330458. You have to rely on observers to queue subsequent overlay loads.

Loading an overlay with the same URI twice is not currently supported, although it may work sometimes.

[edit] Specification

XUL-specific method. Not part of any specification. Defined in nsIDOMXULDocument.idl.