This repository was archived by the owner on Aug 1, 2024. It is now read-only.
File tree 16 files changed +24
-893
lines changed
16 files changed +24
-893
lines changed Original file line number Diff line number Diff line change @@ -423,14 +423,3 @@ goog.date.DateRange.Iterator.prototype.next = function() {
423
423
this . nextDate_ . add ( new goog . date . Interval ( goog . date . Interval . DAYS , 1 ) ) ;
424
424
return goog . iter . createEs6IteratorYield ( rv ) ;
425
425
} ;
426
-
427
-
428
- /**
429
- * TODO(user): Please do not remove - this will be cleaned up centrally.
430
- * @override @see {!goog.iter.Iterator}
431
- * @return {!goog.date.Date }
432
- */
433
- goog . date . DateRange . Iterator . prototype . nextValueOrThrow = function ( ) {
434
- return goog . iter . toEs4IteratorNext (
435
- goog . date . DateRange . Iterator . prototype . next . call ( this ) ) ;
436
- } ;
Original file line number Diff line number Diff line change @@ -522,18 +522,6 @@ goog.dom.ControlRangeIterator.prototype.next = function() {
522
522
} ;
523
523
524
524
525
- /**
526
- * TODO(user): Please do not remove - this will be cleaned up centrally.
527
- * @override @see {!goog.iter.Iterator}
528
- * @return {!Node }
529
- */
530
- goog . dom . ControlRangeIterator . prototype . nextValueOrThrow = function ( ) {
531
- return goog . iter . toEs4IteratorNext (
532
- goog . dom . ControlRangeIterator . prototype . next . call ( this ) ) ;
533
- } ;
534
-
535
-
536
-
537
525
/** @override */
538
526
goog . dom . ControlRangeIterator . prototype . copyFrom = function ( other ) {
539
527
'use strict' ;
Original file line number Diff line number Diff line change @@ -66,18 +66,6 @@ goog.dom.iter.SiblingIterator.prototype.next = function() {
66
66
} ;
67
67
68
68
69
- /**
70
- * TODO(user): Please do not remove - this will be cleaned up centrally.
71
- * @override @see {!goog.iter.Iterator}
72
- * @return {!Node }
73
- */
74
- goog . dom . iter . SiblingIterator . prototype . nextValueOrThrow = function ( ) {
75
- return goog . iter . toEs4IteratorNext (
76
- goog . dom . iter . SiblingIterator . prototype . next . call ( this ) ) ;
77
- } ;
78
-
79
-
80
-
81
69
/**
82
70
* Iterator over an Element's children.
83
71
* @param {Element } element The element to iterate over.
@@ -139,15 +127,4 @@ goog.dom.iter.AncestorIterator.prototype.next = function() {
139
127
}
140
128
this . node_ = node . parentNode ;
141
129
return goog . iter . createEs6IteratorYield ( node ) ;
142
- } ;
143
-
144
-
145
- /**
146
- * TODO(user): Please do not remove - this will be cleaned up centrally.
147
- * @override @see {!goog.iter.Iterator}
148
- * @return {!Node }
149
- */
150
- goog . dom . iter . AncestorIterator . prototype . nextValueOrThrow = function ( ) {
151
- return goog . iter . toEs4IteratorNext (
152
- goog . dom . iter . AncestorIterator . prototype . next . call ( this ) ) ;
153
- } ;
130
+ } ;
Original file line number Diff line number Diff line change @@ -555,18 +555,6 @@ goog.dom.MultiRangeIterator.prototype.next = function() {
555
555
} ;
556
556
557
557
558
- /**
559
- * TODO(user): Please do not remove - this will be cleaned up centrally.
560
- * @override @see {!goog.iter.Iterator}
561
- * @return {!Node }
562
- */
563
- goog . dom . MultiRangeIterator . prototype . nextValueOrThrow = function ( ) {
564
- return goog . iter . toEs4IteratorNext (
565
- goog . dom . MultiRangeIterator . prototype . next . call ( this ) ) ;
566
- } ;
567
-
568
-
569
-
570
558
/** @override */
571
559
goog . dom . MultiRangeIterator . prototype . copyFrom = function ( other ) {
572
560
'use strict' ;
Original file line number Diff line number Diff line change @@ -79,14 +79,3 @@ goog.dom.NodeIterator.prototype.next = function() {
79
79
80
80
return goog . iter . createEs6IteratorYield ( /** @type {!Node } */ ( this . node ) ) ;
81
81
} ;
82
-
83
-
84
- /**
85
- * TODO(user): Please do not remove - this will be cleaned up centrally.
86
- * @override @see {!goog.iter.Iterator}
87
- * @return {!Node }
88
- */
89
- goog . dom . NodeIterator . prototype . nextValueOrThrow = function ( ) {
90
- return goog . iter . toEs4IteratorNext (
91
- goog . dom . NodeIterator . prototype . next . call ( this ) ) ;
92
- } ;
Original file line number Diff line number Diff line change @@ -285,18 +285,6 @@ goog.dom.TagIterator.prototype.next = function() {
285
285
} ;
286
286
287
287
288
- /**
289
- * TODO(user): Please do not remove - this will be cleaned up centrally.
290
- * @override @see {!goog.iter.Iterator}
291
- * @return {!Node }
292
- */
293
- goog . dom . TagIterator . prototype . nextValueOrThrow = function ( ) {
294
- return goog . iter . toEs4IteratorNext (
295
- goog . dom . TagIterator . prototype . next . call ( this ) ) ;
296
- } ;
297
-
298
-
299
-
300
288
/**
301
289
* @return {boolean } Whether next has ever been called on this iterator.
302
290
* @protected
Original file line number Diff line number Diff line change @@ -196,8 +196,8 @@ goog.dom.TextRangeIterator.prototype.isLast = function() {
196
196
} ;
197
197
198
198
/**
199
- * Returns true if the iterator is on the last step before StopIteration is
200
- * thrown, otherwise false .
199
+ * Returns true if the iterator is on the last step before iteration finishes,
200
+ * false otherwise.
201
201
* @return {boolean }
202
202
* @private
203
203
*/
@@ -218,8 +218,8 @@ goog.dom.TextRangeIterator.prototype.isLastTag_ = function() {
218
218
} ;
219
219
220
220
/**
221
- * Move to the next position in the selection.
222
- * Throws `goog.iter.StopIteration` when it passes the end of the range.
221
+ * Move to the next position in the selection. Returns `{done: true}` when it
222
+ * passes the end of the range.
223
223
* @return {!IIterableResult<!Node> } The node at the next position.
224
224
* @override
225
225
*/
@@ -234,17 +234,6 @@ goog.dom.TextRangeIterator.prototype.next = function() {
234
234
} ;
235
235
236
236
237
- /**
238
- * TODO(user): Please do not remove - this will be cleaned up centrally.
239
- * @override @see {!goog.iter.Iterator}
240
- * @return {!Node }
241
- */
242
- goog . dom . TextRangeIterator . prototype . nextValueOrThrow = function ( ) {
243
- return goog . iter . toEs4IteratorNext (
244
- goog . dom . TextRangeIterator . prototype . next . call ( this ) ) ;
245
- } ;
246
-
247
-
248
237
/**
249
238
* Get the last node the iterator will hit.
250
239
* @return {?Node } The last node the iterator will hit.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ goog.module.declareLegacyNamespace();
13
13
14
14
const GoogIterable = goog . require ( 'goog.iter.Iterable' ) ;
15
15
const GoogIterator = goog . require ( 'goog.iter.Iterator' ) ;
16
- const StopIteration = goog . require ( 'goog.iter.StopIteration' ) ;
17
16
18
17
19
18
/**
@@ -121,12 +120,6 @@ class ShimGoogIterator extends GoogIterator {
121
120
this . iter_ = iter ;
122
121
}
123
122
124
- /** @override */
125
- nextValueOrThrow ( ) {
126
- const result = this . iter_ . next ( ) ;
127
- if ( result . done ) throw StopIteration ;
128
- return result . value ;
129
- }
130
123
/**
131
124
* @override @see {!goog.iter.Iterator}
132
125
* @return {!IIterableResult<VALUE> }
You can’t perform that action at this time.
0 commit comments