Closed
Description
I think dyn_ref
should be specialised where possible to support objects from other realms (for which regular instanceof
check would fail).
For example, it's more reliable to use Array::is_array
instead of current instanceof Array
for .dyn_ref::<js_sys::Array>()
, JsValue::is_object
for .dyn_ref::<Object>()
and probably also existing methods for primitives for conversions to js_sys::Number
, js_sys::JsString
and so on.