tabs "close" event returns undefined tab.window

RESOLVED INCOMPLETE

Status

Add-on SDK
General
RESOLVED INCOMPLETE
2 years ago
2 months ago

People

(Reporter: Kestrel, Unassigned)

Tracking

({addon-compat, regression})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
var { viewFor } = require("sdk/view/core");
var { modelFor } = require("sdk/model/core");

tabs.on("close", function(tab) {
  console.log(tab.window); // undefined
  console.log(modelFor(viewFor(tab).ownerGlobal)); // workaround to get window
  console.log(modelFor(require("sdk/tabs/utils").getOwnerWindow(viewFor(tab)))); // another workaround
});
(Reporter)

Comment 1

2 years ago
Regression due to Bug 1160676.
Blocks: 1160676
Keywords: addon-compat, regression
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.