Note that there are some explanatory texts on larger screens.

plurals
  1. POPorting Chrome Extension with multiple app pages to Firefox
    primarykey
    data
    text
    <h1>Chrome</h1> <p>I have a Chrome Extension that behaves like a web app (apart from using chrome.* APIs and Cross-Origin Requests) with multiple html pages which all use the <em>background.html</em> to communicate with a NPAPI plugin.</p> <p>The extension's structure (from the extension's root) is as follows:</p> <ul> <li>background.html</li> <li>plugin/ (NPAPI plugin bundles)</li> <li>frontend/ <ul> <li>main.html</li> <li>foo.html</li> <li>bar.html</li> <li>..</li> </ul></li> </ul> <p>The background.html is loaded upon extension install and loads the NPAPI plugin, running indefinitely (until browser closes or extension is deactivated/removed).</p> <p>Upon clicking the extension's toolbar button, <strong>main.html</strong> is opened, which provides a UI nav to access the other pages foo.html and bar.html. </p> <p>Any of these pages uses <code>chrome.extension.getBackgroundPage()</code> to call methods of the NPAPI plugin and receive responses synchronously.</p> <hr> <h1>Firefox</h1> <p>Concerining the background NPAPI plugin, this was already answered in a <a href="https://stackoverflow.com/questions/11573825/embedding-npapi-plugin-in-background-using-just-firefox-addon-sdk">previous question of mine</a>.</p> <p>From the options available in the current addon sdk, Firefox restricts message passing to JSON serializable values, thus I can no longer call the NPAPI plugin method directly (solved by passing the return value of the plugin along).</p> <p>The question remaining concerns the frontend app pages, which are local and should be trusted scripts. I have experimented loading them as <em>Panels</em>, but Panels don't seem suitable for a complete UI page, but rather for small snippets of information.</p> <p><strong>Is there a way to load these pages without injecting a page-mod contentscript in every page programatically?</strong> (which also requires injecting a new script upon page navigation).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload