Skip to content

Commit

Permalink
Allow to patch custom elements
Browse files Browse the repository at this point in the history
Solves #364
  • Loading branch information
akhilman authored and MartinKavik committed May 4, 2020
1 parent b7a32a2 commit 39a6480
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/virtual_dom/patch/patch_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,7 @@ where

/// Checks whether the old element can be updated with a new one.
pub(crate) fn el_can_be_patched<Ms>(el_old: &El<Ms>, el_new: &El<Ms>) -> bool {
// Custom elements can't be patched, because we need to reinit them (Issue #325).
// @TODO remove this check when #364 will be done.
el_old.namespace == el_new.namespace
&& el_old.tag == el_new.tag
&& el_old.key == el_new.key
&& !el_new.is_custom()
el_old.namespace == el_new.namespace && el_old.tag == el_new.tag && el_old.key == el_new.key
}

/// Takes children from source iterators (new and old) and puts them in the
Expand Down

0 comments on commit 39a6480

Please # to comment.