Fixes #8213: Implement Blob variant of WebSocket.send()

This commit is contained in:
Nikki 2015-10-26 21:22:27 -06:00
parent 6c051ce828
commit 1d280289f1
7 changed files with 86 additions and 52 deletions

View file

@ -72,6 +72,11 @@ impl Blob {
pub fn read_out_buffer(&self, send: Sender<Vec<u8>>) {
send.send(self.bytes.clone().unwrap_or(vec![])).unwrap();
}
// simpler to use version of read_out_buffer
pub fn clone_bytes(&self) -> Vec<u8> {
self.bytes.clone().unwrap_or(vec![])
}
}
impl BlobMethods for Blob {