chore: Replace post-processed warning message with single-line string literal (#152)

This commit is contained in:
ExE Boss 2018-07-19 16:00:00 +02:00
parent 5e4796c116
commit 26683389ea
No known key found for this signature in database
GPG Key ID: BF4FA5DD733D8D1A
1 changed files with 1 additions and 6 deletions

View File

@ -8,12 +8,7 @@
if (typeof browser === "undefined") {
const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE = "The message port closed before a response was received.";
const SEND_RESPONSE_DEPRECATION_WARNING = `
Returning a Promise is the preferred way to send a reply from an
onMessage/onMessageExternal listener, as the sendResponse will be
removed from the specs (See
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/onMessage)
`.replace(/\s+/g, " ").trim();
const SEND_RESPONSE_DEPRECATION_WARNING = "Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)";
// Wrapping the bulk of this polyfill in a one-time-use function is a minor
// optimization for Firefox. Since Spidermonkey does not fully parse the