mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Implement document.open and document.close (fixes #14591)
This commit is contained in:
parent
8c3abd6c79
commit
ac254046e4
52 changed files with 351 additions and 296 deletions
|
@ -170,11 +170,16 @@ impl DOMString {
|
|||
self.0.push_str(string)
|
||||
}
|
||||
|
||||
/// Truncates this `DOMString`, removing all contents.
|
||||
/// Clears this `DOMString`, removing all contents.
|
||||
pub fn clear(&mut self) {
|
||||
self.0.clear()
|
||||
}
|
||||
|
||||
/// Shortens this String to the specified length.
|
||||
pub fn truncate(&mut self, new_len: usize) {
|
||||
self.0.truncate(new_len);
|
||||
}
|
||||
|
||||
/// An iterator over the bytes of this `DOMString`.
|
||||
pub fn bytes(&self) -> Bytes {
|
||||
self.0.bytes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue