Skip to content

Commit

Permalink
Add Dataview as a valid attribute type for WebIDL Codegen
Browse files Browse the repository at this point in the history
Some WebIDL specs (WebBluetooth, WebUSB, etc) use DataView as an
attribute type. These attributes should map to a js_sys::DataView type.

Fixes #2312
  • Loading branch information
qdot committed Sep 20, 2020
1 parent d639960 commit 68519c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/webidl/src/idl_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ impl<'a> IdlType<'a> {
IdlType::Error => Err(TypeError::CannotConvert),

IdlType::ArrayBuffer => Ok(js_sys("ArrayBuffer")),
IdlType::DataView => Err(TypeError::CannotConvert),
IdlType::DataView => Ok(js_sys("DataView")),
IdlType::Int8Array { immutable } => Ok(Some(array("i8", pos, *immutable))),
IdlType::Uint8Array { immutable } => Ok(Some(array("u8", pos, *immutable))),
IdlType::Uint8ClampedArray { immutable } => {
Expand Down

0 comments on commit 68519c0

Please sign in to comment.