Skip to content
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

Remove NDEFErrorEvent #398

Merged
merged 1 commit into from
Oct 20, 2019
Merged

Conversation

beaufortfrancois
Copy link
Collaborator

@beaufortfrancois beaufortfrancois commented Oct 20, 2019

This PR removes NDEFErrorEvent and makes scan return a Promise.

For info, using git diff --word-diff makes it easier to read the diff in this PR.

FIX #391


Preview | Diff

const writer = new NDEFWriter();
writer.push("Pushing data is fun!", { target: "tag", ignoreRead: false });
reader.scan().then(() => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this newline?

@kenchris kenchris merged commit a5f5aa3 into w3c:gh-pages Oct 20, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 13, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.han@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716904}
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 20, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.han@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716904}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2019
Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.han@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716904}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 28, 2019
It's recommended to use the generice ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 28, 2019
It's recommended to use the generice ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 29, 2019
It's recommended to use the generice ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 29, 2019
… Promise, a=testonly

Automatic update from web-platform-tests
[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.han@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716904}

--

wpt-commits: 581a056bf7a743722a2e83cb80e1a8ce250e4f9d
wpt-pr: 20193
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Nov 29, 2019
… Promise, a=testonly

Automatic update from web-platform-tests
[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.han@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716904}

--

wpt-commits: 581a056bf7a743722a2e83cb80e1a8ce250e4f9d
wpt-pr: 20193
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 30, 2019
… Promise, a=testonly

Automatic update from web-platform-tests
[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.hanintel.com>
Reviewed-by: Reilly Grant <reillygchromium.org>
Cr-Commit-Position: refs/heads/master{#716904}

--

wpt-commits: 581a056bf7a743722a2e83cb80e1a8ce250e4f9d
wpt-pr: 20193

UltraBlame original commit: ee74abc564ce6cf1fc427217df061c04e5a43c83
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 30, 2019
… Promise, a=testonly

Automatic update from web-platform-tests
[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.hanintel.com>
Reviewed-by: Reilly Grant <reillygchromium.org>
Cr-Commit-Position: refs/heads/master{#716904}

--

wpt-commits: 581a056bf7a743722a2e83cb80e1a8ce250e4f9d
wpt-pr: 20193

UltraBlame original commit: ee74abc564ce6cf1fc427217df061c04e5a43c83
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 30, 2019
… Promise, a=testonly

Automatic update from web-platform-tests
[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
w3c/web-nfc#398
w3c/web-nfc#432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899586
Commit-Queue: Leon Han <leon.hanintel.com>
Reviewed-by: Reilly Grant <reillygchromium.org>
Cr-Commit-Position: refs/heads/master{#716904}

--

wpt-commits: 581a056bf7a743722a2e83cb80e1a8ce250e4f9d
wpt-pr: 20193

UltraBlame original commit: ee74abc564ce6cf1fc427217df061c04e5a43c83
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2019
It's recommended to use the generice ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2019
It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Cr-Commit-Position: refs/heads/master@{#722930}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Cr-Commit-Position: refs/heads/master@{#722930}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 11, 2019
Automatic update from web-platform-tests
[webnfc] Remove NDEFErrorEvent

It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Cr-Commit-Position: refs/heads/master@{#722930}

--

wpt-commits: a35f8deed59ed1ca32d9b929a145eb1425542cd6
wpt-pr: 20496
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
[webnfc] Remove NDEFErrorEvent

It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Reviewed-by: Kentaro Hara <harakenchromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Cr-Commit-Position: refs/heads/master{#722930}

--

wpt-commits: a35f8deed59ed1ca32d9b929a145eb1425542cd6
wpt-pr: 20496

UltraBlame original commit: b80c93139b7e915d5539f476f7c52ea331bcec0f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
[webnfc] Remove NDEFErrorEvent

It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Reviewed-by: Kentaro Hara <harakenchromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Cr-Commit-Position: refs/heads/master{#722930}

--

wpt-commits: a35f8deed59ed1ca32d9b929a145eb1425542cd6
wpt-pr: 20496

UltraBlame original commit: b80c93139b7e915d5539f476f7c52ea331bcec0f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 12, 2019
Automatic update from web-platform-tests
[webnfc] Remove NDEFErrorEvent

It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Reviewed-by: Kentaro Hara <harakenchromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumikintel.com>
Cr-Commit-Position: refs/heads/master{#722930}

--

wpt-commits: a35f8deed59ed1ca32d9b929a145eb1425542cd6
wpt-pr: 20496

UltraBlame original commit: b80c93139b7e915d5539f476f7c52ea331bcec0f
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Dec 16, 2019
Automatic update from web-platform-tests
[webnfc] Remove NDEFErrorEvent

It's recommended to use the generic ErrorEvent rather than creating
unnecessary custom error event types.

The spec change:
w3c/web-nfc#398

BUG=520391

Change-Id: Id8e02ed16d87d67fe36b6df4340a930893ca3b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940814
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Cr-Commit-Position: refs/heads/master@{#722930}

--

wpt-commits: a35f8deed59ed1ca32d9b929a145eb1425542cd6
wpt-pr: 20496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid creating custom errors
2 participants