Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

System messages should be pluged into the application manifest #73

Open
mounirlamouri opened this issue Apr 16, 2013 · 9 comments
Open
Assignees
Labels
Milestone

Comments

@mounirlamouri
Copy link
Contributor

No description provided.

@ghost ghost assigned mounirlamouri Apr 16, 2013
@marcoscaceres
Copy link
Contributor

Can you clarify what you mean by "plugged"?

@mounirlamouri
Copy link
Contributor Author

In Firefox OS we have:

"messages": [
  [ "foo", "/index.html" ],
  [ "bar", "/blah.html" ]
],

The current spec doesn't say how you register to get system messages.

@jmajnert
Copy link

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
Copy link
Contributor Author

Yes.

@jmajnert
Copy link

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
Copy link
Contributor Author

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
Copy link

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:

  1. 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?
  2. Application is running, index.html is loaded. I guess the system message will have no effect until user navigates to blah.html?

@jmajnert
Copy link

I think this issue is also relevant here: #20

@jmajnert
Copy link

We should also consider multi-window scenarios as in #100

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants