Closed fregante closed 3 years ago
Hi, first off, thanks for the PR!
The webpack-target-webextension
, as its name suggests, is for WebExtension target. The chrome
namespace is not part of the WebExtension spec. For the time being, major browser vendors also implement the chrome
namespace because Google Chrome still dominates the web browser market and most of the current WebExtension APIs are heavily inspired by Chrome Extension.
For this reason, I would prefer using the browser
namespace if possible and fallback to chrome
.
Thanks!
https://github.com/crimx/webpack-target-webextension/blob/cbb1185e2e8935205a1f36d862bde80e1b96a3c3/lib/background.js#L3
chrome
is defined everywhere, so this piece of code has always used thechrome.*
APIFor this reason, I dropped the check and the duplicate code