mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
parent
5be084a3b6
commit
68ddc6b4ab
69 changed files with 435 additions and 461 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! DOM bindings for `CharacterData`.
|
||||
|
||||
use dom::bindings::utils::{DOMString, str, ErrorResult};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::bindings::utils::{BindingObject, CacheableWrapper, WrapperCache};
|
||||
use dom::node::{Node, NodeTypeId, ScriptView};
|
||||
use js::jsapi::{JSObject, JSContext};
|
||||
|
@ -23,11 +23,11 @@ impl CharacterData {
|
|||
}
|
||||
|
||||
pub fn Data(&self) -> DOMString {
|
||||
str(self.data.clone())
|
||||
Some(self.data.clone())
|
||||
}
|
||||
|
||||
pub fn SetData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) {
|
||||
self.data = arg.unwrap();
|
||||
self.data = arg.get_ref().clone();
|
||||
}
|
||||
|
||||
pub fn Length(&self) -> u32 {
|
||||
|
@ -35,11 +35,11 @@ impl CharacterData {
|
|||
}
|
||||
|
||||
pub fn SubstringData(&self, offset: u32, count: u32, _rv: &mut ErrorResult) -> DOMString {
|
||||
str(self.data.slice(offset as uint, count as uint).to_str())
|
||||
Some(self.data.slice(offset as uint, count as uint).to_str())
|
||||
}
|
||||
|
||||
pub fn AppendData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) {
|
||||
self.data.push_str(arg.unwrap());
|
||||
self.data.push_str(arg.get_ref().clone());
|
||||
}
|
||||
|
||||
pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString, _rv: &mut ErrorResult) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue