Skip to content

wasm-bindgen-webidl binding generator ignores namespace attributes #4865

@feathecutie

Description

@feathecutie

WebIDL namespaces can have members which are divided into "operations", "consts" and "attributes" as defined in the spec.

While all of these members are parsed correctly by weedle, attributes get explicitly ignored by wasm-bindgen-webidl (using a match-all underscore and simply returning Ok):

match self {
weedle::namespace::NamespaceMember::Const(const_) => {
record
.namespaces
.get_mut(ctx.0)
.unwrap()
.consts
.push(ConstNamespaceData {
definition: const_,
stability: ctx.1,
});
Ok(())
}
weedle::namespace::NamespaceMember::Operation(op) => op.first_pass(record, ctx),
_ => Ok(()),
}

This currently blocks inclusion of the new APIs like the CSS Custom Highlight API which introduces the highlights attribute into the CSS namespace, as encountered in PR #4792.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions