Skip to content

Can we remove support for some types of newContent? #103

Description

@botandrose

Right now, the newContent argument passed to the main morph function can be a dizzying array of types:

  • Element
  • Node
  • HTMLCollection
  • Array<Node>
  • string
  • null

Also, for the first 4 types, newContent may or may not be already attached to the DOM, which opens the possibility of additional complications. It could conceivably have hidden state, or have siblings that we don't want to morph, etc.

Can we pare this possibility space down at all, and safely support less use-cases?

@MichaelWest22 has already done some exploration about this in branches:
https://github.com/MichaelWest22/idiomorph/tree/fix-outer-normalize
https://github.com/MichaelWest22/idiomorph/tree/fix-outer-normalize2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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