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

Side by Side Diff: lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate

Issue 10883070: Implementing polyfills for insertAdjacent* to get them working on FF. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/dom/scripts/systemhtml.py ('k') | lib/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class FilteredElementList implements ElementList { 5 class FilteredElementList implements ElementList {
6 final Node _node; 6 final Node _node;
7 final NodeList _childNodes; 7 final NodeList _childNodes;
8 8
9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 => this._insertAdjacentNode(where, element); 190 => this._insertAdjacentNode(where, element);
191 191
192 void insertAdjacentText(String where, String text) { 192 void insertAdjacentText(String where, String text) {
193 this._insertAdjacentNode(where, new Text(text)); 193 this._insertAdjacentNode(where, new Text(text));
194 } 194 }
195 195
196 void insertAdjacentHTML(String where, String text) { 196 void insertAdjacentHTML(String where, String text) {
197 this._insertAdjacentNode(where, new DocumentFragment.html(text)); 197 this._insertAdjacentNode(where, new DocumentFragment.html(text));
198 } 198 }
199 199
200 void addText(String text) {
201 this.insertAdjacentText('beforeend', text);
202 }
203
204 void addHTML(String text) {
205 this.insertAdjacentHTML('beforeend', text);
206 }
207
200 Future<ElementRect> get rect() { 208 Future<ElementRect> get rect() {
201 return _createMeasurementFuture(() => const EmptyElementRect(), 209 return _createMeasurementFuture(() => const EmptyElementRect(),
202 new Completer<ElementRect>()); 210 new Completer<ElementRect>());
203 } 211 }
204 212
205 // If we can come up with a semi-reasonable default value for an Element 213 // If we can come up with a semi-reasonable default value for an Element
206 // getter, we'll use it. In general, these return the same values as an 214 // getter, we'll use it. In general, these return the same values as an
207 // element that has no parent. 215 // element that has no parent.
208 String get contentEditable() => "false"; 216 String get contentEditable() => "false";
209 bool get isContentEditable() => false; 217 bool get isContentEditable() => false;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 "WebKit drop zone can't be set for document fragments."); 345 "WebKit drop zone can't be set for document fragments.");
338 } 346 }
339 347
340 void set webkitRegionOverflow(String value) { 348 void set webkitRegionOverflow(String value) {
341 throw new UnsupportedOperationException( 349 throw new UnsupportedOperationException(
342 "WebKit region overflow can't be set for document fragments."); 350 "WebKit region overflow can't be set for document fragments.");
343 } 351 }
344 352
345 $!MEMBERS 353 $!MEMBERS
346 } 354 }
OLDNEW
« no previous file with comments | « lib/dom/scripts/systemhtml.py ('k') | lib/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698