This is an archived page. It's not actively maintained.



Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.

Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use WebExtensions instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.

Starting from Firefox 53, no new legacy add-ons will be accepted on (AMO) for desktop Firefox and Firefox for Android.

Starting from Firefox 57, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android.

Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the "Compatibility Milestones" document for more information.

A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.



Enables an SDK module loaded into a child process to access web content in the child process and communicate with modules in the main process.


The sdk/remote/parent module enables SDK code to load modules into child processes. The sdk/remote/child module is for these "child process modules". It provides two main things:

  • access to web content loaded into this child process
  • port mechanisms to communicate with the main process

Interacting with web content

To interact with web content, the sdk/remote/child module provides a frames property that's a list of all content frames loaded into this child process.

Each frame then has a content property that's the top-level DOM window for the frame, and addEventListener/removeEventListener functions that enable you to listen to DOM events dispatched by the frame.

Communicating with the parent process

To communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive messages from, and send messages to, code in the parent.

See the documentation for sdk/remote/parent for more details.




A Process object.


A Frames object.


A link to the main process.



An event emitter that sends and receives events from the main process.


A boolean property indicating whether this process is remote from the main process or not.


A list of the content frames in this process. Each element in this list is a Frame. Listen to attach and detach events to hear as frames are created and destroyed.



Calls the callback for every existing frame and any new frames created in the future. This is a shortcut for enumerating existing frames and then listening for attach events.


Finds the frame for a top level DOM window.


Adds an event listener for DOM events dispatched to any existing and future frames.


Removes an event listener that was previously registered.



An event emitter that sends and receives events from every frame in this process.



Triggered when a new content frame is opened (for example, the user opened a new tab).

The event listener gets a Frame object as an argument.

At this point you can't access frame's content yet, but you can add event listeners:

const { frames } = require("sdk/remote/child");

frames.on("attach", function(frame) {
  console.log("new frame");
  frame.addEventListener("DOMContentLoaded", function(e) {


Triggered when a frame is removed (for example, the user closed a tab).


A Frame represents a content frame in this process and provides a way to communicate frame specific events to the main process.


addEventListener(event, listener, isCapturing)

Adds an event listener for DOM events dispatched by this content frame. This can include load and unload events from any content that is loaded in the frame. Listeners are automatically removed when this frame is destroyed.

removeEventListener(event, listener, isCapturing)

Removes an event listener that was previously registered.



An event emitter that can be used to send and receive frame specific events to and from code in the main process.


The top level DOM window currently displaying in this frame.


A boolean property indicating whether this frame displays in one of the application's main browser tabs.



Event emitted when this frame disconnects from the application.