Chromium Code Reviews| Index: client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart |
| =================================================================== |
| --- client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart (revision 942) |
| +++ client/dom/generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart (working copy) |
| @@ -42,12 +42,13 @@ |
| throw new UnsupportedOperationException("This object is immutable."); |
| } |
| - int indexOf(int element, int startIndex) { |
| + int indexOf(int element, [int startIndex = 0]) { |
| return _Lists.indexOf(this, element, startIndex, this.length); |
| } |
| - int lastIndexOf(int element, int startIndex) { |
| - return _Lists.lastIndexOf(this, element, startIndex); |
| + int lastIndexOf(int element, [int fromIndex = null]) { |
|
kasperl
2011/10/31 12:35:09
Why is this called fromIndex in lastIndexOf and st
|
| + if (fromIndex === null) fromIndex = length - 1; |
| + return _Lists.lastIndexOf(this, element, fromIndex); |
| } |
| int clear() { |