Skip to content

Commit 2984b13

Browse files
Marketionistmach6
authored andcommitted
Fixed several typos in promise.js (#3172)
* Fixed several typos in promise.js
1 parent bd20807 commit 2984b13

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

javascript/node/selenium-webdriver/lib/promise.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
*
534534
* When a subtask is discarded due to an unreported rejection in its parent
535535
* frame, the existing callbacks on that task will never settle and the
536-
* callbacks will not be invoked. If a new callback is attached ot the subtask
536+
* callbacks will not be invoked. If a new callback is attached to the subtask
537537
* _after_ it has been discarded, it is handled the same as adding a callback
538538
* to a cancelled promise: the error-callback path is invoked. This behavior is
539539
* intended to handle cases where the user saves a reference to a task promise,
@@ -594,7 +594,7 @@
594594
* > must execute in the order of their originating calls to `then`.
595595
* >
596596
*
597-
* Specifically, the conformance tests contains the following scenario (for
597+
* Specifically, the conformance tests contain the following scenario (for
598598
* brevity, only the fulfillment version is shown):
599599
*
600600
* var p1 = Promise.resolve();
@@ -608,7 +608,7 @@
608608
* // B
609609
*
610610
* Since the [ControlFlow](#scheduling_callbacks) executes promise callbacks as
611-
* tasks, with this module, the result would be
611+
* tasks, with this module, the result would be:
612612
*
613613
* var p2 = promise.fulfilled();
614614
* p2.then(function() {
@@ -2172,21 +2172,21 @@ const SIMPLE_SCHEDULER = new SimpleScheduler;
21722172
* promises to be resolved before marking the task as completed.
21732173
*
21742174
* Tasks and each callback registered on a {@link ManagedPromise} will be run
2175-
* in their own ControlFlow frame. Any tasks scheduled within a frame will take
2175+
* in their own ControlFlow frame. Any tasks scheduled within a frame will take
21762176
* priority over previously scheduled tasks. Furthermore, if any of the tasks in
21772177
* the frame fail, the remainder of the tasks in that frame will be discarded
21782178
* and the failure will be propagated to the user through the callback/task's
21792179
* promised result.
21802180
*
21812181
* Each time a ControlFlow empties its task queue, it will fire an
2182-
* {@link ControlFlow.EventType.IDLE IDLE} event. Conversely,
2183-
* whenever the flow terminates due to an unhandled error, it will remove all
2182+
* {@link ControlFlow.EventType.IDLE IDLE} event. Conversely, whenever
2183+
* the flow terminates due to an unhandled error, it will remove all
21842184
* remaining tasks in its queue and fire an
21852185
* {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION UNCAUGHT_EXCEPTION} event.
21862186
* If there are no listeners registered with the flow, the error will be
21872187
* rethrown to the global error handler.
21882188
*
2189-
* Refer to the {@link ./promise} module documentation for a detailed
2189+
* Refer to the {@link ./promise} module documentation for a detailed
21902190
* explanation of how the ControlFlow coordinates task execution.
21912191
*
21922192
* @implements {Scheduler}
@@ -2258,8 +2258,7 @@ class ControlFlow extends events.EventEmitter {
22582258
* control flow stack and cause rejections within parent tasks. If error
22592259
* propagation is disabled, tasks will not be aborted when an unhandled
22602260
* promise rejection is detected, but the rejection _will_ trigger an
2261-
* {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION}
2262-
* event.
2261+
* {@link ControlFlow.EventType.UNCAUGHT_EXCEPTION} event.
22632262
*
22642263
* The default behavior is to propagate all unhandled rejections. _The use
22652264
* of this option is highly discouraged._
@@ -2293,7 +2292,7 @@ class ControlFlow extends events.EventEmitter {
22932292
* {@code opt_includeStackTraces === true}, the string will include the
22942293
* stack trace from when each task was scheduled.
22952294
* @param {string=} opt_includeStackTraces Whether to include the stack traces
2296-
* from when each task was scheduled. Defaults to false.
2295+
* from when each task was scheduled. Defaults to false.
22972296
* @return {string} String representation of this flow's internal state.
22982297
*/
22992298
getSchedule(opt_includeStackTraces) {
@@ -2345,7 +2344,7 @@ class ControlFlow extends events.EventEmitter {
23452344
}
23462345

23472346
/**
2348-
* Returns the currently actively task queue for this flow. If there is no
2347+
* Returns the currently active task queue for this flow. If there is no
23492348
* active queue, one will be created.
23502349
* @return {!TaskQueue} the currently active task queue for this flow.
23512350
* @private

0 commit comments

Comments
 (0)