From 9767b765536279023045ed4280b12d297ec78f0a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 7 Jun 2020 21:40:11 -0400 Subject: Use cross frame API (#553) * Use new CrossFrameAPI for popup proxy communication * Remove use of old cross-frame communication classes * Remove use of old cross-frame communication files * Make the crossFrame object a member of the api object --- ext/mixed/js/api.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js index 5e3195d6..c54196e2 100644 --- a/ext/mixed/js/api.js +++ b/ext/mixed/js/api.js @@ -15,10 +15,23 @@ * along with this program. If not, see . */ +/* global + * CrossFrameAPI + */ + const api = (() => { class API { constructor() { this._forwardLogsToBackendEnabled = false; + this._crossFrame = new CrossFrameAPI(); + } + + get crossFrame() { + return this._crossFrame; + } + + prepare() { + this._crossFrame.prepare(); } forwardLogsToBackend() { @@ -331,5 +344,8 @@ const api = (() => { } } - return new API(); + // eslint-disable-next-line no-shadow + const api = new API(); + api.prepare(); + return api; })(); -- cgit v1.2.3