Skip to content

Commit e2dac7f

Browse files
committed
fix ups
1 parent d36e6af commit e2dac7f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

blog/2024-12-05-boa-release-020/index.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Boa v0.20 is now available! After 5 months of development we are very happy to p
1212
release of the Boa JavaScript engine. Boa makes it easy to embed a JS engine in your projects, and
1313
you can even use it from WebAssembly. See the [about](/about) page for more info.
1414

15-
In this release, our conformance has grown from 87.3% to 87.5% in the official ECMAScript Test Suite
15+
In this release, our conformance has grown from 87.3% to 89.92% in the official ECMAScript Test Suite
1616
(Test262). This small jump is expected as we're shifting most of our focus to performance as the majority of the engine is now conformant. We will continue to implement more of the specification as we go along but we expect these changes to be much smaller than we've been used to.
1717

1818
You can check the full list of changes [here][changelog], and the full information on conformance
@@ -52,6 +52,7 @@ Boa has added support for the [stage 3 proposal `Atomics.pause`](https://github.
5252
### Getters and Setters in the js_class! macro
5353

5454
You can now add getters and setters to the `js_class!` macro. This allows you to define getters and setters on your JavaScript classes in Rust. This is a feature that has been requested by many users of Boa, and thanks to @hansl we now have it!
55+
5556
```rust
5657
#[derive(Clone, Default, Trace, Finalize, JsData)]
5758
pub struct Game {
@@ -75,20 +76,22 @@ js_class! {
7576
}
7677
}
7778
}
79+
```
7880

7981
### Implement your own native Errors
8082

8183
Embedders can now create native errors in Rust and pass them into the JavaScript environment.
8284
The below example creates a new `JsError` from a Rust standard error [`err`](https://doc.rust-lang.org/std/error/trait.Error.html). This will create a new `JsNativeError` with the message of the standard error.
8385

84-
````rust
86+
```rust
8587
use boa_engine::JsError;
8688

8789
let error = std::io::Error::new(std::io::ErrorKind::Other, "oh no!");
8890
let js_error: JsError = JsError::from_rust(error);
8991

9092
assert_eq!(js_error.as_native().unwrap().message(), "oh no!");
9193
assert!(js_error.as_native().unwrap().cause().is_none());
94+
```
9295

9396
## Boa Runtime
9497

0 commit comments

Comments
 (0)