(&self, ctx: Ctx<'js>)
| 115 | String::from_utf8_lossy(self.as_bytes()).to_string() |
| 116 | } |
| 117 | |
| 118 | #[qjs(rename = "arrayBuffer")] |
| 119 | pub async fn array_buffer(&self, ctx: Ctx<'js>) -> Result<ArrayBuffer<'js>> { |
| 120 | //should be mutable according to spec, thus copy is required |
| 121 | ArrayBuffer::new_copy(ctx, self.as_bytes()) |
| 122 | } |
| 123 | |
| 124 | pub async fn bytes(&self, ctx: Ctx<'js>) -> Result<Value<'js>> { |
no test coverage detected