change request module to use EventEmitter event registration model

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: irakli, Assigned: irakli)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 477899 [details] [diff] [review]
Implements changes
Attachment #477899 - Flags: review?(myk)
Blocks: 593737
Assignee: nobody → rFobic
No longer blocks: 593737
Blocks: 593737
Comment on attachment 477899 [details] [diff] [review]
Implements changes

>diff --git a/packages/jetpack-core/docs/request.md b/packages/jetpack-core/docs/request.md

>-    terms of XHR, when `readyState == 4`. The request object is available as
>-    `this` inside the callback. So in order to use the response, you'll need to
>-    access `this.response`
>+    terms of XHR, when `readyState == 4`. The `responce` & `request` objects
>+    are passed to the callback as an arguments.

Nit: responce -> response


>diff --git a/packages/jetpack-core/tests/test-request.js b/packages/jetpack-core/tests/test-request.js

Nit: it would be useful to have at least one test that tests that request.response == response inside a "complete" handler.
Attachment #477899 - Flags: review?(myk) → review+
Keywords: checkin-needed
Status: NEW → ASSIGNED
fixed by changeset https://hg.mozilla.org/labs/jetpack-sdk/rev/0c5f1b013c57
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.