Implement document.open and document.close (fixes #14591)

This commit is contained in:
Anthony Ramine 2017-01-26 12:42:38 +01:00
parent 8c3abd6c79
commit ac254046e4
52 changed files with 351 additions and 296 deletions

View file

@ -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()