Closed Bug 844486 Opened 11 years ago Closed 7 years ago

'select', 'ready', and 'close' events don't work on a tab if require('tabs') is not used in Fennec

Categories

(Add-on SDK Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: evold, Unassigned)

References

Details

If one gets a hold of a Tab instance without using require('tabs'), I think the only way is via a content script instance like so:

PageMod({
  ..
  onAttach: function(mod) {
    let tab = mod.tab;
    tab.on('select', onTabSelect);
  }
})

then onTabSelect won't fire unless require('tabs') was used in the add-on someplace.

I noticed this while working on a patch for bug 784224, which fixes the 'close' and 'ready' events in order to get the page-mod tests to work on Fennec.

This bug should add explicit tests in the test-tab files and fix the select event.
OS: All → Android
Blocks: sdk/tabs
Summary: 'select', 'ready', and 'close' events don't work on a tab if require('tabs') is in used in Fennec → 'select', 'ready', and 'close' events don't work on a tab if require('tabs') is not used in Fennec
Target Milestone: --- → 1.15
QA Contact: jsantell
The event that's fired is the `selected` event, and also looks like `windows/tabs-fennec` is just not even included anywhere. Looking into it
Priority: P1 → --
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.