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

Side by Side Diff: lib/dom.dart

Issue 11265012: Changed UnsupportedOperationException to UnsupportedError (Closed) Base URL: https://github.com/dart-lang/html5lib.git@master
Patch Set: Created 8 years, 2 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/dom_parsing.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * A simple tree API that results from parsing html. Intended to be compatible 2 * A simple tree API that results from parsing html. Intended to be compatible
3 * with dart:html, but right now it resembles the classic JS DOM. 3 * with dart:html, but right now it resembles the classic JS DOM.
4 */ 4 */
5 library dom; 5 library dom;
6 6
7 import 'src/constants.dart'; 7 import 'src/constants.dart';
8 import 'src/list_proxy.dart'; 8 import 'src/list_proxy.dart';
9 import 'src/treebuilder.dart'; 9 import 'src/treebuilder.dart';
10 import 'src/utils.dart'; 10 import 'src/utils.dart';
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void removeRange(int start, int rangeLength) { 478 void removeRange(int start, int rangeLength) {
479 for (int i = start; i < rangeLength; i++) this[i].parent = null; 479 for (int i = start; i < rangeLength; i++) this[i].parent = null;
480 super.removeRange(start, rangeLength); 480 super.removeRange(start, rangeLength);
481 } 481 }
482 482
483 void insertRange(int start, int rangeLength, [Node initialValue]) { 483 void insertRange(int start, int rangeLength, [Node initialValue]) {
484 if (initialValue == null) { 484 if (initialValue == null) {
485 throw new ArgumentError('cannot add null node.'); 485 throw new ArgumentError('cannot add null node.');
486 } 486 }
487 if (rangeLength > 1) { 487 if (rangeLength > 1) {
488 throw new UnsupportedOperationException('cannot add the same node ' 488 throw new UnsupportedError('cannot add the same node multiple times.');
489 'multiple times.');
490 } 489 }
491 super.insertRange(start, 1, _setParent(initialValue)); 490 super.insertRange(start, 1, _setParent(initialValue));
492 } 491 }
493 } 492 }
OLDNEW
« no previous file with comments | « no previous file | lib/dom_parsing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698