mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
commit
be552d4266
|
@ -148,6 +148,7 @@ The following events are available:
|
||||||
* `tab.on("flash", (tab) => { ... });`
|
* `tab.on("flash", (tab) => { ... });`
|
||||||
* `tab.on("unflash", (tab) => { ... });`
|
* `tab.on("unflash", (tab) => { ... });`
|
||||||
* `tab.on("close", (tab) => { ... });`
|
* `tab.on("close", (tab) => { ... });`
|
||||||
|
* `tab.on("closing", (tab) => { ... });`
|
||||||
|
|
||||||
## Drag and drop support
|
## Drag and drop support
|
||||||
|
|
||||||
|
|
1
index.js
1
index.js
|
@ -225,6 +225,7 @@ class Tab extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
close (force) {
|
close (force) {
|
||||||
|
this.emit("closing", this);
|
||||||
if (this.isClosed || (!this.closable && !force)) return;
|
if (this.isClosed || (!this.closable && !force)) return;
|
||||||
this.isClosed = true;
|
this.isClosed = true;
|
||||||
let tabGroup = this.tabGroup;
|
let tabGroup = this.tabGroup;
|
||||||
|
|
Loading…
Reference in a new issue