The use of standards names, patterns like postMessage is a cool idea,
but there is some corner cases with that particular choice:
When we use Panel or Widget (or any future visual API), we load a content document.
In most cases, this document want to communicate
with addon script that instanciate it.
So, if you had already played with addon-sdk,
you will immediatly try to use 'postMessage' function.
But this postMessage function is going to fail and you may not understand why easily!
It fails because this is HTML standards postMessage function:
https://developer.mozilla.org/en/DOM/window.postMessageThe solution is to communicate only with a contentScript.
Ok but that mean that contentURL is almost useless
when we want to define UI with an HTML document :(
Because communication between this document and addon script is going to be hard.
I would suggest to avoid confusion with W3C names and do "like in firefox":
https://developer.mozilla.org/en/The_message_manager1/ Having an identifiable API that does not confuse with HTML ones
2/ As a bonus: having names on messages. This is a so common use case!!!
3/ I don't really know if it's doable, but offering a way to add this message passing API
in Widget/Panels content document would be very cool!