-
Notifications
You must be signed in to change notification settings - Fork 67
Fix #592: allow multiple readers but no multiple scans on any reader #611
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
Changes from 3 commits
6dc7be8
5125762
59b4268
3e5d134
bf7a613
aa2c2f8
ea613a0
4540659
341f824
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2204,8 +2204,8 @@ <h2>The <dfn>record type</dfn> string</h2> | |
|
||
<section><h3>Aborting pending write operation</h3> | ||
<div> | ||
To attempt to <dfn>abort a pending write operation</dfn> on an | ||
<a>environment settings object</a>, perform the following steps: | ||
To attempt to <dfn>abort a pending write operation</dfn>, | ||
run the following steps: | ||
<ol class=algorithm> | ||
<li> | ||
If there is no <a>pending write tuple</a> |tuple|, abort these steps. | ||
|
@@ -2225,6 +2225,28 @@ <h2>The <dfn>record type</dfn> string</h2> | |
</div> | ||
</section> | ||
|
||
<section><h3>Aborting pending scan operation</h3> | ||
<div> | ||
To attempt to <dfn>abort a pending scan operation</dfn>, | ||
run the following steps: | ||
<ol class=algorithm> | ||
<li> | ||
If there is no <a>pending read tuple</a> |tuple|, abort these steps. | ||
</li> | ||
<li> | ||
If |tuple|'s reader has already initiated an ongoing NFC data transfer, | ||
beaufortfrancois marked this conversation as resolved.
Show resolved
Hide resolved
zolkis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
abort these steps. | ||
</li> | ||
<li> | ||
Reject |tuple|'s promise with an {{"InvalidStateError"}} {{DOMException}}. | ||
</li> | ||
<li> | ||
Clear the <a>pending read tuple</a> and abort these steps. | ||
zolkis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</li> | ||
</ol> | ||
</div> | ||
</section> | ||
|
||
<section><h3>Releasing NFC</h3> | ||
<p> | ||
To <dfn>release NFC</dfn> on an <a>environment settings object</a>, | ||
|
@@ -2510,7 +2532,7 @@ <h3><dfn>Writing content</dfn></h3> | |
Let |records| be the list « |textRecord| ». | ||
</li> | ||
<li> | ||
Set |source|'s <a>records</a> to |records|. | ||
Set |source|'s records to |records|. | ||
</li> | ||
</ul> | ||
<dt>{{BufferSource}}</dt> | ||
|
@@ -2524,13 +2546,13 @@ <h3><dfn>Writing content</dfn></h3> | |
Let |records| be the list « |mimeRecord| ». | ||
</li> | ||
<li> | ||
Set |source|'s <a>records</a> to |records|. | ||
Set |source|'s records to |records|. | ||
</li> | ||
</ul> | ||
<dt>{{NDEFMessageInit}}</dt> | ||
<ul> | ||
<li> | ||
If |source|'s <a>records</a> [= list/is empty =], [= exception/throw =] | ||
If |source|'s records [= list/is empty =], [= exception/throw =] | ||
a {{TypeError}} and abort these steps. | ||
</li> | ||
</ul> | ||
|
@@ -2548,7 +2570,7 @@ <h3><dfn>Writing content</dfn></h3> | |
</li> | ||
<li> | ||
[= list/For each =] |record:NDEFRecordInit| in the <a>list</a> | ||
|source|'s <a>records</a>, run the following steps: | ||
|source|'s records, run the following steps: | ||
<ol> | ||
<li> | ||
Let |ndef| be the result of running <a>create NDEF record</a> | ||
|
@@ -3419,6 +3441,9 @@ <h3><dfn>Writing content</dfn></h3> | |
browsing context</a>, then reject |p| with and | ||
{{"InvalidStateError"}} {{DOMException}} and return |p|. | ||
</li> | ||
<li> | ||
Attempt to <a>abort a pending scan operation</a>. | ||
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, we should return |p| with rejected promise if failing. 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. No, we just reject the pending scan, not this one. It's a cleanup operation. |
||
</li> | ||
<li> | ||
Let |reader:NDEFReader| be the {{NDEFReader}} instance. | ||
</li> | ||
|
Uh oh!
There was an error while loading. Please reload this page.