Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.85 KB

HACKING.md

File metadata and controls

55 lines (38 loc) · 1.85 KB

HACKING

Workflow

  1. Run Firefox.html (see README.md for instructions)
  2. Change code
  3. No need to restart, use the Super Reload shortcut: Ctrl/Cmd-shift-R
  4. To run the devtools, press F12

No build process

Code architecture

Entry point is app.js.

JS files are loaded with require.js.

The core of the browser is tabiframedeck.js. It defines a TabIframeDeck object that handles an array of iframes. Iframes are embedded into a wrapper: <tab-iframe> (see tabiframe.js). Events are emitted when iframes are added/removed from the deck, or when an iframe is selected. TabIframeDeck includes methods to manipulate the deck (add, remove and select iframes).

Some self-contained modules listen and control to TabIframeDeck. Like tabstrip.js and navbar.js.

Modularity

We want to keep TabIframeDeck self-contained. If the only imported module is tabiframedeck.js, Firefox.html should still work with no JS exception. For example, the navbar.js modules knows nothing about the tabstrip.js module, and tabiframedeck knows nothing about tabstrip.js and navbar.js.

Tests

To run tests manually you need to install our dependencies once after cloning the repository:

npm install

After installing the dependencies you can trigger the tests with the following command:

npm test

Use