OLD | NEW |
1 library html; | 1 library html; |
2 | 2 |
3 import 'dart:isolate'; | 3 import 'dart:isolate'; |
4 import 'dart:json'; | 4 import 'dart:json'; |
5 import 'dart:svg' as svg; | 5 import 'dart:svg' as svg; |
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
9 | 9 |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 6458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6469 } | 6469 } |
6470 | 6470 |
6471 void insertAdjacentHTML(String where, String text) { | 6471 void insertAdjacentHTML(String where, String text) { |
6472 this._insertAdjacentNode(where, new DocumentFragment.html(text)); | 6472 this._insertAdjacentNode(where, new DocumentFragment.html(text)); |
6473 } | 6473 } |
6474 | 6474 |
6475 void addText(String text) { | 6475 void addText(String text) { |
6476 this.insertAdjacentText('beforeend', text); | 6476 this.insertAdjacentText('beforeend', text); |
6477 } | 6477 } |
6478 | 6478 |
6479 void addHTML(String text) { | 6479 void addHtml(String text) { |
6480 this.insertAdjacentHTML('beforeend', text); | 6480 this.insertAdjacentHTML('beforeend', text); |
6481 } | 6481 } |
6482 | 6482 |
6483 // If we can come up with a semi-reasonable default value for an Element | 6483 // If we can come up with a semi-reasonable default value for an Element |
6484 // getter, we'll use it. In general, these return the same values as an | 6484 // getter, we'll use it. In general, these return the same values as an |
6485 // element that has no parent. | 6485 // element that has no parent. |
6486 String get contentEditable => "false"; | 6486 String get contentEditable => "false"; |
6487 bool get isContentEditable => false; | 6487 bool get isContentEditable => false; |
6488 bool get draggable => false; | 6488 bool get draggable => false; |
6489 bool get hidden => false; | 6489 bool get hidden => false; |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7296 * Adds the specified text as a text node after the last child of this. | 7296 * Adds the specified text as a text node after the last child of this. |
7297 */ | 7297 */ |
7298 void addText(String text) { | 7298 void addText(String text) { |
7299 this.insertAdjacentText('beforeend', text); | 7299 this.insertAdjacentText('beforeend', text); |
7300 } | 7300 } |
7301 | 7301 |
7302 /** | 7302 /** |
7303 * Parses the specified text as HTML and adds the resulting node after the | 7303 * Parses the specified text as HTML and adds the resulting node after the |
7304 * last child of this. | 7304 * last child of this. |
7305 */ | 7305 */ |
7306 void addHTML(String text) { | 7306 void addHtml(String text) { |
7307 this.insertAdjacentHTML('beforeend', text); | 7307 this.insertAdjacentHTML('beforeend', text); |
7308 } | 7308 } |
7309 | 7309 |
7310 // Hooks to support custom WebComponents. | 7310 // Hooks to support custom WebComponents. |
7311 /** | 7311 /** |
7312 * Experimental support for [web components][wc]. This field stores a | 7312 * Experimental support for [web components][wc]. This field stores a |
7313 * reference to the component implementation. It was inspired by Mozilla's | 7313 * reference to the component implementation. It was inspired by Mozilla's |
7314 * [x-tags][] project. Please note: in the future it may be possible to | 7314 * [x-tags][] project. Please note: in the future it may be possible to |
7315 * `extend Element` from your class, in which case this field will be | 7315 * `extend Element` from your class, in which case this field will be |
7316 * deprecated and will simply return this [Element] object. | 7316 * deprecated and will simply return this [Element] object. |
(...skipping 17538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24855 if (length < 0) throw new ArgumentError('length'); | 24855 if (length < 0) throw new ArgumentError('length'); |
24856 if (start < 0) throw new RangeError.value(start); | 24856 if (start < 0) throw new RangeError.value(start); |
24857 int end = start + length; | 24857 int end = start + length; |
24858 if (end > a.length) throw new RangeError.value(end); | 24858 if (end > a.length) throw new RangeError.value(end); |
24859 for (int i = start; i < end; i++) { | 24859 for (int i = start; i < end; i++) { |
24860 accumulator.add(a[i]); | 24860 accumulator.add(a[i]); |
24861 } | 24861 } |
24862 return accumulator; | 24862 return accumulator; |
24863 } | 24863 } |
24864 } | 24864 } |
OLD | NEW |