mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 22:11:23 +00:00
Implement PartialEq
for JsValue
(#217)
Dispatch to JS's `===` operator internally
This commit is contained in:
@ -300,6 +300,15 @@ impl<'a> Context<'a> {
|
||||
"))
|
||||
})?;
|
||||
|
||||
self.bind("__wbindgen_jsval_eq", &|me| {
|
||||
me.expose_get_object();
|
||||
Ok(String::from("
|
||||
function(a, b) {
|
||||
return getObject(a) === getObject(b) ? 1 : 0;
|
||||
}
|
||||
"))
|
||||
})?;
|
||||
|
||||
self.unexport_unused_internal_exports();
|
||||
self.gc()?;
|
||||
|
||||
|
Reference in New Issue
Block a user