From b9ec9a500c63b5475b7cefd9f5fc933835394037 Mon Sep 17 00:00:00 2001 From: bridiver Date: Thu, 15 Dec 2016 00:42:13 -0700 Subject: [PATCH] use new api for "clone" auditors @bbondy --- js/components/frame.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/js/components/frame.js b/js/components/frame.js index 5bc0e465d52..140b8b43425 100644 --- a/js/components/frame.js +++ b/js/components/frame.js @@ -430,18 +430,9 @@ class Frame extends ImmutableComponent { } clone (args) { - const newGuest = this.webview.clone() - const newGuestInstanceId = newGuest.getWebPreferences().guestInstanceId - let cloneAction - if (args && args.get('back')) { - cloneAction = newGuest.goBack - } else if (args && args.get('forward')) { - cloneAction = () => newGuest.goForward - } - if (cloneAction) { - newGuest.once('did-attach', cloneAction.bind(newGuest)) - } - windowActions.cloneFrame(this.frame, newGuestInstanceId, args && args.get('openInForeground')) + this.webview.clone((tab) => { + console.log(tab) + }) } handleShortcut () {