aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-03-07 09:37:32 -0500
committerbors-servo <release+servo@mozilla.com>2014-03-07 09:37:32 -0500
commitcdec81ea4f3985a18cac75b45d2d09e17e993e6c (patch)
tree3f0ba0817643764de5b45fbec5ccaa1013eb12df /src/components/script/dom/node.rs
parent4a47145e6906df25a7dc2ec4f0992d2f2f4e8271 (diff)
parent013039242044243c4a8e92fe44c8920640721184 (diff)
downloadservo-cdec81ea4f3985a18cac75b45d2d09e17e993e6c.tar.gz
servo-cdec81ea4f3985a18cac75b45d2d09e17e993e6c.zip
auto merge of #1834 : lpy/servo/issue1825, r=jdm
see #1825
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index 3ce69d356b7..9999503a758 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -924,9 +924,16 @@ impl Node {
}
// http://dom.spec.whatwg.org/#dom-node-nodevalue
- pub fn SetNodeValue(&mut self, _abstract_self: &JS<Node>, _val: Option<DOMString>)
+ pub fn SetNodeValue(&mut self, abstract_self: &mut JS<Node>, val: Option<DOMString>)
-> ErrorResult {
- // FIXME (#1825) implement.
+ match self.type_id {
+ CommentNodeTypeId |
+ TextNodeTypeId |
+ ProcessingInstructionNodeTypeId => {
+ self.SetTextContent(abstract_self, val);
+ }
+ _ => {}
+ }
Ok(())
}