Skip to content

tBaseElement: Identity function for Privates #126

@danyill

Description

@danyill

Currently our identity function doesn't process Private elements at all:

export function identity(e: Element | null): string | number {
  if (e === null) return NaN;
  if (e.closest("Private")) return NaN;
  const tag = e.tagName;

  if (isSCLTag(tag)) return tags[tag].identity(e);

  return NaN;
}

However we should use the mandatory type atttribute and index by this. This would be helpful with our diffing work for Private elements.

As discussed with @ca-d

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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