From 58258cbc6509d6106b1ac44724e557d7c80eb29f Mon Sep 17 00:00:00 2001 From: Robin Riclet Date: Tue, 4 Apr 2017 14:33:57 +0200 Subject: [PATCH] Fixed force when calling tab.close() --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 2ffb243..e9743b2 100644 --- a/index.js +++ b/index.js @@ -268,7 +268,7 @@ const TabPrivate = { let button = container.appendChild(document.createElement("button")); button.classList.add(`${tabClass}-button-close`); button.innerHTML = this.tabGroup.options.closeButtonText; - button.addEventListener("click", this.close.bind(this), false); + button.addEventListener("click", this.close.bind(this, false), false); } }, @@ -294,13 +294,13 @@ const TabPrivate = { initWebview: function () { this.webview = document.createElement("webview"); - + const tabWebviewDidFinishLoadHandler = function (e) { this.emit("webview-ready", this); }; this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false); - + this.webview.classList.add(this.tabGroup.options.viewClass); if (this.webviewAttributes) { let attrs = this.webviewAttributes; @@ -308,9 +308,9 @@ const TabPrivate = { this.webview.setAttribute(key, attrs[key]); } } - + this.tabGroup.viewContainer.appendChild(this.webview); } }; -module.exports = TabGroup; \ No newline at end of file +module.exports = TabGroup;