Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
buntec committed Feb 7, 2024
1 parent 881c82b commit 145a479
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions snabbdom/src/main/scala/snabbdom/modules/Props.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ object Props {
}
}

// TODO: remove altogether?
// This is mostly futile b/c it only removes
// Own properties while properties of
// DOM elements are typically inherited.
// E.g., a prop like `id` cannot be deleted
// (removing the corresponding (reflected) attribute
// sets this property to the empty string).
oldProps.foreach { case (key, _) =>
if (!props.contains(key)) {
elm.asInstanceOf[js.Dictionary[Any]] -= key
Expand Down

0 comments on commit 145a479

Please sign in to comment.