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
{{ message }}
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
System messages should be pluged into the application manifest #73
OK. So the setMessageHandler() doesn't actually register for a message? It only sets a handler for messages that the application had previously registered for via the manifest?
From the example you gave earlier I see that the registration is on a per-document basis - message of type "foo" goes to index.html and "bar" goes to blah.html. Could you please explain what the expected behaviour is if a "bar" message arrives when:
Application is not running (its manifest says "launch_path: 'index.html' "). Will the application launch normally and get redirected to blah.html (at what point?), or will it launch directly with blah.html?
Application is running, index.html is loaded. I guess the system message will have no effect until user navigates to blah.html?
Activity
marcoscaceres commentedon Apr 16, 2013
Can you clarify what you mean by "plugged"?
mounirlamouri commentedon Apr 16, 2013
In Firefox OS we have:
The current spec doesn't say how you register to get system messages.
jmajnert commentedon Apr 17, 2013
OK. So the setMessageHandler() doesn't actually register for a message? It only sets a handler for messages that the application had previously registered for via the manifest?
mounirlamouri commentedon Apr 23, 2013
Yes.
jmajnert commentedon Apr 24, 2013
OK. Then I think we should clarify that in the runtime spec. The current text gives no hints as to how registering happens.
Why do you think the system messages should be declared in the manifest? Wouldn't a runtime API for registering/unregistering be enough?
mounirlamouri commentedon Apr 24, 2013
We might need a runtime API too but we definitely need something in the manifest so I prefer to delay the JS API for when we will really need it.
I started writing something for that last week. I have to find time to finish it.
jmajnert commentedon Apr 25, 2013
From the example you gave earlier I see that the registration is on a per-document basis - message of type "foo" goes to index.html and "bar" goes to blah.html. Could you please explain what the expected behaviour is if a "bar" message arrives when:
jmajnert commentedon Apr 29, 2013
I think this issue is also relevant here: #20
jmajnert commentedon May 10, 2013
We should also consider multi-window scenarios as in #100