Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Bug 644595 - Implement very minimal support of add-on page API. #338

Merged
merged 8 commits into from Feb 12, 2012

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Feb 7, 2012

This will be a first draft implementation that we will be able to refine in later cycles. This change implements module addon-page. When it's loaded require('self').data.url('index.html') tabs will have no chrome. In a future it should be unnecessary to do require('addon-page'), also this won't be limited to one page only.

@ghost ghost assigned ochameau Feb 7, 2012
const { WindowTracker, isBrowser } = require('api-utils/window-utils');
const { add, remove } = require('api-utils/array');
const { getTabs, closeTab } = require('api-utils/tabs/utils');
const { when: unload } = require('api-utils/unload');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unload and remove aren't used. It may be related, wouldn't you aiming to clean inContentWhileList on addon unload?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I though I had to cleanup my tabs at unload, but it looks like WindowTracker will call onUntrack for each window on add-on unload. Which is counterintuitive to me, but yeah it's fine for now. I'll remove these dependencies.

@ochameau
Copy link
Contributor

r+ Works fine!
I really like seing this landing with iterations. It would be really cool to include exports.url or anything that would allow to start using this feature.

Gozala added a commit that referenced this pull request Feb 12, 2012
Bug 644595 - Implement very minimal support of add-on page API. r=@ochameau
@Gozala Gozala merged commit 8d34075 into mozilla:master Feb 12, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants