bigskysoftware / bigskysoftware/idiomorph

Can we remove support for some types of `newContent`?

Open
#103 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.1k
Forks
57
Avg merge
9h 58m
Merged PRs (30d)
4

Description

Right now, the `newContent` argument passed to the main morph function can be a dizzying array of types:
* Element
* Node
* HTMLCollection
* Array\
* 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.