Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5844847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:21:03+00:00 2026-05-22T12:21:03+00:00

In a Firefox extension using jetpack , I have a panel with a contentScript

  • 0

In a Firefox extension using jetpack, I have a panel with a contentScript attached. The panel is set to initially display an URL. If the panel changes its location (through a click on a link or a document.location=), I can’t emit messages to the contentScript anymore (it raises an ERR_DESTROYED, “The page has been destroyed and can no longer be used.”).

Is there a way to keep my contentScript working (or at least reload it) when the location changes? Or should I avoid changing location totally an only manipulate the original panel content?

Here’s a minimal script showing the behavior:

exports.main = function (options, callbacks) {
  panel = require("panel").Panel({
    contentURL: "http://stackoverflow.com/",
    contentScript: 'self.port.on("foo", function() { console.log("foo received"); });'
  });

  widget = require("widget").Widget({
    id: "test-panel",
    label: "test panel",
    contentURL: "http://stackoverflow.com/favicon.ico",
    panel: panel
  });

  panel.on("show", function() {
    panel.port.emit("foo");
  });
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:21:04+00:00Added an answer on May 22, 2026 at 12:21 pm

    Got an answer from Myk Melez on the Jetpack google group:

    For now, you should avoid changing the
    panel’s location and only manipulate
    the original panel content, since
    there isn’t a way to keep the content
    scripts working. But we should
    probably make the panel’s content
    scripts get reloaded when its location
    changes.

    Or, as lcamacho said, I can use an iframe inside the panel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a Firefox extension that catches when a particular URL is entered
I have made a firefox extension which loads a web page using xmlhttprequest .
I recorded a script using the Selenium IDE extension for Firefox, and I would
I am creating a Firefox Extension...what would be the javascript to open a URL
I want to create a Firefox extension using c++ XPCOM component which in turn
I was wondering if it's possible to write Firefox extension using .Net Framework? Had
I want to create torrent files with a Firefox extension written using javascript. Torrent
I'm using SVN to manage my Firefox extension project, and this project contains an
I've been using the free Firefox extension XSS Me from Security Compass to test
Using Firefox, working on a Firefox extension, I continually get a javascript warning: reference

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.