Skip to content

web-sys types should probably impl Deref to types they're inheriting #842

@upsuper

Description

@upsuper

Currently, for example if you have an Element, but you want to use first_child from Node, you have to either e.into::<Node>().first_child() or (e.as_ref() as &Node).first_child(). If would be great if one can just use e.first_child() without explicit type conversion.

Types defined in WebIDL can only have single inheritance, so I think this is doable via Deref chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions