Loads a XUL overlay and merges it with the current document, notifying an observer when the merge is complete.
- A string containing the absolute URL of the overlay to load.
- An object implementing
nsIObserverthat will be notified with a message of topic "xul-overlay-merged" when the merge is complete, or
nullif no observer is needed. The
nsIURIand will contain the URI of the merged overlay.
This API is not frozen and may change later.
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. There's a comment in
nsXULDocument::LoadOverlay to that effect.
scriptelements that import their code from anything other than
chrome:URLs will fail to import the scripts; this is a fix for a security issue.
- XUL-specific method. Not part of any specification. Defined in nsIDOMXULDocument.idl.