Skip to content

Consider leveraging “Symbol.toStringTag” to print constructor name of element when cast as string. #317

@theengineear

Description

@theengineear

Minor, potential ergonomic improvement. Similar to how logging String(document.createElement('input')) will output [object HTMLInputElement], we could make custom classes log out their names as well.

The default is just [object HTMLElement], so really anything would be an improvement here.

Proposal

Make it log out [object <host.constructor.name>]. E.g., [object ChessPieceElement].

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