Git Product home page Git Product logo

jetpack-oop's Introduction

Jetpack OOP

Experimental use of Out-Of-Process capabilities in firefox 4 to provide multi-process capabilities in addon-sdk.

It use same platform capabilities than Fennec: <xul:browser remote="true" />

That is already working in Firefox4 by creating a remote browser component in the shared process plugin-container that contains all tabs content, plugins and now our new "remote browsers" too.

Then it use q-comm library to interact asynchronously between these two processes.

Example of use

--- test.js : a module that is going to be loaded in the remote process exports.test = function () { return "test"; }

--- Code snippet that instanciate a remote process and load the previous test module into it: IPC.newProcess(function (process) {

  // Load test module in it
  let testModule = process.require("test");

  // Call test function on this module
  let result = Q.post(testModule, "test");

  // Check that the result of this function is valid
  Q.when(result, function (v) {
    test.assertEqual(v, "test");
  
    test.done();
  });

});

Interesting files

  • Low level IPC test demonstrate how to use firefox platform capabilities to instanciate a remote process: test-low-level-ipc.js

jetpack-oop's People

Contributors

ochameau avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.