From bb9e590cb09268afa435f380b8425668c7078000 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 6 Feb 2015 18:41:13 -0700 Subject: [PATCH] Safari: fix privileged/non-priveleged messaging --- platform/safari/vapi-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index 0a9dd5526..1d27e694d 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -209,7 +209,7 @@ document.removeEventListener("DOMContentLoaded", firstMutation, true); firstMutation = false; var randEventName = uniqueId(); - window.addEventListener(randEventName, function(e) { + document.addEventListener(randEventName, function(e) { if(shouldBlockDetailedRequest(e.detail)) { e.detail.url = false; } @@ -225,7 +225,7 @@ type: t\ },\ bubbles: false\ });\ -dispatchEvent(e);\ +document.dispatchEvent(e);\ return e.detail.url === false;\ },\ wo = open,\