mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
commit
fa60ce62b8
50 changed files with 412 additions and 232 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