-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a ContextData struct to inject host defined types from the context (
#3802) * Add more utility traits and funtions to boa_interop * cargo clippy * Readd the safe version for Fn which also implements Copy * Use a new trait for converting a Rust type to a JsResult<JsValue> * cargo clippy * Add a test for returning result and Fn() * Seal both IntoJsFunction and IntoJsFunctionUnsafe * Try Borrowing and return a nice error instead of panicking * Address comments * Rename into_js_function to into_js_function_copied * Move TryIntoJsResult to boa_engine * Move JsRest to be at the end only of arguments and add JsAll * use from_copy_closure and remove unsafe * Add a HostDefined struct to grab host defined in the argument list * cargo fmt and clippy * Explain why we need Clone * Remove the vector from JsRest<> and use a reference * Add HostDefined to context as Data, and rename the injector in boa_interop * Use TypeError instead if the type was not found in context * Update core/interop/src/lib.rs Co-authored-by: José Julián Espina <[email protected]> * cargo fmt * cargo fmt --------- Co-authored-by: José Julián Espina <[email protected]>
- Loading branch information
Showing
3 changed files
with
139 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.