mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-12 15:16:06 +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
|
// Uint8ClampedArray
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#[wasm_bindgen(extends = Object)]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub type Uint8ClampedArray;
|
pub type Uint8ClampedArray;
|
||||||
|
|
||||||
|
@ -6,13 +6,14 @@ use js_sys::*;
|
|||||||
macro_rules! each {
|
macro_rules! each {
|
||||||
($m:ident) => (
|
($m:ident) => (
|
||||||
$m!(Uint8Array);
|
$m!(Uint8Array);
|
||||||
|
$m!(Uint8ClampedArray);
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! test_inheritence {
|
macro_rules! test_inheritence {
|
||||||
($arr:ident) => ({
|
($arr:ident) => ({
|
||||||
let arr = $arr::new(&JsValue::undefined());
|
let arr = $arr::new(&JsValue::undefined());
|
||||||
assert!(arr.is_instance_of::<Uint8Array>());
|
assert!(arr.is_instance_of::<$arr>());
|
||||||
assert!(arr.is_instance_of::<Object>());
|
assert!(arr.is_instance_of::<Object>());
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user