get_required_buffer_source

Function get_required_buffer_source 

Source
fn get_required_buffer_source(
    cx: &mut JSContext,
    object: HandleObject<'_>,
    parameter: &CStr,
) -> Fallible<Vec<u8>>
Expand description

Helper to retrieve a required paramter in BufferSource from WebIDL dictionary, and get a copy of the bytes held by the buffer source according to https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy