-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to PR #277 that addresses issues #254, #269, #273 #278
Merged
markafoltz
merged 4 commits into
w3c:issues-254-269-273
from
tidoust:issues-254-269-273
Apr 21, 2016
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fd17dbc
The availabilityUrl is no longer a "parameter" of getAvailability (#269)
tidoust e2424bd
Improvements to "getting the connectionList attribute" steps (#254)
tidoust b309840
Rephrased a couple of sentences based on feedback from @mfoltzgoogle
tidoust 34c8b84
Getting connectionList now always returns the same object
tidoust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -728,6 +728,22 @@ <h3> | |
connections</a> in this set share the same <a>presentation URL</a> | ||
and <a>presentation identifier</a>. | ||
</p> | ||
<p> | ||
In a <a>receiving browsing context</a>, the <dfn>presentation | ||
controllers monitor</dfn>, initially set to <code>null</code>, | ||
exposes the current <a>set of presentation controllers</a> to the | ||
receiving application. The <a>presentation controllers monitor</a> is | ||
represented by a <a>PresentationConnectionList</a>. | ||
</p> | ||
<p> | ||
In a <a>receiving browsing context</a>, the <dfn>presentation | ||
controllers promise</dfn>, which is initially set to | ||
<code>null</code>, exposes the <a>presentation controllers | ||
monitor</a> once the initial <a>presentation connection</a> is | ||
established. The <a>presentation controllers promise</a> is | ||
represented by a <a>Promise</a> that holds the <a>presentation | ||
controllers monitor</a>. | ||
</p> | ||
</section> | ||
<section> | ||
<h3> | ||
|
@@ -1275,9 +1291,10 @@ <h4> | |
<var>A</var> is a live <a>PresentationAvailability</a> object; | ||
</li> | ||
<li> | ||
<var>availabilityUrl</var> is the parameter passed to | ||
<code><a for="PresentationRequest">getAvailability</a>()</code> | ||
to create <var>A</var>. | ||
<var>availabilityUrl</var> is the <a>presentation request URL</a> | ||
when <code><a for= | ||
"PresentationRequest">getAvailability</a>()</code> is called to | ||
create <var>A</var>. | ||
</li> | ||
</ol> | ||
</section> | ||
|
@@ -1523,10 +1540,9 @@ <h4> | |
A <a>receiving user agent</a> <a>fires</a> a <a>trusted event</a> | ||
named <a for="PresentationConnectionList">connectionavailable</a> | ||
on a <a>PresentationReceiver</a> when an incoming connection is | ||
created. It is fired at the <a>PresentationConnectionList</a> | ||
instance associated with the <a>PresentationReceiver</a> instance, | ||
using the <a>PresentationConnectionAvailableEvent</a> interface, | ||
with the <a for= | ||
created. It is fired at the <a>presentation controllers | ||
monitor</a>, using the <a>PresentationConnectionAvailableEvent</a> | ||
interface, with the <a for= | ||
"PresentationConnectionAvailableEvent">connection</a> attribute set | ||
to the <a><code>PresentationConnection</code></a> object that was | ||
created. The event is fired for all connections that are created | ||
|
@@ -2286,25 +2302,30 @@ <h3> | |
attribute MUST return the result of running the following steps: | ||
</p> | ||
<ol> | ||
<li>If there is already an unsettled <a>Promise</a> <var>P</var> from | ||
a previous call to get the <a for= | ||
"PresentationReceiver">connectionList</a> attribute for the same <a> | ||
PresentationReceiver</a> object, return <var>P</var> and abort all | ||
remaining steps. | ||
<li>If the <a>presentation controllers promise</a> is not | ||
<code>null</code>, return the <a>presentation controllers promise</a> | ||
and abort all remaining steps. | ||
</li> | ||
<li>Let <var>P</var> be a new <a>Promise</a>. | ||
<li>Otherwise, let the <a>presentation controllers promise</a> be a | ||
new <a>Promise</a>. | ||
</li> | ||
<li>Return <var>P</var>, but continue running these steps <a>in | ||
parallel</a>. | ||
<li>Return the <a>presentation controllers promise</a>, but continue | ||
running these steps <a>in parallel</a>. | ||
</li> | ||
<li>Let <var>list</var> be a new <a>PresentationConnectionList</a>. | ||
</li> | ||
<li>Resolve <var>P</var> with <var>list</var>. | ||
<li>If the <a>set of presentation controllers</a> contains at least | ||
one <a>presentation connection</a>, then run the following steps: | ||
<ol> | ||
<li>Let the <a>presentation controllers monitor</a> be a new <a> | ||
PresentationConnectionList</a>. | ||
</li> | ||
<li> | ||
<a>Resolve</a> the <a>presentation controllers promise</a> with | ||
the <a>presentation controllers monitor</a>. | ||
</li> | ||
</ol> | ||
</li> | ||
<li>If the <a>user agent</a> is not <a>monitoring incoming | ||
presentation connections</a>, start <a>monitoring incoming | ||
presentation connections</a> from <a>controlling browsing | ||
contexts</a>. | ||
<li>Otherwise, the <a>presentation controllers promise</a> remains | ||
unsettled. | ||
</li> | ||
</ol> | ||
<section> | ||
|
@@ -2418,16 +2439,31 @@ <h4> | |
</li> | ||
<li>Add <var>S</var> to the <a>set of presentation controllers</a>. | ||
</li> | ||
<li> | ||
<a>Queue a task</a> to <a>fire</a> a <a>trusted event</a> with | ||
the name <a for= | ||
"PresentationConnectionList">connectionavailable</a>, that uses | ||
the <a>PresentationConnectionAvailableEvent</a> interface, with | ||
the <a for="PresentationConnectionAvailableEvent">connection</a> | ||
attribute initialized to <var>S</var>, at the | ||
<a>PresentationConnectionList</a> instance associated with the | ||
<a>PresentationReceiver</a> object. The event must not bubble, | ||
must not be cancelable, and has no default action. | ||
<li>If the <a>presentation controllers promise</a> is | ||
<code>null</code>, then abort all remaining steps. | ||
</li> | ||
<li>Otherwise, if the <a>presentation controllers promise</a> is | ||
unsettled, then run the following steps: | ||
<ol> | ||
<li>Let the <a>presentation controllers monitor</a> be a new | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
<a>PresentationConnectionList</a>. | ||
</li> | ||
<li> | ||
<a>Resolve</a> the <a>presentation controllers promise</a> | ||
with the <a>presentation controllers monitor</a>. | ||
</li> | ||
<li>Abort all remaining steps. | ||
</li> | ||
</ol> | ||
</li> | ||
<li>Otherwise, <a>queue a task</a> to <a>fire</a> a <a>trusted | ||
event</a> with the name <a for= | ||
"PresentationConnectionList">connectionavailable</a>, that uses the | ||
<a>PresentationConnectionAvailableEvent</a> interface, with the | ||
<a for="PresentationConnectionAvailableEvent">connection</a> | ||
attribute initialized to <var>S</var>, at the <a>presentation | ||
controllers monitor</a>. The event must not bubble, must not be | ||
cancelable, and has no default action. | ||
</li> | ||
</ol> | ||
<p> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to be explicit that the connections property of the new PresentationConnectionList should be populated with the contents of the presentation controllers monitor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I note that getting the connections property of the new PresentationConnectionList de facto returns "the non-terminated set of presentation connections in the set of presentation controllers":
https://w3c.github.io/presentation-api/#dom-presentationconnectionlist-connections
That quoted sentence could perhaps be moved here, as the section that describes the PresentationConnectionList interface should probably remain generic and not assume that there is going to be only one PresentationConnectionList instance per browsing context.