Closed miketaylr closed 4 years ago
Here's a variation of what Tom is describing: https://stackoverflow.com/a/23687543/66348
As we're adding postMessage data support on the webcompat.com side not only for screenshots, but for the rest of the metadata in https://github.com/webcompat/webcompat.com/issues/2985 , lets send all data via postMessage to unify things.
So here https://github.com/webcompat/webcompat-reporter-extensions/blob/master/shared/base.js#L34 we'd need to send a postMessage with the following structure
const data = {
screenshot: blob,
message: message
};
where message
should be a stringified object with url, src, utm_source and utm_campaign properties
and screenshot
should be a blob instead of base64 string. This will also allow us to drop base64 support on webcompat.com side as described here https://github.com/webcompat/webcompat.com/issues/1252
This might not even be possible with existing web extension APIs... but Tom has some advice here:
https://github.com/mozilla/webcompat-team-okrs/issues/34#issuecomment-429558122