You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the (not very detailed) MDN documentation for the postMessage function the parameter message needs to be serializable, but that doesn't mean it has to be an object. I'm currently developing a browser extension for Firefox and Chrome and was wondering why I did get a linter error when I passed in a string for Firefox, while that wasn't a problem for Chrome. At runtime it clearly works for both browsers.
The chrome types use any for this parameter, which probably should be the same for Firefox.
The text was updated successfully, but these errors were encountered:
wAuner
changed the title
Firefox-webext-browser: wrong type for browser.runtime.Port.postMessage argument
[@types/firefox-webext-browser] wrong type for browser.runtime.Port.postMessage argument
Jan 18, 2024
DefinitelyTyped/types/firefox-webext-browser/index.d.ts
Line 4317 in 942c50b
According to the (not very detailed) MDN documentation for the
postMessage
function the parametermessage
needs to be serializable, but that doesn't mean it has to be an object. I'm currently developing a browser extension for Firefox and Chrome and was wondering why I did get a linter error when I passed in a string for Firefox, while that wasn't a problem for Chrome. At runtime it clearly works for both browsers.The chrome types use
any
for this parameter, which probably should be the same for Firefox.The text was updated successfully, but these errors were encountered: