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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 16743004: Updating docs for appendText and insertingAdjacentText to reflect implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.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 /// The Dart HTML library. 1 /// The Dart HTML library.
2 library dart.dom.html; 2 library dart.dom.html;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:collection'; 5 import 'dart:collection';
6 import 'dart:_collection-dev' hide Symbol; 6 import 'dart:_collection-dev' hide Symbol;
7 import 'dart:html_common'; 7 import 'dart:html_common';
8 import 'dart:indexed_db'; 8 import 'dart:indexed_db';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 8058 matching lines...) Expand 10 before | Expand all | Expand 10 after
8069 * Gets the position of this element relative to the client area of the page. 8069 * Gets the position of this element relative to the client area of the page.
8070 */ 8070 */
8071 Rect get client => new Rect(clientLeft, clientTop, clientWidth, clientHeight); 8071 Rect get client => new Rect(clientLeft, clientTop, clientWidth, clientHeight);
8072 8072
8073 /** 8073 /**
8074 * Gets the offset of this element relative to its offsetParent. 8074 * Gets the offset of this element relative to its offsetParent.
8075 */ 8075 */
8076 Rect get offset => new Rect(offsetLeft, offsetTop, offsetWidth, offsetHeight); 8076 Rect get offset => new Rect(offsetLeft, offsetTop, offsetWidth, offsetHeight);
8077 8077
8078 /** 8078 /**
8079 * Adds the specified text as a text node after the last child of this 8079 * Adds the specified text after the last child of this element.
8080 * element.
8081 */ 8080 */
8082 void appendText(String text) { 8081 void appendText(String text) {
8083 this.insertAdjacentText('beforeend', text); 8082 this.insertAdjacentText('beforeend', text);
8084 } 8083 }
8085 8084
8086 /** 8085 /**
8087 * Parses the specified text as HTML and adds the resulting node after the 8086 * Parses the specified text as HTML and adds the resulting node after the
8088 * last child of this element. 8087 * last child of this element.
8089 */ 8088 */
8090 void appendHtml(String text) { 8089 void appendHtml(String text) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
8204 static String _determineTransitionEventType(EventTarget e) { 8203 static String _determineTransitionEventType(EventTarget e) {
8205 // Unfortunately the normal 'ontransitionend' style checks don't work here. 8204 // Unfortunately the normal 'ontransitionend' style checks don't work here.
8206 if (Device.isWebKit) { 8205 if (Device.isWebKit) {
8207 return 'webkitTransitionEnd'; 8206 return 'webkitTransitionEnd';
8208 } else if (Device.isOpera) { 8207 } else if (Device.isOpera) {
8209 return 'oTransitionEnd'; 8208 return 'oTransitionEnd';
8210 } 8209 }
8211 return 'transitionend'; 8210 return 'transitionend';
8212 } 8211 }
8213 /** 8212 /**
8214 * Creates a text node and inserts it into the DOM at the specified location. 8213 * Inserts text into the DOM at the specified location.
8215 * 8214 *
8216 * To see the possible values for [where], read the doc for 8215 * To see the possible values for [where], read the doc for
8217 * [insertAdjacentHtml]. 8216 * [insertAdjacentHtml].
8218 * 8217 *
8219 * See also: 8218 * See also:
8220 * 8219 *
8221 * * [insertAdjacentHtml] 8220 * * [insertAdjacentHtml]
8222 */ 8221 */
8223 void insertAdjacentText(String where, String text) { 8222 void insertAdjacentText(String where, String text) {
8224 if (JS('bool', '!!#.insertAdjacentText', this)) { 8223 if (JS('bool', '!!#.insertAdjacentText', this)) {
(...skipping 21662 matching lines...) Expand 10 before | Expand all | Expand 10 after
29887 _position = nextPosition; 29886 _position = nextPosition;
29888 return true; 29887 return true;
29889 } 29888 }
29890 _current = null; 29889 _current = null;
29891 _position = _array.length; 29890 _position = _array.length;
29892 return false; 29891 return false;
29893 } 29892 }
29894 29893
29895 T get current => _current; 29894 T get current => _current;
29896 } 29895 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698