Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element tagName is not patching by id #72

Closed
reenko opened this issue Jul 5, 2016 · 2 comments
Closed

Element tagName is not patching by id #72

reenko opened this issue Jul 5, 2016 · 2 comments

Comments

@reenko
Copy link

reenko commented Jul 5, 2016

I create test:

it('patch tags by id', function() {
    var el1 = document.createElement('div');
    el1.innerHTML = '<span id="boo" class="foo"></span>';

    var el2 = document.createElement('div');
    el2.innerHTML = '<div id="boo"></div>';

    var morphedEl = morphdom(el1, el2);

    expect(el1.innerHTML).to.equal('<div id="boo"></div>');
});

Failed:

   AssertionError: expected '<span id="boo"></span>' to equal '<div id="boo"></div>'
      + expected - actual

      -<span id="boo"></span>
      +<div id="boo"></div>
@patrick-steele-idem
Copy link
Owner

Interesting. I'll take a look. Thanks for providing the test case.

@patrick-steele-idem
Copy link
Owner

New version published with fix: morphdom@1.4.41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants