Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 24740003: Add List.shuffle(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 02d902ea3ba8e75cc9d0ea7719b99c74edd458f4..c39d0af1572731db90370d301e41fc8ae5925e3b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -7170,7 +7170,6 @@ class Document extends Node native "Document"
DocumentFragment createDocumentFragment() native;
@JSName('createElement')
- /// Deprecated: use new Element.tag(tagName) instead.
@DomName('Document.createElement')
@DocsEditable()
Element _createElement(String localName_OR_tagName, [String typeExtension]) native;
@@ -8072,6 +8071,10 @@ class _ChildrenElementList extends ListBase<Element> {
throw new UnsupportedError('Cannot sort element lists');
}
+ void shuffle() {
+ throw new UnsupportedError('Cannot shuffle element lists');
+ }
+
void removeWhere(bool test(Element element)) {
_filter(test, false);
}
@@ -8517,6 +8520,10 @@ class _FrozenElementList<T extends Element> extends ListBase<T> implements Eleme
throw new UnsupportedError('Cannot sort list');
}
+ void shuffle() {
+ throw new UnsupportedError('Cannot shuffle list');
+ }
+
Element get first => _nodeList.first;
Element get last => _nodeList.last;
@@ -17662,6 +17669,10 @@ class _ChildNodeListLazy extends ListBase<Node> {
throw new UnsupportedError("Cannot sort Node list");
}
+ void shuffle() {
+ throw new UnsupportedError("Cannot shuffle Node list");
+ }
+
// FIXME: implement these.
void setRange(int start, int end, Iterable<Node> iterable,
[int skipCount = 0]) {
@@ -29295,6 +29306,10 @@ abstract class ImmutableListMixin<E> implements List<E> {
throw new UnsupportedError("Cannot sort immutable List.");
}
+ void shuffle() {
+ throw new UnsupportedError("Cannot shuffle immutable List.");
+ }
+
void insert(int index, E element) {
throw new UnsupportedError("Cannot add to immutable List.");
}

Powered by Google App Engine
This is Rietveld 408576698