Skip to content

Allow manipulating attributes while iterating over them  #158

@Fxxxlei

Description

@Fxxxlei

I would like to have a function similar to Vec::retain_mut to remove or modify the attributes of an element while iterating over them.

This is currently doable, but involves iterating over the attributes, collecting and cloning their names, potentially cloning the new value, and searching the attribute in the attribute list every time we want to remove or modify an attribute.

The proposed function would make this much more efficient and simpler to implement.
I guess this function would have to be available on StartTag and on Element. I am not quite sure about the naming, but I'd be willing to contribute this.

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