mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix CharacterData annotations
This commit is contained in:
parent
6eb6e386c1
commit
14cd682210
2 changed files with 5 additions and 8 deletions
|
@ -78,9 +78,8 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
||||||
fn SetData(self, arg: DOMString) -> ErrorResult {
|
fn SetData(self, data: DOMString) {
|
||||||
*self.data.borrow_mut() = arg;
|
*self.data.borrow_mut() = data;
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-characterdata-length
|
// https://dom.spec.whatwg.org/#dom-characterdata-length
|
||||||
|
@ -98,9 +97,8 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-characterdata-appenddata
|
// https://dom.spec.whatwg.org/#dom-characterdata-appenddata
|
||||||
fn AppendData(self, arg: DOMString) -> ErrorResult {
|
fn AppendData(self, data: DOMString) {
|
||||||
self.data.borrow_mut().push_str(arg.as_slice());
|
self.data.borrow_mut().push_str(&data);
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-characterdata-insertdata
|
// https://dom.spec.whatwg.org/#dom-characterdata-insertdata
|
||||||
|
|
|
@ -11,11 +11,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
interface CharacterData : Node {
|
interface CharacterData : Node {
|
||||||
[TreatNullAs=EmptyString,SetterThrows] attribute DOMString data;
|
[TreatNullAs=EmptyString] attribute DOMString data;
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
[Throws]
|
[Throws]
|
||||||
DOMString substringData(unsigned long offset, unsigned long count);
|
DOMString substringData(unsigned long offset, unsigned long count);
|
||||||
[Throws]
|
|
||||||
void appendData(DOMString data);
|
void appendData(DOMString data);
|
||||||
[Throws]
|
[Throws]
|
||||||
void insertData(unsigned long offset, DOMString data);
|
void insertData(unsigned long offset, DOMString data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue