From 58258cbc6509d6106b1ac44724e557d7c80eb29f Mon Sep 17 00:00:00 2001 From: Robin Riclet Date: Tue, 4 Apr 2017 14:33:57 +0200 Subject: [PATCH 1/2] 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; From 12ccdb8cc2399271dbd1f0aeb7dd036eaafc9d92 Mon Sep 17 00:00:00 2001 From: Robin Riclet Date: Tue, 4 Apr 2017 15:07:27 +0200 Subject: [PATCH 2/2] Restored whitespaces --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e9743b2..6d49ae2 100644 --- a/index.js +++ b/index.js @@ -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,7 +308,7 @@ const TabPrivate = { this.webview.setAttribute(key, attrs[key]); } } - + this.tabGroup.viewContainer.appendChild(this.webview); } };