PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.14k stars 350 forks source link

[BUG] sendMessage name is both required and never #837

Closed monarchwadia closed 8 months ago

monarchwadia commented 9 months ago

What happened?

seems related to #528 as well as to #503

I'm following the example in https://docs.plasmo.com/framework/messaging#message-flow

image

However, my code doesn't work if name is declared; nor does it work with name undeclared

image

image

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

No response

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

monarchwadia commented 9 months ago

Okay, I found a section here that explains things

https://docs.plasmo.com/framework/messaging#initial-type-error

image

Maybe having a reference to it in the initial example itself would help?

louisgv commented 9 months ago

@monarchwadia that'd be great I think :-?

monarchwadia commented 9 months ago

I can fix it up in a few. :-)

monarchwadia commented 9 months ago

@louisgv see https://github.com/PlasmoHQ/docs/pull/93

kingname commented 8 months ago

The same issue. still exists. And the method of "Initial Type Error" in doc is useless.

image image
kingname commented 8 months ago

Thanks. I have solved this problem by your new document. @monarchwadia