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

How preserve attributes values? #58

Open
dannluciano opened this issue Jul 11, 2024 · 1 comment
Open

How preserve attributes values? #58

dannluciano opened this issue Jul 11, 2024 · 1 comment

Comments

@dannluciano
Copy link

How preserve attribute values missed from new content?
For example:

let details1 = make('<details open><summary>Details1</summary>Something</details>')
let details2 = make('<details><summary>Details2</summary>Something</details>')

Idiomorph.morph(details1, details2);

should.equal(null, details2.getAttribute("open"));
details1.getAttribute("open").should.equal("");

I want that details1 have openattribute and the content of details2

@genezys
Copy link

genezys commented Jul 19, 2024

Did you try with options { morphStyle: 'innerHTML' }?

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