diff options
author | lpy <pylaurent1314@gmail.com> | 2014-03-06 13:23:31 +0800 |
---|---|---|
committer | lpy <pylaurent1314@gmail.com> | 2014-03-07 13:11:02 +0800 |
commit | 013039242044243c4a8e92fe44c8920640721184 (patch) | |
tree | 26da4d13a5c31d54269d86ba3bf3ad5125afcf3b /src/components/script/dom/node.rs | |
parent | 07b8c9bf88244b64d9b795d1c10219e465810974 (diff) | |
download | servo-013039242044243c4a8e92fe44c8920640721184.tar.gz servo-013039242044243c4a8e92fe44c8920640721184.zip |
implement the setter for Node.nodeValue.(fixes #1825)
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r-- | src/components/script/dom/node.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index 4efa6ddbf9a..200c8845812 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(()) } |