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

Unified Diff: sky/specs/elements.md

Issue 924163004: Specs: (reverts part of recent checkin) Make appendChild, prependChild, and setChild not return the… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/specs/elements.md
diff --git a/sky/specs/elements.md b/sky/specs/elements.md
index 37bb95c4c250106f0724864ca35a517e1ee541fa..4ace5d4d95f668df241f195ca0dfbb8e0c559a5f 100644
--- a/sky/specs/elements.md
+++ b/sky/specs/elements.md
@@ -139,11 +139,10 @@ abstract class ParentNode extends Node {
external void _appendChild(Node node); // O(N) in number of descendants
// node must be Text or Element
- Node appendChild(Node node) {
+ void appendChild(Node node) {
if (node is String)
node = new Text(node);
_appendChild(node);
- return node;
}
void append(List nodes) {
nodes.forEach(appendChild);
@@ -151,11 +150,10 @@ abstract class ParentNode extends Node {
external void _prependChild(Node node); // O(N) in number of descendants
// node must be Text or Element
- Node prependChild(Node node) {
+ void prependChild(Node node) {
if (node is String)
node = new Text(node);
_prependChild(node);
- return node;
}
void prepend(List nodes) {
// note: not implemented in terms of _prependChild()
@@ -166,10 +164,9 @@ abstract class ParentNode extends Node {
}
external void removeChildren(); // O(N) in number of descendants
- Node setChild(Node node) {
+ void setChild(Node node) {
removeChildren();
appendChild(node);
- return node;
}
void setChildren(List nodes) {
removeChildren();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698