Pad: New padRemove hook pad context property

This commit is contained in:
Richard Hansen 2022-04-08 03:06:23 -04:00
parent 8fe779b58c
commit a2460a9848
3 changed files with 11 additions and 2 deletions

View file

@ -594,7 +594,13 @@ Pad.prototype.remove = async function () {
// delete the pad entry and delete pad from padManager
p.push(padManager.removePad(padID));
p.push(hooks.aCallAll('padRemove', {padID}));
p.push(hooks.aCallAll('padRemove', {
get padID() {
warnDeprecated('padRemove padID context property is deprecated; use pad.id instead');
return this.pad.id;
},
pad: this,
}));
await Promise.all(p);
};