From 9f5cbaac5ac38ac1106eb8392b1ceb5ef841225e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 6 Feb 2021 16:19:55 -0500 Subject: Frame ancestry handler refactor (#1352) * Validate source window before handling messages * Add unregisterHandler to CrossFrameAPI * Refactor the process FrameAncestryHandler uses to get ancestor frame IDs * Store a mapping of child frame information * Update getFrameAncestryInfo to only run once --- ext/mixed/js/comm.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/mixed') diff --git a/ext/mixed/js/comm.js b/ext/mixed/js/comm.js index ea450da6..997249c8 100644 --- a/ext/mixed/js/comm.js +++ b/ext/mixed/js/comm.js @@ -248,6 +248,12 @@ class CrossFrameAPI { } } + unregisterHandler(key) { + return this._messageHandlers.delete(key); + } + + // Private + _onConnect(port) { try { let details; -- cgit v1.2.3