Skip to content

Element should override Node methods, such as removeAttr #1193

Closed
@tobia

Description

@tobia

Methods that are inherited from Node and not overridden, return a Node instance, even when they are called on an Element instance. This prevents chaining:

Element foo = ...
foo.addClass("isfoo").removeAttr("bar"); // OK
foo.removeAttr("bar").addClass("isfoo"); // ERROR Node#addClass not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementAn improvement / new feature idea

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions