Auto merge of #15303 - nox:open-your-heart-to-eternal-dimension, r=jdm

Implement document.open and document.close

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15303)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-03 10:53:46 -08:00 committed by GitHub
commit fa60ce62b8
50 changed files with 412 additions and 232 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()