Commit d15c7aa2 authored by Nick Stenning's avatar Nick Stenning

Merge pull request #3263 from hypothesis/firefox-webextensions-build

Build Firefox WebExtensions during Travis builds
parents 6cfbadf4 34f40b4a
......@@ -12,7 +12,6 @@
"esnext": true,
"globals": {
"chrome": false,
"h": false,
"Promise": false,
"chai": false,
"sinon": false,
......@@ -31,6 +30,7 @@
"assert",
"before",
"beforeEach",
"chrome",
"context",
"describe",
"it",
......
......@@ -92,7 +92,11 @@ module.exports = class Discovery
#
# https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
#
if origin is 'null'
# When sending messages to or from a Firefox WebExtension, current
# versions of Firefox have a bug that causes the origin check to fail even
# though the target and actual origins of the message match.
if origin is 'null' || origin.match('moz-extension:') ||
window.location.protocol == 'moz-extension:'
origin = '*'
# Check if the message is at all related to our discovery mechanism
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment