Confirmed users
496
edits
m (→The Root Actor: No unquoted identifiers in JSON.) |
m (→Listing Top-Level Browsing Contexts: Clarify context actor lifetimes.) |
||
Line 75: | Line 75: | ||
Clients should send "list-contexts" requests only to root actors that have identified themselves as browsers. | Clients should send "list-contexts" requests only to root actors that have identified themselves as browsers. | ||
Actor names given in a list-contexts reply have the root actor as their parent. They remain valid at least until the next list-contexts request is received. If the client attaches to a context actor, its name is valid until the client detaches from the context and receives a "detached" packet from the context, or until the client | Actor names given in a list-contexts reply have the root actor as their parent. They remain valid at least until the next list-contexts request is received. If the client attaches to a context actor, its name is valid until the client detaches from the context and receives a "detached" packet from the context, or until the client sends a "release" packet to the context. See "Interacting with Thread-Like Actors" for details. | ||
For example, upon connection to a web browser visiting two pages at example.com, the root actor's introductory packet might look like this: | For example, upon connection to a web browser visiting two pages at example.com, the root actor's introductory packet might look like this: | ||
Line 81: | Line 81: | ||
{ "from":0, "application-type":"browser", | { "from":0, "application-type":"browser", | ||
"contexts": [ { "actor":1, "title":"Fruits", | "contexts": [ { "actor":1, "title":"Fruits", | ||
"url":"http://www.example.com/fruits/"}, | "url":"http://www.example.com/fruits/" }, | ||
{ "actor":2, "title":"Bats", | { "actor":2, "title":"Bats", | ||
"url":"http://www.example.com/bats/"}]} | "url":"http://www.example.com/bats/" }]} | ||
<i>(The point here is to give the debugger enough information to select which context it would like to debug without having to do too many round trips. Round trips are bad for UI responsiveness, but large packets are probably not a problem, so whatever would help to add, we should add.)</i> | <i>(The point here is to give the debugger enough information to select which context it would like to debug without having to do too many round trips. Round trips are bad for UI responsiveness, but large packets are probably not a problem, so whatever would help to add, we should add.)</i> |