mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-17 02:30:50 +00:00
js-sys: Add extends attributes for js_sys::UInt8ClampedArray
This commit is contained in:
parent
ea0ac134db
commit
2979618842
@ -2592,6 +2592,7 @@ extern "C" {
|
||||
// Uint8ClampedArray
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
#[wasm_bindgen(extends = Object)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub type Uint8ClampedArray;
|
||||
|
||||
|
@ -6,13 +6,14 @@ use js_sys::*;
|
||||
macro_rules! each {
|
||||
($m:ident) => (
|
||||
$m!(Uint8Array);
|
||||
$m!(Uint8ClampedArray);
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! test_inheritence {
|
||||
($arr:ident) => ({
|
||||
let arr = $arr::new(&JsValue::undefined());
|
||||
assert!(arr.is_instance_of::<Uint8Array>());
|
||||
assert!(arr.is_instance_of::<$arr>());
|
||||
assert!(arr.is_instance_of::<Object>());
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user