Files
sdk/client/html/src/TextWrappingImplementation.dart
T
jimhug@google.com 42c584b7c4 Revert "Example showing alternate async measurement solution"
This reverts r3473 which was causing several buildbots to go red due to
breaks in swarm tests.

The issue appears to be minor - but the buildbots have been red for too long.

Review URL: https://chromiumcodereview.appspot.com//9145004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3474 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-21 13:53:40 +00:00

32 lines
1.0 KiB
Dart

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class TextWrappingImplementation extends CharacterDataWrappingImplementation implements Text {
/** @domName Document.createTextNode */
factory TextWrappingImplementation(String content) {
return new TextWrappingImplementation._wrap(
dom.document.createTextNode(content));
}
TextWrappingImplementation._wrap(ptr) : super._wrap(ptr);
String get wholeText() => _ptr.wholeText;
Text replaceWholeText([String content = null]) {
if (content === null) {
return LevelDom.wrapText(_ptr.replaceWholeText());
} else {
return LevelDom.wrapText(_ptr.replaceWholeText(content));
}
}
Text splitText([int offset = null]) {
if (offset === null) {
return LevelDom.wrapText(_ptr.splitText());
} else {
return LevelDom.wrapText(_ptr.splitText(offset));
}
}
}