summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-06 16:19:55 -0500
committerGitHub <noreply@github.com>2021-02-06 16:19:55 -0500
commit9f5cbaac5ac38ac1106eb8392b1ceb5ef841225e (patch)
tree476e7b8d38a465b468046e2e0a7ee623ead7e8b3 /ext/mixed
parent356e7f52749aaecb981bbc8286dd55d6d74e6343 (diff)
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
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/comm.js6
1 files changed, 6 insertions, 0 deletions
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;